#dev-general

1 messages · Page 288 of 1

lunar cypress
#

F

prisma wave
#

At least yours boots into windows 🥲

half harness
#

just did right now

half harness
prisma wave
#

mine bsods before it even reaches the login screen

#

Every time

#

🙂

half harness
#

wot

#

seriously?

prisma wave
#

Yes lol

half harness
prisma wave
#

I have a Linux dual boot

#

Just been using that

half harness
#

oh

prisma wave
#

But I can't play any games 😔

half harness
#

rippppppppppppppppp

onyx loom
#

no hollow knight 😔

prisma wave
#

😭

half harness
#

yes minecraft tho

prisma wave
#

Actually I think that runs on linux

onyx loom
#

o

prisma wave
#

Unity is pretty good with compatibility

#

Ig cuz C#

onyx loom
#

just make everyone game run on the jvm, no compatibility issues, ez 🥲

half harness
#

pls how does piggy do it

prisma wave
#

@half harness wtf

prisma wave
obtuse gale
#

Sorry !

half harness
hallow crane
#

CVM

onyx loom
prisma wave
hallow crane
#

actually IKVM

half harness
prisma wave
#

send build.gradle

hallow crane
#

XMLVM

onyx loom
#

guidfgdfuVM

hallow crane
#

elaraVM

compact perchBOT
half harness
#

@prisma wave ^

prisma wave
hallow crane
#

LOL

steel heart
#

Noam yes

onyx loom
#

xml 🤢

prisma wave
#

"people" that use XML don't deserve mockery

steel heart
#

I see the image

prisma wave
#

They deserve death

onyx loom
#

i could only agree.

steel heart
#

XHTML

#

So good

onyx loom
#

to the guillotine!

steel heart
#

Compelling punishment

onyx loom
half harness
obtuse gale
#

But is it possible to do as in the picture with the DeluxeMenus plugin?

prisma wave
#

@half harness what exactly did you do

compact perchBOT
#
FAQ Answer:

You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/ to upload images/screenshots.
You can also use a screenshot service like gyazo or jinx and post those links here.

prisma wave
#

I am so confused

half harness
steel heart
#

Just use debug mode

#

Pog pog

obtuse gale
#

Is it possible to do this with the DeluxeMenus plugin?
https://imgur.com/a/ZVjokqH

The goal is to put this message when you don't have the permission to take a kit and when you have the permission to make the kit that marks another lore?

steel heart
#

U fool

onyx loom
#

hashtag

#

general-plugins

steel heart
obtuse gale
#

Sorry.

half harness
prisma wave
#

what does this have to do with gradle or piggys guide

half harness
#

uh

#

wot

#

i followed piggy's guide, didn't work

steel heart
#

Random dkim moment, did u install dcevm

half harness
#

and now im asking here for work

half harness
#

I did

steel heart
#

Put it in the right thing

prisma wave
#

Is this the problem?

#

O it didn't reply

#

Shit

half harness
#

I put in C:\Program Files\Java\

prisma wave
#

^^

half harness
hallow crane
#

on the brightside pdm works good <- completely irrelavent to what u are talking about i wasnt watching

half harness
half harness
steel heart
hallow crane
#

lol

prisma wave
#

Wait dkim are you trying to copy the jar into the plugins folder?

half harness
#

i guess

#

wait a sec

prisma wave
#

how are those files even getting there

half harness
#

i think i know

prisma wave
#

Piggys guide doesn't say anything about copying the jar afaik

#

Or if it does I missed it

half harness
#

wait

#

buildDir = '../.TestServers/1.16/plugins'

#

this is also in my build.gradle

prisma wave
#

...

half harness
#

wait 1 sec

prisma wave
#

buildDir remaps the build/ directory

half harness
#

i may have fixed the issue

prisma wave
#

Obviously that's gonna happen

half harness
#

I DID IT

#

lol

#
libsDirName = '/plugins'
buildDir = '../.TestServers/1.16'
```good?
prisma wave
#

not really

half harness
#

😔

prisma wave
#

You should probably make a copy task rather than remapping the entire build and libs dir

#

I'd argue that's an anti-pattern

half harness
#

okay

#

how do I do that

#

pls tell me :c

#

wait a sec

prisma wave
#

just Google it's like 4 lines

#

I can't remember off the top of my head

#

And I'm not googling code on mobile

#

Ask me again in about 9 hours

half harness
#

what do i google

#

😅

#

im trying

static zealot
#

how to copy a jar file

obtuse gale
static zealot
#

if noone else helps you

#

til then

prisma wave
half harness
#

uhh how do I execute the task

obtuse gale
#

No worries, thanks to you.

prisma wave
#

Just the name

half harness
#
task copyFile(type: Copy) {
    from('build/libs/MobAIController-1.0-SNAPSHOT-all.jar')
    into('test')
    include('*.jar')
}
```ive got this
#

ok

prisma wave
#

shadowJar, build, clean etc are all tasks too

#

So the same way you run those

half harness
#

but

#

how do i run the task when shadowjar is ran?>

#

waita sec

ocean quartz
#

shadowJar.finalizeBy yourTask

half harness
#

can I run this with hotswapping?

prisma wave
#

you don't need to use gradle at all when hotswapping

#

you just rebuild the classes with IJ

half harness
#

ah ok

#

org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'MobAIController'

#

Caused by: org.gradle.internal.metaobject.AbstractDynamicObject$CustomMessageMissingMethodException: Could not find method finalizeBy() for arguments [task ':copyFile'] on task ':shadowJar' of type com.github.jengelmblahblah

#

oh

#

its finalized

#

I DID IT

#

THX

#

❤️

prisma wave
#

Lol

steel heart
#

Pro coder

forest pecan
#

i got a nutella from my garage

#

and it was snowing outside

#

and then the spread literally turned rock hard

#

not capping

#

literally its solid

tranquil crane
#

boutta beat intellij into submission unless it stops freezing

jovial iris
#

Ack

static zealot
#

xD

forest pecan
#

Lmao

forest pecan
#

[INFO] Including org.bytedeco:javacpp:jar:windows-x86_64:1.5.4 in the shaded jar.

                                    <excludes>
                                        <exclude>org.spigotmc</exclude>
                                        <exclude>uk.co.caprica.vlcj</exclude>
                                        <exclude>com.github.sealedtx</exclude>
                                        <exclude>ws.schild.jave</exclude>
                                        <exclude>io.netty</exclude>
                                        <exclude>com.mojang</exclude>
                                        <exclude>org.bytedeco</exclude>
                                        <exclude>org.jetbrains.annotations</exclude>
                                        <exclude>org.apache.httpcomponents</exclude>
                                    </excludes>
static zealot
#

hmm

ocean quartz
#

Maven

forest pecan
#

gay

#

maven is very bad

#

?????

obtuse gale
#

you've got to be kidding

half harness
static zealot
#

@chilly zenith maybe you're here?

#

can you ban him?

#

spam. he spammed that thing in like 10 channels

obtuse gale
#

bruh

static zealot
#

I know fefo

obtuse gale
#

and free....

half harness
#

$275 = free

static zealot
#

he started here and in minecraft, asked him to do it in request-paid he goes both, then development, then back here, the back to paid

#

xD

ocean quartz
#

I do not trust that someone who spams shit and doesn't respect the rules would be a trustworthy person for a $275 plugin

forest pecan
#

^^

static zealot
#

^^^

#

xD

forest pecan
#

plus why the fuck a skyblock core

#

theres like millions

half harness
#

BSkyBlock/BentoBox, ASkyBlock

static zealot
#

well those are a few

#

but there's probably over 10 that are more known

chilly zenith
#

hello

quiet depot
#

beaned him

#

ur 2 slow tig

chilly zenith
#

:sadge

#

imagine global emotes

static zealot
#

xD

chilly zenith
#

not even enabled for staff

static zealot
#

ty piggy

quiet depot
#

imagine not boosting

chilly zenith
#

imagine paying 10 a month when you can pay 5 for a month

#

:sadge

obtuse gale
obtuse gale
#

how does the gc work?

quiet depot
#

@obtuse gale that's an extremely loaded question

#

which gc do you want to know about?

obtuse gale
#

java

quiet depot
#

g1? zgc? shenandoah?

obtuse gale
#

oh

#

idk what the fuck those are lol

quiet depot
#

they're java garbage collectors

obtuse gale
#

like if i make a variable somewhere does it get yeeted like how does that work

old wyvern
#

When its no longer referenced

quiet depot
#

when there's no references remaining to your object, it'll be purged by the gc

#

e.g. if u go

old wyvern
#

As in when* its not reachable from the root of the heap

quiet depot
#
public class Blah {
    public String str = "cool string";
}```
#

and then somewhere else u go

#

str = null

#

the gc will come along and remove "cool string" from existence

#

when you assign things as null in java, or remove them from a collection, or whatever, the actual object is still in memory for a brief period of time till the gc comes and cleans it up

#

is that all you wanted to know?

#

or did you want to know the actual fine details

obtuse gale
#

what happens if i reassign str after that

#

or will it not remove it if theres still a thing saying str = "something else"

quiet depot
#

@obtuse gale if u reassign it it'll still remove the old value

obtuse gale
#
public static void main(things){
String x = "Hello"
print(x)
// More code here - program wont end
}```
#

so does x get removed after its printed?

#

or

static zealot
#

no

#

if you make it null I think

quiet depot
#

if you eventually reassigned x to something else "Hello" would be removed

obtuse gale
#

o

#

what if i never reassign it

quiet depot
#

then it won't disappear

#

since there's a reference to it

obtuse gale
#

itll just stay loaded?

static zealot
#

but if you make it null. it will right?

quiet depot
#

yes blitz

#

and yes aj

#

if there's a reference to a value, the gc won't remove it

obtuse gale
#

what if its in a method then the method ends

quiet depot
#

if the value is inaccessible then it'll be removed

#

so yes, if a variable only exists in a method's scope, and that method ends, the variable will be garbage collected

obtuse gale
#

wait so why dont all java devs set their variables to null once theyre done with them? Or will the impact be minimal

#

or am i being dumb

old wyvern
#

You dont need to

#

You dont hold objects you dont need as fields. The ones in lexical scopes dont have a reference after the end of the scope and so everything referenced only under it also subsequently becomes unreachable

hot hull
#

What would you call a class which handles async functions

static zealot
#

AsyncClass

hot hull
#

There has to be something better

lost forge
#

AsyncFuncs

static zealot
#

AsyncFunc

hot hull
#

ew

lost forge
#

FunkyAsyncs

static zealot
#

AsynchronousFunctions

#

FuncAsync

#

xD

lost forge
#

xD

hot hull
#

I'll just have it as Function

lost forge
#

How boring

static zealot
#

AsyncFunction

#

then

#

because its Async

hot hull
#

What would you even call async and sync with one word

lost forge
#

SyncASync 🤷‍♂️

static zealot
#

xD

ocean quartz
static zealot
#

simultaneous or not simultaneous

#

in sync or out of sync

#

ez

hot hull
#

@quiet depot Does this docdex have default docs yet fingerguns

quiet depot
#

no

hot hull
#

sadge

quiet depot
#

@hot hull

#

type bd;docs

#

and tell me yay or nay

static zealot
#

bd;docs

#

o

quiet depot
#

well that's not ideal

#

@static zealot try now

static zealot
#

db;docs

#

oh wait what? did you do the command in #bot-commands ?

hot hull
#

bd;docs

fleet cedarBOT
#
Minecraft Plugins:

Plugins for the various minecraft server platforms.

• plotsquared-bukkit    • worldguard
• luckperms/lp          
• antivpn               
• fawe                  
• plotsquared           
• traincarts            
• fawe-bukkit           
• bkcommonlib           
• signlink              
• worldedit             
static zealot
#

why am I not special?

#

ah

#

db

#

I'm very very smart

#

fuck me

hot hull
#

hmm

quiet depot
#

frosty go thru the different pages

hot hull
#

Why no FJ on there

#

sadge

quiet depot
#

does it even have an api

static zealot
#

can only Frosty change the pages?

hot hull
#

It has events :p

quiet depot
#

yeah only the command sender blitz

static zealot
#

nice

hot hull
#

It's nice yea Piggy

static zealot
#

wait but if you save the sender I guess you can show the nick of the one that sent the command at the bottom can't you?

quiet depot
#

that sounds like effort

static zealot
#

xD

#

nvm then

quiet depot
#

@static zealot can u run the command again?

static zealot
#

bd;docs

quiet depot
#

awesome

#

thanks

hot hull
#

Would serializing an inventory when a command is called be good enough, or should I store it serialized in memory?, asking because if I do store it, then I need to somehow implement an updater when another user is viewing someones inventory

#

@quiet depot suggestions? fingerguns

quiet depot
#

i'd probably go the storing route, but I don't know about that issue

static zealot
#

is pdm 0.0.31 stable?

#

oh wait I'll ask in BMs discord because I'm cool

quiet depot
#

pdm isn't prod ready afaik

static zealot
#

o

quiet depot
#

should still be safe to use for most things

static zealot
#

I've been using 0.0.28 for a long time xD

#

dk why

quiet depot
#

but I don't think things like jda work properly with it

#

and idk if relocations exist yet

regal gale
#

Which is better? ScriptEngine#put or Bindings#put? Or they're the same?

hot hull
#

jda doesn't work no

#

Since transitive deps

quiet depot
#

@regal gale ScriptEngine#put uses Bindings#put (sort of, it uses the engine scope bindings)

#

they're the same

static zealot
#

do I need to do some special shit when I change from 28 to 31? because gradle reload doesn't seem to be enough

quiet depot
#

d;scriptengine#put

ruby craterBOT
#
void put(String key, Object value)
throws IllegalArgumentException, NullPointerException```
Description:

Sets a key/value pair in the state of the ScriptEngine that may either create a Java Language Binding to be used in the execution of scripts or be used in some other way, depending on whether the key is reserved. Must have the same effect as getBindings(ScriptContext.ENGINE_SCOPE).put.

Parameters:

value - The value of named value to add.
key - The name of named value to add

Throws:

IllegalArgumentException - if key is empty.
NullPointerException - if key is null.

regal gale
#

Oh ok

#

Thanks

#

d;bindings

ruby craterBOT
#
public interface Bindings
extends Map<String,​Object>```
Bindings has 5 methods, 2 implementing classes, 1 extensions, and  3 super interfaces.
Description:

A mapping of key/value pairs, all of whose keys are Strings.

regal gale
#

In the code, I have this: java engine.put("ParserUtility", Parser.class);

#

How can I make this efficiently so that the thing up there remain constant while evaluating, because const variable will add into the binding and I want to remove it after finished

hot hull
#

@quiet depot Why did I get a random urge to want to work on papi ee

quiet depot
#

idk

regal gale
#

I can't even find any discord that are really good at coding support at this point thonking

#

In SpigotMC, it's even worse

static zealot
#

codecave fingerguns

lunar cypress
#

TCD

jovial warren
#

@prisma wave any way I can do runtime dependencies like the MariaDB database driver with PDM? or should I just use runtimeOnly?

#

because I tried using pdm to depend on mariadb-java-client but Hikari still seems to not be able to find a suitable driver

#

also, there doesn't seem to be a way to do exclusions, so I end up with dependencies for both kotlin-stdlib 1.4.21 and 1.4.10 for example

#

and it doesn't override dependencies either

#

so I have 2 SLF4J's, 2 retrofits, 2 OkHttp's, 2 kotlinx.serialization's, 3 stdlib-commons and 3 stdlibs

jovial warren
#

also, java.lang.NoSuchFieldError: Companion tf?

steel heart
#

runtimeOnly?

jovial warren
#

nah, pdm

#

it's on this line: .addConverterFactory(Json.Default.asConverterFactory("application/json".toMediaType()))

#

that's meant to just be Json.asConverterFactory, but I've tried both initialising it and using Json.Default and neither work

#

(Json.Default is the companion)

prisma wave
#

to make sure it gets properly loaded

jovial warren
#

yeah I fixed that issue with driverClassName

#

a.k.a reading the Connector/J documentation

#

my issue now seems to be with kotlinx.serialization and Jake Wharton's Retrofit kotlinx.serialization converter

#

maybe it's because I manually depend on OkHttp 4 and Retrofit uses OkHttp 3 (OkHttp was rewritten in Kotlin)

#

can PDM not override dependencies?

#

e.g. a library I depend on depends on x library version 1, but I want to use x library version 2, so I manually depend on x library version 2 and that library uses x library version 2

#

java.lang.NoSuchFieldError: Companion

retrofit = Retrofit.Builder()
            .baseUrl("https://api.mojang.com/")
            .client(OkHttpClient.Builder().build())
            .addConverterFactory(Json.asConverterFactory("application/json".toMediaType())) // this line is causing the error
            .build()
```would you know why that line is causing that error?
steel heart
#

Is someone good at math? I have noob question

jovial warren
#

go for it

#

error doesn't occur when I use implementation on all of them

steel heart
#

So basically
Why is √(x) = -1 a false root? I mean if we square both sides it would be x = 1 and then if we place it back LHS = √1 = -1 = RHS ?

#

RuntimeOnly is a special kid

jovial warren
#

just define a few terms first

#

what do you mean by "false root"? and what do you mean by "scare"?

steel heart
#

square*

jovial warren
#

sqrt(x^2) = x no?

steel heart
#

?

jovial warren
#

also, if x was 1, the sqrt(x) is not -1

steel heart
#

Why though

#

(-1)*(-1)=1

jovial warren
#

but 1*1 is also 1

steel heart
#

Yeah

#

2 solutions then?

jovial warren
#

that's why you can't square root any negative numbers

#

every square root of a positive number has 2 solutions

steel heart
#

I know sqrt(-1) doesn’t work but why is one false root?

jovial warren
#

didn't know -1 was a false root

steel heart
#

Hmm no

jovial warren
#

sqrt(x) = -1 can't be a false root

steel heart
#

Probably the solution x = 1

jovial warren
#

yeah must be

#

only negative square roots aren't possible

steel heart
#

Still don’t get why PES4_SadGe

jovial warren
#

actually no, they are, just they aren't at the same time

#

if we say this:

let x = -1
sqrt(x) = i
#

i is what's known as the imaginary number

steel heart
#

Uh okay

jovial warren
#

because yes, imaginary numbers exist

#

then sqrt(2x) = 2i I believe

steel heart
#

Well ik square root of -1 is i

jovial warren
#

the imaginary number in its definition is kinda a paradox

#

since it's a number that exists that represents a number that doesn't exist

steel heart
#

But consider this:
sqrt(x) = -1
sqrt(x)^2 = (-1)^2
x = 1

This is what is considered to be a false root according to my math teacher and it got me hella confused.

#

I know squaring can be an irreversible action but still.

hallow crane
#

i

steel heart
#

Why is it a false root ):

hallow crane
#

don't know

steel heart
#

You’d also say that the solution set of x is the empty set

hot hull
#

ask them for an explanation

jovial warren
#

can't find any definitions for false roots

steel heart
#

Yeah I did and he just circle jerked around it

steel heart
#

Not exactly the same

jovial warren
#

because x becomes positive when it is squared no matter what, some people use that reasoning to say that sqrt(x) is always positive

steel heart
#

But I guess

jovial warren
#

square root is one of those thing that's kinda weird to calculate

lunar cypress
lunar cypress
#

and i isn't paradox

jovial warren
prisma wave
#

you cannot square root a negative number

lunar cypress
#

in the realm of complex numbers you can

prisma wave
#

yeah

#

what i mean is

#

it doesnt yield a real answer

lunar cypress
#

it can't just be -1

steel heart
#

Idk

#

but do you know why it's a false root?

prisma wave
#

that's a weird term

lunar cypress
#

I don't know what that means

steel heart
#

yeah

lunar cypress
#

my point is the first equation cannot be on its own

#

you can say "sqrt(x) = -1 or sqrt(x) = 1" or "abs(sqrt(x)) = 1"

steel heart
#

yeah exactly

#

so in theory the equation has more than one solution or nah?

#

actually no

#

nvm

#

but this false root still confuses me

prisma wave
#

there are always 2 solutions

lunar cypress
#

Yes, it has 2 solutions

prisma wave
#

except 0

steel heart
#

sqrt(x) = -1
sqrt(x)^2 = (-1)^2
x = 1

well if x would be -1 then we would go into complex numbers, so if we exclude complex numbers the solution is x = 1 right? I just dont get why its a false root

lunar cypress
#

I still don't know what a false root is

steel heart
#

me neither

lunar cypress
#

And again, this is not an equivalence transformation

prisma wave
#

lol

lunar cypress
#

sqrt(x) = -1 is not equivalent to x = 1

jovial warren
#

@prisma wave any ideas about overriding dependencies btw with PDM?

prisma wave
#

how do you mean?

lunar cypress
#

you can only derive one way that x = 1

jovial warren
#

e.g. retrofit depends on okhttp 3, but I want to use okhttp 4

prisma wave
#

that sounds like it would break things even without pdm

steel heart
jovial warren
#

nah it's fully backwards-compatible for the most part

prisma wave
#

if sqrt(x) = -1 then x = 1
that's not true?

lunar cypress
#

this is true

steel heart
#

Idk

#

ok nvm

prisma wave
#

oh wait

#

yeah

#

im dumb

#

@jovial warren try excluding okhttp3 and adding 4 as a pdm dependency

lunar cypress
#

sqrt(x) = -1 implies x = 1
sqrt(x) = 1 implies x = 1

but x = 1 does not imply one of those exclusively

prisma wave
#

im pretty sure it respects exclusions

steel heart
#

okay so I guess a false root might be when a step in solving an equation loses its equivalence? Or am I nonsensing now

jovial warren
#

how can I exclude with pdm?

prisma wave
#

the same way you do it with any other configuration

lunar cypress
prisma wave
#
pdm ('dependency') {
  exclude group: 'blah'
}```
lunar cypress
#

I can't find this term

steel heart
#

hmm let me ask him

lunar cypress
#

But yes, in order to solve equations through transformations you need equivalence in every step

#

Because otherwise you assume that the initial equation is already true

#

and every proof you derive from that assumption is worthless obviously

jovial warren
#

oh also, just another random question, any ideas if I could use it with Velocity?

prisma wave
#

theoretically

lunar cypress
#

I could prove that any 2 real numbers x, y are equal
x = y
=> 0 = 0

steel heart
regal gale
#

I had to literally google down every single syntax or statement of GDScript that I found on tutorial lol

#

Sorry to bother but... does anyone even get a random number this way thonking

steel heart
#

GDScript?

regal gale
#

mob_types[randi() % mob_types.size()]

hot hull
#

ew

regal gale
#

Also, GDScript is Godot's scripting language

#

Gaby I saw the code lol

distant sun
#

too many things are questionable on this projects ffs

#
        // split action_type: action
        String[] sp = action.split(": ");
        if (sp.length == 0) return;

        StringBuilder act = new StringBuilder(sp[1]);
        for (int i = 2; i < sp.length; i++) act.append(": ").append(sp[i]); // add anything extra that has a colon```
Imagine if `action.split(": ", 2)` was a thing
#

oh wait, it is -.-

steel heart
#

Use StringJoiner?

quiet depot
#

@distant sun compiled regex pls

obtuse gale
#

Tf is a real number

#

Nerds

prisma wave
#

a number that isnt complex

obtuse gale
#

Lmao what

#

Number is number

distant sun
#

is-not-my-code @quiet depot

prisma wave
#

complex numbers have an imaginary part

distant sun
#

but I get what you mean

quiet depot
#

i think aj learns about complex numbers this year

distant sun
#

how old is he?

quiet depot
#

idk

#

16 or 15

#

he's in year 11 this year iirc

obtuse gale
#

Yeah

quiet depot
#

aj what maths r u doing

obtuse gale
#

It's called advanced here but I think elsewhere it's called methods or somwthing

distant sun
#

duh

quiet depot
#

you learn complex numbers in year 12

distant sun
#

we did it on 9th grade lol

hot hull
old wyvern
#

Like where?

steel heart
#

ew

#

what the hell why would one use substitution for completablefuture when its not necessary

#

or like a helper

#
public final class Function {

    /**
     * Executes a supplied runnable async
     *
     * @param runnable to be performed
     * @return {@link CompletableFuture<Void>} of the given {@link Runnable}
     */
    public static CompletableFuture<Void> perform(final Runnable runnable) {
        return CompletableFuture.runAsync(
                runnable
        );
    }

}
``` bruh
distant sun
#

who said Collection#size() == 0 should be used over Collection#isEmpty?

hot hull
#

Conclure, don't bully me

quiet depot
#

idk, but it may be preferred as I don't believe Collection#size has a contract on how the function should work, which could mean it's either cached, or it's calculated o(n)

#

however I don't see why isEmpty would be any different

#

¯_(ツ)_/¯

distant sun
#

I think sx was

quiet depot
#

point is use isEmpty over size == 0

#

it was probably ij

#

ij has a warning for it

heady birch
#

I have heard isEmpty is platform dependent 😮

quiet depot
#

well that's definitely wrong lol

steel heart
quiet depot
#

niall I don't believe any of the collections are platform dependent

heady birch
#

Lol joke

quiet depot
#

oh

steel heart
#

frosty what if you'd schedule a task on server thread for

vaultGui.open(player);

quiet depot
#

@hot hull fully tested my ass btw

steel heart
#

lmao

quiet depot
#

you forgot to actually implement the default javadoc in the search command

distant sun
#

so isEmpty is good?

steel heart
#

yes

hot hull
#

kek

quiet depot
#

yes

steel heart
#

it makes ur code more readable so its less complex

prisma wave
#

size() == 0 is dumb

quiet depot
prisma wave
#

anyone know why a bunch of spigot transitive dependencies would suddenly stop working?

#

eg Validate.notEmpty from commons

#

Nvm seems to be an Intellij bug, builds fine with gradle

forest pecan
jovial warren
forest pecan
#

no like im serious

#

i use that over isEmpty

lunar cypress
#

you should actually prefer isEmpty

prisma wave
#

let isNotEmpty col = isEmpty >> not

jovial warren
#

lol

jovial warren
forest pecan
#

no im not, i use it for algorithmic programming

#

and there is a good reason to do so

jovial warren
#

I believe isEmpty, in the majority of it's implementations, will probably just go "check the first element, if it doesn't exist, return false, if it does, return true"

#

whereas size will iterate over all the elements and increment a counter each time (in the worst case)

#

O(1) vs O(n)

lunar cypress
#

yeah, this is implementation detail, but isEmpty is definitely always at least as efficient as size

#

plus it reads better

#

arguably

jovial warren
#

yeah

forest pecan
#

that makes sense because the counter

forest pecan
#

why doesnt the class just store a size though?

jovial warren
forest pecan
#

as an integer?

prisma wave
lunar cypress
#

which class now

quiet depot
#

some collections do store size iirc

jovial warren
forest pecan
#

just increment size by 1?

#

or decrement?

lunar cypress
#

Can we please clarify which class we are talking about

forest pecan
#

just lists in general

jovial warren
#

I think it's generalised

lunar cypress
#

you can't make a general statement

#

like that

quiet depot
#

arraylist stores size

jovial warren
#

ArrayList's size is closer to O(1) I believe

quiet depot
#

linkedlist doesn't (afaik, didn't actually check)

lunar cypress
#

because a lot of lists do store the size

jovial warren
#

LinkedList on the other hand is closer to O(n) because of the way linked lists work

forest pecan
#

well i guess the efficiency depends on what data structure you use

prisma wave
#

does the internal array get shrunk if you remove elements? because if not, arraylist.size would probably be o(n)

jovial warren
#

for a linked list, we have to follow the rabbit trail

quiet depot
#

linkedlist does store size

prisma wave
#

i think

quiet depot
#

just checked source

lunar cypress
#

arraylist stores the size

prisma wave
#

Ah makes sense

forest pecan
#

how is it O(n)...

quiet depot
#

it's not, it's o(1). it would be o(n) if it had to iterate all the elements and count

jovial warren
#

if LinkedList stores size, it's closer to O(1)

#

still safer though to use isEmpty, as that is basically guaranteed to be O(1) if done right in all of it's implementations

lunar cypress
#

in any case, there is no reason to prefer size() == 0 over isEmpty(). the strongest "argument" you can make is that it's just as good in most cases, but that is implementation dependent and you shouldn't care about that

jovial warren
#

yeah, size == 0 will pretty much never be better than isEmpty

forest pecan
#

in my case, i was dealing with arraylist, stacks, and queues

#

so there wasn't much of a difference

lunar cypress
#

as i said

prisma wave
#

virgin JVM lists: O(n), O(logn), "implementation details"

Chad Elara Lists: O(1) for every operation including iteration

steel heart
#

lol

forest pecan
#

jvm lists are virgin?

lunar cypress
#

all of my algorithms are Ω(1)

forest pecan
#

lmao

quiet depot
#

fun fact

forest pecan
#

pigs can be made into bacon

quiet depot
forest pecan
#

lmao

quiet depot
#

that's from AbstractCollection

forest pecan
quiet depot
#

i'm sure some classes override it

#

dunno which tho

forest pecan
#

yeah

lunar cypress
#

again, completely irrelevant

#

It would be relevant if isEmpty() were worse than size() == 0 anywhere

steel heart
#

ConcurrentHashMap doesnt use the regular size == 0 iirc

#

btw

#

very irrelevant but ye

quiet depot
#

it doesn't

#

it iterates

#

that's a good example of an o(n) size impl

#

but its isEmpty() is also o(n)

forest pecan
#

but what if you call something like

#

keySet().size()

#

isnt size of sets faster?

#

but idk of keySet() method itself

#

has any stuff in it which makes it much slower

steel heart
#

I think it just forwards the implementation of the map

quiet depot
#

yep it does

#

just checked

forest pecan
#

so its an iteration?

quiet depot
#

mhm

forest pecan
#

Yeah

#

that would make sense

prisma wave
#

this is a blessing and a curse

#

dcevm crashes on /reload

#

🙃

quiet depot
#

sounds like a u problem

prisma wave
#

probably

quiet depot
#

i'll try

#

2 secs

#

but what u need to /reload for when u have dcevm?

prisma wave
#

idk

#

sometimes u need a full reload

#

and i cba to restart

steel heart
#

what jar do u use?

#

like spigot, paper etc

prisma wave
#

paper i think

quiet depot
#

reloading works for me on dcevm

#

with spigot

prisma wave
#

weird

quiet depot
#

1.8.8

steel heart
#

paper does some funky stuff with classloaders I think

prisma wave
#

same

quiet depot
#

what dcevm ver?

prisma wave
#
openjdk version "1.8.0_232b09"
OpenJDK Runtime Environment (build 1.8.0_232b09-201911100919-dcevm8u232b09)
Dynamic Code Evolution 64-Bit Server VM (build 25.232b09-bdcevm8u23209, mixed mode)

#

it's not really a big deal

#

just mildly annoying

quiet depot
#

wtf

#

i didn't know dcevm had a 232 ver

prisma wave
#

¯_(ツ)_/¯

quiet depot
#

how are you installing dcevm btw?

prisma wave
#

i think via the AUR

#

dont remember though

quiet depot
#

I recommend using sdkman for all things java related

#

dcevm, java installs, gradle, maven, etc

prisma wave
#

o sdkman has that?

quiet depot
#

yea

#

it's called travaopenjdk

#

cuz dcevm was merged into that

prisma wave
#

oh great

#

good to know

quiet depot
#

they also have a java 8 trava which is really neat

#

because I didn't think dcevm was in trava 8

prisma wave
#

yeah

#

/reload fixed itself lol

quiet depot
#

nice

#

I wonder if I can fork trava and add support for java 15

prisma wave
#

that would be cool

#

probably tricky though

quiet depot
#

that's the sole reason I'm not using java 15 on docdex

#

because dcevm doesn't support it

#

and fuck i'm not developing on a version if there's no dcevm lol

#

til sdkman is written in scala

prisma wave
#

records tho

#

o

#

the startup time is pretty fast for a jvm app

half harness
#

whats difference between dcevm and normal?

prisma wave
#

in theory hotswapping is better

#

in practice

#

Unnamed: verifier detected internal inconsistency or security problem

#

😦

half harness
#

👀

quiet depot
#

bm do you actually not know how to fix that?

prisma wave
#

lol

#

no?

#

i usually just restart

quiet depot
#

it's really really really simple

prisma wave
#

oh god

quiet depot
#

go to build.gradle

#

and comment your relocations

prisma wave
#

o

quiet depot
#

lol

#

dcevm works fine

#

it doesn't know your relocations exist though, because you're compiling via ij, not gradle

half harness
#

what will happen if i dont use dcevm?

#

and try hotswapping

quiet depot
#

then your hotswapping experience will be shit

#

and pointless

#

you may aswell /reload

prisma wave
#

still happening lol

#

😦

hot hull
#

Anyone got any explanation as to why only half of the code would be ran, and the rest wouldn't?

quiet depot
#

paste ur build.gradle

#

and clean ur build dir

#

and restart the server if u didn't already

half harness
#

also when hotswapping, do I have to build or reload chcanged classes? (im not at intellij rn tho)

hot hull
jovial warren
#

thenAccept will run when the first CompletableFuture returns

prisma wave
#

lemme clean and restart rq

#

that will probably fix

quiet depot
#

yeah you have to restart

hot hull
#

Still doesn't make any sense Bardy

prisma wave
#

alrighty

quiet depot
#

if you hotswapped after the inconsistency already happened

#

it won't fix anything

prisma wave
#

oh yeah good point

quiet depot
#

ur shadowjar is outdated btw

#

6.1.0 is latest iirc

jovial warren
#

yeah

prisma wave
#

yea ik, using that in other projects

#

jeez i3 is hard to get used to

#

@jovial warren you used to use it right?

jovial warren
#

I still do

prisma wave
#

ah ok

jovial warren
#

just don't use Arch as often

#

you can use i3 without a mouse, remember that

prisma wave
#

how do you update jars in plugins? on KDE i would just copy the jar from build/libs into plugins, but writing a long cp command is kinda annoying

#

ik

#

learning vim as well

#

to get the pro keyboard experience

jovial warren
#

thunar?

prisma wave
#

o you still use a graphical file manager?

jovial warren
#

i3 doesn't have a built-in file manager

#

nope

quiet depot
#

bm

jovial warren
#

I either use rsync or cp

quiet depot
#

use a copy script in gradle

#

smh

prisma wave
#

🙄

#

not portable tho

quiet depot
#

how is it not portable

prisma wave
#

file path is different across machines

#

somewhat

quiet depot
#

do you not have an isolated test server per project?

prisma wave
#

no lol

#

should i?

quiet depot
#

yes

prisma wave
#

what's the benefit

quiet depot
#

isolation

#

portability

jovial warren
#

no chance of conflict

prisma wave
#

i just have to re-run buildtools, regen the world, download essentials etc again

quiet depot
#

or you can just have a template

prisma wave
#

o true

frigid badge
#

or skip bukkit all together

quiet depot
#

and what lemmo?

#

use a bukkit mock?

frigid badge
#

no more need to run development servers

#

nah just fuck bukkit

#

;p

quiet depot
#

ez

#

fukkit

frigid badge
#

lmao

#

or run it in docker 😮

quiet depot
#

ah yes because that fixes the issue

prisma wave
#

whats the easiest way of setting up a template

#

is there like a thing in IJ for it

quiet depot
#

bm when I said template

#

I literally just meant a folder that u copy to new projects

frigid badge
#

well you could do it per project much easier when using docker

quiet depot
#

i'm sure ij can do it

#

but copying is easier

#

i need to write a gradle plugin that automatically sets up my dev servers

#

plugins what?

#

fuck plugins

frigid badge
#

???

quiet depot
#

apply from: scripts are the best

frigid badge
#

docker is the best

#

stop lying

quiet depot
#

my bad

prisma wave
#

oh lol

#

i thought you meant something cleverer than that

#

isn't there already a plugin that does that?

quiet depot
#

idk

hot hull
#

What is one doing wrong here, I honestly have used futures once before and that's it, https://paste.helpch.at/azuyibideq.java,
yeeting everything sync if noone presents atleast a path to the solution

quiet depot
#

so it gets stuck at constructing menu frosty?

hot hull
#

Yes

quiet depot
#

show me vaultmenu

#

and print index

prisma wave
#

that probably means an exception is being thrown

#

it was hell to debug stuff like that in pdm, cuz the future just stopped with no information

quiet depot
#

o ye try adding an exceptionally thing

prisma wave
#

^

quiet depot
#

d;completablefuture#exceptionally

ruby craterBOT
#
CompletionStage<T> exceptionally(Function fn)```
Description:

Returns a new CompletionStage that, when this stage completes exceptionally, is executed with this stage's exception as the argument to the supplied function. Otherwise, if this stage completes normally, then the returned stage also completes normally with the same value.

Parameters:

fn - the function to use to compute the value of the returned CompletionStage if this CompletionStage completed exceptionally

Returns:

the new CompletionStage

quiet depot
#

function's param is a throwable iirc

jovial warren
#

oh yeah, I was gonna make that point

quiet depot
#

sorry can't show type params in method params

frigid badge
#

why does clion not support assembly

#

sad lemmo

jovial warren
#

thenAccept will only run if thenRun returns a value for it to accept

quiet depot
#

because the "c" in "clion" isn't "assembly" for "assemblylion"

#

knowing jetbrains they have a plugin that adds support for it though

frigid badge
#

they don't

quiet depot
#

that's a mega oof

frigid badge
#

yup

jovial warren
#

there's plenty of other better Assembly IDE's

#

which assembly you learning?

hot hull
#

Wait, before I continue with this, is there a better way of doing things like this?

quiet depot
#

yes

#

your usage of completablefuture here is to merely make it async

#

you'd be better off with an executor service

frigid badge
#

intel x86

#

there are others yeah just wish jetbrains had one

hot hull
#

Got a guide Piggy, cause I've no idea what you mean by that

quiet depot
#

no and you really don't need a guide because executor services are extremely simple

#

make an executor via Executors#newBlah

#

then submit tasks via ExecutorService#submit

#

it's similar to the bukkit scheduler

hot hull
#

ohh the thingy you use in docdex ye?

quiet depot
#

ye i use them in docdex

hot hull
#

k, thanks

#

kinky Piggy

#

Might wanna close the issue btw if the default stuff is sorted now

quiet depot
#

nah

#

issue will close when I push

hot hull
#

I see

forest pecan
#
System.out.println((!(String.valueOf(!(!(!(!true))) == false).equalsIgnoreCase("true")) == true ? String.valueOf(true) : String.valueOf(false));
onyx loom
#

delete this

forest pecan
#
final boolean bool = (!(String.valueOf(!(!(!(!Boolean.TRUE))) == Boolean.FALSE).equalsIgnoreCase("true")) == Boolean.TRUE ? String.valueOf(Boolean.TRUE) : String.valueOf(Boolean.FALSE);
#

you happy now lol

quiet depot
#

d;fields boolean

ruby craterBOT
#
Fields:
java.lang.Boolean%TRUE
java.lang.Boolean%TYPE
java.lang.Boolean%FALSE```
quiet depot
#

should be using those instead of "true" and "false"

#

d;boolean%true

ruby craterBOT
#
public static final Boolean TRUE```
Description:

The Boolean object corresponding to the primitive value true.

quiet depot
#

d;methods Boolea

ruby craterBOT
#

There was no direct match for that query, did you mean any of the following?: boolean booleanflag booleantype booleanvalue booleancontrol

quiet depot
#

d;methods Boolean

ruby craterBOT
#
Methods:
java.lang.Boolean#valueOf
java.lang.Boolean#compare
java.lang.Boolean#equals
java.lang.Boolean#logicalOr
java.lang.Boolean#compareTo
java.lang.Boolean#Boolean
java.lang.Boolean#booleanValue
java.lang.Boolean#hashCode
java.lang.Boolean#logicalXor
java.lang.Boolean#getBoolean
java.lang.Boolean#logicalAnd
java.lang.Boolean#toString
java.lang.Boolean#parseBoolean```
quiet depot
#

how u convert this shit to a primitive

#

d;boolean#getboolean

ruby craterBOT
#
public static boolean getBoolean(String name)
throws SecurityException```
Description:

Returns true if and only if the system property named by the argument exists and is equal to, ignoring case, the string "true". A system property is accessible through getProperty, a method defined by the System class.

If there is no property with the specified name, or if the specified name is empty or null, then false is returned.

Parameters:

name - the system property name.

Throws:

SecurityException - for the same reasons as System.getProperty

Returns:

the boolean value of the system property.

half harness
quiet depot
#

Class<Boolean>

forest pecan
#

i have to download this shitty xocde tools

#

on my mac

#

cause i cant install gradle

distant sun
#

HashMap<UUID, HashMap<String, ArrayList<String>>> 😭

forest pecan
#

without it

quiet depot
#

why not?

forest pecan
#

well i want to get brew actually

#

for not just gradle

#

but just easier to install packages

#

and that requires xcode

quiet depot
#

yeah i've used homebrew before

#

didn't realise it required xcode

#

that's too bad

#

but I wouldn't call xcode shit

#

iirc it's a very capable ide

forest pecan
#

the xcode zip itself is like 10 gigabytes lmao

#

yeah

quiet depot
#

i made an app in swift once

#

i can't even remember what it did

hot hull
quiet depot
#

no frosty

forest pecan
#

isn't it void?

quiet depot
#

that's not what I said to do

half harness
#

return null 🙂

quiet depot
#

at all

forest pecan
#

so you dont have to return?

quiet depot
#

use EXECUTOR.submit

#

not CompletableFuture

#

e.g.

#
EXECUTOR.submit(() -> {
    System.out.println("cool");
});```
hot hull
#

And how do I run the sync part afterwards?

quiet depot
#

bukkit scheduler

#

you could also run that executor shit via the scheduler instead of using an executor

hot hull
#

ew, but okay

quiet depot
#

well I mean

#

EXECUTOR#submit returns a future iirc

#

d;executorservice#submit

ruby craterBOT
#
Future<?> submit(Runnable task)
throws NullPointerException, RejectedExecutionException```
Description:

Submits a Runnable task for execution and returns a Future representing that task. The Future's get method will return null upon successful completion.

Parameters:

task - the task to submit

Throws:

NullPointerException - if the task is null
RejectedExecutionException - if the task cannot be scheduled for execution

Returns:

a Future representing pending completion of the task

quiet depot
#

does future have a thenRun?

#

and fuck my internet is so bad

#

this is painful

hot hull
#

Nope, it doesn't

quiet depot
#

maybe use something like taskchain

hot hull
#

Appreciated for the pointers mr porkchop

lunar cypress
#

use completable future

forest pecan
#

what the fuck

#

one of the people in the developer channel in the spigot discord needed help

#

and this was their code

compact perchBOT
#
📋 Paste Converted!
https://paste.helpch.at/ocemuxomap

A member of staff has requested I move your pastebin.com paste to our paste.helpch.at!

stuck harbor
#

oh my fuck

#

that last method

forest pecan
#

ikr

#

54 itemstacks

surreal quarry
#

LMFAO

#

Why

#

Who

stuck harbor
#

my mans never heard of an arraylist or a for loop

surreal quarry
#

thinks

#

thats a good idea

#

please

#

youtube tutorial probably told him to do that !!! :)

forest pecan
#

lmao

stuck harbor
#

lol

#

prolly also used eclipse

ocean quartz
#

//BUILD BEFORE TESTING
thonking

forest pecan
#

its clearly copied and pasted

        getServer().getConsoleSender().sendMessage("[CGUI] Working version(s): 1.15");
        createInv();
        this.getServer().getPluginManager().registerEvents(this, this);
        getServer().getConsoleSender().sendMessage("======================");
#

the random use of this

#

for getServer() out of nowhere

#

and its for registering events as well, everything else is sending messages but this one is this for no reason

hot hull
#

first one async, second one sync

ocean quartz
#

Personally more fan of something like

Task.async {
  // Async
  Task.queue {
    // Sync
  }
}
hot hull
#

Cleaner yea

prisma wave
#

suspend fun

hot hull
#

@ocean quartz Can command completions be player specific

ocean quartz
#

Pretty sure it is

stuck harbor
#

mhm

hot hull
#

Indeed

stuck harbor
#

web design mmmm

ocean quartz
half harness
#

lolll

steel heart
#

You don’t need static helper methods and util methods for everything.

hot hull
#

That's ugly Conclure

steel heart
#

No it isn’t

hot hull
#

So clean

steel heart
#

They’re the same. Your is hiding stuff that it should not hide

#

It’s not clean because the class name Function does not even suggest what the class might be doing

#

Not even the static method names

hot hull
#

I mean I'm down to hear a better name for the class, I didn't know what to call it

steel heart
#

It just masks stuff it shouldn’t mask

hot hull
#

Should it be Executor?

steel heart
#

No it should be removed or justified why it’s used instead of the raw Completablefuture

hot hull
#

Nein.

steel heart
#

Yes that code is objectively more complicated than what it has to be.

hot hull
#

I refuse.

ocean quartz
#

Call it task

steel heart
#

Task would be a better name.

I could see it being a potential win assuming you want to use a common executor for all tasks and therefore you create some sort of forwarding logic along with that. But those static methods themselves are just complicating it for no reason at all by masking away the information a regular completablefuture usage would provide. What’s wrong with completablefuture.runasync? It has its cleanliness. The factory method is informative so is the class name and it’s in java meaning anyone that sees it will directly know what it does as opposed to your helper method.

forest pecan
#

what the fuck

#

lmao

prisma wave
#

lmao

#

lol they left

onyx loom
#

😭

half harness
#

I am a small youtuber and had saved up to buy a canon g7x mk3 I had used it for quiet a while till I dropped it in water and it damaged, I am only 15 years old so I cant afford a new one and my parents don't have the money to spend on it, so i came here to try making the money from your help and start recording again and hopefully make this my full time job in the future.
thats a lot of grammer mistakes ._ .

#

but why he leave

#

O_o

prisma wave
#

lol

#

grammar*

half harness
#

🙄

#

xD

prisma wave
#

he probably just spammed in every server lol

half harness
#

ye

half harness
#

?plsnolombok

compact perchBOT
#
FAQ Answer:

Why is Lombok bad?

  • It's a compiler hack - the Java compiler isn't designed to modify code, so it can cause difficult to debug errors, or worse
  • It requires an IDE plugin, so unless you've properly configured Maven, Gradle and your IDE, you'll get hundreds of compilation errors. This process takes time too, it's not easy
  • Lombok'd code won't show in Javadocs
  • The code generation is often unpredictable and difficult to debug, and often you'll have to do it "the hard way" anyway
  • Java is supposed to be explicit, Lombok hides a lot of key functionality into a subtle annotation which can be easy to miss
  • While IDEs support it with a plugin, it's usually more difficult to find specific things, like usages of a getter because they don't exist in the source code
  • Finally, Lombok'd bytecode doesn't match the source code, so it causes a pretty annoying warning in IntelliJ
half harness
#

need this for another server

distant sun
#

indeed

half harness
tranquil crane
#

you may not have a problem, but I do

#

there's a good response

hasty needle
#

I'm wondering how I could in theory create a tether, I saw a plugin where the lead didn't break and it was shot and attached via arrow

ocean quartz
#

Lombok won't cause any issues at first, the issues are more hidden

tranquil crane
#

You might be able to set a lead's holder to an arrow, never tried it before though. If not you can make a mob ride the arrow and hold the lead or something (like a wandering trader)

ocean quartz
#

Specially on an API, cough bungee cough

distant sun
#

^

#

imagine using it for any god damn reason

hasty needle
#

@tranquil crane I haven't really messed with creating plugins however I've taken enough years of java and computer science to where I can probably understand most of it and figure it out, I'm just seeing if its an option

#

I have a big project that I'm wanting to start, I've only used premade plugins till now

half harness
#

this discord also has someone that uses:
eclipse + light mode + static variables and methods + public fields + java 8

#

:p

tranquil crane
#

It's definitely possible I'm just not sure how you'd do it entirely lol

hasty needle
#

yeah, do u know if leads have a state option to where you can set them to break or not break?