#dev-general

1 messages · Page 340 of 1

prisma wave
#

Theoretically

quiet depot
#

it has to be closed and there has to be no references

prisma wave
#

Yeah

#

And even then it's pretty unpredictable

old wyvern
#

hmm

jovial warren
#

Yeah but the GC is a really complex system that just kinda picks what it wants and can do some weird things sometimes

#

Isn't it?

old wyvern
#

Might be worth it to ask chestly what he did

quiet depot
#

chestly's thing is more comparable to dcevm afaik

old wyvern
#

ah, I just remember him saying something about getting classloaders gc'd

quiet depot
#

not sure

#

I don't believe dcevm can even delete classes though

jovial warren
#

So GCing a class loader will also GC all of its classes right?

quiet depot
#

dcevm is pretty good but it too, in fact has limits

stuck harbor
#

man i was gonna set up dcevm

#

then i realised

hot hull
#

How does bukkit handle double blocked blocks, ie. bed, Block will enclose both locations right?

stuck harbor
#

if i want an efficient workflow, i wouldnt be using java

#

or the jvm

jovial warren
#

Since the class loader is what is keeping the classes loaded

old wyvern
#

so yes

quiet depot
#

yes bardy, but to gc a class loader it has to be closed and there musn't be a single reference to one of its classes

#

ensuring there aren't any references is a particularly difficult thing

jovial warren
#

Yeah

quiet depot
#

and that in general is why it's so "unpredictable" afaik

#

because while it may seem that you've eliminated all references

jovial warren
#

Especially if another plugin uses it as a dependency and so holds a reference to it

quiet depot
#

you in fact haven't, for some peculiar reason

jovial warren
#

E.g. an API

old wyvern
#

Yea you're probably better of allowing the plugin to manage its own "reload"

quiet depot
#

you need a mix of both for a true reload

#

there has to be management on both ends

jovial warren
#

If the plugin has an API that other plugins are using then surely those other plugins would need their class loaders destroyed too to remove the references they have

quiet depot
#

the plugin, and only the plugin, is capable of removing references to itself from its dependencies

#

but krypton, and only krypton, should be responsible for removing references to the plugin from krypton

prisma wave
#

Which makes things even more difficult

#

If you just want to reload one plugin

jovial warren
#

Yeah

old wyvern
#

You can isolate a classloader right?

quiet depot
jovial warren
#

Well, if a plugin depends on the server and reflectively accesses and controls the class loader and unloads the classes then there's nothing I can do about that ofc (in response to only Krypton being able to remove references to itself)

old wyvern
prisma wave
quiet depot
#

reflectively accesses and controls the class loader and unloads the classes

#

this isn't possible

#

classes are stored in 3 places in a url class loader

#

you can remove a class from all 3 places but it'll still be loaded

old wyvern
#

Even reflectively, I mean

quiet depot
#

yep

#

it makes me think something is going on natively

jovial warren
#

Maybe I should fight fire with fire then

#

A.k.a write some native stuff to destroy stuff on the JVM

old wyvern
#

uh

#

no

forest pecan
#

native keyword

quiet depot
#

such stuff could only be integrated into the jvm itself (afaik)

prisma wave
jovial warren
#

But then I risk fucking the JVM itself

#

Which would be beyond a bad day

old wyvern
quiet depot
#

You don't need intermediate channels

#

an intermediate channel is just another place for references to be misplaced, making it even harder to unload a classloader

jovial warren
#

Wait so I can shut off access to a module reflectively?

quiet depot
#

there's no reason communication can't happen directly between plugin classloaders

jovial warren
#

You can do that?

quiet depot
#

yes

old wyvern
#

Oh you mean by passing instances of classes loaded from one side of the group

quiet depot
#

you can access a class from another classloader

jovial warren
#

No, the other thing I said

#

With modules

old wyvern
jovial warren
#

You can deny reflective access through modules?

old wyvern
#

bm mentioned that modules do something similar

frigid badge
#

smh

quiet depot
#

I'm not experienced enough with modules to comment on that

old wyvern
#

Altho Im not at all familiar with how java 9+ modules work

prisma wave
#

Me neither

#

I'm probably completely wrong tbh

old wyvern
#

Might be interesting to see

jovial warren
#

Well then, guess it'll be google time when I get home

quiet depot
#

good luck lol

old wyvern
#

If so, you could hook up something similar to interprocess communication

quiet depot
#

I'm pretty sure we've gone through pretty much everything to cover in this topic

old wyvern
#

like in AIDL

quiet depot
#

aidl?

frigid badge
#

but to be completely honest, what's the use of reloading the jar itself

old wyvern
frigid badge
#

nobody in production would do this, only reloading configurations or data is useful

old wyvern
jovial warren
#

BM you're right

prisma wave
#

yay

stuck harbor
#

java... 9?

#

whats that

jovial warren
#

Module privacy applies to reflection too

stuck harbor
#

no java since java 8

prisma wave
quiet depot
#

welp, i'm off for the night, fun chat lads, glad I could finally use my obscure urlclassloader knowledge

old wyvern
#

lol

onyx loom
#

goodnight

#

big brain conversation man

old wyvern
#

gn

frigid badge
#

gn

frigid badge
#

I mean it would be fun to create ngl

#

but actual safe use

#

eh

stuck harbor
#

gn

jovial warren
#

But also a nightmare

prisma wave
#

bonne nuit

#

Now the serious discussion is over...

jovial warren
#

Also, I want Krypton to be at least somewhat idiot friendly

prisma wave
#

EVM will support native hotswapping and unloading everything

frigid badge
#

evm u funny man

#

where is compilation to arm???

prisma wave
#

arm is useless

jovial warren
#

Like you know that someone's gonna /reload and break everything

jovial warren
prisma wave
#

Simple? EVM
Lightweight? EVM
Portable? EVM
Fast? EVM

old wyvern
frigid badge
#

Hotel? Trivago

prisma wave
#

EVM can do everything arm does but better

jovial warren
old wyvern
#

EVM will be superceeded by ERM

jovial warren
#

Gl

prisma wave
#

😳

frigid badge
#

🤣

old wyvern
#

!!!

jovial warren
#

ERM = ?

frigid badge
#

🍋 RM better

old wyvern
#

xD

prisma wave
#

Lmao

#

elara instruction set

#

only 1 instruction

old wyvern
#

EIS

jovial warren
#

Quantum machine haha

prisma wave
#

let

frigid badge
#

will elara ever finish though

prisma wave
#

sure

#

Eventually

old wyvern
jovial warren
prisma wave
#

you may laugh

#

But the 80s taught people how to optimise code

onyx loom
#

80s? 🤔

prisma wave
#

And now elara is making fast code a reality again

onyx loom
#

more like the 40s

frigid badge
jovial warren
old wyvern
#

nah man 80's = 8000s

jovial warren
#

Gl with that one

prisma wave
#

elara has all

#

JVM is fast

frigid badge
#

ah shit you are right yugi

prisma wave
#

EVM is faster

old wyvern
#

This is technology far off into the future

jovial warren
old wyvern
#

🥲

prisma wave
#

it does

lunar cypress
prisma wave
#

Hmmm

frigid badge
onyx loom
#

yes

jovial warren
#

No

prisma wave
#

Is that a pcj reference

onyx loom
#

itll be taught in schools by 2022

lunar cypress
#

Maybe

old wyvern
#

Lets make a worm that makes every infected computer continuously compile Elara code

lunar cypress
#

This article was just too good to be serious

jovial warren
prisma wave
#

r/programmingcirclejerk

jovial warren
#

Lol

old wyvern
#

ikr

jovial warren
hot hull
#

I use 12, for that oompft

prisma wave
#

johnny do you have a link to that most compiled post

jovial warren
lunar cypress
#

I just posted it

#

or do you mean the reddit post

prisma wave
#

Oh was that it?

lunar cypress
#

yeah that's the article

jovial warren
#

I swear, fucking Kyori uses 2 space, and I had to write with that when I added ZLIB to NBT

prisma wave
#

Ohh yeah hahaha

#

I didn't even notice it

jovial warren
#

It was literally cancerous

hot hull
old wyvern
#

Cant you have your editor handle that conversion?

jovial warren
prisma wave
#

Absolutely

jovial warren
#

Just not nice to look at either though

#

All the surrounding code

prisma wave
#

vim can do it in just 45 illegible lines

#

Anyway yes, elara will definitely become the most compiled language

jovial warren
#

Lol

prisma wave
#

Orders of magnitude more compiled than competitors!

jovial warren
#

When pigs fly

onyx loom
#

pigs can in fact fly

#

trust me on this

prisma wave
#

compile to IR
compile IR to kotlin
compile kotlin
Compile kotlin IR to java
Compile bytecode to native

#

Ez

lunar cypress
# jovial warren You wish

You make fun of us talking about the most compiled languages, yet we don't even know what that means. Curious

jovial warren
onyx loom
#

i probably fit all of the above

#

but thats besides the point

#

elara will be the #1 compiled language!

prisma wave
#

Most compiled language in the world!

jovial warren
#

I swear you probably don't even know how a compiler works

#

Kali

hot hull
#

I don't

#

You're right

prisma wave
onyx loom
#

whats that got to do with anything

stuck harbor
#

it compiles

#

simple

onyx loom
#

my point stands

jovial warren
#

Lol

prisma wave
#

aren't compilers just String#replace...?

#

Seems pretty simple

stuck harbor
#

yeah

#

it just replaces the code with hex instructions

old wyvern
stuck harbor
#

simple

prisma wave
#

Damn

#

idk why people were saying it's hard to make a compiler

old wyvern
#

Did you know that there is a tiny Leprechaun inside your computer performing actions to make everything you do work?

jovial warren
#

Yeah but you can't make the most compiled language without first making a compiler to compile it

onyx loom
#

o

#

soon™️

jovial warren
#

Lol

prisma wave
#

more than halfway

#

Maybe

jovial warren
#

Maybe if BM forces Yugi to keep doing all the work then we might finally get there xD

old wyvern
#

mhm

prisma wave
#

Typer + compiler ez

jovial warren
#

I'm messing

prisma wave
#

🥲

old wyvern
#

No need to force anyone, its been less than a year since we even started

prisma wave
#

I did pretty much all of the interpreter

#

Yeah exactly

#

No rush

old wyvern
#

A fair amount of work has been done for that time frame

jovial warren
frail glade
#

Wish we could say the same about PDM relocations.

prisma wave
#

anyway syntax rework first

prisma wave
#

That would be nice

jovial warren
#

You have a PR there

old wyvern
#

PDM rewrite when?

jovial warren
#

Literally just waiting

prisma wave
#

Afaik

#

There's the asm port

stuck harbor
#

ew asm

#

just use wasm

#

nerds

forest pecan
#

lucko

prisma wave
#

Didn't realise yugi had done anything with that

forest pecan
#

relocation

prisma wave
forest pecan
#

it uses asm

old wyvern
#

I didnt

prisma wave
#

o

jovial warren
old wyvern
#

Theres only 1 or 2 commits on the asm port

forest pecan
old wyvern
#

We have the parser, lexer and an interpretter rn

#

typer is... in waiting for now

jovial warren
#

You talking about Luck's jar relocator?

forest pecan
#

yea

jovial warren
#

Ah

old wyvern
#

So rn typer and emitter left

forest pecan
#

It works pretty well

prisma wave
#

java tutorial pdm rewrite and typer coming tomorrow I guarantee it

forest pecan
#

also should i cache gson instances

jovial warren
#

PDM Kotlin rewrite

onyx loom
#

cant wait

prisma wave
#

In other words yes

forest pecan
#

kk

prisma wave
onyx loom
#

pdm kotlin rewrite doesnt make sense

forest pecan
#

is it fine if i have like one for each class

jovial warren
stuck harbor
#

PDM lisp rewrite?

old wyvern
#

Because KOTLIN

prisma wave
#

pdm runtime needs to be embedded into every jar

old wyvern
#

Dependencies

onyx loom
#

phat stdlib

prisma wave
#

I need to keep that runtime small

jovial warren
old wyvern
jovial warren
old wyvern
#

Did you read the next message bard? xD

jovial warren
#

Yes

prisma wave
#

and probably better

jovial warren
#

Also, the dream of not having to shade Kotlin will finally come true with Krypton

old wyvern
#

GsonProvider.getGson()

stuck harbor
#

all the gson i know is

  1. set pretty printing
prisma wave
#

nauseated face

old wyvern
#

Actually no

#

hmm

jovial warren
old wyvern
#

not Enterprise enough, sorry

jovial warren
#

Lol

#

That is Enterprise that makes sense

stuck harbor
#

AbstractGsonBuilderFactoryGetterBuilderSetterFactoryBaseAbstract.java

old wyvern
#

There we go

stuck harbor
#

each one adds 1 new variable

#

to the 'object'

onyx loom
stuck harbor
#

lol

#

thats me

#

also

#

transient

regal gale
#

I think Jackson is more on OOP?

stuck harbor
#

jackson ewwwwwwww

#

ewwwww

#

ewwww

#

eww

#

🤢

prisma wave
#

let str = toJson obj
let obj = fromJson 'Type str

old wyvern
#
/**
 * Creates a new variable
 * @ApiNote might create a singularity and result in a black hole
 */
class AbstractGsonBuilderFactoryGetterBuilderSetterFactoryBaseAbstract {
  ...
}```
stuck harbor
#

man those javadoc comments

#

i have no javadoc comments

#

cause i have no javadoc

#

cause implementing an API is harddd

prisma wave
#

okay

stuck harbor
#

like sure

#

i can make a custom event

#

but then i have to

#

do maven shit

#

mvn central

#

utter headache

jovial warren
stuck harbor
#

but whhyyy would i

old wyvern
#

Reminds me of the pain that is Aeson tho

prisma wave
#

Dw elara json will be easy to use

hot hull
#

In the year 2070 yes

pliant badger
#

Our grandchildren will code in elara

stuck harbor
#

imagine if torvalds made a language

pliant badger
#

It would be C

stuck harbor
#

yes it would

prisma wave
#

he would make rust because rust is good

stuck harbor
#

rust is good

#

meh I'll turn into a microsoft stan and use Checked C

pliant badger
#

He said in one interview (if i remember correctly) that he thinks C is the perfect language

stuck harbor
#

🙄

#

man is insane

#

I bet he never tried any lisp

onyx loom
#

iwanio

#

please

pliant badger
#

I honestly i am not able to do any C or C++

onyx loom
#

uve made atleast 3 clojure references in the past hour

pliant badger
#

memory management is just not for me

frail glade
#

It's really not as bad as you'd think.

#

It just makes some getting used to.

prisma wave
#

Not very well known at the moment

pliant badger
#

I heard of rust

stuck harbor
#

C has so many security poops caused by bad memory

prisma wave
stuck harbor
#

exactly

pliant badger
#

Low level stuff is preety hard to understand

stuck harbor
#

it is fast AND memory safe

stuck harbor
#

pffffffffft

pliant badger
#

i know they are actually

#

high level languages

#

still

prisma wave
#

They're low level nowadays

pliant badger
#

for today standards

stuck harbor
#

man I'll make a game in 6502 assembly

prisma wave
#

Since people only know expensive garbage collected null safety array length

pliant badger
#

I can barely get done hello world in assembly

stuck harbor
#

well yeah

#

duh

frigid badge
#

that's ez

stuck harbor
#

just send the signals to the LCD

#

read the datasheet

#

u nerd

pliant badger
#

Imagine reading docs

stuck harbor
#

it's the docs for ur CPU

#

boi

#

I'll install a 6502 into my workstation

regal gale
#

Visual Basic reversed_fingerguns

pliant badger
#

Iwanio is running discord on breadboards right now

#

big flex

stuck harbor
#

;)

prisma wave
#

Electron 🤢

stuck harbor
#

🤢

jovial warren
#

C memory management isn't even that hard

stuck harbor
#

torvalds probably thinks objective c is modern

stuck harbor
prisma wave
jovial warren
#

I swear most things get destroyed automatically in C when they ain't in use anyway

stuck harbor
#

man I'll pointer you in a minute

prisma wave
#

Stack memory does obviously

jovial warren
#

Yeah

#

Can't remember what the keyword for releasing memory is in C

regal gale
prisma wave
#

Github electron bad

regal gale
#

Oh that, welp

forest pecan
#
while (true) {
  System.gc(); 
}
#

what happens if i do this

prisma wave
#

infinite loop

#

Same as an empty while true

#

Probably

forest pecan
#

would it lag in between

#

well ig that depends

stuck harbor
#

death

jovial warren
jovial warren
#

Also, 2 space indent

#

Leave

forest pecan
#

google formatting

#

whats wrong

jovial warren
lunar cypress
jovial warren
forest pecan
#

yea

jovial warren
#

That's in Google's official style guide?

#

No way

forest pecan
#

you didn't know...

prisma wave
#

But it's slow as hell

forest pecan
#

you just knew?

prisma wave
forest pecan
#

Yeah

#

Fefo show bardy

obtuse gale
forest pecan
#

the picture of the code

#

overflowing onto 4 moniters

#

lol

obtuse gale
#

lmao

prisma wave
#

And even if it was cycling, i don't think thered be a noticeable difference

forest pecan
#

Yeah

forest pecan
#

Yesss

#

lol

ocean quartz
#

Empty allman block

while(true)
{}
old wyvern
#

ew

forest pecan
#

seeing {} tho

jovial warren
obtuse gale
#

md_5

while ( true )
{

}
forest pecan
#

Bro i fucking hate the people who add spaces in the loops

#

like i understand if its something like algorithm and formatting and easier to understand

old wyvern
forest pecan
#

but this

jovial warren
prisma wave
ocean quartz
#
for ( i = 0 ; i < 10 ; i ++ )
{

}
old wyvern
#

😈

forest pecan
#

i hate u

#

lmao

jovial warren
forest pecan
#

there is even a space between i and the ++

#

that really hurts

frigid badge
prisma wave
#

imagine writing braces tho

old wyvern
#

😌

forest pecan
prisma wave
#

shame IJ ruins it

old wyvern
#

it doesnt

prisma wave
#

By default it does

ocean quartz
#

Also @old wyvern @prisma wave, this would be an interesting feature for elara, a syntax for infinite loop

while {
}

As in just while without any condition

prisma wave
#

Ik you can change

old wyvern
#

We already have that I think matt

prisma wave
#

Do we?

old wyvern
#

I think we go

#

Not sure

prisma wave
#

¯\_(ツ)_/¯

ocean quartz
#

Oh shit, that's nice

old wyvern
#

Just need to let the condition be true if the next token is a {

old wyvern
#

No warning or anything

#
  • ligatures makes that look lit
prisma wave
#

I mean when you format it

#

It ruins it

old wyvern
#

ah I see

prisma wave
#

Turns it into i-- > j

ocean quartz
#

Oh interesting, go's version is

for {
}
hot hull
#

4.7k lines on bw so far, yikes

old wyvern
#

yea

#

go's for also works like a while

frigid badge
#

bw?

hot hull
#

bedwars

old wyvern
#
for i > 5 {

}
ocean quartz
#

You tell me

rotund vigil
#

I'm op, it still won't work

prisma wave
#

go for is nice

frail glade
#

Stick to 1 channel.

prisma wave
#

Very versatile

prisma wave
jovial warren
forest pecan
#

im at 18k lines 🥲

jovial warren
#

18k lines? pfff

#

GitHub seems to think I've added 386,361 lines and removed 193,970 lines for Krypton in 32 commits

forest pecan
#

enum class

#

lmao

jovial warren
#

totally not that the blocks.json file is 171k lines or anything

forest pecan
#

lmao

#

wait im not at 18k

#

im at 120k

hot hull
#

I mean I'm gonna hate myself when I start refactoring all this

jovial warren
hot hull
#

my potato code

jovial warren
#

right, should probably make a repo for the API in the Krypton org actually, thinking about it

#

tempted to call it "Api" just to piss everyone off xD

half harness
#

whats so bad about "Api"

hot hull
#

API

#

or sudoku

half harness
#

;-;

#

BedwarsApi

jovial warren
#

I swear the official Java convention is to have an abbreviation of 3 characters or less be fully uppercase

hot hull
#

I mean it makes sense for it to be uppercase

forest pecan
#

its an acronym

#

so it should be uppercase

jovial warren
#

oh btw, I might switch us to log4j 2 at some point

#

since log4j 2 is faster and supports async loggers

forest pecan
#

thank you

#

for not fucking using JAVA.UTIL.LOGGER

#

which is what Spigot

#

apparantly uses

jovial warren
#

we're already using SLF4J and Logback

#

just thinking of switching Logback out for Log4j 2

prisma wave
#

tfw your logging isn't fast enough

#

Nooooo

#

Logging is a HUGE hotspot in our Fermat's last theorem brute forcer

jovial warren
#

thanks for that Google

prisma wave
#

Wales 🤢

jovial warren
#

I know someone from Wales, I should tell them you said that

prisma wave
#

Please do

half harness
#

y do u need logging lib

#

println("[INFO] Hi")

#

ez

jovial warren
#

please leave

half harness
#

what???

jovial warren
#

I swear

half harness
#

...

jovial warren
#

you have about 5 brain cells on a good day

forest pecan
#

please leave

half harness
#

W H y

forest pecan
#

u suc

half harness
#

what does a logging lib have

prisma wave
#

Can't tell if you're trolling or not

forest pecan
#

dw its a dkim moment again

half harness
#

;-;

jovial warren
forest pecan
#

remember when he said kotlin was bad

#

now hes doing it again

half harness
#

kotlin is good

#

but

#

what exactly does a logging lib have

forest pecan
#

you said before it was bad

onyx loom
forest pecan
#

before you even knew it

#

LMAO

jovial warren
forest pecan
#

LMAO

prisma wave
#

Almost as if criticising a language you've never used is dumb...

forest pecan
forest pecan
#

remember these days

#

lol

half harness
#

lol

jovial warren
#

has anything really changed since then?

half harness
#

...

#

😦

jovial warren
#

I mean, not like dkim has really progressed in that time KEKW

half harness
errant geyser
#

He's trying ok

prisma wave
#

Dkim is pro in code cave

jovial warren
half harness
prisma wave
#

Helpful

jovial warren
#

is it just me or does code cave sound like you're referencing code combat lol

half harness
#

code cave should have levels

#

and xp

prisma wave
#

I agree

half harness
#

it'd be more active

jovial warren
#

I bet dkim can't even do code combat

errant geyser
#

What's code cave?

half harness
#

What's code combat?

prisma wave
#

Made in discord.elr

forest pecan
jovial warren
#

any British people here familiar with code combat?

prisma wave
forest pecan
#

is hc one

prisma wave
#

@half harness no

errant geyser
prisma wave
#

Code cave is good because I'm mod but it's also full of dumbasses

jovial warren
#

inv

half harness
#

lol

errant geyser
half harness
prisma wave
#

you're effectively immune

#

what are they gonna do, cry?

errant geyser
#

Well I meant being banned

jovial warren
prisma wave
#

well

#

most of them are just noobs

#

but theres this one guy

#

i cant really describe it

#

theyre braindead but incredibly overcompetend

#

wait what

#

my english died

#

thats not a word

#

overconfident*

errant geyser
#

Can we abuse help said person?

prisma wave
#

absolutely

hot hull
jovial warren
#

the first thing I see that is an issue is that it's Java

hot hull
#

Jump off a cliff

forest pecan
#

frosty did you write that code

jovial warren
#

I mean, you can't code anyway, so I'm not that surprised by this

hot hull
#

Yes 👀

forest pecan
#

it isnt really that bad

hot hull
#

What's so wrong about it, apart from functional interface abuse

jovial warren
#

I'm messing btw lol

#
  1. you don't need to use this unless it's necessary to do so
hot hull
#

Nah I prefer them, cleaner imo

jovial warren
#

like when an instance variable and stack variable have the same name

#

also, that execute method and the Arrays.asList have 8 space indents wtf

hot hull
#

4 too litle, my bad

forest pecan
#

i only this in constructors but its personal pref

jovial warren
forest pecan
#

lol

jovial warren
#

but that really doesn't happen in Kotlin unless you're stupid lol

#

also, Frosty wtf

forest pecan
#

i love how kotlin is much less verbose

hot hull
#

?

jovial warren
#

returns a Predicate<Event>

#

casts to another event

hot hull
#

shut up

jovial warren
#

the repeated cast as well

hot hull
#

I'll fix that eventually

#

Just trynna get shit working first lol

#

And before you ask what the point of this is, it's per world listeners

jovial warren
#

casts like that are dangerous

forest pecan
#

also is there a way so that intellij deletes semi colons automatically when coding in kotlin

jovial warren
#

totally didn't do that once in Krypton before I yeeted it because it was damn ugly

hot hull
#

yeye I believe I can yeet the lambda all together, just no clue how

jovial warren
#

I find it an inconvenience to have to press the right arrow all the way to the end of the line just to type it

forest pecan
#

i use java for my main library code

#

and kotlin for testing

jovial warren
#

why would you do that to yourself smh

forest pecan
#

well it has advantages cause kotlin tests are much easier to write

#

better testing overall ig

jovial warren
#

just use Kotlin everywhere lol

forest pecan
#

and i need to let my mind differentiate the two

#

lol

#

so my brain can realize that kotlin doesnt use semicolons

#

does kotlin even use any semicolons like anywhere in the language?

#

like not syntax wise

#

but like anywhere

#

besides like string names

jovial warren
#

if you want to put two things on the same line

#

you gotta use 'em

#

same as in Python

forest pecan
#

who would do that to theirselves

#

lol

jovial warren
forest pecan
#

LMAO

#

true

jovial warren
#

until you inevitably get rinsed by Python

forest pecan
#

indentation

#

python is basically executable yaml

#

lol

obtuse gale
#

skript tho

hot hull
#

leave

obtuse gale
#

nah I'm fine thanks

forest pecan
hot hull
#

You need jesus

forest pecan
#

Paid anti cheat made in skript

dawn hinge
#

I believe the link you just sent includes your cookies aswell

forest pecan
#

29 cookies

#

holy shit

dawn hinge
#

Noice

forest pecan
#

did you copy and paste that

#

XD

dawn hinge
#

I'm on my phone so no

jovial warren
#

oh btw, I'm on to designing the command manager, just thinking of how to do it

hot hull
#

I wanna buy that just to see the actual files kek

jovial warren
#

should I just have a few registration and deregistration functions?

forest pecan
#

its only 25 cents

dawn hinge
#

If it does actually work, its completely worth it lol

hot hull
#

No

jovial warren
forest pecan
#

LOL

jovial warren
#

because they block VPNs for non-supreme users

#

not kidding

#

fucking money hungry scumbags

#

also, the words "free" and "MC market" just don't go together do they

forest pecan
#

i was looking on the mineacademy site and i found this:

Our focus for this training is to teach you development and coding. If your dream is to become a developer at Google, or to offer your own development services, Project Orion is a great place to start.

#

dumbass you think you can fucking get into Google?

#

just by taking this one course for 20 days?

jovial warren
#

anyone can get into google with enough experience

hot hull
#

Not with that course

forest pecan
#

^

hot hull
#

It teaches shit, but it's 90% wrong

dawn hinge
#

"Is a great place to start"

jovial warren
#

isn't mineacademy that one run by that really shady guy who got banned from Spigot because he advertised literally everywhere?

forest pecan
#

yea

hot hull
#

CHAD

dawn hinge
#

Yeah

hot hull
#

kangarkoo

jovial warren
#

and then he complained that the price limit was "too low" in his blog

hot hull
#

dude would've probably charged 100 for a plugin no doubt

jovial warren
forest pecan
#

chatcontrol is literally only 200kilobytes

hot hull
#

Chatcontrol is utter shit

jovial warren
#

bUt iT HaS lOaDS oF FeaTuREs

dawn hinge
#

So rude!?!?

jovial warren
dawn hinge
#

Jokes aside, definitely

onyx loom
jovial warren
jovial warren
#

replace the words "snakes" with "spigot developers" and "on this mother fucking plane" with "complaining about these mother fucking limits"

#

honestly though, in the terms of spigot vs developers, that's one of the things I fully agree with md_5 on

#

some developers think that it is somehow their god given right to sell their shit on Spigot

#

also, for the CommandManager, ```kotlin
interface CommandManager {

fun register(command: Command)

fun register(vararg commands: Command)

fun register(commands: Iterable<Command>)

fun unregister(command: Command)

}

hot hull
#

Yes

jovial warren
#

and should I add an easy registerCommand method in Plugin to avoid you doing ```kotlin
class MyPlugin(context: PluginContext) : Plugin(context) {

init {
    context.server.commandManager.register(SomeCommand)
}

}

hot hull
#

I presume listeners will be done in a similar way when it comes to registration?

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

    init {
        on<SomeEvent> {
            // do some whack
        }
    }
}
hot hull
#

oh so no actual registration

jovial warren
#

or optionally, registerListener maybe, if you want to separate listeners into classes

jovial warren
hot hull
#

I see

jovial warren
#

or something like that

#

it'll use an event bus

#

which I still need to look into lol

#

a.k.a steal from Guava or LuckPerms and pretend I know what I'm doing

hot hull
#

Why reinvent the wheel fingerguns

jovial warren
#

wdym?

hot hull
#

bus

half harness
#

🚌

jovial warren
#

does anyone here know about how event buses work and wouldn't mind explaining it to me pls?

obtuse gale
#

just use KyoriPowered/event

#

ezpz

jovial warren
#

more like copy from kyoripowered/event

obtuse gale
#

fun fact, with the LP API you can subscribe to LuckPermsEvent and unlike stupid Bukkit it will be called for every event

ocean quartz
#

EventEvent

jovial warren
half harness
#

what is Unit

#

i always see it instead of void

obtuse gale
#

Nothing fingerguns

jovial warren
#

it's void that can be returned

half harness
#

oh

jovial warren
#

no

obtuse gale
#

xD

half harness
#

isn't that the same thing

jovial warren
#

e.g. ```kotlin
interface EventBus {

fun <T : Event> subscribe(subscriber: (T) -> Unit)

}

half harness
#

void and Unit

stuck harbor
#

void urMum(void, void, void void...)

jovial warren
#

void = Unit

#

but Unit is a return type

#

it can be returned

onyx loom
#

u can do stuff like return someVoidFunction() with Unit

obtuse gale
#

Void tho

half harness
#

so void and Unit are the same

onyx loom
#

basically yea

#

but unit better

half harness
onyx loom
#

its really not

onyx loom
#

its concise

obtuse gale
#

just return Object ez

half harness
onyx loom
#

player.sendMessage("hello")
return

return player.sendMessage("hello")

#

which do u prefer

#

if u say first i will smack u

half harness
#

second

prisma wave
#

the main reason for unit is that everything is a function

#

a function always returns something

hot hull
#

When you try and figure out why stuff doesn't work, but you made it uppercase instead of lowercase :sadge:

stuck harbor
#

sudge

prisma wave
#

meaning you can do () -> Unit rather than some weird syntax to represent "void"

jovial warren
#

@prisma wave teach me the event bus ways pls senpai

half harness
#

sodge

prisma wave
#

same answer as last time

hot hull
#

wait for the 4th

jovial warren
#

you don't know 😦

half harness
#

@prisma wave teach my the sftp script ways pls senpai

stuck harbor
#

This is an unregistered copy of Sublime Text

forest pecan
#

So a dude from the other discord decided to respond to the statements of why lombok is bad

jovial warren
#

"one of the most stable projects"

#

JetBrains remakes Lombok plugin because it breaks every other update

hot hull
#

We've seen this already

jovial warren
#

Heretere?

hot hull
#

mhm

jovial warren
#

who dis

hot hull
#

some nerd

jovial warren
#

it is a buggy mess, that's BS

#

"greasy neckbeard"

#

BM you just got owned

prisma wave
#

huh?

jovial warren
#

that's a world class insult I swear

onyx loom
#

lol

lunar cypress
stuck harbor
#

what

obtuse gale
stuck harbor
#

pdf?

#

iso?

onyx loom
#

paste

lunar cypress
#

not a file preferably

stuck harbor
#

wasm?

jovial warren
#

I swear you wrote ?plsnolombok BM

onyx loom
#

johnny^

lunar cypress
#

thank you

#

but jesus christ

onyx loom
#

this guy loves Furthermore 🤣

old wyvern
#

nvm lol

stuck harbor
#

moreover

#

forthright

#

ar y llaw arall wrong languag

#

wait

lunar cypress
#

debunk: So what?
why even care about stability?

old wyvern
#

Isnt that what piggy sent earlier?

half harness
#

@stuck harbor what is your pfp

stuck harbor
#

duck

half harness
#

@lunar cypress what is your pfp

obtuse gale
#

I mean...

forest pecan
#

cap

stuck harbor
#

sadge

jovial warren
#

also, tf is stability?

#

what does that even mean?

stuck harbor
#

something to do with stables

obtuse gale
#

Staple's?

lunar cypress
#

being prone to errors because of tiny changes

#

that's "unstable"

stuck harbor
onyx loom
#

wilko!

lunar cypress
#

and you can say what you want, that is the case with lombok. It remains to be a compiler hack, even if you dislike the term

#

It doesn't use an official API

#

or rather, it uses an internal API

#

Also: facts and logic

This "compiler hack" is likely more stable than most projects you'll ever make

stuck harbor
#

sult

lunar cypress
#

you could say that I was "owned" by this. "Destroyed", even

hot hull
stuck harbor
#

100%

forest pecan
#

:)

lunar cypress
#

I wonder what the argument against proper annotation processors is that do the same thing

jovial warren
#
interface EventBus<E : Event> {
    
    val subscribers: Map<E, EventSubscription<E>>

    fun call(event: E)

    fun register(subscription: EventSubscription<E>)

    fun unregister(subscription: EventSubscription<*>)
}
```wonder if that'll work 🤔
#

(using a functional interface because of unregistering)

#

though actually, is unregistering event listeners actually even a good idea?

onyx loom
#

o i forgot @hot hull what language we learning this week

jovial warren
hot hull
#

none

#

Busy

onyx loom
#

altho i only touched f# on that one day kek

hot hull
#

Same lol

jovial warren
hot hull
#

Legit got to many stuff to finish rn

stuck harbor
#

slep

old wyvern
#

E?

hot hull
#

E!

stuck harbor
#

I gotta make an AHK script to help me sleep

jovial warren
#
interface EventBus<E : Event> {

    val subscribers: Map<E, (E) -> Unit>

    fun call(event: E)

    fun register(subscription: (E) -> Unit)
}
```maybe this better
#

actually lucko's is better than that

#

it has register return an EventSubscription and takes a consumer as an argument

#
interface EventBus {

    fun <T : Event> subscribe(handler: (T) -> Unit): EventSubscription<T>
}
#

and then calling as well

stuck harbor
#

lucko be gg

#

no re

old wyvern
#

wait nvm xD

jovial warren
#

also, I swear some of my KDocs are gonna look like they were written for children lol

hot hull
#

for children, by children cursed_fingerguns

jovial warren
#
/**
 * Plain old survival mode. In this mode, you have a finite amount of health,
 * and you can take damage.
 */
```for example lol
jovial warren
hot hull
#

Slovenia

#

want my address?

jovial warren
#

gimme addr

static zealot
#

I can give you his address if you want

jovial warren
#

do it lol

#

dox frosty

stuck harbor
#

123 Sesame Street?

jovial warren
static zealot
#
Street:  Turjaška 4

City:  Preserje

Phone number  031-947-131

Zip code  1352

Country calling code  +386

Country  Slovenia```
jovial warren
static zealot
#

this isa ll his info

stuck harbor
#

bois

jovial warren
#

I call BS lol

static zealot
#

for legal reasons it is not

hot hull
#

Wrong

static zealot
jovial warren
stuck harbor
#

sadge

hot hull
#

I mean it's close, but you can't actually get my address from my ip

#

It'll just lead you to the data centre for some reason

static zealot
#

well because that's how it works

stuck harbor
#

yeah

hot hull
#

shut up

old wyvern
#

🙂

jovial warren
#

also, Event is an interface btw

#

thank me later

#

and no BS getHandlerList lol

ocean quartz
#

Never understood the handler list bs

prisma wave
#

To store handlers

jovial warren
#

also, Cancellable is also a thing

#
/**
 * An event that can be cancelled
 *
 * This has a single value, [isCancelled], which states whether the
 * event has been cancelled or not.
 *
 * @author Callum Seabrook
 */
interface Cancellable {

    /**
     * Whether or not the event has been cancelled.
     */
    var isCancelled: Boolean
}
```noice
#

and yes, that is a var, but that's literally the cleanest way to do it

#

trying to think if I can even do that lol

#

have cancellable events

#

but if I don't, I will literally be hung by the neck lol

jovial warren
old wyvern
jovial warren
old wyvern
#

Not sure why they chose so many things to be static

jovial warren
#

taking inspiration from messy donkey code is one of Bukkit's biggest mistakes

#

HandlerList<TEvent extends Event<TEvent>> wat

ocean quartz
#

I mean i know what it is, what I meant i never understood is because I feel like there is better ways to do it xD

old wyvern
#

ah, just bukkit being bukkit

old wyvern
#

Just an irrecoverable state tbh

jovial warren
#

event buses handle events through pub/sub

jovial warren
#

well it's either that or ```kotlin
interface Cancellable {

val isCancelled: Boolean

fun cancel()

}

#

I guess

#

idiots

onyx loom
#

asking questions that shouldnt be answered 🙂

jovial warren
#

right, close tab

distant sun
#

yea that's bad

distant sun
#

but doesn't that mean you can have only one listener per class?

jovial warren
#

ah yeah, good point

#

I mean, not even sure how I'll do listeners in classes yet (if I will)

hot hull
#

SRP cursed_fingerguns

distant sun
#

well yea, you can use multiple listeners for one thing

#

ex for an afk system you can use chat, interact, command events etc and just put them all in one class

half harness
#

would it be bad to have 2 classes

#

both with the same listener?

distant sun
#

depending on context