#dev-general

1 messages · Page 507 of 1

quiet depot
#

lemmo do you actually run everything in docker?

#

like what don't you run in docker

slow schooner
#

hello. does this place have any developers?

frigid badge
#

anything non development isn't ran in docker lol

quiet depot
slow schooner
#

i don't need development support. im just looking to hire one

quiet depot
old wyvern
slow schooner
#

see whats changed

old wyvern
#

Did discord change nonpfp users to be only purple now?

distant sun
#

$ docker -doc lemmo.doc

onyx loom
#

its blue for me?

#

idk what u mean yugi

cinder flare
#

i mean, it's blurple I think he means

quiet depot
#

you ever think about different perceptions of colour

old wyvern
#

docker rm -f lemmo

#

Yea that vsauce video

quiet depot
#

kinda wack that my blue, could be completely different to your blue

#

vsauce video?

old wyvern
#

How can I know your yellow is my yellow

onyx loom
#

it could be

old wyvern
quiet depot
#

link

onyx loom
#

but considering this is a light blue, i doubt it could it be considered purple

quiet depot
#

CUBE IT'S RELEVANT

#

to development

#

I promise

pallid gale
#

Greetings travelers.

onyx loom
#

🙂

frigid badge
quiet depot
#

don't think I've seen this one

old wyvern
old wyvern
quiet depot
#

idk where I heard about the perception thing

#

might've read it somewhere, or it might've just been a shower thought

#

but it's been in my head

old wyvern
#

lol

onyx loom
#

shower thoughts do be the deepest of them all

frigid badge
#

lol

half harness
#

lol

forest pecan
#

lol

cinder flare
#

lol

prisma wave
#

lol

jovial warren
#

lol

old wyvern
#

lol

half harness
#

what is the difference between ```kt
import kotlinx.coroutines.*

fun main(): Unit = runBlocking { // this: CoroutineScope
val job = launch {
repeat(1000) { i ->
println("job: I'm sleeping $i ...")
delay(500L)
}
}
delay(1300L) // delay a bit
println("main: I'm tired of waiting!")
job.cancel() // cancels the job
job.join() // waits for job's completion
println("main: Now I can quit.")
}
and kt
import kotlinx.coroutines.*

fun main(): Unit = runBlocking { // this: CoroutineScope
val job = launch {
repeat(1000) { i ->
println("job: I'm sleeping $i ...")
delay(500L)
}
}
delay(1300L) // delay a bit
println("main: I'm tired of waiting!")
job.cancel() // cancels the job
println("main: Now I can quit.")
}

#

since it produces the same output

obtuse gale
#

repeat(1000)
delay(500L)
damn okay

old wyvern
# half harness what is the difference between ```kt import kotlinx.coroutines.* fun main(): Un...

cancel only stops the next continuation from executing, it cant really stop the current task itself, you're creating a new continuation on every delay. so with your delays you are cancelling approximately right after you print and schedule the delay on 3rd repeat, so there isnt anything to join rn, and the child task was scheduled, cancel kills this child task, and since there wasnt anything else to run. it just stops there, join makes sure that execution before the cancelled tasks have finished

half harness
#

wdym continuations?

prisma wave
#

Spicy callback

old wyvern
#

^

half harness
#

so it cancels the delay callback/continuation?

old wyvern
#

It cancells any children from the job you cancelled on

half harness
#

what are the children?

old wyvern
#

On every suspend function call, you're creating a child

#

for eg: on delay here

half harness
#

oh

#

but why doesn't join continue the loop?

old wyvern
#

The compilers converts all suspensions to continuations

old wyvern
half harness
#

can u give an example of when join would be used?

#

i dont get how it works

old wyvern
#

Join is used to wait if anything that isnt cancellable (currently executing) is running

#

So you know for sure that job is complete/cancelled completely

half harness
#

uh

#

wait

#

but why wouldn't it cancel instantly?

obtuse gale
#

cancelling != interrupting/killing/terminating

half harness
#

ohhhhhhhh

obtuse gale
#

that's what I'd think, imagine it like cancelling a BukkitTask, if the task is currently running, it will keep on running until it returns

#

then the scheduler goes "bruh no this is cancelled, gtfo" the next time it tries to run it

half harness
obtuse gale
#

that's what I'd think
bear in mind i have 0 experience with kotlin coroutines lmao

half harness
#

lol

jovial warren
#

right, I think I've finally decided on a DI framework

#

and it's not Koin or Guice

quiet depot
#

guice best

jovial warren
#

nah this is actually on top

half harness
#

constructor DI 😌

jovial warren
#

it's like Guice but supports Kotlin much better

#

it supports field injection as well (though it does say that constructor injection is preferred and this shouldn't be used) in the same way Koin does

#

it's like the ultimate DI framework

#

have a read of the wiki, lmk what you guys think of it

half harness
#

the only thing i know about DI is still passing values through constructors ;-;

prisma wave
#

functional DI 😌

half harness
#

haskell 🤢

jovial warren
#

@quiet depot maybe you should have a read, you probably know enough about this stuff to determine whether you think it's actually good or not

prisma wave
half harness
#

☹️

quiet depot
#

looks very enterprisey

#

I find a library can really go 2 ways in java

#

it'll either have your regular, run of the mill names (guice)

#

or super enterprisey fuck off names (spring)

jovial warren
#

lol

#

this actually seems very simplistic

quiet depot
#

and honestly, I don't know what half the shit in enterprise means

#

yeah idk if it's good or not

#

I'm not reading an entire wiki to determine whether it's good or not either

jovial warren
#

lol

#

fair

gusty glen
#

except that after certain coroutines functions, like delay, there's already a check being done for you

half harness
cinder flare
#

dude whose idea was it to make google apps script

#

my stupid connector literally works perfectly but it says it doesn't on the data studio page but there's no error in the execution log

#

like wow very helpful

ocean quartz
#

New startup banner ;o

obtuse gale
#

Oo

cinder flare
#

where you get that

obtuse gale
#

They literally took the current one and Neon Overdrive'd it

#

Tron'd

cinder flare
#

i absolutely love it

ocean quartz
#

New image too I think

cinder flare
#

WOAH

obtuse gale
#

Damn

cinder flare
#

dude how??

#

what does EAP mean?

obtuse gale
#

That's SICK

cinder flare
#

early access program or somethin?

obtuse gale
#

Absolutely SICK

ocean quartz
quiet depot
#

the icon doesn't look good

cinder flare
#

the icon looks awesome!

quiet depot
#

ij square on top just looks weird

#

has potential

#

just needs more funnycube

obtuse gale
#

Lol

jovial warren
#
class ServiceModule<T>(provider: KryptonServiceProvider<T>) : Module() {

    init {
        bind(provider.serviceClass).toInstance(provider.service)
    }
}
```got a feeling this is actually gonna be god tier
#

being able to put these in the root scope and then allowing plugins to inject them

#

and I can even create plugin-specific bindings (e.g. PluginContext, Logger, etc.) because they can be scoped to that plugin only

ocean quartz
jovial warren
#

oof

cinder flare
#

yeah I would update but all the plugins no worky

half harness
#

lol

jovial warren
#

lol

cinder flare
#

so I guess ill just be patient until i get a beautiful opening screen and icon

ocean quartz
#

Only 3 so far, material icons, minecraft dev, and gittoolbox

half harness
#

i disabled mc dev and gittoolbox 🤡

quiet depot
#

the hek is gittoolboz

jovial warren
#
@InjectConstructor
class MyPlugin(private val server: Server) : Plugin() {

    override fun initialize() {
        // do things        
    }
}
```this actually looks kinda cool ngl
half harness
#

got annoyed by all the "edited by dkim19375 at blah" everywhere

jovial warren
#

what do you guys think of that style of plugin from now on?

half harness
#

ohh no dont make plugin makers do some weird guice things

#

im gonna struggle

#

😩 😭

jovial warren
#

lol

#

it's not that hard

quiet depot
#

dkim I’ve been using guice for longer than I haven’t

#

I definitely started using guice when I was at ur level of experience

#

so u can use it too

#

it’s not that hard

jovial warren
#

yeah it's not that hard

half harness
#

;-;

jovial warren
#

Toothpick is slightly more complicated but still pretty simple

ocean quartz
jovial warren
#

it's just understanding the encapsulation that may be a little difficult

half harness
#

i don't even know what it does yes i know its some DI library but i thought di is just putting values in constructors

jovial warren
#

just out of interest btw pig, does Guice support scoping like this?

quiet depot
#

idk what that means bardy

#

give me an example

jovial warren
#

right, so imagine Toothpick like a tree, where the root scope is at the top, and it contains a few sub scopes inside of it

#

each sub scope is local to a plugin

#

and the root scope is accessible to all sub scopes

quiet depot
#

yes

jovial warren
#

but the sub scopes aren't accessible to the root scope

ocean quartz
#

Toothpicks do come from trees

quiet depot
#

guice has this

jovial warren
#

I think the only difference between Toothpick and Guice really then is that Toothpick has better Kotlin support

#

apart from that, they basically do the same thing

half harness
quiet depot
#

dkim read the guide I linked

#

its what got me started on a journey of guice greatness

jovial warren
#

dkim it's literally just a tree

forest pecan
#

Uh @ocean quartz

#

is that intentional?

#

that the jetbrains annotations are set to compile only

jovial warren
#

Spigot contains annotations, no point in shading it

forest pecan
#

because I thought spigot already included them

#

Yeah

jovial warren
#

and the fact that it's 17.0 makes me think it is, since that's the ancient version they use

forest pecan
#

lol

ocean quartz
#

You're in the wrong branch

jovial warren
#

also tf why do you depend on authlib in a GUI framework

half harness
jovial warren
#

pretty much

jovial warren
#

well, that's the easiest way to describe it

forest pecan
#

Oh

jovial warren
#

it's dependency injection but not done by you dkim

forest pecan
#

but i was wondering why the annotations are being shaded in tho

#

hm

half harness
#
@Inject
private Bedwars plugin;
```vs ```java
private Bedwars plugin = Bedwars.getInstance();
```woohoo, we did the same as guice without an entire library
jovial warren
#

no

forest pecan
#

no

obtuse gale
#

no

ocean quartz
forest pecan
#

Oh

quiet depot
#

u can use it for anything dkim

#

not just ur main class

forest pecan
#

what version should i use matt?

#

It says the latest is 2.0.2 on the docs

quiet depot
#

bardy when u first started using di libraries

#

did u struggle to understand that for injections to be honoured, the class using injections had to be instantiated by the di library?

jovial warren
#

this is the first time I've kinda known what I'm doing when I'm using a DI library

#

and this is the second time I've ever used a DI library

ocean quartz
quiet depot
#

because most people I introduce to di libraries struggle immensely with that concept

jovial warren
#

nah ik how it works

half harness
#

i guess im not one of the lucky ones 😔

jovial warren
#

ik that I can give it an instance of something and then ask for that instance and it will annotation scan and inject that instance for me

quiet depot
#

people I’ve introduced in the past go inject blah in A

#

then go new A()

jovial warren
#

lol

quiet depot
#

and go all why my blah no work

jovial warren
#

lol

half harness
#

i cba setting up the entire library to avoid using up 3 lines of extra code to make a constructor

forest pecan
#

ive been looking at examples of guice and i still dont understand how it works

#

lmao

quiet depot
#

dkim u still use constructors in guice

#

field injection is actually bad practice

ocean quartz
#

Ktor, a web application framework for creating connected systems, now comes bundled in IntelliJ IDEA Ultimate.
😮

quiet depot
#

the difference is you just don’t call constructors manually

#

you don’t have to keep track of dependencies

#

guice does it for you

jovial warren
#

yeah that's the part that takes some getting used to for me

#

not calling the constructors myself

half harness
#

then that makes it confusing

#

😩

quiet depot
#

it’s not

obtuse gale
#

until you learn it...

quiet depot
#

it makes it less confusing

#

less things for you to keep track of

obtuse gale
#

literally everything you've ever done is confusing until you learn it

#

stop acting like a child

quiet depot
#

it really helps keep things clean and separate

ocean quartz
#

Dkim, remember you saying Kotlin was confusing, then you learned it and it wasn't anymore, it applies to basically everything

obtuse gale
jovial warren
#

I wonder if I should make you able to inject the set of online players 🤔

half harness
#

but in the examples in the spigot page, it uses ```java
@Inject private SimpleCommand command;

steel heart
#

Any1 used dagger?

obtuse gale
quiet depot
#

dkim you can’t inject local variables

ocean quartz
forest pecan
#

wait @ocean quartz it didnt seem to work. it says it cant find the dependency

quiet depot
#

but I’ve never encountered a case where you need to

jovial warren
#

only issue with that is that I have set a strict requirement for injection: nothing too generic that could have loads of instances

quiet depot
#

it doesn’t make sense to

forest pecan
#

implementation("dev.triumphteam:triumph-gui:3.0.0-SNAPSHOT")
maven("https://repo.mattstudios.me/artifactory/")

#

and i put repo above dependencies

quiet depot
#

artifactory oof

half harness
prisma wave
#

what

quiet depot
#

show me an example

quiet depot
#

generally you don’t want business logic in the constructor

jovial warren
forest pecan
#

triumpgui is the improved mfgui

#

Lol

quiet depot
#

guice will make you write code in a different way

#

where stupid shit like that shouldn’t happen

ocean quartz
quiet depot
#

this also means that it can be very difficult to migrate existing projects to guice because the way you write normal code & guice code is radically different

jovial warren
#

also, the issue with Krypton especially is that we need to instantiate constructors a lot of the time anyway because of the API

#

so the backend can't really change all that much lol

#

but it will be very useful on the API's end

quiet depot
quiet depot
#

it uses like 32MB

forest pecan
#

Matt it's empty

#

the thing

shadow summit
#

im trying to find a plugin that hooks to mcmmo that unlocks a command and let accesible to someone when he reaches mcmmo level 500 for example
is it a thing?
if someone knows smthing that could do that dm me or smthing

quiet depot
#

bardy check papi 3 if u need any inspiration

ocean quartz
#

Artifactory requires just around 2GB
Also the website looks mmuch better

quiet depot
#

sir this is dev general

ocean quartz
cinder flare
#

i hate typescript

forest pecan
#

ok

cinder flare
#

working with an api that is not documented to me in my IDE is the worst thing I can imagine

quiet depot
#

probably better than python

cinder flare
#

at least python has documentation

ocean quartz
#

@forest pecan Idk if it was something to do with it being snapshot, but i released a temporary version 3.0.0.0 (i know dumb) for you, once i fully release it I'll delete this version

forest pecan
#

Ok

#

aww

#

🥰

#

so it would be

#

implementation("dev.triumphteam:triumph-gui:3.0.0.0")

ocean quartz
#

Yeah

forest pecan
#

then same repo

#

hm

   > Could not find dev.triumphteam:triumph-gui:3.0.0.0.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/dev/triumphteam/triumph-gui/3.0.0.0/triumph-gui-3.0.0.0.pom
       - https://hub.spigotmc.org/nexus/content/repositories/snapshots/dev/triumphteam/triumph-gui/3.0.0.0/triumph-gui-3.0.0.0.pom
       - https://libraries.minecraft.net/dev/triumphteam/triumph-gui/3.0.0.0/triumph-gui-3.0.0.0.pom
       - https://jitpack.io/dev/triumphteam/triumph-gui/3.0.0.0/triumph-gui-3.0.0.0.pom
       - https://repo.codemc.org/repository/maven-public/dev/triumphteam/triumph-gui/3.0.0.0/triumph-gui-3.0.0.0.pom
       - https://oss.sonatype.org/content/repositories/snapshots/dev/triumphteam/triumph-gui/3.0.0.0/triumph-gui-3.0.0.0.pom
       - https://repo.mattstudios.me/artifactory/dev/triumphteam/triumph-gui/3.0.0.0/triumph-gui-3.0.0.0.pom
#

thats weird

ocean quartz
#

Let me delete from cache and try as well

forest pecan
#

Ok

ocean quartz
#

Yeah it worked for me

#

Try doing this

forest pecan
#

Ok

#

hm it didnt work still

#

what does it show for you?

ocean quartz
#

Ooooo, i see the issue

gusty glen
ocean quartz
#

It's missing public/ after the artifactory/ in the repository url lmao

forest pecan
#

Oh

ocean quartz
#

I forgot to add it in the main message xD

forest pecan
#

lol

#

https://repo.mattstudios.me/artifactory/public/

#

like this?

obtuse gale
#

stoopid

ocean quartz
#

Yeah

cinder flare
#

anyone here good with typescript

#

i have figured out a problem with my code

ocean quartz
#

I have suffered with it

cinder flare
#

and i need some assistance

#

can you vc?

ocean quartz
#

Shoot me with the code, then with a gun

#

Uh just a sec

obtuse gale
#

idk TS but you can shoot me anyway

cinder flare
#

get in here

forest pecan
ocean quartz
#

Nice

winter iron
#

Where the fuck do i share my plugin if SpigotMC don't accept plugins based on the Paper API

jovial warren
#

gotta wait until Hangar comes around

obtuse gale
#

curseforge

winter iron
#

i want now

#

🙂

winter iron
#

😦

#

fuck

#

im not working on this plugin anymore

#

thats so annoying

#

now @compact perch is mentioning me telling me im level 18

#

not in the mood

ocean quartz
#

So, I am working on a JDA implementation for my modularity thingy
What would be better, the JDA instance being this or a separate property?

jovial warren
#

probably separate property

prisma wave
#

Is the former even possible?

ocean quartz
#

Hacky but possible, I'd make JdaApplication extend JdaImpl

prisma wave
#

doesn't seem worth it

jovial warren
#

man, Toothpick relies on annotation processing, which is gonna introduce a small amount of boilerplate telling people to add kapt and add the toothpick-compiler as a kapt dependency

#

I might make a Gradle plugin

#

like ```kotlin
plugins {
id("org.kryptonmc.krypton") version "0.22.1"
}

krypton {
version("0.22.1")
fileName("TestPlugin-${project.version}.jar") // could configure shadow automatically? (would default to that format)
configuration {
name(project.rootProject.name) // Defaults to this
main("me.bardy.plugin.TestPlugin")
version(project.version.toString()) // Defaults to this
description("My description") // optional
authors("BomBardyGamer", "BomBardyGamer") // optional
dependencies("TestCore", "TestExtras") // optional
}
}

cinder flare
#

Matt you're a lifesaver it works!!!

jovial warren
#

then that will configure literally everything you need

ocean quartz
ocean quartz
jovial warren
#

repositories? ✅
dependencies? ✅
plugin config? ✅
shadow? ✅
kotlin compiler? ✅

#

e.g. that will do this for you: ```kotlin
plugins {
kotlin("jvm") version "1.5.10"
kotlin("kapt") version "1.5.10"
id("com.github.johnrengelman.shadow") version "7.0.0"
}

repositories {
mavenCentral()
maven("https://libraries.minecraft.net/")
maven("https://repo.bristermitten.me/repository/maven-public/")
}

dependencies {
compileOnly("org.kryptonmc:krypton-api:$apiVersion")
compileOnly(kotlin("stdlib")) // override to stop the Kotlin plugin implementing it and making us shade it
kapt("com.github.stephanenicolas.toothpick:toothpick-compiler:3.1.0")
}

tasks {
withType<KotlinCompile> {
kotlinOptions.jvmTarget = "16"
}
withType<ShadowJar> {
archiveFileName.set(fileName)
}
}

#

sounds like a good idea, right?

cinder flare
#

what if i want to do that myself

jovial warren
#

you can just override them

#

like you would normally

cinder flare
#

sounds a little spoopy

jovial warren
#

or just not use the plugin

cinder flare
#

oh I see it's a plugin

#

okay that might be cool

jovial warren
#

yeah, Gradle plugin

#

I wanna also have it auto-generate the plugin.conf with the options you give it

#

yeah dkim fuck off

cinder flare
#

maven lmao

jovial warren
#

kinda wanna make it implicitly clear that I don't give a fuck about Maven lol

cinder flare
#

implicitly or explicitly?

ocean quartz
#

Because of the jda builder it won't look as clean as i wanted 😩

jovial warren
#

extension functions?

humble silo
#

Omfg ive been working on this gradle + kotlin module thing for 2 or 3 weeks now and the answer was literally JUST to create a java sources root and put the module-info there... why...

jovial warren
#

lol

half harness
#

there's this one part of mock frameworks that i'm so confused by - for example, ```kt
when(variable.method()).thenReturn("a")

prisma wave
#

magic

half harness
#

._.

prisma wave
#

no i have no idea how it works

#

it just does

ocean quartz
#

@prisma wave btw, add to your collection

cinder flare
#

what... am i looking at?

obtuse gale
#

An image

cinder flare
#

wow thanks emilyy

obtuse gale
#

You're welcome

#

I should be given the Support role at this rate

cinder flare
#

oh yea yea

ocean quartz
cinder flare
#

oh I thought they were proud of their documentation or something lmao

prisma wave
ocean quartz
#

Noice

jovial warren
#

I might actually change the plugin system to make it use Sponge's plugin SPI

#

seems nicer, and easier to work with on the backend

cinder flare
#

bardy has recognized his inferiority compared to the Sponge devs

jovial warren
#

lol

obtuse gale
#

I mean sponge is kinda op ngl

jovial warren
#

debating whether I like the plugin SPI though

prisma wave
#

minehraft SPI is the best

half harness
#

thonking is it just me or does intellij only show the "Pull Requests" button sometimes? yesterday it was under the commit button, now it's gone

jovial warren
#

lol

half harness
jovial warren
#

what do you guys think btw? should I switch to using a Sponge/Velocity-like plugin loading mechanism or stick with the Bukkit/BungeeCord-like one?

obtuse gale
#

idk how neither of those 2 do it tho

#

I kinda like how Fabric does things ngl

jovial warren
#

BungeeCord: ```kotlin
class MyPlugin : Plugin() {

override fun onEnable() {
    // stuff
}

}

Velocity: ```kotlin
@Plugin(id = "test-plugin", name = "TestPlugin", dependencies = [Dependency("test-core")])
class MyPlugin @Inject constructor(val server: ProxyServer, val logger: Logger) {

    init {
        // can do stuff here, but Velocity prefers you use the ProxyInitializeEvent
    }
}
stuck harbor
#

more like bungeedeath

jovial warren
#

though with us, instead of @Inject constructor, it would be @InjectConstructor on the class

#

or I could define my own annotation processor to not even require that annotation at all and just use @Plugin as the marker for this class

#

anyway, opinions?

gusty glen
#

teach me how to use toothpick

cinder flare
#

step 1: open your mouth

#

step 2: insert toothpick

#

step 3: slide between teeth

#

step 4: ???

#

step 5: profit

obtuse gale
#

Y'know, it would've been better if the instructions told me not to swallow it

#

Great

half harness
#

which is best for hosting a discord bot:

  • CentOS
  • Debian
  • Fedora (i haven't heard of this before :p)
  • Scientific (i haven't heard of this before either)
  • Suse (same with this)
  • Ubuntu
    ?
#

just decided to ask some people that might have more linux knowledge than me 😛

old wyvern
half harness
half harness
cinder flare
half harness
#

hmm

cinder flare
#

CentOS is in the shitter cause Red Hat big dumb, Fedora is the user version of CentOS unfit for servers, OpenSUSE is cool but annoying, and I've never heard of Scientific

half harness
#

lol

#

alr

#

thx

cinder flare
#

debian is where it's at though

lunar cypress
#

Scientific sounds like a distro for scientific purposes

#

Not hosting

jovial warren
cinder flare
#

though people do have hot takes on linux distros

obtuse gale
jovial warren
#

Toothpick builds a scope tree

obtuse gale
#

idk man... Scientific is a bit ambiguous

#

hmm hmm

cinder flare
#

ew Scientific is based on RHEL

#

no thanks

prisma wave
#

any distro that supports XMonad is perfect 😌

cinder flare
#

ohhh Xmonad is written in haskell

#

i was wondering why you liked it, cause I am an i3-gaps man myself

half harness
#

lol

prisma wave
#

I am sure XMonad is vastly superior

#

You configure it by writing Haskell 😌 😌 😌

jovial warren
#

lol

cinder flare
#

all the images are from like 15 years ago

#

🤮

obtuse gale
#

Lol

prisma wave
#

nice bit of anti-aliasing

cinder flare
#

yeah i was gonna say, before they invented text anti aliasing

jovial warren
#

is dependency injection with a framework actually feasible with per plugin class loaders?

cinder flare
#

or color schemes

jovial warren
#

with our current setup

cinder flare
#

why is the default mod key alt

old wyvern
cinder flare
#

dude XMonad fucking sucks lmao

#

cool that it's written in Haskell though

prisma wave
#

apparently it's actually a lot better than i3, according to clever guy in Dev den

#

Like unironically

cinder flare
#

not according to their own getting started page

#

unless they've never heard of a compositor?

prisma wave
#

¯\_(ツ)_/¯

obtuse gale
#

according to clever guy in Dev den

BM asking BM:

cinder flare
#

yeah I went and looked and saw nothing but confusion about what the X windowing system even was

#

so seems like fake news to me

prisma wave
stuck harbor
#

hehe

#

sure

obtuse gale
#

Oh right

ocean quartz
#

Oh yeah there is a unicorn in the dev den

obtuse gale
#

Must've been Mister Britten

prisma wave
#

LOOK

#

NOT ME

cinder flare
#

ah Ian Poggers

#

also what does he plan on doing with his windowing manager

#

i3 had too much customization for my needs

prisma wave
#

Ask him yourself

cinder flare
#

what channel

half harness
#

btw bm

#

i updated PR

#

and now i gtg

#

bye

jovial warren
#

I use i3 with py3status, works fine for me lol

ocean quartz
#

Uhu uhu BM, you can't hide from us

prisma wave
#

AAAAAAAA

obtuse gale
#

😂 😂

prisma wave
#

FAKE

prisma wave
jovial warren
#

wait hold on a minute

#

just trying to figure out if I'm smart or not

#

if you load a class with a class loader, all the classes you loaded with that loader will belong to that loader, right?

obtuse gale
#

Indeed

jovial warren
#

I need to load the class with the app class loader though and load all the things it needs with my own PluginClassLoader

#

this is really annoying me

#

this is confusing

obtuse gale
#

Wat

jovial warren
#

I basically want to load plugins on their own class loaders, but the DI framework I use uses Class.forName to resolve a generated factory class

#

and that uses the caller class, so the injection must be called under the context of the plugin class loader

old wyvern
#

Yes

jovial warren
#

but how tf do I do that?

old wyvern
#

Im not sure I understand your question

jovial warren
#

explain what specifically you don't get

old wyvern
#

You want to have injections ran in your plugin?

jovial warren
#

I want to be able to inject stuff into the constructor of a plugin

old wyvern
#

Make a factory class

#

Have the factory pick up the dependencies

jovial warren
#

and load the factory class from the plugin class loader?

#

or what?

old wyvern
#

No

#

The factory would be in your application class loader

jovial warren
#

ah

old wyvern
#

You would take the deoendencies in it

#

And then use reflection to find the constructor and invoke it

jovial warren
#

so I should just ignore the DI framework here then?

#

since I'm not supposed to invoke an injected constructor myself

#

that's meant to be the job of the DI framework

#

also, I can't rely on the order that the injectable things are placed

old wyvern
#

What di framework are you using?

#

Guice?

jovial warren
#

Toothpick

#

it's, as the title says right there, a scope tree based DI library, and it uses AP to generate factory classes to use for instantiation rather than using reflection like Guice does

#

but it tries to resolve the factory classes with Class.forName, which when called with just a string, uses the caller class's class loader to resolve the class from, which is where the error comes from

prisma wave
#

Guice doesn't use reflection

#

It uses classgen

old wyvern
#

Why didnt you use dagger instead?

jovial warren
#

ah so Guice would likely have the same issue here then?

old wyvern
#

Dagger uses class gen

#

Guice uses reflection and class gen both

prisma wave
#

Guice is runtime classgen as much as possible afaik

jovial warren
#

ah

old wyvern
#

He wants to inject into a class from another class loader bm

#

Would that work fine?

prisma wave
#

Probably

old wyvern
#

Id assume he needs an intermediary factory class to create it

jovial warren
#

maybe Guice uses the class loader of the provided class under the hood rather than using Class.forName which uses the caller class

jovial warren
#

I might just modify Toothpick to use the class loader of the provided object rather than no class loader which defaults to the caller class loader

obtuse gale
#

for that matter you could just make it call either Class.forName(String, boolean, ClassLoader) or ClassLoader#loadClass(String) right?

jovial warren
#

yeah

obtuse gale
#

aw neat neat

jovial warren
#

this bitch doesn't even use the publish plugin though

#

this build is whack

obtuse gale
#

lmao

prisma wave
#

sounds like you should just use guice

#

for "peace of mind" 😌

jovial warren
#

this is nicer than Guice though 😔

prisma wave
#

proof?

jovial warren
#

it just looks nicer and feels nicer

#

especially in Kotlin

#

yeah fuck this, I'll just use Guice

obtuse gale
#

lmao

prisma wave
jovial warren
#
val pluginClass = loader.loadClass(description.main).asSubclass(Plugin::class.java)
Guice.createInjector(GlobalModule(server), PluginModule(context)).getInstance(pluginClass)
```that should be enough right?
prisma wave
#

probably

#

should probably use a child injector here though

#

create 1 global injector, then a child injector for each pluginmodule

ocean quartz
jovial warren
#

4 sentences?

ocean quartz
#

In 4 sentences you completely changed your mind

jovial warren
prisma wave
#

yes

jovial warren
prisma wave
#

d;guice Injector#createChildInjecotr

ruby craterBOT
#
Injector createChildInjector(Module... modules)```
Description:

Returns a new injector that inherits all state from this injector. All bindings, scopes, interceptors and type converters are inherited -- they are visible to the child injector. Elements of the child injector are not visible to its parent.

Just-in-time bindings created for child injectors will be created in an ancestor injector whenever possible. This allows for scoped instances to be shared between injectors. Use explicit bindings to prevent bindings from being shared with the parent injector.

No key may be bound by both an injector and one of its ancestors. This includes just-in-time bindings. The lone exception is the key for Injector.class, which is bound by each injector to itself.

prisma wave
#

o wow it actually has guice

#

good pig

obtuse gale
#

lol

ocean quartz
obtuse gale
#

i really can't get used to the fact it's pronounced "juice"

ocean quartz
#

same

jovial warren
#

how do you pronounce it then?

obtuse gale
#

in my mind i say "goo-is".. ish, kinda, yes but not really

ocean quartz
#

I pronounced it like "Guy-ce"

jovial warren
prisma wave
#

"juice"

jovial warren
#

you guys are weird

onyx loom
#

engine x 🌚

jovial warren
#

I've always pronounced it juice, even before I saw it said it's pronounced juice

ocean quartz
#

English is weird

jovial warren
#

this reminds me of "gif" vs "jif" lol

ocean quartz
#

Jif makes no sense

jovial warren
#

even though the creator of the format insists it's pronounced jif not gif

#

lol

#

but yeah, he's an idiot

obtuse gale
#

lmao

jovial warren
#
Context is PluginContext(server=org.kryptonmc.krypton.KryptonServer@36ab5f43, folder=/mnt/windows/Users/callu/IdeaProjects/MineKraft/server-test/plugins/TestPlugin, description=PluginDescriptionFile(name=TestPlugin, main=me.bardy.plugin.TestPlugin, version=0.0.1, description=, authors=[], dependencies=[]), logger=[TestPlugin]:DEBUG in 251a69d7)
Injected server is org.kryptonmc.krypton.KryptonServer@36ab5f43
```omg finally, proper DI
ocean quartz
#

If it's pronounced jif then I'll start saying jift as well

prisma wave
#

maybe you'll get some DI on your server

jovial warren
deft urchin
jovial warren
#

also, can someone please explain why IJ likes to complain that asFile doesn't work because java.io.File isn't on the CP

ocean quartz
deft urchin
#

female and kk

jovial warren
#
bind<PluginContext>().toInstance(context)
bind<Path>().toInstance(context.folder)
bind<PluginDescriptionFile>().toInstance(context.description)
bind<Logger>().toInstance(context.logger)
```probably not a good idea, unless using the child injector here protects me against conflicts
jovial warren
prisma wave
#

we dont discriminate

deft urchin
#

lol thx

prisma wave
jovial warren
#

^

#

anyway BM, am I protected here?

prisma wave
#

wat

jovial warren
#

look

prisma wave
#

oh

#

no

jovial warren
#

this is defined in the PluginModule

prisma wave
#

i think it will die if there are conflicts

#

cant remember the workaround

jovial warren
#

is it best for me to make them named?

prisma wave
#

but more importantly tryitandsee

jovial warren
#

annotatedWith(Names.named(pluginName)) lol

#

I think that's the workaround

#

that's what Velocity does iirc

#

actually no, that's for the global common module's plugin container instances

#

ah, Velocity uses a per plugin injector

#

so it uses Guice.createInjector per plugin

half harness
ocean quartz
#

Pretty simple, non native English speakers wouldn't pronounce it as juice while natives would

half harness
#

oh

old wyvern
#

Wait what?

obtuse gale
#

?

old wyvern
#

Isnt it supposed to actually be juice?

obtuse gale
#

yes?

lunar cypress
#

Juice has always been the most natural sounding pronunciation to me

toxic field
#

U still updating DeluxeChat?

prisma wave
#

yes

#

i am personally updating it

#

last dev build seems to have been a month or 2 ago

#

so

jovial warren
#

lol

#

I'm finally removing the need to always provide the plugin context as a parameter to pass it to the super class

#

bit hacky on the backend having to use a map and a contextOf function but works fine lol

#
class TestPlugin @Inject constructor(commandManager: CommandManager) : Plugin() {

    init {
        commandManager.register(TestCommand())
    }
}
```😌
toxic field
#

And where are u updating it

jovial warren
#

could probably have Plugin be an interface now

jovial warren
prisma wave
#

u have to link ur spigot

toxic field
#

I don't have that chat

#

Ok wait

ocean quartz
toxic field
#

how 2 do that

prisma wave
#

^^

ocean quartz
#

BM smh, that's just as bad as sending your wiki

prisma wave
#

what

toxic field
#

ok done

prisma wave
ocean quartz
prisma wave
#

smh

#

okay

#

that was possibly not good

#

but i gave a serious response afterwards

#

so

toxic field
#

Will you add a sound for /msg

#

And

#

DeathMessage support for global chat?

ocean quartz
jovial warren
#

wonder if it's worth trying to make commands properly injectable or not

#

@quiet depot maybe you could look in to this, might be useful for multiplatform support, since it supports turning 4 different formats into the same JSON structure

forest pecan
#

People that pronounce Guice as Gui - ce but with the gooeey part

#

🤡

onyx loom
#

are u implying that u pronounce GUI as gui

forest pecan
#

Yes

#

Lol

old wyvern
#

like gooey?

forest pecan
#

Mhm

old wyvern
#

😫

forest pecan
#

Yuuuuugoey

#

Lmao

old wyvern
#

😮

#

Oh btw made the release if you wanted to try it now

forest pecan
#

Oh nice

obtuse gale
old wyvern
#

appending now works on 16 if you dont want to use isolated

forest pecan
#

Yeah with agents

#

and bytebuddy

old wyvern
#

mhm

forest pecan
#

I've known that for a while, implemented it once but it was a fuckmess

#

so i just gave up

#

Lol

old wyvern
#

lol

#

I referenced some work from openjpa

#

It does something similar with agents to get the intrumentation instance

forest pecan
#

ic

jovial warren
onyx loom
#

yea bad

#

its literally G.U.I

#

no buts

jovial warren
#

yeah

#

man, the dev branch has so many breaking changes that I'm probably gonna merge in about 5 mins or so

ocean quartz
#

I can't look at that pronunciation without remembering this song lmao
https://www.youtube.com/watch?v=jeo3an2M_Lo

DREAMLAND IS HERE. IT’S YOURS NOW. I’m feeling somewhere between absolute terror & super excitement. I really hope you enjoy it. can grab a copy / listen here: https://GlassAnimals.lnk.to/DreamlandAlbumYT

Instagram: https://www.instagram.com/glassanimals
Facebook: https://www.facebook.com/glassanimals/
Twitter: https://twitter.com/GlassAnimals
...

▶ Play video
jovial warren
forest pecan
#

Lmao

ocean quartz
#

Damn, doesn't even sound like me

half harness
ocean quartz
#

You talking alone? lol
Why are you sending and deleting messages

half harness
obtuse gale
ocean quartz
#

Fair

half harness
#

☹️

ocean quartz
#

IJ without material icons is so ugly 😩

steel heart
#

I use legacy icons

ocean quartz
obtuse gale
#

yes

#

0.16.1

ocean quartz
#

Ah, damn docs

obtuse gale
#

yeah had to find that one out myself :P

ocean quartz
#

why do you use double slash?

obtuse gale
#

I like it

#

no real reason other than that

ocean quartz
#

Fair

obtuse gale
#

I'm not much of a block comment in general though

#

unless I want to comment out a specific section within a line

#

which isn't really a matter of taste either in that case

#

i use it there because I have to x)

ocean quartz
#

Oh yeah, totally
Was just curious ;p

obtuse gale
#

hahaha "prefer not to answer" is just on another level

onyx loom
#

interrupted only by myself... procrastination 😔

ocean quartz
#

I don't get why this is an issue

obtuse gale
ocean quartz
#

Lmao

gusty glen
ocean quartz
#

Codacy

#

Code reviewer

half harness
#
/**
 * Obtains the current continuation instance inside suspend functions and suspends
 * the currently running coroutine.
 *
 * In this function both [Continuation.resume] and [Continuation.resumeWithException] can be used either synchronously in
 * the same stack-frame where the suspension function is run or asynchronously later in the same thread or
 * from a different thread of execution. Subsequent invocation of any resume function will produce an [IllegalStateException].
*/
```and uh... i don't really get what this means
ocean quartz
#

Oh that's what you got it from

obtuse gale
#

lmao

half harness
obtuse gale
#

oh boy stack frames

#

dkim i hope you're ready to learn C

ocean quartz
#

From what I understand basically if two coroutines are running on the same thread it'll be sequential, which means it can block it, when you suspend the coroutine it'll no longer block that thread

half harness
obtuse gale
#

:))

ocean quartz
#

Rollercoaster of emotions there

eternal compass
#

Discord just made my ping counter say 7 (on mobile) but I've gotten no new pings... I hate seeing that icon and not being able to fix it

obtuse gale
#

Is there an easy way to convert a project to a multi module project and rename the original module?

jovial warren
#

@half harness probably a bit late to the party, but imagine coroutines as just a mess of callbacks. Every suspending function takes a continuation as an argument, which denotes where it should call back to after the execution of that function is complete.

prisma wave
#

Yeah continuations are spicy callbacks

quiet depot
#

is dkim doing guice yet

jovial warren
#

Coroutines are subroutines that can be suspended and resumed at any time, and the benefit to them is that the dispatcher can switch contexts with pretty much 0 overheas

#

Oh btw pig, Krypton uses Guice now :)

quiet depot
#

good choice

#

best choice

jovial warren
#

And also, did you see my ping?

quiet depot
#

the json libraryt hing

#

link again pls

jovial warren
#

Yeah

quiet depot
#

I had a look then forgot

jovial warren
#

I tried using it yesterday, was a bit annoying to get setup with, and the wiki is very under documented, but I think it works well once setup

#

It can turn 4 different documentation formats into the same JSON format

#

So you can say goodbye JSoup lol

quiet depot
#

don't think this solves the docdex problem

jovial warren
#

what is the DocDex problem?

quiet depot
#

although I'll definitely have a look at the common format they're using

#

because I can probably steal that

jovial warren
#

Yeah lol

distant sun
hot hull
#

jesus fuck

jovial warren
#

That first one looks about right

#

Actual NBT is pure binary

#

The Minecraft Development plugin has a really good way of rendering NBT

#

Oh btw, how much do you guys think the Krypton API should have before I officially release 1.0 and remove the ability to make breaking changes to it

distant sun
#

I need this for items

obtuse gale
#

Is there an easy way to convert a project to a multi module project and rename the original module?

old wyvern
#

Yes

#

Create the modules you want, and just change the rootProject name in your settings.gradle

zenith raft
obtuse gale
#

so do i need to make a new module as the root project? Cos I dont want the new modules to be inside the existing one

ocean quartz
obtuse gale
#

dont they all nbeed to be inside a root module?

ocean quartz
ocean quartz
obtuse gale
#

does that normally have its own build.gradle and stuff like that?

#

idk if a multi module project is the best way either, basically there are 2 different things in the thing im making, theres the thing that runs on all the individual devices, and theres a admin website that runs on a host machine to configure everything,

#

I also need the website to be easy to setup in the first place, so idk if id need to make like an installer or smthn weird for the website

half harness
#

What's the differences:kt fun main() = runBlocking { blah } vskt fun main() = runBlocking { coroutineScope { blah } } vskt fun main() = runBlocking { coroutineScope { launch { blah } } } vskt fun main() = runBlocking { launch { blah } }

ocean quartz
#

In this specific case basically no difference, since it's just one thing running, so doesn't matter how it is running
It would be a lot different if you added more to it

half harness
#

alright

#

what does coroutineScope do? Apparently kt fun main() { runBlocking { coroutineScope { delay(100L) println("a") } println("test") launch { println("blah") } } } and ```kt
fun main() {
runBlocking {
delay(100L)
println("a")
println("test")
launch {
println("blah")
}
}
}

ocean quartz
#

Because you're running it blocking

#

The coroutineScope is to decide in which scope it should lunch the coroutine

half harness
#

wdym?

half harness
ocean quartz
#

Wdym "do something"?

half harness
ocean quartz
#

Because you're blocking

onyx loom
half harness
#

🤣

#

ignores the fact that I'm making a hypixel copy of bedwars

old wyvern
half harness
old wyvern
#

Youd normally only use it to get the scope in a suspend function

#

Otherwise you dont get the scope extensions

ocean quartz
#

Dkim, the coroutineScope is just a scope, it's for you to launch coroutines etc

old wyvern
#

Thats a different one matt

half harness
#

i see

old wyvern
#

Hes talking about the smaller case one

onyx loom
ocean quartz
#

Ikr

old wyvern
#

Arent they paid now?

half harness
#

idk

#

Is this (basically) the same: kt fun main() { runBlocking { println("test") } } and ```kt
fun main() {
runBlocking {
launch {
println("test")
}
}
}

#

(nothing under & above launch)

old wyvern
#

Result wise, yes. What you're doing? no

half harness
#

alr

old wyvern
#

You're launching another task into the scope in the second one

half harness
#

mhm, so if i do delay() in launch, it won't affect outside of that launch? correct?

old wyvern
#

Yes

half harness
#

yES im finally understanding coroutines 🎉

gusty glen
half harness
#

lol

jovial warren
#

lol

old wyvern
#

Consumption of Oxygen is illegal and a punishable offense.

jovial warren
#

lol

ocean quartz
# half harness yES im finally understanding coroutines 🎉

As an easier way to view it

coroutineScope {
  println("a")
  launch {
    delay(20L)
    println("b")
  }
  println("c")
}

Would be the "same" as bukkit's

println("a")
Bukkit.getScheduler().runTaskLaterAsynchronously(plugin, Runable {
  println("b")
}, 20L)
println("c")
jovial warren
#
project.buildscript.dependencies.add("classpath", "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.10")
project.pluginManager.apply("org.jetbrains.kotlin.jvm")
#

is this how you're meant to add dependencies within plugins?

half harness
jovial warren
#

currently working on Krypton Gradle, and I wanna auto-add the Kotlin and Shadow plugins

ocean quartz
#

Don't do that, it won't work correctly

jovial warren
#

what should I do instead?

gusty glen
#

usually we have a CoroutineScope(Dispatchers.Default/IO) somewhere, dkim, to provide the scope needed to launch a coroutine

old wyvern
#

Project#dependencies#add

ocean quartz
#

Require people to do it, like hard depend or something
When a plugin applies an external plugin, it's just a pain in the ass, trust me, i tried adding shadow

jovial warren
half harness
jovial warren
#

guess it's not bad though, since then you can add the plugin yourself and customise the version

#

I definitely wanna set the API and the stdlib as compileOnly dependencies by default though

#

and I want that compileOnly for the stdlib to override the Kotlin plugin's one

#

what would the configuration name be btw?

#

compile classpath?

old wyvern
#

wait are you trying to add plugins? or just dependencies?

jovial warren
#

alright

old wyvern
#

Having the plugin add another plugin was pretty buggy

#

Sometimes it worked, sometimes it didnt

jovial warren
#

adding the stdlib manually and overriding the plugin's version shouldn't be hard though right?

jovial warren
#

that won't exactly work for the Kotlin plugin or Shadow, since they're not built-ins

#

I'd need to add the dependency to the buildscript classpath first

prisma wave
#

ah yeah

dusk holly
#

Hello

onyx loom
#

hello obama

old wyvern
#

hello obama

dusk holly
#

Hello Kaliber and Yugi

half harness
#

hello trump

old wyvern
#

hello biden

dusk holly
#

I am not Trump

#

How are you my good citizen

half harness
#

bad

#

i just lost my 12 winstreak

dusk holly
#

In what?

half harness
#

duels

#

hypixel

dusk holly
#

That is a shame

half harness
#

and now i rage quit

#

and back to coding

dusk holly
#

I am very sorry to hear that dkim19375_02

half harness
#

☹️

dusk holly
#

Have you considered joining the US Army of the United States of America

#

That might be easier than Hypixel

half harness
#

Sorry I like no combat pvp

#

😔

serene cave
#

OBAMA

#

WHAT THE hell

#

ARE YOU

#

DOING

#

in my COUNTRY

onyx loom
#

🤨

half harness
#

🤨

serene cave
#

@dusk holly

#

You suck

dusk holly
#

That is not true

serene cave
#

Yes it is

#

you know it

#

We all do

dusk holly
#

Prove it

serene cave
#

What's Obama's last name

dusk holly
#

umm

#

idk

#

that's not a fair question

serene cave
#

Lmao

#

bad

onyx loom
#

barack is his last name

dusk holly
#

if you're so clever

serene cave
#

It's Donald

dusk holly
#

Obama Donald?

serene cave
#

Yes

dusk holly
#

I wanted to kill you then

serene cave
#

you almost hit the officier

dusk holly
#

good

#

Barack Obama#0354

jovial warren
#

anyone know how to configure KotlinCompile from within an external plugin?

#

looked everywhere and can't find anything, and I can't access that class from within code

spiral junco
minor oracle
#

@serene cave @dusk holly Greetings, fellow presidents!

onyx loom
#

what in the fuck

dusk holly
#

Hello there

#

How are you my old pal

onyx loom
#

man what is wrong with u guys

#

whos alt is this now

dusk holly
#

Not mine

minor oracle
onyx loom
#

i cannot believe this

dusk holly
#

What is this

#

Do I have Admin

onyx loom
#

u are all presidents at the same time sus

minor oracle
#

Ah, the presidents are back on top

dusk holly
minor oracle
#

We shall now lead helpchat to victory the same way as we led the americans through the civil war

dusk holly
#

I would be honored

#

@serene cave get online loser

#

we need the group photo

old wyvern
#

😮 Another one

dusk holly
#

of the 3 presidents

old wyvern
#

Hello @minor oracle

onyx loom
#

trump does not wish to oblige 😔

old wyvern
#

😔

dusk holly
#

Cowardly trupm

onyx loom
prisma wave
#

thats one for the album

onyx loom
#

absolutely

minor oracle
half harness
#

wTF

#

whys there

minor oracle
half harness
#

what

dusk holly
compact perchBOT
#

probably playing golf

dusk holly
#

Hello my robotic citizen

onyx loom
#

trump does love his golf after all

prisma wave
#

wtf is happening

#

lmao

half harness
#

@prisma wave is this worthy enough to be in the helpchat iforgotwhatitscalled

prisma wave
#

admins appear offline

half harness
#

gtg

dusk holly
#

Goodbye dkim19375_02

minor oracle
#

Goodbye dkim19375_02

dusk holly
#

Have a nice day citizen

compact perchBOT
#

Farewell dkim

minor oracle
#

Our wonderful robotic friend is here as well. What a great day!

dusk holly
#

I nominate Barry#7877 for a presidental award

minor oracle
#

I second that nomination

dusk holly
#

wow Barry is president too

minor oracle
#

A robot for president, that's got some serious ramifications, Mr. Obama.

compact perchBOT
#

I resigned, I had a good run

dusk holly
#

Good

minor oracle
#

Great

dusk holly
#

Yes I do not think a robot president is a good idea, Mr Lincoln

#

It could be devastating for our society

#

This robot could start a war in a second

#

For reference: Avengers Age of Ultron (2015)

#

Robots do not know what is best for humanity

#

We do

compact perchBOT
#

Does Lincoln truly understand the ramifications of a robotic president? I fear his knowledge may be lacking due to the time he came from

gilded basin
#

lol