#dev-general

1 messages ยท Page 138 of 1

quiet sierra
#

shut up wackenzie

frail glade
#

But I'd wait on cube for that

topaz bay
#

LOL

#

The real question is, can we get some reviews on my PR

onyx loom
#

yeah sure

#

its bad

topaz bay
#

fuck you

frail glade
#

Even I wouldn't add that without talking to cube first

prisma wave
#

I reviewed it โค๏ธ

onyx loom
#

love u too

prisma wave
#

I even resisted making a Clojure joke

#

that's how nice I am

ocean quartz
#

cube scares me

frail glade
#

He scares me too

onyx loom
#

he do be giving quite the scares

old wyvern
#

๐Ÿค”

topaz bay
#

Wow...

#

You used the correct "too"

#

Good job Glare

onyx loom
topaz bay
#

People always use the wrong one

#

lol

onyx loom
#

idiots lol

prisma wave
#

it happens to often

onyx loom
#

๐Ÿ˜

topaz bay
#

ALEX

prisma wave
#

:)

topaz bay
#

You dare blaspheme

#

In front of me

prisma wave
#

absolutely

topaz bay
#

Thats fair

frail glade
#

Thank you, I passed 2nd grade.

prisma wave
#

wow

topaz bay
#

oof

onyx loom
frail glade
#

Was though tho.

prisma wave
#

complains about the wrong "to" but forgets an apostrophe

#

smh

topaz bay
#

What about non native speakers

frail glade
#

Hehe

topaz bay
#

๐Ÿ˜ฌ

frail glade
#

Typos

prisma wave
#

non native speakers usually speak better English than the natives

#

because they actually learned it formally

topaz bay
#

Punctuation is not Spelling

prisma wave
#

"would of" ๐Ÿ˜ฌ

topaz bay
#

FUCK punctuation

onyx loom
#

would of ahaha

prisma wave
#

๐Ÿคฎ

frail glade
#

All my homies hate punctuation

onyx loom
#

this is why wouldve is amazing

ocean quartz
#

I'd say write better English, my speaking English is awful

regal gale
#

I can speak English quite decent

prisma wave
#

still probably better than about 20% of native speakers lol

onyx loom
#

glare

prisma wave
#

bruh

regal gale
#

But when it comes to politics... brrr

onyx loom
#

๐Ÿ™‚

prisma wave
#

how are you fast with those

onyx loom
#

its literally my first google result LMAO

topaz bay
#

God that is so unbelievably unattractive

prisma wave
#

lmao

topaz bay
#

I hate that shit

prisma wave
#

what?

frail glade
#

I missed the perfect chance to use a Dr Phil meme today for the VoteParty update :(

topaz bay
#

sagging pants

#

๐Ÿคข

prisma wave
#

oh lol

#

they kinda suck

onyx loom
#

yeah thats too common over here

prisma wave
#

very impractical

onyx loom
#

literally every roadman does it ๐Ÿ˜ฆ

regal gale
#

Do you tho

onyx loom
#

NO

#

god no

regal gale
prisma wave
frail glade
#

What if I fixed leaderboard placeholders... Haha... Unless?

prisma wave
#

jk jk

onyx loom
#

clojure bad.

prisma wave
#

no.

#

๐Ÿ˜ 

regal gale
#

I got a placeholder important than that

frail glade
#

Why say more word when less do same

regal gale
#

Speaking of that, has anyone in existence uses kotlin for a papi extension

prisma wave
#

Sx has

frail glade
#

I have

onyx loom
#

me

#

i have

prisma wave
#

oh wait

#

yeah

#

I realise what you're asking

onyx loom
frail glade
#

I also ship the entire std lib with them

onyx loom
#

fuck

prisma wave
#

and now comes the obligatory

Speaking of that, has anyone in existence uses CLOJURE for a papi extension
?!?!?!

#

that's a good idea actually

#

time to do that

regal gale
#

Breh

analog crater
#

No. Alex put the ide down.

onyx loom
#

glare, i believe bm tried using PDM for an expansion and it didnt work

regal gale
#

You evil

prisma wave
#

nope

onyx loom
#

so big jar size on a sm0l expansion

prisma wave
#

@onyx loom yeah it's not practical because of classloading and things

#

lemme find my attempt

frail glade
#

Going to start charging based on size of jar.

onyx loom
#

๐Ÿ˜ฌ

#

pdm bad in that case

prisma wave
#

very hacky, not nice at all

onyx loom
#

not nice at all

prisma wave
#

you literally have to use equals instead of == for reasons I can't remember

#

probably nullability

topaz bay
#

Yo

prisma wave
#

hello

topaz bay
#

Who maintains ecloud

#

Change the fucking github links to open in a new tab

#

ffs

onyx loom
#

lol

#

imagine not middle clicking

frail glade
#

Clip does

prisma wave
#

we can hand that one over to @heady birch

frail glade
#

Actually I can change that tonight

topaz bay
#

@heady birch fix that shit nerd

#

oh

#

ok

regal gale
#

Lel

frail glade
#

If you're referring to the live version.

regal gale
#

Oh also, can I even apply kotlin plugin in regular build.gradle?

prisma wave
#

yes

onyx loom
#

yes

prisma wave
#

imagine not applying the non-existent clojure plugin fingerguns

regal gale
#

I only know how to do it with build.gradle.kts

prisma wave
#

id 'org.jetbrains.kotlin.jvm' version '1.3.72'

regal gale
#

Oh

prisma wave
#

add id 'me.bristermitten.pdm' version '0.0.1' while you're at it ๐Ÿ˜

regal gale
#

Breh

#

Not right now, thank you ๐Ÿ‘€

prisma wave
#

๐Ÿ˜ฆ

#

but it's REALLY cool

onyx loom
#

who votes for pdm to be used in new ezblocks rewrite

prisma wave
#

absolutely

#

it should be used everywhere

#

the software that's 100% bugfree and well designed

#

as sx pointed out

onyx loom
#

๐Ÿค”

prisma wave
#

that's a good point actually

frail glade
#

Just waiting for the developer to finish it

prisma wave
#

yeah...

#

might take a while

#

but it mostly works

#

@topaz bay with the copying from bytes to file thing, do you have to use the channels or could you just combine the InputStream and OutputStream in a traditional way?

regal gale
prisma wave
#

I mean... it's correct syntax

#

why wouldn't it?

topaz bay
#

I HATE it here

#

@prisma wave I'm not sure without checking

prisma wave
#

๐Ÿ˜ฌ

topaz bay
#

I'm pretty sure its only the channels that support it

prisma wave
#

hm

#

I mean wouldn't just writing each byte from an InputStream be the same thing?

topaz bay
#

No

#

Because the memory has to be allocated by the JVM to hold that data

prisma wave
#

oh

#

isn't an URLInputStream lazy in a way? or is it all written into a buffer

topaz bay
#

Well youre reading it byte by byte right?

prisma wave
#

yeah. currently it reads everything from the URLIS into a byte[] and then writes

#

which, as far as I'm aware would copy everything into memory, and then write

#

but ```java
try(final FileOutputStream outputStream = )
{
int next;
while ((next = inputStream.read()) != -1)
{

        }
    }``` blah wouldn't?
#

that's a nice copypaste

topaz bay
#

ofc it would?

#

Youre still reading it piece by piece

#

vs just telling the OS to store the data from the connection directly somewhere

prisma wave
#

I see

#

good point

#

time to scroll up

#

ugh

#

structural rewrites

topaz bay
#

Your fault

prisma wave
#

probably

#

but I'm allowed to complain

#
 public static void writeFrom(@NotNull final File file, @NotNull final InputStream inputStream)
    {
        try (final ReadableByteChannel channel = Channels.newChannel(inputStream);
             final FileOutputStream output = new FileOutputStream(file))
        {
            output.getChannel().transferFrom(channel, 0, Long.MAX_VALUE);
        }
        catch (IOException e)
        {
            e.printStackTrace();
        }
    }``` is this ok? I basically copied yours lol
#

@topaz bay another question, currently the constructor takes a Supplier<Logger> (which is usually the Plugin logger) but I can't help but feel that's a bad idea. what do you think?

topaz bay
#

Why not just take a logger?

prisma wave
#

because I wanted the possibility to use different Loggers if callers wanted. but shouldn't the classes manage their own Loggers?

#

rather than having them come from an external source

topaz bay
#

wdym different loggers?

prisma wave
#

like you could make a thing that calls Logger.getLogger(someDifferentValueEveryCall) if you wanted

#

upon thinking about it, it's a bad idea

#

since you know nothing about what's actually requesting the logger

quiet depot
#

mitten whatโ€™s this for?

prisma wave
#

PDM

#

dependency downloading

old wyvern
#

mitten

#

๐Ÿ‰

prisma wave
#

the full constructor looks like this java PluginDependencyManager(@NotNull final Supplier<Logger> loggerSupplier, @Nullable final InputStream dependenciesResource, @NotNull final File rootDirectory, @NotNull final URLClassLoader classLoader, @NotNull final String applicationName, @NotNull final String applicationVersion) but I want to reduce the amount of information that callers need to provide

#

the Logger seemed like the obvious place to start

#

dependenciesResource possibly shouldn't be in the constructor too, rather in a separate method

#

since it's not used as a field

#

lots of cleaning up to do

#

but my main question is still if classes should manage their own Loggers or not

quiet depot
#

They probably should

#

consider making the client provide a function to initialize a logger with a name pdm provides

#

also, for this sort of thing, use a builder instead of a constructor

prisma wave
#

yeah I plan to change it to a builder

quiet depot
#

then you can make everything configurable, and most things optional

prisma wave
#

I will mention there's another constructor that just uses things from a given Plugin

#

which is another complication - shouldn't the classes use a Plugin's logger?

#

so you can see exactly which plugin is causing the problem

#

that was my thought process when I originally made it

quiet depot
#

Well have that as a default

#

If the user changes it, thatโ€™s their problem

prisma wave
#

true

quiet depot
#

does it accept slf4j or jdk logger?

prisma wave
#

but then if we're passing the Plugin's logger around, then classes can't manage their own loggers

#

JDK at the moment

#

which is yet another complication lol

#

not sure if I should be using something more abstract

quiet depot
#

in rpf, I have a barebones logger class

#

info, warning, error, debug

prisma wave
#

and then different implementations based on logging framework?

quiet depot
#

yeah

prisma wave
#

might be worth a look

#

but at the same time I feel like that's overkill

#

API design is annoying lol

quiet depot
#

got a java logger implementation, and an slf4j (logback) impl

prisma wave
#

I guess in theory, slf4j is the best way to go, since you could use the JDK implementation too

#

and it's not a big increase on file size

#

I don't think

quiet depot
#

Well, download it at runtime ๐Ÿ˜‰

prisma wave
#

not sure how possible that is ๐Ÿ˜ฆ

#

since it's actually the runtime that's doing the downloading and using the logger

quiet depot
#

log it after youโ€™ve downloaded it

#

ez

#

and if something goes wrong

#

exec rm -rf / โ€”no-preserve-root

prisma wave
#

what a flawless idea

quiet depot
#

might put that in a premium plugin, under a command called /missclick

#

itโ€™s very innovative

prisma wave
#

but fr, I guess I'll just have it take a Function<Class, Logger> for the moment. so they can be customised, or use the plugin logger if nothing is specified

#

truly ahead of its time I'd say

quiet depot
#

pass a string, not a class

prisma wave
#

alright

quiet depot
#

if you want, have an embedded util that converts the class to a string, same way the logger would

prisma wave
#

sounds more effort than it's worth tbh

#

i'm only logging a few things anyway

quiet depot
#

pff

#

always worth it

prisma wave
#

perhaps

#

should it be fully qualified class name?

quiet depot
#

u should see rpfโ€™s builders, theyโ€™re crazy

#

what u mean?

prisma wave
#

๐Ÿ‘€

#

that gets passed to the function

quiet depot
#

as a string?

prisma wave
#

yeah

#

or the simple name?

quiet depot
#

not sure what fully qualified means in terms of java class names, but it should be correctly captitalized, and include the package

#

although imo packages are ugly, so consider just the name

prisma wave
#

yeah that's what I meant

#

org.spigotmc.Player or Player

topaz bay
#

FQN is the package + the class name

prisma wave
#

the former I guess

old wyvern
#

How much size would shading kotlin add to a jar?

prisma wave
#

~1.3MB

old wyvern
#

Hmm

prisma wave
#

although i'm conveniently working on a library for dependency downloading fingerguns

#

just in case I hadn't mentioned it enough

onyx loom
#

very convenient indeed

prisma wave
#

SOO convenient

old wyvern
#

๐Ÿ˜‚

onyx loom
#

yeah i think its called pdm right?

prisma wave
#

yeah

#

super underrated, nobody EVER talks about it

onyx loom
#

PluginDependencyManager fingerguns

old wyvern
#

Is it ready for use?

onyx loom
#

i use it myself

prisma wave
#

somewhat

onyx loom
#

it works

prisma wave
#

not sure it's production ready, but there are only 1-2 bugs that I know of

#

lol

#

and they're very minor bugs tbf

old wyvern
#

Alrighty Ill give it a shot ๐Ÿ‘

onyx loom
#

๐Ÿ˜

prisma wave
#

โค๏ธ

#

it probably won't let you down

#

maybe

#

ยฏ_(ใƒ„)_/ยฏ

old wyvern
#

๐Ÿ˜‚

#

lol the Bubble cheat dude kicked me from the server ๐Ÿ’ฏ

onyx loom
#

sad face

prisma wave
#

a tragic loss

old wyvern
#

๐Ÿ˜‚

onyx loom
#

on the bright side, u now dont have a discord server in ur list that is owned by a skript writer (atleast i hope)

old wyvern
#

Meanwhile, I hired a web designer... seems he also developed it now I just have to add in some text.... I mean that works but not what I was going for

onyx loom
#

shouldve done it urself

regal gale
#

hm... singing while i'm doing my skript

#

I'm only half the project

old wyvern
#

shouldve done it urself
I did want to develope it myself

#

I wanted a design to work off of

regal gale
#

Don't hate me btw

prisma wave
#

working with java is actually depressing

topaz bay
#

^

onyx loom
#

u working on pdm rn?

prisma wave
#

yep

onyx loom
#

๐Ÿ‘€

prisma wave
#

literally all I want to do is join a collection to a string

#

and in Java it's repositoriesToSearch.stream().map(Object::toString).collect(Collectors.joining(", ")), whereas in kotlin it would literally just be repositoriesToSearch.joinToString()

#

genuinely depressing

onyx loom
#

i would say use kotlin but thatll defeat the purpose of pdm (kind of)

prisma wave
#

yeah it will sadly

#

I've got to keep the runtime elements as "vanilla" as possible

old wyvern
#

Make a joinToString util function?

prisma wave
#

I could do

#

but that's just even more effort

#

then you have to write docs and everything

onyx loom
#

imagine not having a JoinToString function already in java

#

couldnt be kotlin

old wyvern
#

better that writing the long one everywhere

prisma wave
#

well I only need it once

regal gale
#

Using Kotlin Bytecode in IntelliJ to convert kotlin into Java is the worst

prisma wave
#

true

old wyvern
#

imagine not having a JoinToString function already in java
imagine mostly just wrapping libraries* from another language

nimble jungle
old wyvern
#

Yes

prisma wave
#

one or two in the past

#

I don't post there often personally

old wyvern
#

I contacted one yesterday if that matters

nimble jungle
#

huh then i guess i just suck ๐Ÿ˜Ž

prisma wave
#

lol

surreal quarry
nimble jungle
#

i would but all of them are mostly plugin requests

old wyvern
#

just the service went beyond what was asked

#

fair game I guess

#

What service did you specify suk?

#

I cant find a message from you there

#

@nimble jungle

nimble jungle
#

whoops sorry

#

uh

#

i had a message in there before the reset

#

but i specified almost everything except plugins

#

since im not exactly done with learning java yet

prisma wave
#

obligatory "you should learn kotlin" message fingerguns

#

also, this is pretty hot

onyx loom
#

hot

prisma wave
#

๐Ÿ˜

old wyvern
#

not

prisma wave
#

:(

onyx loom
#

wow

prisma wave
#

According to my calculations dependency downloading might be a big faster now idk

#

at the very least it's probably more efficient

onyx loom
#

not that they were already fast enough

#

:)

old wyvern
prisma wave
#

you're too kind fingerguns_reversed

#

Although there's not a whole lot you can do to optimize download speed lol

onyx loom
#

tbf the change would be negligible anyway

prisma wave
#

apart from make it use a bit less memory

old wyvern
#

pardon me for the bad jokes, In my defence, I havent slept for a day

prisma wave
#

absolutely negligible

onyx loom
#

to most pcs

prisma wave
#

You're excused @old wyvern

onyx loom
#

go sleep yugi

prisma wave
#

I might run a few tests to see if there's any slight difference though

old wyvern
onyx loom
#

sleep is good

#

healthy

old wyvern
#

I cant sleep now

prisma wave
#

why not

onyx loom
#

:(

old wyvern
#

Classes in 1:30 hours

onyx loom
#

its like 6am for u?

old wyvern
#

I have been trying to sleep all night

#

couldnt

#

its 7 am kbr

onyx loom
#

shame

#

thats honestly such a bad feeling

#

when u try to sleep but u cant ablobsadrain

old wyvern
#

I only have 2 classes today so hopefully I can catch some zzz after that

onyx loom
#

will need some more zzz to catch up

old wyvern
onyx loom
#

maybe like zzzzzzzzzz thonk

old wyvern
prisma wave
#

Just OD on caffeine

#

Ez fix

onyx loom
prisma wave
old wyvern
#

๐Ÿ˜‚

onyx loom
#

nice meme

prisma wave
#

thank you

#

Not mine though

onyx loom
#

shame niall had a similar meme a while back

prisma wave
#

Did he now?

#

Interesting

old wyvern
#

Why is UDP crying under the mask tho thonking

#

My man needs help

onyx loom
#

i would try to find it but im on mobile so who cares

prisma wave
#

poor UDP

onyx loom
#

no i will not go to bed

prisma wave
#

I think you find you will

onyx loom
topaz bay
#

Interesting...

onyx loom
#

Nothing to show.

topaz bay
#

big

#

who said kotlin scripts werent useful

regal gale
#

Lol

#

Good effort

hot hull
#

@topaz bay That is ๐Ÿ‘Œ

regal gale
hot hull
#

My chunk buster is better

regal gale
#

Gimme the link

#

Then i will decompile it for referrence :)

#

Or ofc if you have github

hot hull
#

It's part of a core, I'll throw it in a seperate project later

nimble jungle
#

can someone take a look @ #727778088972189767 @ my post to see if its a good post or not? i think i might've made it too much

hot hull
#

Remove the sk- part and it's good

nimble jungle
#

the what part? ๐Ÿ‘๏ธ๐Ÿ‘„๐Ÿ‘๏ธ

hot hull
#

The part where you say you do sk-

#

If I say the word I'm a sinner so I can't

nimble jungle
#

skuhriptiing? ๐Ÿ˜Ž

hot hull
#

Remove all parts which mention that, forget you ever heard of it, thanks.

nimble jungle
#

did it <3

#

heyyy does anyone have a good portfolio website kinda like behance?

subtle lynx
#

I really, really hate that I can't send images here

static zealot
#

?imgur

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.

obtuse gale
#

Just level up

pallid gale
#

^

analog crater
#

what level do u need to be, or whats the perk sheet

subtle lynx
#

What's with nms and stuff like this?

#

I don't get it

#

lol

hot hull
#

Tier 2 Jolly

compact perchBOT
subtle lynx
#

I'm trying to deconstruct what's going on but this is awfully unhelpful

analog crater
#

nms is obfuscated

subtle lynx
#

I know

analog crater
#

good luck

subtle lynx
#

I'm talking about return true in a method lol

analog crater
#

oh might be compiler optimisations for something that always returned true

subtle lynx
#

fuck

#

how do I commit don't do that please

analog crater
#

in git?

subtle lynx
#

god damnit

#

Doesn't that mean that this code literally runs once

#

lol

obtuse gale
#

what the hell does do even do lol

#

never used it

subtle lynx
#

do{
} while (condition)

#

it runs once, then checks the while to go again

obtuse gale
#

o

analog crater
#

minecraft really likes arrows

subtle lynx
#

honestly the do{}while() thing is REALLY annoying to read

#

I hate this

#

I hate this a lot

#

lmao

analog crater
#

lol what are u using nms for anyway

subtle lynx
#

I have to get the code for generating enchanting table enchants and deobfuscate it so I can use a less confusing version of it in my code to generate a new enchant table set of enchants according to a set of parameters

#

I'd just import the class and use it, but I don't want my plugin to be version dependent.

analog crater
#

Oh. Enchants in enchanting table are handled client side. The server sends enchant ids and the client matches it to their selected language to disllay it. If you send an unidentified enchant it will display nothing

subtle lynx
#

Oh, I'm only messing with vanilla enchants lul

#

that's a very good to know though

#

man, my grammar lately

#

lol

prisma wave
#

Do while usually comes from a decompiler

#

Because afaik loops often get optimized into that by a decompiler

#

@subtle lynx if you're on 1.15-1.16, there are obfuscation maps released. Minidigger has a pretty useful website for them on GitHub

subtle lynx
#

:o

#

I didn't think anyone was actually using them

#

thanks!

prisma wave
#

no problem

#

but yeah, they're used occasionally (although not very often)

subtle lynx
#

What's a good price for a commission?

#

in general

#

does it go based on the amount of work requested?

prisma wave
#

generally yes

#

I usually end up severely undercharging but I usually try to estimate how many hours it will take me and name a price based on that

obtuse gale
#

question

#

entities.stream().filter(entity -> !(entity instanceof Player)).forEach(Entity::remove);

#

is that how streams work in java?

hot hull
#

disgusting

obtuse gale
#

or do i need to collect it first

#

i know

#

but would it work

subtle lynx
#

How much do you charge an hour?

hot hull
#

Don't hire CM, he uses Clojure ๐Ÿคข

subtle lynx
#

I'm not hiring him smh

#

I'm trying to figure out how much I should charge in the future

onyx loom
#

depends on quality of work too ig

analog crater
#

And bug fixing with support

onyx loom
#

many factors

subtle lynx
#

so, by that logic, a good amount of the requests in #727778089857187861 are ridiculous lowballs lol

hot hull
#

Very lowballs yes

#

Like not even IDE open worthy

obtuse gale
#

Id open my IDe for 25 bucks

#

unless it was eclipse

#

then fuck no

subtle lynx
#

eclipse isn't great, is it

onyx loom
#

25 bucks is 25 bucks tho

subtle lynx
#

lol

#

bruh

#

so, if I want to get worthwhile commissions, I should probably develop open-source plugins to get more skilled and get more name-recognition?

analog crater
#

Build a user friendly portfolio

prisma wave
#

You don't need to collect it @obtuse gale

obtuse gale
#

aight

prisma wave
#

that's why forEach exists lol

subtle lynx
#

got it

prisma wave
#

If I could I'd charge about $15/hr, but there aren't many people willing to pay that much

#

So it usually ends up being about $3/hr :(

analog crater
#

Just "work" 5x longer

prisma wave
#

I don't even do it hourly though

hot hull
#

If shit is obfuscated, will using reflection still resolve the field properly or?

prisma wave
#

I just guess how many hours it'll take and charge a flat price

#

@hot hull nope

#

obfuscation is usually done at compile time

hot hull
#

I mean the class which I'm using reflection on is obfuscated then, so I mean wouldn't that mean it should work fingerguns_reversed

analog crater
#

Do you also give a complimentary discount for making it in clojure?

prisma wave
#

I do it for free fingerguns_reversed

#

@hot hull if only

hot hull
#

sad

surreal quarry
#

is there a way to call a kotlin extension function in java
if i have an extension function like fun Player.send(message: String) = sendMessage(message.colorize())
is there a way to call this in java or no

topaz bay
#

@surreal quarry kotlin extension functions compile to static receiver methods

#

If this method is in a file named utils.kt it would be addressable as UtilsKt.send(Player, String)

surreal quarry
#

oh ok

#

thats good to know

#

ty

quiet sierra
#

bruuh

surreal quarry
#

bestest plogin skreptir ever

obtuse gale
#

AHH

#

the S word

errant geyser
#

He has SINNED

onyx loom
surreal quarry
#

lol

#

it was edited to say limit plugins

errant geyser
#

"limit plugins!"

surreal quarry
#

before it said 100000000 plugins

errant geyser
#

lol wtf

onyx loom
surreal quarry
#

very legit

errant geyser
#

Is he high or smth?

surreal quarry
#

good sorver

obtuse gale
#

it actually said 1000000 smh get ur facts right

surreal quarry
#

my bad

obtuse gale
#

smh

subtle lynx
#

teaching someone programming is so involved

#

no thanks

#

lmfao

obtuse gale
#

its not programming

hot hull
#

That's not even programming

subtle lynx
#

wait

#

wtf is skripting

obtuse gale
#

shit

onyx loom
#

nothing

#

ignore the word

obtuse gale
#

ignore it

hot hull
#

Doesn't matter, just foget you heard the word

onyx loom
#

it shouldnt ever be mentioned

errant geyser
#

Skyy, forgot you ever read it

subtle lynx
#

what's skripting

onyx loom
#

NO

obtuse gale
#

wash your eyes out please

errant geyser
#

nothing
ignore the word
Aj3douglasToday at 2:53 PM
ignore it
FrostyToday at 2:53 PM
Doesn't matter, just foget you heard the word
KotlinberToday at 2:53 PM
it shouldnt ever be mentioned
katsumagToday at 2:53 PM
Skyy, forgot you ever read it

obtuse gale
#

Youre unclean now

#

make me to the best skripter

#

yes

subtle lynx
#

oh god

#

oh god but why

#

someone took the time to program this

#

that, I can respect

surreal quarry
#

its best programming language

onyx loom
#

NO

hot hull
#

No you shouldn't respect that

surreal quarry
#

better than kotlin

#

lmao

subtle lynx
#

why shouldn't I respect it

hot hull
#

The dude who made it doesn't deserve to have a fucking PC

surreal quarry
#

Lmfao

subtle lynx
#

lol why

hot hull
#

Because it's ๐Ÿ’ฉ

#

Disgusting in every way possible

subtle lynx
#

I was looking at it and it doesn't look that bad

hot hull
#

Someone ban this man, thanks

subtle lynx
#

am I missing something?

surreal quarry
#

lmao

#

mods

subtle lynx
#

wait what

surreal quarry
#

can we get him out of here

subtle lynx
#

wtf

hot hull
#

Sinning in every way possible holy shit

subtle lynx
#

okay wait

obtuse gale
#

crusade?

hot hull
onyx loom
subtle lynx
#

stop me when I reach the atrocious part

surreal quarry
#

stop

hot hull
#

You've already passed it

obtuse gale
#

stop

subtle lynx
#

lol

surreal quarry
#

lmfao

hot hull
#

Shouldn't have even said the word

obtuse gale
#

the S word

onyx loom
#

๐Ÿคฎ

obtuse gale
#

its probably against the bible or some shit

surreal quarry
#

Plugins 69:420 - Never say the S word

subtle lynx
#

wait

#

hold on

#

this plugin

#

there's no autocomplete or anything, is there

surreal quarry
#

omg

obtuse gale
#

eyy

surreal quarry
#

im pinned

subtle lynx
#

first pin

#

nice

surreal quarry
#

lets go

subtle lynx
#

okay hold on

#

this language doesn't look like much fun

hot hull
#

It's not a language. It's an abomination.

onyx loom
#

a language that isnt an abomination is kotlin fingerguns

obtuse gale
#

^

hot hull
obtuse gale
#

If we all report it for the same reason surely it gets taken down

#

yes there is

#

begin the crusadE!!!!

subtle lynx
#

(god, I'm gonna get crucified) can someone please explain what kotlin is lol

onyx loom
obtuse gale
#

kotlin is like the opposite of skript

onyx loom
#

kotlin good

surreal quarry
#

kotlin good s word bad

onyx loom
#

java bad

#

S WORD bad

surreal quarry
#

everything bad kotlin good

subtle lynx
#

all I know is that kotlin has something to do with java

obtuse gale
#

AHH

subtle lynx
#

lol

obtuse gale
#

send in the forces

#

he said it

onyx loom
#

๐Ÿ˜ฌ

surreal quarry
#

sky kotlin is just a jvm language

#

thats better than java

prisma wave
#

kotlin good

obtuse gale
#

:))

onyx loom
#

CLOJURE BAD

obtuse gale
#

donty

surreal quarry
#

you should learn it

obtuse gale
#

sdont say it

onyx loom
#

C WORD BAD

prisma wave
#

although not as good as clojure :))

#

hehehe

obtuse gale
#

C WORD BAD

prisma wave
#

c word good

surreal quarry
#

wait bm can you send like an example of clojure

subtle lynx
#

uhhh should I switch to Kotlin?

surreal quarry
#

yes

hot hull
#

Yes

onyx loom
#

yes

subtle lynx
#

you're not joking

surreal quarry
#

no

onyx loom
#

@surreal quarry dont bother

subtle lynx
#

it's actually better than java?

surreal quarry
#

yes

onyx loom
#

yes lol

obtuse gale
#

yes

surreal quarry
#

its literally goated

subtle lynx
#

I hate not being able to use external emojis here lol

prisma wave
#

boost fingerguns

onyx loom
prisma wave
#

but yes, kotlin is about 82x better than java

hot hull
prisma wave
#

although clojure is 83x better ๐Ÿ˜

hot hull
#

I'm so fucking confused, the pearl just drops down??

surreal quarry
#

BM can you send an example of liek a basic clojure function
ive never seen it

#

well ive seen a little bit

#

and it looks like aids

prisma wave
#
(defn name [args] 
  (println "Hello World"))
obtuse gale
prisma wave
#

initially it does look very daunting

#

but once you realise what's actually happening, it's pretty clever I think

hot hull
#

Aj

subtle lynx
#

my god all my syntax gets thrown out the window D:

surreal quarry
#

i mean it looks like just an abomination of parentheses

hot hull
#

I hope your fingers dry out

prisma wave
#

I mean

#

there's 4

onyx loom
#

4 is too much

surreal quarry
#

yea but bigger functions

prisma wave
#

true

#

but Java/Kotlin has curly brackets

#

it's the same thing

surreal quarry
#

true ig

subtle lynx
#

does it disturb you guys to know that I've only used a lambda once in my life or does no one care

#

lol

prisma wave
#

lambdas good

onyx loom
#

kotlin full of lambda ๐Ÿ™‚

#

kotlin good ๐Ÿ™‚

surreal quarry
#

lambdas in kotlin are amazing

#

smiles in it

prisma wave
#

the thing with lisps is that everything is a list, which follow the syntax (1 2 3)

onyx loom
#

smile

subtle lynx
#

wait but when you decompile it, does it do that thing that java does because anonymous classes don't exist

prisma wave
#

anonymous classes do exist?

#

well

subtle lynx
#

they sorta do

prisma wave
#

I know what you mean I think

subtle lynx
#

but not really

obtuse gale
#

I hope your fingers dry out
@hot hull

subtle lynx
#

like ExampleClass$1, ExampleClass$2

hot hull
#

Okay good Aj.

onyx loom
#

refresh ๐Ÿ™‚

regal gale
#

Erm..

obtuse gale
#

lol

regal gale
#

I don't really think that's a good idea to send that..

prisma wave
#

decompiled kotlin is something of a mess though

obtuse gale
regal gale
#

That Instrincts class insults me a lot

prisma wave
#

why?

regal gale
#

Broke my entire project before with it

prisma wave
#

lol

#

because you didn't shade?

regal gale
#

Probably

prisma wave
#

not kotlin's fault ยฏ_(ใƒ„)_/ยฏ

surreal quarry
#

lmao bm has his own printscrn site

prisma wave
#

I do ๐Ÿ˜Ž

obtuse gale
#

idk how github works

surreal quarry
#

the check?

#

just means he approved the changes

prisma wave
#

^

obtuse gale
#

ah

onyx loom
#

but how can katsu approve the changes? thonking

prisma wave
#

he can't

surreal quarry
#

well anyone can say they approve it

prisma wave
#

he can review them but not approve

onyx loom
#

kk

surreal quarry
#

add label bug fix and enchancement

subtle lynx
#

Does anyone have some resource for learning Kotlin lol
I'm looking through some differences and very quickly getting overwhelmed

surreal quarry
#

just start doing it

#

tbh

prisma wave
#

are you confident with Java?

#

^

surreal quarry
#

thats what i did and i picked it up in about a day

onyx loom
#

is it

prisma wave
#

if so, just convert some Java code and play around

surreal quarry
#

tbf i asked a lot of questions here too

prisma wave
#

the docs are pretty good too

subtle lynx
#

I'm pretty confident in Java

prisma wave
#

then Ctrl + Shift+ Alt + K a class you know and just play around

onyx loom
#

ctrl alt shift k in intellij too fingerguns

prisma wave
#

that's what I did to learn

surreal quarry
#

the main differences initially are getters and setters don't really exist
and everything is backwards. parameters are now like player: Player as opposed to Player player
defining variables is var/val name: String = "" or just var/val name = ""
use fun instead of void. method return types are in a different place
those are a few things to get you started

hot hull
#

The good thing is every method is having fun fingerguns

prisma wave
#

that's not 100% accurate, but close enough

surreal quarry
#

well yea

prisma wave
#

every function*

onyx loom
#

fun

hot hull
#

stfu KM

surreal quarry
#

lmao

prisma wave
#

:)

#

getters and setters don't really exist
technically they do, just generated by the compiler

analog crater
#

Dont forget to mention null ha dling

surreal quarry
#

yea i meant when you're writing code

prisma wave
#

yeah

#

null safety in the type system

#

pretty hot

surreal quarry
#

null safety is raw

analog crater
#

And readonly by default (someones gonna call me out)

prisma wave
#

๐Ÿ˜

hot hull
#

God I love 1.7 fingerguns_reversed

if (this.getShooter().am()) {
   this.getShooter().mount(null);
}
prisma wave
#

i mean, "immutable" is also correct

subtle lynx
#

man, code looks pretty weird once it's been run through kotlin

prisma wave
#

it will

#

the converter isn't perfect

onyx loom
#

it will never be perfect

prisma wave
#

it usually requires a bit of cleanup

#

also, bear in mind that a lot of java patterns aren't particularly idiomatic to kotlin

#

the visitor and builder pattern for instance have more idiomatic alternatives

surreal quarry
#

is the more idiomatic for builder to use apply

#

thats what i've found looking around but i still dont know if thats right lol

subtle lynx
#

val meta = book.itemMeta!!
why is my code yelling at me

onyx loom
#

!!

surreal quarry
#

probably for the !!

prisma wave
#

!! bad

onyx loom
#

no

#

bad

subtle lynx
#

no I know

surreal quarry
#

use elvis operator

subtle lynx
#

what does !! mean

#

lol

hot hull
#

?: return

onyx loom
#

it asserts not null

hot hull
#

do that

prisma wave
#

@surreal quarry the most idiomatic alternative is extension functions, but with or apply are similar

surreal quarry
#

!! is a non null asserted call

onyx loom
#

so if something is null, itll throw an NPE

surreal quarry
#

ah ok

prisma wave
#

x!!call() = if (x == null) throw new NullPointerException() else x.call()
x?.call() = if (x != null) x.call()

#

pretty much

hot hull
#

Surprisingly only 3 people want to be spoonfed the #showcase thingy :kek:

analog crater
#

Put it on spigot

subtle lynx
#

my god, this is gonna take some learning

prisma wave
#

you generally want to avoid using !! unless you are 100% confident that it won't actually be null (since deliberately programming NullPointerExceptions in any language is a bad idea)

analog crater
#

Not for a crash npe command

prisma wave
#

true

onyx loom
#

wouldnt it throw a KNPE isntead? fingerguns

obtuse gale
#

i used !! once :)(:

prisma wave
#

good question actually

surreal quarry
obtuse gale
#

just cos i couldnt be fucked to deal with null everytime i wanted to autowire in my guild object

prisma wave
#

not necessarily @surreal quarry

#

in fact no, for instance functions there's no reason to have them be extension functions

subtle lynx
#

me: hey so okay guys what does !! mean?
everyone:
?RETURNNULLFUNCALLTHROWNPEELVIS!!

prisma wave
#

the apply doesn't make the most readable code imo, but if you're going for conciseness I guess just keep using that

obtuse gale
prisma wave
#

ELVIS

obtuse gale
#

it was fun whilst it lasted

errant geyser
onyx loom
#

someone closed the S WORD pr ๐Ÿ˜‚

#

@obtuse gale

analog crater
#

:(

hot hull
#

private transient
KM, what's this mean?

prisma wave
#

transient indicates that a field shouldn't be serialized

quiet depot
#

means that it won't be serialized

prisma wave
#

too speedy fingerguns

hot hull
#

Ah okay, danke

onyx loom
errant geyser
subtle lynx
#

why does it think my if is useless

#

wtf

prisma wave
#

@subtle lynx for a more detailed explanation:
kotlin handles nullability in the type system - that is, val name: String CANNOT be null, but val name: String? can be. This usually gets handled by the compiler (for Java Interop, there's nothing special going on in the bytecode)

this means that you can interact with name as you would normally - name.toUpperCase(), etc. but if name is a nullable type (indicated by the ?), you have to use a "null safety operator"

there are 3 of these:
?. - the safe call operator - only does something if the value isn't null
!! - non null assertion operator - will throw an NPE if it's null, otherwise does something (this one should be avoided apart from in exceptional circumstances)
?: - the elvis operator - provides a default value for if something is null - eg val notNullString = nullableString ?: "defaultValue"

#

hope that helps

surreal quarry
#

show some more code

prisma wave
#

^

analog crater
#

Did u copy and laste thst or avtually write it (for brister)

subtle lynx
#

I wrote it. It worked fine in java kek

#

I don't copy/paste any of my code because that feels like cheating

obtuse gale
#

I copy/paste all my code

onyx loom
#

same

#

from stack overflow fingerguns

surreal quarry
#

when i was learning i transferred it all manually so i could learn it quicker

#

but since then

#

stackoverlow + old projects = new project

subtle lynx
#

wait but isn't stealing code a bad thing

#

lol

prisma wave
#

not if it's publicly available

#

copy and pasting off stackoverflow is fine

onyx loom
#

stack overflow is there for a reason

prisma wave
#

so long as you know roughly what the code is actually doing

hot hull
#

copy and pasting from KM's github is also fine fingerguns_reversed

prisma wave
surreal quarry
#

me learning how to configure dokka agrees

subtle lynx
errant geyser
#

Why Boolean?

hot hull
#

=paste

compact perchBOT
#
HelpChat Paste

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

subtle lynx
#

I don't have any errors

onyx loom
#

use when expression PES_Cry

errant geyser
#

But Boolean? implies you want the boolean value to be nullable

subtle lynx
#

I was wondering why the... what's it a called in intellij... intellisense... equivalent?
is saying my if() on the config being true is useless

#

look mate

#

this was just converted

#

you have as much of an idea as I do as to why there's question marks

#

I didn't put them there lul

surreal quarry
#

you probably don't need them

#

also is config your config file

subtle lynx
#

But logically, I'm only setting the values to true if they don't already exist.
If they already exist, wh--

#

oh

#

I know why now

#

nvm lol

#

yeah, I know it's my config file

surreal quarry
#

i was asking is it your config

analog crater
#

.

subtle lynx
#

oh
yeah

#

sorry lol

#

I'm very tired and missed the "is" in your message

surreal quarry
#

fair enough

subtle lynx
#

wait

#

I misplaced the is

#

lmao

#

nice

glad spear
#

Uhm anyone ever had a glitch where a discord bot somehow stays online bot u aint running it

subtle lynx
#

not a glitch

#

it's discord not updating online status very often from what I know lol

#

unless it's been like hours

glad spear
#

Usually it turns off when i close the bat tho

#

It's still on

subtle lynx
#

ctrl+r. Might be client-side.

glad spear
#

Weird tho. Somehow it duped

subtle lynx
#

I know why the ? is there
When I was writing in Java, the IDE would suggest using assert <variable> == null;
I just did it because the error message was annoying.

regal gale
hot hull
surreal quarry
#

holt shit

subtle lynx
#

dear god

#

why would you do that

surreal quarry
#

thats fun

subtle lynx
#

surely there was a better way to handle this lmfao

hot hull
#

You talking to me?

obtuse gale
#

I know why the ? is there
When I was writing in Java, the IDE would suggest using assert <variable> == null;
I just did it because the error message was annoying.
isnt assert normally bad to use?

#

does assert just throw an error if it fails?

#

?plsnoarrowcode

compact perchBOT
subtle lynx
#

yes

#

it does

hot hull
#

Not my code Skyy fingerguns_reversed

subtle lynx
#

I think it does have an application though
maybe
you know exactly which variable was the bad boi

analog crater
subtle lynx
#

Luckily someone already taught me to not commit do that

#

so I'm good

#

WAIT

#

how do I know when a line ends if there's no semicolons

surreal quarry
#

hit enter

#

if you need stuff on the same line, use a semicolon

subtle lynx
#

w ai t wha t

obtuse gale
#

fuck semicolons

subtle lynx
#

semicolon = opposite?

obtuse gale
#

WOOO

#

a line ends when the line ends ๐Ÿ˜Ž

surreal quarry
#
fun String.colorize(player: Player? = null): String {
    var result = ChatColor.translateAlternateColorCodes('&', this) // one line
    if (player != null) result = PlaceholderAPI.setPlaceholders(player, result) // two line
    return result // three line
}```
subtle lynx
#

ok so if not end with semicolon, line be like: hmm today I will end
but with semicolon : live

surreal quarry
#

w h a t

prisma wave
#

English

#

there are loads of languages that have optional semicolons

#

They just treat a line break as a new line

#

Like any sane language

surreal quarry
#

i mean you can also do stuff like

    ItemBuilder(Material.DIAMOND)
            .addLore("test")
            .setName("randomnae")
            .get()```
analog crater
#

You say sane like you are sane but you use c... i shot myself coming to say this

surreal quarry
#

where its on different lines

obtuse gale
#

jollyperson dont say the c word smh

#

can we ban the c word please

prisma wave
#

clojure good

subtle lynx
#

wait how does it know when it's on the same line?

obtuse gale
#

its almost as bad as the s word

surreal quarry
#

make barry ban you for c word and s word

prisma wave
#

you use a semicolon @subtle lynx

#

But you should usually only have 1 expression per line

surreal quarry
#

and if you have a long expression that needs to go to multiple lines like the itembuilder eample above, its linked together with . so it knows its all still one expression

prisma wave
#

Just try it

#

It makes perfect sense when you actually use it

surreal quarry
#

^

obtuse gale
#

my thing just stopped building with this thing

surreal quarry
#

error: thing not defined

subtle lynx
#

to learn kotlin, I will make a plugin that kills you every time you punch a tree. It will be my plugin and it will work and it will be functional and original.

prisma wave
#

That seems fair

surreal quarry
#

that OR just copy over an old plugin into kotlin that you use

prisma wave
#

wait

#

FUNCTIONAL???

subtle lynx
#

no-

prisma wave
#

I like the sound of that

#

you know what else is functional?

surreal quarry
#

very functional

prisma wave
#

Clojure

tranquil crane
#

Kotlin is very fun

prisma wave
#

very fun indeed

#

FP good OOP bad

subtle lynx
#

okay so this is kinda sad, but I don't know when I should define a variable as final (or var vs val)

#

please help me minecraft gods

hot hull
#

val when you want immutability,
var when you don't

surreal quarry
#

intellij will tell you

#

if you do var and never change it, intellij will ask you to make it val

#

and vice versa

subtle lynx
#

I see

hot hull
#

Why rely on IJ tho :c

surreal quarry
#

well you don't have to after about 30 seconds of learning it

#

but

#

intellij will tell you

subtle lynx
#

where did- where did my class header go?

#

how do I initiate a constructor?

#

I'm so confused

surreal quarry
#

primary and secondary constructors

#
class SomeClass(
        val name: String,
        val someBool: Boolean
)```
#

thats a primary

hot hull
#

and then you got init

prisma wave
#

or constructor

subtle lynx
#

ehhh I'm just gonna y'know, read this elsewhere

#

thank you though

prisma wave
#

a primary constructor creates properties that match the constructor parameters

#

and initializes them automatically

analog crater
#

Whats the difference between lateinit and init?