#dev-general

1 messages ยท Page 339 of 1

prisma wave
#

if you made sure to handle all of that it could be possible

#

but it would be easier if we know an url will follow the maven repo specification

astral quiver
#

I was thinking in change dependencies.json to:

  • list of repositories
  • list of dependencies, their excludes, their relocation
#

no transitive

#

Maven Aether will do the resolution of the repository all in runtime

prisma wave
#

transitive is included to reduce lookup times at runtime

#

but maybe aether will make that unnecessary

astral quiver
#

well this is not a issue for Maven Aether if I recall, it does resolution in parallel

#

currently PDM does not and this is kinda really slow

prisma wave
#

pdm does

#

i believe

astral quiver
#

some project of mine take 15m to complete download all dependencies

#

in gradle, with no cache it is faster

prisma wave
#

oh it might not be parallel in the gradle plugin lol

#

it definitely is at runtime

onyx loom
#

is there a way for me to remove !! (ij is complaining) im having small brain moment, but this shouldnt be null right?

astral quiver
prisma wave
astral quiver
prisma wave
onyx loom
#

still kinda yucky

prisma wave
#

meh

astral quiver
#

I think it is in Bukkript, because it have big libraries, like Maven Aether and Kotlin Compiler

onyx loom
#

ty ๐Ÿ‘

astral quiver
#

so maybe your download implementation is not so fast?

prisma wave
#

idk tbh

#

ive never profiled it

#

it should be fine

obtuse gale
#

stackexchange "Hot Network Questions" be like

prisma wave
#

that is incredibly specific lmao

onyx loom
#

i think he got it in him ๐Ÿ‘

prisma wave
onyx loom
#

fuck

winter iron
#

cancelled

onyx loom
#

please dont ๐Ÿ˜ฉ

prisma wave
#

no mercy

onyx loom
#

oh no!

old wyvern
oak raft
#

no way ๐Ÿ˜ฎ

lunar cypress
#

sigh

prisma wave
#

based

lunar cypress
#

HelpChat is getting better at comedy and it intimidates the 0xers

prisma wave
#

lmaoo

old wyvern
#

0xers?

#

Whats that?

prisma wave
#

opposite of 10xers

old wyvern
#

um.. whats a 10xer?

prisma wave
#

A particularly talented and productive engineer, thought to be capable of doing the work of ten typical engineers.

#

in other words

#

a haskell programmer

old wyvern
#

oh

#

xD

prisma wave
#

who also knows go and rust and blockchain

old wyvern
#

lol

stuck harbor
#

haha

#

blockchain

#

funny

#

the universe is a blockchain

lunar cypress
#

this is not very webscale of you to say

jovial warren
#

oh also, thinking about PDM, BM

prisma wave
#

ok ๐Ÿ™‚

jovial warren
#

couldn't you just use jar in jar like LP does?

prisma wave
#

maybe

jovial warren
#

I mean, nobody would really notice a difference, since it'd just be like a normal jar

#

just that jar would contain the actual jar and some other stuff

prisma wave
#

i will admit i know basically nothing about how lp does it

jovial warren
#

LP has a bootstrap that, well, bootstraps the plugin

#

so I think Bukkit loads the bootstrap and the bootstrap loads the plugin

#

or something like that

prisma wave
#

oh so you can use your own classloader?

jovial warren
#

yep

prisma wave
#

sounds simple enough

jovial warren
#

he says xD

#

also, what's Kotlin's answer to Java 16 btw?

prisma wave
#

nothing

#

?

jovial warren
#

actually strong encapsulation on JDK internals only applies to runtime access

#

and Kotlin/JVM doesn't have its own runtime, since the runtime is the JVM

#

also, on the command thingys, would events be the only way to ensure thread safety on command handling?

prisma wave
#

not necessarily

#

but event driven works pretty well with multithreaded stuff

jovial warren
#

I mean, I'm really not sure about event-driven commands tbh

#

obviously the events will use coroutines and flows to better make use of concurrency, but commands will just be called internally

old wyvern
#

You can have functions to wrap the event and filter it through to make it work similar to "registered" commands

prisma wave
#

yeah

jovial warren
#

example pls

#

oh also, btw, how should I actually implement event handling btw?

#

just listen<CommandEvent> {}?

#

or onEvent?

#

or just on<CommandEvent>?

prisma wave
#

event<T> returning a Flow<T>

#

or a different name

#

but

#

Flow good

jovial warren
#

watched a video about flows last night

#

they seem pretty cool

prisma wave
#

jda kt uses on

#

mhm

jovial warren
#

ah right, so a Flow is basically an asynchronous List

prisma wave
#

uh

#

more like a Sequence

astral quiver
#

Use SharedFlow

prisma wave
#

but not really like either

astral quiver
#

To publish events

obtuse gale
#

the LP API is not part of the jar-in-jar, it's part of the bootstrap plugin jar, so other plugins can access it

prisma wave
#

ah.

#

yes

#

that could be an issue

obtuse gale
#

so maybe with a gradle plugin you can make things like an @Api annotation for classes that wouldn't be bootstrapped

#

idk

#

just a thought

prisma wave
#

perhaps yeah

old wyvern
prisma wave
#

reactive tho

jovial warren
#

that's not bad

#

also, what would I actually do for the event function? ```kotlin
inline fun <reified T : Event> on(consumer: T.() -> Unit) {

}

#

or listen

#

or whatever lol

prisma wave
#

meh

#

whatever

jovial warren
#

also, T.() -> Unit should work right?

prisma wave
#

eww flow pls

jovial warren
#

since then that'll give me some thingys

#

Flow<T>.() -> Unit?

prisma wave
#

on can be that but have listen<T> that returns a Flow<T>

jovial warren
#

or maybe just ```kotlin
inline fun <reified T : Event> listen(consumer: T.() -> Unit): Flow<T>

prisma wave
#

you dont need a consumer and a flow

jovial warren
#

is that what you're on about?

prisma wave
#

that doesnt make sense

jovial warren
#

so what do I need then?

#

just a flow?

prisma wave
#

yes

jovial warren
#

I kinda wanna call this like ```kotlin
listen<CommandEvent> {
sender.sendMessage(Component.text("Hello there!"))
}

old wyvern
half harness
ocean quartz
#

Yugi are you okay, are you okay Yugi

old wyvern
#

Kinda

#

xD

jovial warren
#

or one better, for commands, ```kotlin
onCommand("hello") {
sender.sendMessage(Component.text("Hello there!"))
}

half harness
old wyvern
half harness
#

can u last 30 more mins

#

yugi

old wyvern
#

uhm

prisma wave
#
listen<CommandEvent>().collect {
    print(event)
}
ocean quartz
#

That's a lot of time to last, most men don't last that long

prisma wave
#

use on as a syntax sugar for collect maybe

half harness
jovial warren
#

tf is syntax sugar

half harness
#

๐Ÿ˜ฎ

prisma wave
half harness
#

i believe in you Yugi

#

you

#

can

old wyvern
#

How many seconds matt xD

half harness
#

do

#

it

prisma wave
#

A convenience function

jovial warren
#

ah right, that's what it is

#

oh the wonders of Wikipedia lol

ocean quartz
old wyvern
#

xD

half harness
#

what is any%

jovial warren
#

anyway, so you mean ```kotlin
inline fun <reified T : Event> on(): SomeCollectionFlowOrWhatever<T>

ocean quartz
# half harness what is any%

A category in speedrunning which pertains to the goal of a game's mere completion, i.e. getting to the main concluding goal as quickly as possible, regardless of how much is unlocked.

onyx loom
ocean quartz
#

Not sure, need to check

prisma wave
jovial warren
prisma wave
#

?

#

do what

jovial warren
#

actually nvm, I dum dum

#

right, ```kotlin
inline fun <reified T : Event> listen(): Flow<T>

inline fun <reified T : Event> on(consumer: T.() -> Unit) = listen<T>().collect(consumer)

prisma wave
#

yeah should work

lunar cypress
#

probably wont

prisma wave
#

๐Ÿ˜ฆ

lunar cypress
#

unless they changed inline semantics

jovial warren
#

also, how am I even going to do that?

prisma wave
#

what about them?

jovial warren
#

like what do I put in the {} thingys?

prisma wave
#

huh?

jovial warren
#

how should I do event handling?

prisma wave
#

event bus i guess

lunar cypress
jovial warren
#

how dis work

prisma wave
#

maybe SharedFlow

prisma wave
#

unless you just use a normal function instead of a receiver

lunar cypress
#

just a question of style but as a side note I would probably pass events as the first param rather than the receiver

lunar cypress
#

I stand corrected

jovial warren
#

reified good

jovial warren
#

also, teach me the event bus ways pls senpai @prisma wave

prisma wave
#

idk

lunar cypress
# jovial warren why?

because of consistency with other apis and because I think the receiver should be reserved for things that are immediately connected to the function

prisma wave
lunar cypress
#

event.executeListener() just doesn't make sense to me

jovial warren
#

so ```kotlin
on(CommandEvent) {
sender.sendMessage(Component.text("Hello there!"))
}

#

right @lunar cypress?

lunar cypress
#

still receiver

jovial warren
#

so what should it be then?

lunar cypress
#

(T) -> Unit

jovial warren
#

ah right

#

oh so it can still be reified then, just not receiver

lunar cypress
#

sure it can still be reified

jovial warren
#
inline fun <reified T : Event> on(consumer: (T) -> Unit)
#

right?

lunar cypress
#

right

prisma wave
#

trying to resist the urge to make a hillarious comment rn

jovial warren
prisma wave
#

uhh f# good kotlin bad

#

nice

surreal quarry
#

๐Ÿคฃ๐Ÿคฃ๐Ÿคฃ๐Ÿคฃ๐Ÿคฃ

prisma wave
#

me ๐Ÿคฃ

#

oh wow it's still here

surreal quarry
#

lol

#

very surprising

frigid badge
#

you guys truly are unique

prisma wave
#

thanks

#

we are free thinkers

frigid badge
#

I wonder where everyone will be at in 10 years

prisma wave
#

dead

frigid badge
#

lmao

prisma wave
#

or just severely burnt out in some underpaid office job

#

"remember when we all said kotlin was good and java was bad? those were the good old days"

stuck harbor
#

lol

#

sadgely true

prisma wave
jovial warren
prisma wave
#

what?

jovial warren
#

anyway, teach me the event bus ways pls senpai

prisma wave
#

i already said idk

#

i have no idea how to make one

stuck harbor
#

event bus?

jovial warren
#

someone pls teach me the event bus ways

stuck harbor
#

ughhh ffs now bm is changing von neumann

prisma wave
#

google ๐Ÿ™‚

prisma wave
#

we need a new architecture

#

that only supports functions

#

no data

stuck harbor
#

lol

jovial warren
#

maybe I should use Guava as a reference for my event bus

stuck harbor
#

delete data bus

jovial warren
#

copies guava

stuck harbor
#

only control and adress

prisma wave
#

we need something that will guarantee 0 state

stuck harbor
#

wh

#

delete every bus

#

no transfer needed

prisma wave
#

imagine if you could curry assembly instructions ๐Ÿ˜ฎ ๐Ÿ˜ฎ ๐Ÿ˜„

#

wait no

stuck harbor
#

lol

prisma wave
#

assembly would just be the lambda calculus

prisma wave
#

ikr

#

and just remember that functional programming invented curry!!

stuck harbor
#

damn

#

we are going full gen z programming now

#

not that I'm complaining

prisma wave
#

no self awareness please

stuck harbor
#

right you are

obtuse gale
prisma wave
#

i HATE people that want configuration help

prisma wave
#

yep

#

he invented haskell and then went on to invent curry too

#

so talented

ocean quartz
#

Big sad, so much for 100% interop!

prisma wave
#

i wonder what the reason for that is

#

i guess names can sometimes be erased in java

ocean quartz
#

Yeah parameter names get erased in java, they become arg1, arg2, etc, unless you add a compiler flag to keep it

prisma wave
#

i guess thats why then

half harness
#

what should i name the class?

ocean quartz
#

Which class?

obtuse gale
#

make it a top level function

#

and period

half harness
#

the class that code is in

#

okay

#

what should i name the file

#

before it was ConfigUtils

#

but i think thats a bad name for it

#

lol

ocean quartz
#

We told you this so many times you don't put it on a class
Name it something that describes the functions inside
For example Strings.kt or Numbers.kt

half harness
#

ye i know, but idk what to name this

#

Lists.kt seems strange
so im asking for ur opinions

ocean quartz
#

For example I have one called Adventure.kt where I have many adventure related extensions

half harness
#

and is extension a good package name?

ocean quartz
#

If you want a generic one to throw everything in it maybe call it Declarations or Functions

half harness
#

ok

half harness
prisma wave
#

the docs may or may not say not to do that

#

lol

surreal quarry
#

FileContainingGetMapFromIpAndPorts.kt

half harness
#

๐Ÿ˜ฎ

half harness
surreal quarry
#

not a joke

#

thanks

half harness
#

wait

#

should I do List#getMapFromIpAndPorts or List#mapFromIpAndPorts?

ocean quartz
prisma wave
#

In particular, when defining extension functions for a class which are relevant for all clients of this class, put them in the same file with the class itself. When defining extension functions that make sense only for a specific client, put them next to the code of that client. Avoid creating files just to hold all extensions of some class.

#

although as I said earlier, that might only apply to classes that you can actually control

ocean quartz
#

Well I'd say that is only if that function only applies to a specific class, since those are supposed to be global i don't think it'd be like that

prisma wave
#

yeah im not sure what you'd do there

#

i guess you might make the file a bit more generic

prisma wave
#

Formatting.kt instead of Strings.kt to hold functions related to formatting and printing or something

#

lol

#

classic

#

ignoring their own conventions

ocean quartz
#

Yup xD

prisma wave
#

oh actually i guess that's slightly different

half harness
#

fun sendMessageToMinecraft(plugin: SomePlugin, message: String, tag: String) { should I do
SomePlugin#sendMessageToMinecraft or
String#sendMessageToMinecraft?

prisma wave
#

it's not all extensions of Path

surreal quarry
#

i would extend SomePlugin

prisma wave
#

lmao

half harness
#

alr

#

ahhh i have so much code

#

that i have to change

#

hiuashdisadhiuashdjanskd

surreal quarry
#

lol

#

its good

#

you will learn a lot in the process

half harness
#

wait

#

curious question

#

could I access private fields with extension functions?

#

or public only?

prisma wave
#

nope

half harness
#

rip

#

lol

prisma wave
#

theyre not actual methods

#

just syntax sugar

half harness
#

i have like 8 classes that have to be changed from utils to extension functions

jovial warren
#

oh hey, was just having a talk about this, and it made me think: if commands are event-based using a pub/sub event bus, how would I handle precedence if two plugins have the same command with the same name?

half harness
#

and like a whole bunch of other classes that i have to change its usages

#

๐Ÿ˜ซ

ocean quartz
#

Also, didn't like doing unit tests before, but damn it's actually so nice to do it, you create the supposed occurrence once and if you need to test later you already have it
I used to have to rewrite the test class all the time to try different things to find issues
Now it's all organized ๐Ÿฅบ

prisma wave
#

unit testing is amazing

half harness
#

what the

#

my intellij

#

why is it 8 spacing

surreal quarry
#

whichever plugin

#

or have you moved away from registering plugins entirely

#

actually that wouldn't work, at least not easily

#

probably just let them both do their thing fingerguns

jovial warren
prisma wave
#

oh that is a good point actually

surreal quarry
#

event priority

prisma wave
#

you need the stupid tab complete packet

surreal quarry
#

?

jovial warren
#

maybe we should just go back to the old method

#
object MyCommand : Command(name, permission, aliases) {

    override fun execute(sender: Sender, args: List<String>) {
        // do some whack
    }
}

class MyPlugin(context: PluginContext) : Plugin(context) {

    init {
        registerCommand(MyCommand)
    }
}
surreal quarry
#

yea event based commands might not be the best

half harness
#

oof i already changed 21 files while refactoring

surreal quarry
#

good

half harness
#

this is tiring

jovial warren
#

dkim that's normal lol

half harness
#

i have like a billion errors

surreal quarry
#

great

#

fix them

jovial warren
#

if you didn't change that many files while refactoring then I would be a bit concerned

half harness
#

๐Ÿ˜ญ

jovial warren
surreal quarry
#

stop complaining lol

jovial warren
#

^

#

you're starting to sound British

half harness
#

looks cool

jovial warren
#

๐Ÿฅฒ

surreal quarry
#

loll

prisma wave
#

if you want something to complain about then convert to clojure

half harness
#

no

#

thanks

prisma wave
#

why not

jovial warren
#

convert to Kotlin

#

actually you've already done that

half harness
#

im using kotlin

#

๐Ÿ˜›

jovial warren
#

oh btw, how should I actually do the command registration?

#

should it be handled centrally?

half harness
jovial warren
#

a.k.a by the server

jovial warren
half harness
#

but its server name

jovial warren
#

show

surreal quarry
#

lol

half harness
#

._.

#

ok

jovial warren
prisma wave
#

liskov

half harness
#

fixed

#

it was wrapped around class {}

surreal quarry
#

show name anyway

jovial warren
#

liskov?

surreal quarry
#

i have some plans

#

๐Ÿ™‚

prisma wave
#

substitution principle

half harness
#

n-no thanks

surreal quarry
#

yes

jovial warren
surreal quarry
#

isn't it like use List<T> instead of ArrayList<T> as your type

#

basically

prisma wave
#

use most abstract type that still keeps needed contracts

half harness
#

is this bad?

prisma wave
#

what

#

the

surreal quarry
#

Yes

prisma wave
#

fuck

surreal quarry
#

lol

winter iron
#

u dont need in a class

jovial warren
#

er...

#

what

#

the

#

fuck

#

private key

#

plain text

#

in plugin

winter iron
#

pog

half harness
prisma wave
#

that raises so many questions

winter iron
#

send me

surreal quarry
#

this is hideous

jovial warren
half harness
#

don't worry

winter iron
#

name it SOMETHING_PUBLIC_KEY

jovial warren
#

it's called a private key for a reason GOD DAMN IT DKIM

half harness
#

oh

surreal quarry
#

but

#

stop sharing your private key with uus

half harness
#

ok

surreal quarry
#

LOL

prisma wave
#

bruh

jovial warren
#

OMFG

half harness
#

-_-

jovial warren
#

did you just say Y???????????

prisma wave
#

private key

winter iron
#

bro i swear, im gonna kick my fucking monitor, everytime i shift enter it closes discord

jovial warren
#

PRIVATE key

surreal quarry
jovial warren
#

jesus christ

winter iron
#

-_-

prisma wave
#

storing that in plain text IN the plugin is also probably an extremely bad idea

half harness
surreal quarry
#

environment variables ๐Ÿฅฒ
config file ๐Ÿฅฒ

half harness
#

then where do i store it

winter iron
#

config file

half harness
#

but I'll need that key

onyx loom
#

not in the plugin

winter iron
#

so its not distributed to everyone

half harness
#

for it to work

winter iron
#

u have licensing?

half harness
#

um

#

no

#

its a random string

surreal quarry
#

what are you doing?

jovial warren
#

@prisma wave how should I store commands? map in the server like Bukkit does?

half harness
surreal quarry
#

plugin messaging...

jovial warren
#

Map<String, Command>

half harness
surreal quarry
#

what data are you passing when players aren't on the server lol

half harness
#

console

surreal quarry
#

what

half harness
#

join/leaves

#

chat messages

#

etc

surreal quarry
#

that all happens when a player is on the server

half harness
#

not leaves

#

just

surreal quarry
#

quit event has a player

#

it should work

half harness
#

anyways

prisma wave
#

anyways what

surreal quarry
#

anyways, i'm gonna keep storing my private key in plain text inside the plugin

prisma wave
#

it's not a security vulnerability as long as nobody decompiles the plugin

surreal quarry
#

sounds like a good chance to take

prisma wave
#

yeah pretty much 0 risk

winter iron
#

unless you run into the same guy this morning who found out u can decompile jars for resources

#

then u have an issue

#

but until then

frail glade
#

O.o

half harness
#

because I need the key

obtuse gale
#

Make it a config option

half harness
#

but then how will they get it?

obtuse gale
#

"they"?

half harness
#

since theres only 1 key

obtuse gale
#

Tell them to put it in the damn config

#

idk

prisma wave
half harness
#

pem?

obtuse gale
half harness
#

yes, but they can still get the decoded key

lunar cypress
#

what is it that you're trying to do?

half harness
#

nvm

prisma wave
#

why do i get the suspicion that means you're just gonna ignore the issue

half harness
#

because

#

no point in spending time fixing the issue

#

for now

surreal quarry
#

lol

half harness
#

why am I getting a billion build.gradle warnings ๐Ÿ˜ญ

#

even after invaliding & restarting

#

everything is yellow

old dune
#

anyone able to determine why my server randomly stops and restarts every hour or so?

#

ive checked through logs and theres no error as to why the restart would be executed

surreal quarry
#

check for a restart schedule thing

#

assuming you host it at a hosting provider

old dune
#

checked through shockbyte and theres no restart timer

#

used a region fixer for any corrupt chunks, and nothing found

prisma wave
half harness
#

;-;

#

it's private rn

#

and closed source

prisma wave
#

Doesn't matter

half harness
#

it does

#

it won't ever be public afaik

#

but

#

why is my whole build.gradle

#

in YELLOW

prisma wave
#

Still doesn't matter

half harness
#

...

half harness
prisma wave
#

If that key is leaked you have no way of changing it

half harness
#

i do

prisma wave
#

Anyone can just read it in plain text

prisma wave
#

So convenient

half harness
#

uhhhhhhhh

#

it takes 2 seconds

prisma wave
#

Ok

#

Imagine a private key is like a bot token

#

Is hardcoding it a good idea?

half harness
#

no

prisma wave
#

Obviously not

#

Same principle applies here

half harness
#

uhh quick question

#

how do i fix this

surreal quarry
#

hit configure to the right

half harness
#

no configure button

#

my intellij is dying

#

๐Ÿ˜ฆ

winter iron
#

karma for avoiding security ๐Ÿ™‚

half harness
#

;-;

winter iron
#

L

half harness
#

..

#

not very helpful

errant geyser
half harness
#

oh

#

thx ill try that ๐Ÿ™‚

forest pecan
#

alright what the hell does this error mean

#

Class 'kotlin.jvm.JvmStatic' is compiled by a pre-release version of Kotlin and cannot be loaded by this version of the compiler

ocean quartz
#

Which Kotlin version are you using?

forest pecan
#

the latest one

#

like 5

ocean quartz
#

Thanks Kotlin 5

forest pecan
#

lmao

ocean quartz
#

Exact number please

forest pecan
#

ok let me check

#

1.5.0-M1

ocean quartz
#

Don't use that one, it's unstable

forest pecan
#

oh

#

which one is considered stable

ocean quartz
#

1.4.31

#

Also why you even using JvmStatic? thonking

forest pecan
#

it was conversion

onyx loom
#
with(plugin.config) {
  getString("blah")
  getString("blah")
}

or

  config.getString("blah")
  config.getString("blah")```
๐Ÿค”, i kinda like with()
forest pecan
#

and it was a main class

#

i just found out i dont need it anyways

forest pecan
#

cause i can just define the function directly without the header

#

i originally had object

#

i didnt need it

ocean quartz
#

Yeah you don't need it, just fun main() {}

forest pecan
#

after removing it, i dont seem to need it anyways

#

yea

#

is 1.4.31

#

fine

surreal quarry
#

yea i believe thats the latest

forest pecan
#

thank you intellij

#

very useful

#

now i understand why you get these types of shit

#

lol

#

oh i fixed it

#

its the null things with the question marks

half harness
#

um

#

what do i do

#

if mc is stuck on the page

#

where its like joining the server

#

but its empty

#

no text

#

no buttons

ocean quartz
#

Alt + F4

half harness
#

ok

#

rip

#

my server is also dying

onyx loom
#

every day ur complaining about ur pc

#

and everyday i will reply saying get a better pc ๐Ÿ™‚

half harness
#

ok my mc is back up

hot heron
#

Anyone used Open Policy Agent (OPA) / rego before?

eternal compass
#

but theres this thing in the world called Money

onyx loom
#

never heard of it

eternal compass
#

really?

#

could you do something for me

ocean quartz
eternal compass
#

search up this thing called "My Bank Account" and find your user and pass, and uh DM it to me

#

:D

potent python
#

who can help me to install MySQL?
in my Host Dedicate ubuntu 16.04

surreal quarry
#

use docker

oblique heath
#

what is my best choice as far as maintaining an SQL connection when i'm not making a lot of requests

ocean quartz
#

Connection pooling

oblique heath
#

alright fair enough

#

is there a lower limit to how few requests being made that would justify not using connection pooling?

#

or would i just always use it

#

and then which package should i use 0.0 there's a million of them out there, does it matter which i pick?

ocean quartz
#

I'd say always use it
And wdym which package?

obtuse gale
#

I know this place is English speaking
But is there a DEV that can speak Spanish?
I pay

oblique heath
#

like BoneCP, c3po, HikariCP etc.

ocean quartz
#

HikariCP is my choice

oblique heath
#

nice, thats what i figured as well

#

thank you Matt ๐Ÿ™‚

oblique heath
#

on a separate note, does anybody know of a decent solution to running some potentially long events on onDisable()

#

i'd like to do some nonspecific network stuff just before a server goes down

hot hull
#

Just run it, sync ofc

oblique heath
#

it doesnt want to work for me ๐Ÿ˜ฆ i may be an idiot i AM an idiot, thank you frosty โค๏ธ

hot hull
#

What would be a good location builder from a string, would something like
x:<coord> y:<coord> z:<coord> be good or anyone got any better suggestions?

prisma wave
#

looks fine

jovial warren
hot hull
#

oh god

#

Pretty nice if I do say so myself

jovial warren
#

Or you could store coordinates how the protocol does, in a long with the X packed into the most significant 26 bits, the Y in the middle 12 bits and the Z in the least significant 26 bits lol

hot hull
#

It's user configuration, I will legit shoot you Bardy

jovial warren
#

Lol

prisma wave
#
{:x 10 :y 64 :z 15}
jovial warren
#

^

distant sun
#

10:x

prisma wave
jovial warren
#

Also, thinking about event handling btw, I kinda want a way that events can be handled outside of the init block of the plugin

hot hull
#

How are they currently handled?

obtuse gale
#

not good

#

really bad

jovial warren
#
class MyPlugin(context: PluginContext) : Plugin(context) {

    init {
        on<Event> {
            // do some whack
        }
    }
}
prisma wave
jovial warren
#

whatโ€™s so ew Frosty

obtuse gale
hot hull
#

not a fan of that init block

jovial warren
#

fair

#

what would one prefer?

hot hull
#

not sure

#

I mean I quite like the current way, but that's just cause I'm used to it

jovial warren
#

If I was going to make it a function, it would be initialize, not onEnable

#

And shutting down will be an event

hot hull
#

enable, disable

#

and perhaps reload if you were to introduce some default shit for reloading

jovial warren
#

plugins wonโ€™t be reloadable very easily

#

well, you can reload confรญes, but thatโ€™s your lot

#

also, the startup states are different from Bukkit

#

thatโ€™s why the function would be initialise, not enable

#

things like plugman would require depending on the server and reflectively calling functions from the internal plugin manager

#

I want to very strongly discourage plugins being able to enable and disable other plugins

hot hull
#

plugman should never exist.

quiet depot
#

why won't plugins be reloadable easily?

#

reloading is a key component on any production system, you should be making it as easy as possible

#

well actually I know fuck all about production and that sentence is probably wrong

#

but it's still useful

hot hull
#

reloading would be nice, but certainly not how plugman does it

old wyvern
#

Have an in-built accessible plugin manager

#

maybe even something like a "package manager"

frigid badge
#

do reloading like sponge does

#

have an event which gets handled by plugins

quiet depot
#

does sponge handle the actual jar change or is it completely up to plugins?

frigid badge
#

completely up to plugins

#

afaik

#

just an event

quiet depot
#

concept I had in mind would be to have plugins in their own classloader. That classloader has the krypton classloader as a parent, along with the classloaders of any of its dependencies (although you'd have to create some sort of shallow classloader implementation here, as we don't want the krypton classloader from dependency x, although considering there is only one krypton classloader, perhaps it wouldn't be an issue). On plugin reload, you tell the plugin to unregister itself from its dependencies (i.e. through such an event that lemmo mentioned). Upon its success, you unregister it from krypton itself then close the classloader and initialize a new one with the updated jar.

forest pecan
#

open the url classloader ๐Ÿ™‚

jovial warren
quiet depot
jovial warren
#

/reload won't exist btw because of how whacky it is

forest pecan
#

and the url classloader thing

#

that doesn't work for java 16

old wyvern
#

Allow it per plugin

#

There shouldnt be much of an issue if you can clean up properly

quiet depot
#

pulse that makes it impossible to reliably reload

#

not a good solution

jovial warren
#

Having each plugin have it's own class loader might get a bit whack though

quiet depot
#

how?

somber tulip
#

Does anyone know what you usually do when you have a premium resource that you don't want to maintain anymore? Like how do I find someone to take over for example

jovial warren
forest pecan
#

open source it

hot hull
#

Open sauce

somber tulip
#

It's already open source

hot hull
#

Just remove price tag

#

Or just wait for them to move it to inactive

somber tulip
#

Yea but then I'll still have to maintain it / fix people's errors etc? Like I keep getting feature requests that I just can't be arsed to do

hot hull
#

Nah just ignore

quiet depot
#

disable purchases

old wyvern
somber tulip
#

Didn't know you could disable purchases tbh. Okay, think I'm going to put it in request paid and then if noone picks it up I'll do what you said frosty and just ignore everything lol

old wyvern
#

lol

somber tulip
#

but make it free ofc

old wyvern
#

link to plugin har

somber tulip
#

Like I structured the code like an idiot and databases etc so it takes way longer than it should to fix or add things. I just cba to work on it and I don't really have time

hot hull
#

lazy man

somber tulip
#

aha pretty much

stuck harbor
#

man if i was good enough to make premium plugins

#

that would be funny

hot hull
#

iwanio it takes no skill to make premium plugins

stuck harbor
#

well to make good ones

hot hull
#

90% of them are a fucking disaster code wise

somber tulip
#

Yea i mean look at the code of that one i just posted lmfao

stuck harbor
#

well my code is klean

#

cause clojure

#

๐Ÿ˜‰

hot hull
#

It's just the idea and features that count

stuck harbor
#

man i gotta set up clojars

somber tulip
#

aight barry doesn't like my "budget"

stuck harbor
#

what language is it in?

hot hull
#

brainfuck

somber tulip
#

Java

stuck harbor
#

๐Ÿคข

old wyvern
#

Dammit keyboard

stuck harbor
#

a premium plugin thats open source?

somber tulip
#

Well, it's not a numerical value really. It's whatever the person makes from sales technically

hot hull
#

60 pesos

stuck harbor
#

i am confusion

hot hull
#

Freemium iwanio

stuck harbor
#

cooolio

somber tulip
#

It just gets leaked anyway iwanio

stuck harbor
#

meh good point

#

might as well control the source urself

somber tulip
#

yeah exactly, I usually just keep it a version or two behind latest

stuck harbor
#

mm fair

unreal briar
#

All popular plugins get leaked in days anyway

stuck harbor
#

yeah

unreal briar
#

People cry about leaking impacting sales and whatnot

#

never happened to me

stuck harbor
#

lol

unreal briar
#

and i'm having thousands of downloads from leak sites

somber tulip
#

To be fair, I was getting like 5+ sales a day at one point and then it got leaked and it slowed to 1 every few days

unreal briar
#

If people go to those sites they weren't going to buy the plugin anyways

hot hull
#

they were never a potential customer so why bother yourself with that

stuck harbor
#

lol thats a point

ocean quartz
#

People that get their plugins from leak websites wouldn't buy your plugin anyways

hot hull
#

Matt

#

You gonna consider brigadier in mf cmds

ocean quartz
#

Frosty that was already on the board i sent you even before you opened the issue xD

hot hull
#

I didn't look at the board

ocean quartz
#

Smh

old wyvern
#

mf-cmd 2 when?

stuck harbor
#

mf cmd 2 electric boogaloo

hot hull
#

Is annotating a param with @obtuse galeable gonna make it be able to be null, or will the manager yell at me

old wyvern
#

mf-2: The Brigadier

stuck harbor
#

wow frosty

ocean quartz
#

Working on it, figuring abstraction is pretty rough

stuck harbor
#

rude

hot hull
#

Your fault for having such a shit name, not sorry for the ping

stuck harbor
#

haha

old wyvern
#

oh wait nvm

#

got it

hot hull
#

Yea

somber tulip
#

Wait how do I disable purchases?

stuck harbor
#

๐Ÿคท

#

settings?

hot hull
#

๐Ÿคทโ€โ™‚๏ธ

stuck harbor
#

bloody spigot

somber tulip
#

I can't see an option anywhere .-.

stuck harbor
#

hopefully paper's hangar gets popular

hot hull
#

hopefully

stuck harbor
#

then md_5 can go sadge in a corner

hot hull
#

open sauce everything, would be nice

stuck harbor
#

mmm yes

#

open sauce

old wyvern
#

Dont think md would really care

ocean quartz
stuck harbor
#

meh

distant sun
#

^

hot hull
#

I mean they could still setup some kind of donations

stuck harbor
#

donations are a lot less used tho

ocean quartz
#

Like people donate

hot hull
#

Well yea, but still

old wyvern
hot hull
#

:kek:

ocean quartz
#

Hell yeah

old wyvern
#

twerk at your customers

#

!

hot hull
#

Just throw your OF link on the plugin page

distant sun
jovial warren
onyx loom
#

hey are we getting placeholderapi for krypton

#

๐Ÿ™‚

hot hull
#

Bardy

#

we don't give two fucks about the devs who are in it for the money

#

Their plugins are shit anyways, cough vk

stuck harbor
#

lol

jovial warren
#

If Piggy makes PAPI 3 in a way that I can create an implementation with no issues then yes Kaliber

stuck harbor
#

when ur docs are worse than nms

old wyvern
hot hull
#

Yugi, most of the time I'm either underpaid or it's free

#

So I'm about to smack you

old wyvern
#

Eh

quiet depot
#

bardy

#

that'll 100% be possible

old wyvern
#

You made almost $1k last year right?

hot hull
#

Yea

jovial warren
#

Then there's your answer kali

old wyvern
#

Seems you got paid enough

stuck harbor
#

oh my

#

ยฃ1k

onyx loom
#

pog

stuck harbor
#

thats like

hot hull
#

Well not really lol

stuck harbor
#

a day's rent

#

jesus

old wyvern
#

How many did you do?

jovial warren
#

Complaining about $1000 in a year smh

hot hull
#

I wish I tracked how many hours I spent

stuck harbor
#

when people admire making less than minimum wage

#

just make a steam game

#

ffs

#

easy money

jovial warren
#

Actually I make ยฃ20 a week in pocket money for doing fuck all so I can't say shit

stuck harbor
#

smh

old wyvern
onyx loom
#

i made a grand total of $2 last year ๐Ÿ˜ฎ

hot hull
#

Most of them wasn't from request paid Yugi, but people reaching out

quiet depot
old wyvern
#

Ah

stuck harbor
#

sucks to suck

hot hull
#

I have 170$ scholarship, but I'm a nice person so I don't get any of it fingerguns

quiet depot
#

can't relate, I'm in the top of my cohort for maths

stuck harbor
#

ยฃ170 scholarship

#

per what

hot hull
#

monthly

stuck harbor
#

ah

#

man

hot hull
#

I give it to my mom

old wyvern
#

Ah

jovial warren
stuck harbor
#

y'all americans with ur shite student finance

hot hull
#

:kek:

onyx loom
#

whos american

stuck harbor
onyx loom
prisma wave
stuck harbor
#

hotswapping is satan

quiet depot
#

neither bm

#

you can't reliably unload classes from a classloader

#

trust me I've tried

jovial warren
#

He wants /reload for Krypton plugins BM

prisma wave
#

why would you need to unload them tho

old wyvern
#

Didnt chestly post something about being able to unload classes in #developer-chat

stuck harbor
#

yes i also am #developer-chat

#

i also, in fact, agree

quiet depot
#

pulse's solution was to just have everything in the one urlclassloader, and for a reload to function, you'd need to unload classes and load in new ones

#

but you can't unload classes

hot hull
#

spot the impostor

onyx loom
#

lol

jovial warren
old wyvern
#

lol

stuck harbor
#

mmm

prisma wave
#

Oh

ocean quartz
quiet depot
#

bukkit isn't reliable

#

bukkit literally has a message saying "this is a bad idea" when you reload

stuck harbor
#

haha

hot hull
#

lmao

prisma wave
#

I thought you were saying having an open classloader was a bad idea

jovial warren
stuck harbor
#

imagine loading 'classes'

#

pfffft

jovial warren
#

Stfu

stuck harbor
#

not like clojure has to compile to classes

#

nope

#

not at all

jovial warren
#

Lol

prisma wave
#

Imagine needing to reload because your spaghetti code is so tightly coupled to an impure framework you can't test in a repl

quiet depot
#

just gonna bring up osgi again because I think it has a functional reload impl

old wyvern
#

You could provide ways for plugins to interact with each other w.r.t their lifecycle

old wyvern
#

Like make it deregister the hook as soon as the calling plugin dies

quiet depot
#

yes

jovial warren
#

Wat dis

stuck harbor
#

man

quiet depot
#

basically a plugin framework

prisma wave
stuck harbor
#

controversial statement there bm

quiet depot
#

it allows u to load jars

onyx loom
#

bm comparing himself to jesus?

quiet depot
#

and unload jars

stuck harbor
#

bm is jesus

jovial warren
hot hull
#

Might just have to jump off a cliff myself after that statement that BM is jesus

prisma wave
#

lmao

stuck harbor
#

cliffs are too short for that

prisma wave
#

I was just quoting the meme

#

No comparisons drawn

old wyvern
#

bm be like

quiet depot
#

btw osgi doesn't fix your spaghetti code, osgi advertises itself as a way to "modularise your tightly coupled code into modules that are still tightly coupled"

#

but it fixes the reload issue

#

somehow

jovial warren
#

Dis why reloading bad

quiet depot
#

is that a new vid?

stuck harbor
#

no

#

very old

#

wurtz made a new one a month ago

quiet depot
#

yeah

stuck harbor
#

before that he made one called 'might quit' a year prior

#

that was a hard time

prisma wave
quiet depot
#

lol

#

wurtz is a strange one

stuck harbor
#

indeed

prisma wave
#

very strange

jovial warren
#

Anyway

#

Restart good reload bad

old wyvern
quiet depot
#

tl;dr

quiet depot
#

"a class or interface may be unloaded if and only if its defining class loader may be reclaimed by the garbage collector" (JLS,

#

that's what I said to do earlier

#

this just validates my claim

#

you can't unload classes from a classloader

#

only the classloader itself

#

which is why pulse's solution is not viable

old wyvern
#

I see

jovial warren
#

Wait so the secret to unloading is making the class loader useless and letting the GC yeet it?

quiet depot
#

yes

#

that should've been strongly implied through my original solution that I sent

jovial warren
#

How does one accomplish such a feat?

prisma wave
#

yeah good luck reliably getting the GC to actually destroy it

quiet depot
#

you need to first eliminate ALL references to the class

#

that's why a method in the plugin which unregisters itself from its dependencies is essential

#

and then you also need to eliminate the references in krypton itself

#

then, you can close the classloader

#

and if you're lucky, gc will take it away

jovial warren
quiet depot
#

yeah no

prisma wave
quiet depot
#

yeah, I struggled immensely with it

prisma wave
#

Probably not worth the effort tbh

jovial warren
quiet depot
#

reloading is an extremely useful feature if functional

#

it's definitely worth it

old wyvern
#

If nothing holds a reference to a class from that classloder, it would be eligible for gc right?

jovial warren
#

If I need to do some whack to try and force the GC into a corner, it's very debatable whether it's worth it or not

quiet depot
#

only if the classloader is closed yugi