#dev-general

1 messages · Page 261 of 1

onyx loom
#

urs is the repost 🥲

distant sun
#

why does he looks like he's about to judge every line I write lol

surreal quarry
#

because he is

onyx loom
#

gaby obsessed with pikachu

#

looks cool tho lol

half harness
static zealot
#

what was that?

half harness
#

github repo for old FAWE

#

its deleted/hidden/private now

half harness
#

How does spigot... "give" its code to the plugins?

surreal quarry
#

wdym?

#

like how come you can use the methods

onyx loom
#

its just an api

#

application programming interface 🌝

ocean quartz
#

programming*

onyx loom
#

is it

#

i always forget 🌝

half harness
#

but how

#

does it have a plugins folder

#

and give the code to it?

#

like, how would I do it? (simply put, as I'm not actually going to)

onyx loom
#

i am so confused as to what ur asking now

half harness
#

lol

#

basically

#

in build.gradle I have things like compileOnly

#

but how does it get the code?!

surreal quarry
#

its available at runtime

half harness
#

but hOw

onyx loom
#

still confused.

half harness
half harness
onyx loom
#

what code

surreal quarry
#

think of a plugin as an addon to the server. its in the same java runtime environment (not sure if thats the right technical term but thats how i think of it) and so just like you have access to the code of another plugin on the server through its api, you have access to to the spigot code through spigots api

half harness
#

o

#

interesting

half harness
#

is sublime text good?

surreal quarry
#

yes

half harness
#

ok

ocean quartz
#

Vscode > sublime

surreal quarry
#

vscode is more of an ide feel

#

imo

half harness
#

but sublime takes 2 seconds to open up and literally 1 second to install

#

I did not know an app could install so quickly

ocean quartz
onyx loom
#

wtf its almost 3am

ocean quartz
#

Ikr

onyx loom
#

ok well uh

#

bed time for me 🌝

surreal quarry
#

i feel like for just a text editor to edit like single files, sublime is better

onyx loom
#

gn

ocean quartz
#

Gn kali

surreal quarry
#

yea i guess its just personal preference

#

but vscode is definitely good

#

i use it for web stuff

quiet depot
#

sublime is faster then vscode

#

nothing graphical beats sublime in speed

obtuse gale
#

Hello

#

I have a question

compact perchBOT
#

There is no time to wait! Ask your question @obtuse gale!

obtuse gale
#

BRUH

#

I have a question

compact perchBOT
#

There is no time to wait! Ask your question @obtuse gale!

obtuse gale
#

I have a question

compact perchBOT
#

There is no time to wait! Ask your question @obtuse gale!

obtuse gale
#

XD

#

So, how do config files supply stuff to the plugin?

regal gale
#

What?

obtuse gale
#

I mean, if I want to give a item to a player (/give sender item) and the item should be specified in the config, like (Item name: any_item_name), how will the plugin extract "any_item_name" to use it in a command so it can run /give sender any_item_name?

#

I'm just a beginner please spare me

hot hull
#

You'd just input your path and retrieve the data

obtuse gale
#

🤯

prisma wave
steel heart
#

BM can I relocate a package that is non existent so only the imports within my existing classes change

prisma wave
#

Presumably

#

But why

steel heart
#

Runtime dependencies

prisma wave
#

Oh cool, I know a library for that if you're interested

hot hull
#

kek

prisma wave
#

Jokes aside the problem there is that you need to relocate the jar too

#

Not just your imports

steel heart
#

I’m using hdl

#

So it’s Gucci

lunar cypress
#

Ew, no transitive dependency support

steel heart
#

Yeah I guess

#

Can you recommend something that supports it then ?

hot hull
#

PDM fingerguns

#

If it does thonking

prisma wave
#

It does

#

Or it tries to at least

#

Also ew, annotations

high violet
#

Mh. What's the reason Runtime Dependencies are better than actually shading them inside the jar?

#

If even there is one

#

I mean, i took time to learn Maven n shit and now you guys are all using runtime dependency injection

#

what the heck

prisma wave
#

reduces jar size mostly

high violet
#

understood

#

that's all?

prisma wave
#

pretty much

hot hull
#

basically

prisma wave
#

Spigot and things have a jar size limit

#

And if you're uploading every time it's nice to have a smaller jar

steel heart
#

Consider shading in every jdk and spigot version

#

Or at least as runtime dep

#

;:

#

)

prisma wave
#

Good idea

steel heart
#

Hmm do you know anything that is bigger?

prisma wave
#

bigger than the jdk?

#

Probably not much

#

Maybe every spring project

regal gale
#

@prisma wave in case you haven't read this, enjoy :)

prisma wave
#

WOW

#

What is this?1?1

old wyvern
#

Weird random ghost ping?

winter iron
#

If i want an event to fire before another, i make its priority low right?

prisma wave
#

you mean an EventHandler?

winter iron
#

err

#

yes

#

sorry

#

i want event A before event B

#

so i set event A to low?

quiet depot
#

yes

#

d;spigot eventpriority%lowest

ruby craterBOT
#
public static final EventPriority LOWEST```
Description:

Event call is of very low importance and should be ran first, to allow other plugins to further customise the outcome

winter iron
#

Pog

#

thanks

prisma wave
#

clash of code anyone?

obtuse gale
#

i can do a quick one

prisma wave
#

sure

obtuse gale
#

it is 2.20am

prisma wave
#

is it

obtuse gale
#

indeed

prisma wave
#

i see

#

well

#

im sure you can do one

#

or not 😦

obtuse gale
#

er

#

yes

#

one sec

prisma wave
#

k

#

alright

#

looks like it's just us lol

obtuse gale
#

welp

#

im fucked

prisma wave
#

oh this one looks like it sucks

obtuse gale
#

it does

prisma wave
#

ima try it

#

i think i have an idea

obtuse gale
#

wait is this all in one line?

#

00000 AAAAA xxxxx

prisma wave
#

yeah

#

o nice

obtuse gale
#

:))

prisma wave
#

i cba to try and do this

#

i could switch to kotlin

#

but that would be cheating

#

another?

obtuse gale
#

yeah ok

#

What language were u doing it in?

#
fun main(args : Array<String>) {
    val input = Scanner(System.`in`)
    for (i in 0 until 5) {
        val line = input.nextLine()
        val splitLine = line.split(" ")
        val left = splitLine[1]
        val right = splitLine[2]
        val numbers = splitLine[0]
        val sb = StringBuilder()
        var index = 0
        numbers.toCharArray().forEach {
            if(it == '0') sb.append(left.toCharArray()[index])
            else sb.append(right.toCharArray()[index])
            index += 1
        }
        println(sb.toString())
    }
}```
prisma wave
#

F#

#

or trying to

obtuse gale
#

o

#

actually imma sleep

prisma wave
#

ok

#

gn

#

ima try finish this off

#

yay got it working

#
open System


for i in 0 .. 5 - 1 do
    let LINE = Console.In.ReadLine()
    let parts = LINE.Split [| ' ' |]
    let (check, a, b) = (parts.[0], parts.[1], parts.[2])

    let extract i c = string (if c = '0' then a.[i] else b.[i])

    Seq.mapi extract check
        |> String.concat ""
        |> printfn "%s"

    ()

#

hot

stuck harbor
#

nice

old wyvern
#

Hmm, is there some sort of edit distance between n words, like more than 2

#

minimum edit distance

prisma wave
#

?

old wyvern
#

Levenshtein only works only when comparing 2 right?

prisma wave
#

Oh right yeah

old wyvern
#

Or is there some form of addition possible

distant sun
#

coc?

prisma wave
#

Just about to go out lol

#

Layer

#

Later*

#

@old wyvern sounds like it would be undefined

#

What's the distance between "hello", "hi" and "example"?

old wyvern
#

hmm good point

#

Im looking at something like this
ab aa ba ba

#

same length strings

#

minimum changes to make them all equal

prisma wave
#

Hmm

#

You could pick 1 as a base and then sum all of the other's distances

old wyvern
#

And take the minimum of those?

#

Might work I guess altho that may take too much time, ill give it a shot

winter iron
#

in kotlin, if i want a constant should i make it in companion object or top level

onyx loom
#

companion object

winter iron
#

any specific reasons why

onyx loom
#

good question

prisma wave
#

It kinda depends

#

Use companion object if you want it namespaced to the class

#

Otherwise use a constant

winter iron
#

thats what i was thinking

#

constant it is

#

looks nice as top level constant

prisma wave
#

top level*

#

Yeah

old wyvern
#

What seemed to work was getting the most frequent string in the collection and using that to get distance and sum

prisma wave
#

That works I guess

old wyvern
#

Also didnt have to use levenshtein, checking differences in the character seemed to give the right answer

#

Now im not sure if the question was wrong xD

#
fun main(args: Array<String>) {
    val str = readLine()!!
    val k = readLine()!!.toInt()
    val size = str.length / k
    val sp = str.windowed(size,size)
    val selM = sp.groupingBy { it }.eachCount().maxBy { it.value }!!.key
    val res = sp.map { distance(selM, it) }.sum()
    println(res)
}


fun distance(a: CharSequence, b: CharSequence): Int {
    var d = 0
    for ((index,c) in a.withIndex()) {
        if (c != b[index])d++
    }
    return d
}```
this is what worked
prisma wave
#

Horrible

#

But nice 👍

hot hull
#

hideous indeed

old wyvern
#

xD

#

What

ebon hearth
#

oh sorry for my bad english i can prepare better to read

#

wait a sec

old wyvern
#

Are you taking about skript by any chance?

ebon hearth
#

yes

half harness
#

👀

old wyvern
half harness
#

lol

ebon hearth
#

oh okay

shadow wasp
#

any way I can force a delayed task to run before the server shuts?
BukkitScheduler#getPendingTasks allows you to find the ids of pending tasks but how would I run a task from it's id?

half harness
#

unless

#

it's possible to get a runnable from task id

shadow wasp
#

figured that might be the only way

#

that's I'm wondering

#

I just don't want to have to store a lot of tasks that way if most of the time it won't be accessed

half harness
#

well it won't really matter ;-;

#

not like its gonna bring ur tps to 1

prisma wave
#

idk what version you're on but pendingTasks returns a List<BukkitTask> for me

half harness
#

but

#

you can't run that task

#

you can only do things like check if async or get the id

prisma wave
#

hmm true

#

you could probably use reflection to get the underlying Runnable

#

but that's hacky

half harness
#

huh?

prisma wave
#

BukkitTask is eventually just a wrapper of a Runnable

old wyvern
#

xD

obtuse gale
#

BukkitRunnable cct

old wyvern
#

Copy pasta

shadow wasp
#

docs are wrong but you can see the return type is correct

prisma wave
#

"asynch"

shadow wasp
old wyvern
#

xD

shadow wasp
#

BukkitTask is a separate interface

prisma wave
#

No, I meant BukkitTask - but having looked at the implementations it's not that simple for the repeating / async ones

half harness
#

hm

shadow wasp
#

I'd imagine there would be a hacky way of getting the runnable from the task id but I don't know where to look

half harness
#

hacky

old wyvern
#

Yea

half harness
#

thats what bm said

obtuse gale
#

Hjallo

half harness
#

;-;

#

hi

prisma wave
#

yeah CraftTask just wraps it

old wyvern
#

actually wait no

prisma wave
#

CraftAsyncTask and CraftFuture are more complex

#

nvm

shadow wasp
#

what is the implementation of BukkitScheduler

prisma wave
#

they all extend CraftTask 🤣

errant geyser
#

BM what's that extension function u like to use for events?

old wyvern
#

oof

prisma wave
#

CraftScheduler

prisma wave
#

you mean like fun Event.handle()?

errant geyser
#

Yeah

old wyvern
#

anyname katsu

#

Thats equvalent to a function that takes the event as argument

#

Unless you meant something else?

#
@EventHandler
fun PlayerJoinEvent.handle() {

}
shadow wasp
#

what is the current state of kotlin for spigot plugins? I barely see it used

prisma wave
#

let handle(PlayerJoinEvent event)

#

You're not looking in the right places

#

I use it whenever I can, so do a lot of people here

shadow wasp
#

When making plugins for myself I love using it because it looks so much better and it's faster to write, but unfortunately if i'm making plugins for someone else they usually want java

old wyvern
#

Only issue would be filesize afaik

errant geyser
#

Kotlin is epik

old wyvern
#

Theres no other reason to be specific

errant geyser
#

Not as epik as Elara though

old wyvern
#

Ask them why they want java

shadow wasp
#

I think it's because they want other developers to be able to work with the source

old wyvern
#

Ah, if their team mostly uses java then thats fair

errant geyser
#

Kotlin isn't that hard to understand

prisma wave
#

you overestimate the average spigot developer's intelligence

shadow wasp
#

but i assume if they want changes down the line

#

lol

old wyvern
#

Provide low cost/ free fixes

#

Ofc do keep a limit

prisma wave
#

a small price to pay for kotlin

shadow wasp
#

i already do, current client has a very confusing team

onyx loom
shadow wasp
#

they want a large plugin, but are getting different developers to make separate plugins with the idea of merging them once they are all finished

prisma wave
#

😔

errant geyser
onyx loom
#

lol

shadow wasp
#

with no core and no central utilities, I don't know how it's going to work

#

someone is going to have a painful job

prisma wave
#

that's just...

shadow wasp
#

I have no access to any one elses code either

errant geyser
#

jeez

prisma wave
#

i don't understand why you'd want to have everything in 1 plugin?

#

there's no benefit to it

shadow wasp
#

well I assume that's how it's going to work, because I'm working on 1 half of a gui, and another developer is working on the other half of the very same gui

#

so they can't be separate plugins

onyx loom
#

wtf

shadow wasp
#

honestly, not a clue

prisma wave
#

what the

errant geyser
#

what the kek

#

Someone needs to get slapped

prisma wave
#

i hate it here

shadow wasp
#

I don't think anyone has heard of github or any source control tool

half harness
#

lol

prisma wave
#

of course they havent lmao

shadow wasp
#

just work separately and then someone gets the job of putting them together

half harness
#

🤔

shadow wasp
#

manual merging

onyx loom
#

🥲

prisma wave
#

i feel so sorry for whoever has to do that

shadow wasp
#

i'm making sure that's not me

half harness
#

🤣

surreal quarry
#

wtf am i reading

#

why would someone do that

errant geyser
shadow wasp
#

so, what's best

  1. using reflection to get the pending tasks and running them
  2. storing block + position info in either a hashmap or db which will get queried before the server shuts down
prisma wave
#

the first is less effort in the long term

#

but it's hacky

shadow wasp
#

I have a bunch of tasks that change the type of a block after a certain amount of time

#

can the first be done without reflection?

errant geyser
#

Is Gaby being paid for that status or what

onyx loom
#

thats his

errant geyser
#

ah

#

Makes more sense

surreal quarry
#

lmao

prisma wave
#

i think anyway

shadow wasp
#
((CraftTask)Bukkit.getScheduler().getPendingTasks().get(0)).run();
#

surely it's not this simple

half harness
#

lol

prisma wave
#

try it

onyx loom
#

what the frick

prisma wave
#

im pretty sure that will work

onyx loom
#

my windows has basically crashed

shadow wasp
#

if it is, why isn't it a part of the spigot api?

onyx loom
#

why can i access everything but i cant open the start menu or file explorer??????????????

prisma wave
#

possibly an oversight

shadow wasp
#

windows bad lol

prisma wave
#

but also because the api usually only provides the interfaces

onyx loom
#

shut the fuck up

#

🥲

prisma wave
#

the scheduler implementation is part of craftbukkit

#

because it's pretty closely tied to the server

onyx loom
#

no

#

cba

half harness
#

is there a task bar

#

at bottom

#

or is it blank

prisma wave
#

upgrade your kernel without restarting OH WAIT you can't

winter iron
#

Is it possible to return a value for placeholder request which comes from an async database call
i dont think it is
Im tryna grab some database data and return it as placeholder

prisma wave
#

nope

#

cache it

winter iron
#

😦

half harness
#

@onyx loom is there a task bar at bottom
ok then ;-;

prisma wave
#

database calls in placeholders, very bad

winter iron
#

yeyeye

#

i shall cache the data

onyx loom
#

my solution is to restart dkim

#

but im not gonna 🥲

prisma wave
#

classic windows

onyx loom
#

bruh this is so weird tho

#

im not even doing anything

#

literally windows has just shit itself

prisma wave
onyx loom
#

time to switch to linux!

prisma wave
#

good idea!

onyx loom
#

no.

prisma wave
#

all the coolest people use linux

#

me, piggy, james, etc

onyx loom
#

guess im not cool

half harness
#

my

#

question

#

please

prisma wave
#

iwanio too iirc

onyx loom
#

why

half harness
#

;-;

#

fInE

onyx loom
#

BRUH

#

i cant even print screen

#

LOL

half harness
#

😐

#

try killing explorer and reopening

onyx loom
#

😐

half harness
#

😐

prisma wave
half harness
#

is there a task bar

onyx loom
#

DKIM

#

my solution is TO RESTART

winter iron
half harness
onyx loom
#

no

#

i only need file explorer so i can do my homework

#

but i guess thats off the table now 🥲

half harness
#

🙄

#

i said to try restarting file explorer

#

but u dont want to listen 😭

onyx loom
#

ah yes let me restart a process that isnt even running

#

great idea!

half harness
#

is there a task bar

#

at the bottom

onyx loom
#

😐

half harness
#

also open up task manager

onyx loom
#

i can access task manager

#

its not there

half harness
#

okay

#

go to details

onyx loom
#

😐

half harness
#

is there explorer?

#

if not

#

then do winkey + r then put explorer

#

i think

prisma wave
#

get a usb stick, download "Manjaro KDE", flash to the usb, and then boot into that

#

then double click "Install Manjaro"

onyx loom
#

great idea bm

prisma wave
#

then wipe your windows partitions

half harness
#

🙄

#

then do winkey + r then put explorer

onyx loom
#

except for the fact that i dont have a usb stick 🙃

half harness
#

then do winkey + r then put explorer

#

bgsaiudhsaiudhsa

prisma wave
#

🙄

#

dvd?

onyx loom
#

ur solutions were already tried before u even said lol

half harness
#

not IGnORE

#

😐

shadow wasp
#

i mean if you have a second drive could always install to that too

#

can confirm by the way, it did work, so that was easy

prisma wave
#

nice

ocean quartz
weary epoch
#

bruh

#

what is that

ocean quartz
#

It works

weary epoch
#

mom can we get working code

#

no we have working code at home

half harness
#

what is home

weary epoch
#

the working code at home

5=6
weary epoch
shadow wasp
weary epoch
# half harness what is home

the joke here is that he is referring as if he is homeless, this is a comically funny "sad joke" and is enjoyed by many

ocean quartz
#

I legit never know if his questions are joking or not lmao

half harness
#

uh

#

ok

weary epoch
#

whos

ocean quartz
#

Dkim's

weary epoch
#

oh

half harness
#

😐

distant sun
ocean quartz
distant sun
#

-300kb/s

onyx loom
#

cursed

hot hull
#

That code is making me want to go down the suislide

onyx loom
#

🥲

prisma wave
#

it's pretty complex so far but I think i understand the first few pages lol

#

yeah nevermind

hot hull
#

The fuck is that

half harness
#

XD

prisma wave
#

i have no idea

#

im just googling all of the symbols

#

this is like an and gate i think

#

¬ is like ! in terms of inverting

#

ok so the first 2 make sense

onyx loom
#

this mans solving the unknown questions of the universe rn

prisma wave
#

the first is like A & !A, second is !!A = A

#

Lmao

#

Doubt

lunar cypress
#

I was thrown into all of this in my first week of uni 🥶

#

So the backwards E means "there exists"

#

The others you've figured out correctly

#

And => is an implication, meaning if the left is true the right must be true

frigid badge
#

yoo type theory and functional programming

hot hull
#

Any reason why it's such dumb symbols?

frigid badge
#

I'm reading that

#

lmao

lunar cypress
#

And to answer the question I don't know that particular paper/repo but it looks good to me

#

wow I'm finally back at my PC again this feels unreal

prisma wave
#

Backwards E is a bit weird

#

But I suppose that makes sense

#

What about the upside down A?

lunar cypress
#

That means "for each"

#

We call them "quantifiers" although I don't know if that is the correct term for english

#

The relationship between the two is a bit like the one between and and or

#

ah yeah they're called quantifiers in english too

#

oh I just noticed you confused "and" and "or" earlier

#

v is or

prisma wave
#

oh yeah it is my bad

obtuse gale
#

Bruh I had to study that shit in philosophy in high school

prisma wave
#

¬∀x.¬P(x) ⇒ ∃x.P(x)
so what does the . mean?

#

i assume P(x) just means a function call?

obtuse gale
#

🌝

prisma wave
lunar cypress
#

I assume the dot is just used to separate the quantifier expression from the thing it's quantifying

#

We use a colon for that but I've heard there are different ways

prisma wave
#

Right

#

What's this called so I know what to google? Logic expressions?

lunar cypress
#

And yeah you can think of P(x) as a function call, or depending on the context just a paramaterised expression that was introduced earlier

prisma wave
#

Okay

lunar cypress
#

which is the same in a sense

#

again don't know the english term but translating directly from german gives me predicate logic

prisma wave
#

"First Order Logic" is the first thing that came up

lunar cypress
#

seems like that's about right

prisma wave
#

I'll look into that a bit

#

yeah

#

So ¬∀ is "not for each"?

#

that doesn't really make much sense

lunar cypress
#

It does

#

It means there exists at least one case where the condition is not true

prisma wave
#

Ohh yeah

lunar cypress
#

There you have the connection to the other quantifier

prisma wave
#

so it's like !allMatch

#

I see

lunar cypress
#

Yeah, allMatch and anyMatch are exactly that

#

bcs !allMatch test <=> anyMatch !test

shrewd owl
#

Where can i find people that can make plugins for free

onyx loom
prisma wave
#

So the whole thing would read as something like ```
If there is at least 1 x where P(x) is not true, it is implied that there exists an x where P(x) is true

Is that correct?
#

im not sure the logic there makes sense so maybe it isn't

lunar cypress
#

no, it's if P(x) is not *not* true for each x, then there exists an x where P(x) is true

prisma wave
#

Oh lol

#

so it's just common sense

lunar cypress
#

yeah, it's one of the fundamental transformations you can make

#

It's not just an implication, it's an equivalence even

#

meaning it also goes the other way around

prisma wave
#

yeah

#

LMAO it explains it right underneath

#

which can be given the gloss
If it is contradictory for no object x to have the property P(x),
then there is an object x with the property P(x)

#

okay

#

well

#

That makes sense

#

and the other 2 are kind of the same thing

lunar cypress
onyx loom
#

handwriting reveal

#

i rate that handwriting a 4/10

half harness
#

3/10

prisma wave
#

Interesting

#

Although it seems strange to have such detailed definitions for things that are essentially common sense

lunar cypress
#

come on it's not that bad

onyx loom
#

🥲

prisma wave
#

then again didn't someone write a 300 paper proving 1 + 1 = 2?

old wyvern
#

Yea, for us we had a tilda instead of the dash thing tho

prisma wave
#

I saw someone do it in Rust's type system lmao

old wyvern
#

~A

lunar cypress
#

well depends on what you work with as your ground material

obtuse gale
#

Start with the premise that 1 + 1 ≠ 2 and work your way out to disprove that instead

lunar cypress
#

same thing, the important bit is what you start with

half harness
prisma wave
#

yeah they redefined addition lol

#

and a lot of other axioms

lunar cypress
#

turns out there is a lot of different ways to define and derive things in maths

#

which reminds me, I'm procrastinating the assignment that's due tomorrow 🥲

prisma wave
#

classic

#

this paper is pretty interesting

#

it almost makes sense 🥲

lunar cypress
#

was the predicate logic fundamental thing part of it?

hot hull
#

No it doesn't

prisma wave
#

I'm not sure

#

in the next page it said why that principle is flawed lol

#

so I think that was just the prerequisites

lunar cypress
#

lol

prisma wave
#

The problem with the principle is that it asserts the existence of an object without giving any indication of what the object is. It is a non-constructive method of proof, in other words.

lunar cypress
#

Oh, yes

#

That is actually a problem theoretically

#

because it allows you to construct paradox situations

#

I'm relieved, I thought it was something else, then my world would have crumbled lol

prisma wave
#

haha

hot hull
#

May I ask what use would you get by learning this?

prisma wave
#

any examples of a paradox? i can understand why but i can't really think of any examples

hot hull
#

Appart from drastically fucking up your brain

prisma wave
#

apparently it's useful for designing programming languages

#

I can see why, it's all about Type Theory

#

although it's a bit advanced for elara lol

#

possibly

#

maybe

lunar cypress
#

The paradox happens when you ask the question if R is contained in itself

#

Because if that were the case, it can't be contained in itself

#

And if it's not the case, it must be contained in itself

prisma wave
#

ohh yeah I think I've heard of that

lunar cypress
#

And you can derive a lot of other stuff from that

#

with similar ideas

half harness
#

wayback machine is the best

#

👀

prisma wave
#

im losing braincells from this conversation in Code Cave

half harness
#

i have no idea what u guys are saying

#

what are structs?!

prisma wave
#

classes without the methods

#

basically

half harness
#

o

prisma wave
#

just like data

#

only

half harness
#

also gradle not working

#

:((

prisma wave
#

:((

half harness
#

=paste

compact perchBOT
#
HelpChat Paste

Please use a paste service to share configs, errors, code and long logs.
HelpChat Paste

lunar cypress
compact perchBOT
half harness
#

this is my build.gradle

#

pls someone help 🙂

prisma wave
#

whats not working

#

"we cant help unless you send a stacktrace"!!

half harness
#

lol

#

basically its as if worldguard isn't listed in there

#

no build errors

prisma wave
#

com.sk89q.worldguard:com.sk89q.worldguard:worldguard-legacy:6.2

half harness
#

that is correct

#

I need 1.8 😐

#

😦

#

I'd switch if I could

hot hull
#

ngl BM, language theory is probably easier than understading women, might actually read on that

prisma wave
#

Lmaoo

prisma wave
half harness
#

oh

#

oh...............................

#

lmao

winter iron
#

if i am handling user data i wanna load when the login and save when the disconnect right

#

and just remove it from my maps

lunar cypress
winter iron
#

memory management

hot hull
#

Depends Sensei

#

How much data we talking

half harness
#

Still not working

winter iron
#

at the moment my User class stores uuid and about 8 ints

#

but im expecting to expand to alot more

#

just wanna make sure the base is all well and good

#

before i add

hot hull
#

Should be fine to have it loaded on enable and saved on disable

#

Probably more impact if the user keeps rejoining than having it stored all the time

winter iron
#

what if there was some sort of time to live that removes it say 5 mintues later

#

some runnable

#

and if they rejoin

#

just cancel it

hot hull
#

Could have an expiring cache

winter iron
#

May as well right

#

i mean im working on a custom server i doubt i will ever release, more just for practice

#

so i may as well try it

prisma wave
#

@ocean quartz sorry for ping, but what's the best way of making a "dynamic" menu with your gui lib?
I was just gonna use recursion (re-generate and open a new menu whenever the data updates), but that activates the onClose action which I only want to happen when they actually press esc
This didn't work so I tried just re-adding all the GUI items but now none of the actions work.
Is there an easier way?

distant sun
#

there is update()

prisma wave
#

o

#

that will probably work

#

i was using player.updateInventory()

#

lemme try

distant sun
#

Nah

#

d;spigot player#updateInventory

ruby craterBOT
distant sun
#

"Player's entire inventory"

prisma wave
#

yeah that works perfectly

#

ty

distant sun
#

Np

oak raft
#

1.8 ftw

#

why do u have 1.8 server tho

half harness
half harness
#

1.8 is fun to play, but horrible to develop on

winter iron
#

if im gonna load player data should it be done on the AsyncPlayerPreLoginEvent or PlayerJoinEvent

#

i assume prelogin

#

since its async

half harness
#

d;spigot PlayerJoinEvent

ruby craterBOT
#
public class PlayerJoinEvent
extends PlayerEvent```
PlayerJoinEvent has 5 methods, and  1 extensions.
Description:

Called when a player joins a server

half harness
#

d;spigot AsyncPlayerPreLoginEvent

ruby craterBOT
#
public class AsyncPlayerPreLoginEvent
extends Event```
AsyncPlayerPreLoginEvent has 14 methods, and  1 extensions.
Description:

Stores details for players attempting to log in. This event is asynchronous, and not run using main thread.

tranquil crane
#

I'd just suggest loading it in PlayerJoinEvent since you know 100% that the player will be connected at that point

#

PreLogin the player has started connecting but still isn't even fully authenticated or checked for the ban list so that's a bit premature for loading data in most cases

half harness
#

@winter iron some info ^

winter iron
#

if i set to highest priority on the eventhandler and check the login result

#

would that be good enough tho

#

if the login result is allowed

#

should be fine?

half harness
#

btw highest priority = run last
just saying, people usually get it reversed

tranquil crane
#

If you want to prevent the player from joining until your data is loaded for them then yes, listen on the monitor priority and check if the login is allowed, that's pretty much the only use case I can think of for using that event for loading data

#

Since the event is done in a separate thread it should be safe to run a database query in there or something, it will prevent the player from joining while the data is loading but that's probably what you want

winter iron
#

ye

#

so lets assume its loading the data

#

and they disconnect as its loading

#

how would i check for that

old wyvern
#

Why would you want to check that case?

winter iron
#

so im gonna load the data in prelogin and if they disconnect its gonna save the users data and clean up some stuff

old wyvern
#

It would probably be a better approach to use some expiring cache and save on expiry

winter iron
#

which is why i wanna see if there is a way to see if they dc whilst prelogin

#

ye

#

ive got it saving periodically whilst player is on

#

and when they dc

#

i have a task that waits 5 mins before cleaning up the user

#

but in case they connect and disconnect same time

#

before loading

#

is there a way to check for it

#

if not ill just run my cleanup task on prelogin too

#

and check if the player is offline it cleans up fine

tranquil crane
#

They won't be able to connect and disconnect at the same time if you hang the PreLogin thread

#

it's also extremely unlikely you would run into any issues with that happening anyway, I load data in the join event and have never once seen an issue with somebody disconnecting while the data was still loading

winter iron
#

When you login to a server u can cancel it, does that just throw the quit event or smth

tranquil crane
#

PreLogin doesn't start until the connection isn't cancelable anymore I bekieve

winter iron
#

hmm

#

ok

#

ill do some testing

#

thanks

tranquil crane
#

After the client authenticates with the server it's no longer cancelable.. I know this because I modified a server to never send world data to the client and it just softlocks them on the Loading world... Screen forever

#

do not recommend

winter iron
#

xd

ocean quartz
prisma wave
#

hmm

#

i'll stick with update for now

#

idk how many will change, it depends

forest pecan
#

fck

#

i lost my daily streak

obtuse gale
#

weren't you offline for like a whole 2 weeks or more?

forest pecan
#

no

#

i was still doing commands

#

in the bot channel

ocean quartz
#

Ignore the part where he uses public fields, it's very beginner

#

@half harness You specially, at the beginning he explains, instance, object, and class

onyx loom
#

pinging someone specifically when they havent even asked for it 😭 😭

ocean quartz
#

He has asked that many times so yeah worth pinging

surreal quarry
#

lmao

surreal quarry
#

watch the beginning of the video hes saying lol

half harness
#

onyx loom
#

good video

half harness
#

🙄

ocean quartz
half harness
#

;-;

#

nvm

surreal quarry
#

anyone know if theres a way to make git branch --list show as just a list in the console instead of the man page format

#

i have to hit q every time i list something

forest pecan
#

bruh

#

i shaded in a library

#

my plugin went from 70kb

#

to 100 megabytes

#

🥱

surreal quarry
#

pdm

#

pdm

ocean quartz
#

What are you even shading?

onyx loom
#

its not like u have terrabytes of storage! 🌝

forest pecan
#

an audio encoding library

#

lol

onyx loom
#

(or atleast id hope u have atleast 1tb in 2021)

surreal quarry
#

still lists it the same way

#

unless you were just pointing out im a dumbass for using --list

lunar cypress
#

ah my mistake thought --list was enabling that

forest pecan
#

when you realize your code takes long to execute so you have to use a second thread

#

🌚

quiet sierra
#

Thanks

#

Really cool

forest pecan
#

ty intellij

onyx loom
#

switch to netbeans

#

the SUPERIOR IDE

quiet sierra
#

Ms paint IDE

prisma wave
#

Sounds to me like you would benefit from E L A R A G E N E R I C S

half harness
onyx loom
#

no

forest pecan
#

yall dumbasses obviously paper and pencil is the best ide out there

#

"infinite possibilities"

#

just draw a run button

#

boom you run the program

half harness
#

😮

#

idk how I didn't think of that!

quiet sierra
#

just bring a wire to your motherboard

#

shock it a few times

#

done

prisma wave
#

short a few pins

#

Ez

quiet sierra
#

ez

surreal quarry
forest pecan
#

omg

#

i got my plugin to work

#

the only issue is

#

it stalls the server

#

cause it runs on the main thread

#

👺

surreal quarry
#

sounds like it doesnt work

forest pecan
#

nah

#

it just takes so long to run

#

cause of decoding and everything

#

so it stalls the server

#

lol

quiet sierra
#

async

forest pecan
#

yea

#

im forced to use threads

half harness
quiet sierra
#

or completablefuture

obtuse gale
#

ExecutorService fingerguns

ocean quartz
#

Coroutines fingerguns

surreal quarry
#

one day i need to actually learn how to use coroutines properly

prisma wave
#

Coroutines are amazing

#

But pretty tricky

surreal quarry
#

yea ik they are awesome i just have yet to learn them lol

prisma wave
#

I still don't fully understand them

#

They're cool though

surreal quarry
#

can you use them in place of like the bukkit scheduler?

prisma wave
#

Just add suspend everywhere until things work

#

Yeah

#

There's a library that combines them both

#

Or they can just replace it

surreal quarry
ocean quartz
#

You don't need that, just use normal coroutines

surreal quarry
#

if i have data stored in json files vs a database should getting that be run async as well

ocean quartz
#

Ideally

surreal quarry
#

alr time to learn coroutines then

forest pecan
#

Guys i repeat

#

my plugin has increased 7 megabytes

#

from 100 -> 107

obtuse gale
#

lol

#

Damn field access breakpoints really slow down the program speed

onyx loom
#

omg pog

#

107mb = enterprise solutions

prisma wave
obtuse gale
#

"Sk" brings me nightmares

prisma wave
#

🥲

obtuse gale
#

wasn't gonna

#

buenas noches 🙂

glad tide
#

hi

obtuse gale
#

hello there, unmentionable user

ocean quartz
#

@ٴۢ#8153 Freaky name

static zealot
#

o

surreal quarry
#

yea it like flips it lmao

lunar cypress
#

That just happens with certain unicode characters bcs they're read from left to right

#

Right to left

#

How do I keep confusing that

regal gale
#

That is most commonly in Arabian unicode

lunar cypress
#

Not just that

#

Not sure where this particular char comes from, but one major language that's read that way is Hebrew for example

quiet depot
#

@glad tide names need to be mentionable here

forest pecan
#

ay

#

i reduced the size of my plugin

#

by 50 megabytes

half harness
#

oh jeez

obtuse gale
#

"plugin"

#

Lol

#

That's larger than the final server jar still

forest pecan
#

yea lol

half harness
obtuse gale
#

😏

forest pecan
#

thats

#

what

#

she

static zealot
#

didn't say\

forest pecan
#

yes

forest pecan
#

does anyone know what operating system server hosting companies use?

#

im guessing linux

obtuse gale
#

Most likely

#

Even Microsoft for sure lol

surreal quarry
#

macos

half harness
#

Make a plugin that detects the OS 🙂

surreal quarry
#

or windows xp

glad tide
surreal quarry
#

@ocean quartz if i build triumph chat is it ready to use or not yet?

ocean quartz
#

I can let you know once it's ready

surreal quarry
#

sounds good 👍

half harness
#

what should I do

#

when I have 30+ unfinished projects

obtuse gale
#

start a new one

#

30 is weak

half harness
#

oh

#

that was not the advice i was expecting 🥲

junior granite
#

any advice for a tablist

#

on bedwars

#

coz on mine its not showing the team colors

obtuse gale
junior granite
#

okay

obtuse gale
viscid charm
#

Are utils suppose to be static?

prisma wave
#

Yeah

obtuse gale
#

pro gamers just name all their classes with Util as a suffix to the class name, then make all the methods static

prisma wave
#

🥲

obtuse gale
#

coc anyone?

prisma wave
#

good idea

obtuse gale
#

indeed

hot hull
#

Later bm

#

Gotta finish this assignment first

prisma wave
#

😦

hot hull
#

like 15min ❤️

prisma wave
#

okay

obtuse gale
#

coc first, assignment later

prisma wave
#

^

hot hull
#

If I wasn't almost finished with it yes, however since I've got like 3 sentences left, coc can wait fingerguns

obtuse gale
#

idk what this question is tryna get me to do

hot hull
#

:suislide:

prisma wave
#

shortest time in minutes

queen star
#

I have a server with +- 100 ppl on it.
We have 40k tiled entities when i do /lag
Can this cause lag?
Furthermore:
We have 1500 itemframes loaded at any one time, sometimes up to 2500
I wanna know whats causing the lagg on the server when 150 ppl come the tps drops to 14
We are running this server on a dedicated ryzen 9 3900x

obtuse gale
#

i swear im just dumb here

#

my code is always printing 0

hot hull
#

Invite me to the new one, gonna go make sum food rn

prisma wave
#

because i had the same thing

obtuse gale
#

no

#

literally

prisma wave
#

send your code

obtuse gale
#

hold up

#

var x = 0

#

x = 10

#

x is 10 there right?

#

im not just dumb

prisma wave
#

yes

obtuse gale
#
fun main(args : Array<String>) {
    val input = Scanner(System.`in`)
    val N = input.nextInt()
    var lowest = 0
    for (i in 0 until N) {
        val s = input.nextInt()
        val d = input.nextInt()
        val t = ((d/s) * 60)
        if(lowest > t){
            lowest = t
        }
    }
    println(lowest)
}``` idk if i even get the question right lol
prisma wave
#

you need to use floating point division

#

not ints

#

lol

#

unlucky

#

@hot hull you free now

obtuse gale
#

ping me when forstys here

hot hull
#

I'm here

#

sad as fuck tho

#

Ran out of bread, so gotta use toast instead :C

old wyvern
#

Oh you guys doing coc?

prisma wave
#

yup

hot hull
#

send the link

prisma wave
old wyvern
#

Im in for next round

hot hull
#

Making food BM, but I ran out of bread, so I had to use toast bread instead

prisma wave
#

what's the difference

hot hull
#

toast is smaller, less girth

obtuse gale
#

toast bread is thicker

#

at least here it is i think lol

prisma wave
#

weird

#

we just use the same for both

obtuse gale
#

i thought toast bread had more girth

prisma wave
#

girthy bread

#

right

obtuse gale
old wyvern
#

What in the hell

#

Bread is bread

#

Dont ruin it

prisma wave
#

^^

hot hull
#

It's not

prisma wave
#

what

obtuse gale
#

why am i so dumb

#

i forgot you could print booleans

oak coyote
#

Toast is just bread^2

hot hull
#

Y'all just got annihalated by a dude eating toast

#

What is this

obtuse gale
#

I literally did if(b) println("true) else println("false")

hot hull
#

lol Aj

prisma wave
#

tf is wrong with my logic?

hot hull
#

just multiply, subtract, check

oak coyote
#

Your missing a speech mark Aj

prisma wave
#

ive done that

#
let salary = a * 5 * 6 * 4

printfn "%b" (a - c >= b)
#

oh

#

shit

#

ffs

hot hull
#

missing () I pressume

prisma wave
#

no

#

i was using a instead of salary

hot hull
#

oof

oak coyote
#

Yeah I was confused why you had salary defined but not then used

prisma wave
#

very smart

oak coyote
#

It’s fine I’ve accidentally forgot to transcient a variable before and caused myself to stare at code for 2 days wondering why it was moaning about a long

prisma wave
#

🥲

oak coyote
#

Cause I put the variable not with the rest

#

For Gson serialisation ^

hot hull
#

Yugi dead?

prisma wave
#

seems like it

old wyvern
#

Worth the time!!!

prisma wave
#

ooh haskell