#dev-general

1 messages · Page 182 of 1

prisma wave
#

Why not both?

#

A compiler AND an interpreter

old wyvern
#

Yes PlusOne

prisma wave
#

So you can use interpreting in development but once you're ready you can compile for speed

old wyvern
#

Project Elara

unreal briar
#

skript is kind of dead now

onyx loom
#

u guys are thinking really far into the future when u barely have a working language 😆

prisma wave
#

Pff

#

We have a working lexer

#

That's enough

hot hull
#

Did someone say the S word

old wyvern
#

xD

onyx loom
hot hull
#

You hecking sinners

onyx loom
#

ikr frosty

#

bean these men

old wyvern
#

I mean technically we have all the logic we need till parsing down

#

Moving it to go shouldnt be too hard I hope

prisma wave
#

More than enough

#

Probably not

old wyvern
#

😂

#

Ill start on that tonight

prisma wave
#

Awesome

old wyvern
#

Procrastinated this whole day

#

😂

prisma wave
#

Go is super clean

old wyvern
#

Also km I need opinions on something

prisma wave
#

As fast as C++ or Rust but I've not needed to use a single pointer yet

#

What's up

hot hull
#

Would something like the js placeholders make sense/be a good addition so people can easily add in actions without the need of another plugin (FJ)

prisma wave
#

Sounds a bit overengineered tbh

#

All this for a join plugin

hot hull
#

Bruh, go big or go home

prisma wave
#

Touché

old wyvern
#

So I was working on a Skyblock plugin, Initial plan was to force create a "Member" wrapper for all players even if they arent part of a Island, as in the IslandID field and Rank field would be null.
Alternative choice would be to delete records of a Member when they leave and island and not have a Member for players without an Island.
First option introduces 2 nullable fields inside Member
Second option makes Member itself nullable.

I feel like Second option should be the choice I should go for but at the same time feel like first option is more managable

hot hull
#

It's not the plugin, it's the fact that it's a good learning experience figuring that out

old wyvern
#

What do you recommend?

hot hull
#

First is better imo Yugi

prisma wave
#

First is definitely more manageable

#

You couldn't set it to null everywhere

#

So you'd end up with "invalid" members

old wyvern
#

hmm

#

true true

prisma wave
#

or have a PlayerWrapper with a nullable Member field or something

old wyvern
#

Oh member is supposed to be the player wrapper here

astral quiver
#

Currently, I guess, Bukkript is the only script project for Bukkit that really compile to bytecode / jvm

#

And its use PDM

#

soooo its great!

prisma wave
old wyvern
#

we'll bring in the competiton souz

astral quiver
#

nonono

#

I done that first

#

don't kill my project

#

plz

old wyvern
#

xD

astral quiver
#

😭

old wyvern
#

Competition doesnt kill

#

it improves

astral quiver
#

I don't have much time to improve it

#

And its opensource

#

improve it

#

if you do in will

#

if you are talking about Elara

old wyvern
#

You think Im sitting around free all day? xD

astral quiver
#

I will love to see it on Bukkit as well

old wyvern
#

Thanks bro 🍉

astral quiver
#

The Citizens folks done a scripting language as well, right?

old wyvern
#

I think it was denizens

#

Not really sure

astral quiver
#

But Elara looks like a real language, not a scripting

#

Yes denizens

#

never use it

#

I don't like scripting languages so much

prisma wave
#

because it is a real language

astral quiver
#

Like Javascript and Python 👀

#

Exacly!

ocean quartz
#

Ugh denizen

old wyvern
#

😂

distant sun
#

🤢

prisma wave
#

Elara is the ultimate scripting language

old wyvern
jovial warren
unreal briar
#

If you want a real language, why not make a wrapper for javascript?

jovial warren
#

fuck JavaScript

#

that language can go fuck itself

unreal briar
#

It's easy to learn, relatively performance effective, and java already has some javascript engines implemented

ocean quartz
#

TypeScript fingerguns

unreal briar
#

so what's the point in creating another language which is less widespread and maybe even less advanced

old wyvern
#

Why make a wrapper for javascript when you already have a lot of work done for the language?

unreal briar
#

if not just use the javascript engines

old wyvern
#

No need

unreal briar
#

and some plugin to load the scripts in

jovial warren
#

It's easy to learn, relatively performance effective, and java already has some javascript engines implemented
and encourages bad coding practice, uses duck typing, and is a very premature language

prisma wave
#

js isn't duck typed?

jovial warren
#

oh sorry, I forgot, it's worse

prisma wave
#

and I wouldn't say any of those things are true

#

it's definitely more mature than it was

unreal briar
#

The main driving force behind skript was that it was easy to learn and you didn't need to know programming to be able to understand

jovial warren
#

^ exactly why it's awful

unreal briar
#

if you create a programming language that is more complex and more viable than java, you're already driving away off the path a looong while

#

It is awful for large networks, as it's not intended for use in production

#

it's cool for school projects or anything at a small scale

ocean quartz
unreal briar
#

not to mention it's mature and widely explained

#

if you want something high performance then why not directly go for java development

#

or maybe java-native for paranoid people

prisma wave
#

if you want high performance then why not go for elara

old wyvern
#

^

prisma wave
#

we plan for it to be the fastest language ever made

old wyvern
#

fingerguns 😂

prisma wave
#

solving fermat's last theorem in approximately 10ms

old wyvern
#

10ms? oof nah, 10ns

prisma wave
#

sorry my bad

#

mistype

ocean quartz
#

Do it in 1 plank time

prisma wave
#

it also supports every single cpu architecture

old wyvern
#

Yes. Orrrr lets make a smaller unit of time

prisma wave
#

even the ones that haven't been invented yet

old wyvern
#

😂

ocean quartz
#

1 elara, approximately 0.1 planck time

prisma wave
#

0.01*

old wyvern
#

😂

prisma wave
#

quantum computing made redundant after the elara language discovers the mysteries of the universe in 2ns

old wyvern
#

🍉

dusky drum
#

2ns what about 10^-100?

astral quiver
#

The main driving force behind skript was that it was easy to learn and you didn't need to know programming to be able to understand
@unreal briar KotlinBukkitAPI and Bukkript is kinda like that

#

So easy to use

#

I could do better

#

hopefully in the future this could replace Skript

#

I friend of mine is working on a Skript to Bukkript converter

prisma wave
#

lmaoo

distant sun
#

it wont replace skript at all

prisma wave
#

you can't replace skript

#

unless you make it 100% idiot-proof

distant sun
#

not even then

astral quiver
#

lol

distant sun
#

some people won't leave skript

astral quiver
#

is kotlin sooo, I can't

ocean quartz
#

Skript is like a virus infecting people

astral quiver
#

This is exacly what happens with Java as well

distant sun
#

I mean, if they wanted to, they would have learned a real programming language

astral quiver
#

I know people that just don't like Kotlin because they don't know

hot hull
#

Bruh y'all fuckers sinning again smh

astral quiver
#

If I remember, Papermc was a "NO KOTLIN" emoji

#

:c

#

Papermc discord

hot hull
#

I used to dislike kotlin, then I tried it

astral quiver
#

everyone that tries it, loves it

ocean quartz
#

People who refuse it will never understand it's beauty 🙏🏻

prisma wave
#

it's proven to be psychologically impossible to hate elara

astral quiver
#

it is a good language

prisma wave
#

lmao

ocean quartz
#

They have a Kotlin and a No Kotlin emoji

prisma wave
#

the paper people are weird

astral quiver
#

Why they don't have No Java !

#

Emoji as well

ocean quartz
#

Cuz no java is common sense

distant sun
#

"Pro skript!"

astral quiver
#

lol

old wyvern
#

The circlejerk is back bois

prisma wave
#

when's the elarajerk coming

#

😔

old wyvern
#

its already here

prisma wave
#

yeah but not enough

#

need more

old wyvern
#

yes

#

!

ocean quartz
prisma wave
#

good god

old wyvern
#

who made that bloody shit

astral quiver
#

The Bukkript icon is just easy

ocean quartz
#

How many fonts in our logo? Yes

prisma wave
#

that is seizure inducing

astral quiver
#

Is a Kotlin in a Bucket

old wyvern
#

what?

ocean quartz
#

You should have called it Bucklin

old wyvern
#

oh nvm

old wyvern
#

I didnt see your last msg

astral quiver
#

Bukkript ! Bukkit Kotlin Scripting!

ocean quartz
old wyvern
#

eh

#

Not as good as :elaramoon:

#

😂

ocean quartz
#

Fail

prisma wave
#

:elaramoon: fingerguns

distant sun
#

where are the brackets coming from?

old wyvern
#

Fail
Not really, logo not ready xD

astral quiver
#

Jetbrains Mono

distant sun
#

kotlin script?

jovial warren
#

yeah

#

no idea lol

old wyvern
#

Didnt sx have something like that?

ocean quartz
#

Fira Code Medium > Jetbrains Mono

#

Yeah he had

#

Was pretty cool

astral quiver
#

Take it back young man!

old wyvern
#

Did he delete it or something?

ocean quartz
#

Never! They are pretty similar, but Fira Medium is thicker

astral quiver
#

I have this project for 2 years+ I guess

#

But Kotlin scripting is really imature

#

two years ago

#

currently, still, but is better, with better IntelliJ support as well

jovial warren
#

Fira Code Medium > Jetbrains Mono
yes

ocean quartz
#

Yugi, don't think he ever finished it
Can't find on gh so idk what happened

astral quiver
#

Also supporting Compiler Plugins that currently I do not add to Bukkript because it breaks IntelliJ

old wyvern
#

ah

distant sun
astral quiver
ocean quartz
jovial warren
#

@prisma wave what would freeCompilerArgs = listOf() be in Groovy DSL?

#

is it just [] or what?

prisma wave
#

yeah

#

freeCompilerArgs = []

jovial warren
#

also can you push a devel branch or something to the main project so I have somewhere to PR that isn't master?

prisma wave
#

yea 1 sec

jovial warren
#

alright

#

and we can kinda just merge W.I.P shit in there and make a draft PR to merge in to master to track progress or something

prisma wave
#

done

jovial warren
#

cheers

#

now lemme submit my half-finished W.I.P PR to the devel branch

prisma wave
#

great

jovial warren
#

you can check it out if you want and request changes where you feel necessary (which I encourage you to do if you have time)

#

also you should create a milestone

dusky drum
jovial warren
#

over 500 servers?

#

nice

dusky drum
#

yep

jovial warren
#

what's the plugin called?

dusky drum
jovial warren
#

ah HolographicPlaceholders

dusky drum
#

yes indeed

#

i cant belive my plugin became so popular

jovial warren
#

7k downloads as well

dusky drum
#

all i wanted was baltop on holograms and i couldnt find any working plugin so i made a one

#

XD

#

and i was thinking of implementing animations that Niall has in his plugin but kinda need to wait for HD to add hex support

ocean quartz
#

Caused by: java.lang.NoClassDefFoundError: org/jetbrains/kotlin/psi/KtTreeVisitorVoid PepeHands

jovial warren
#

oof

astral quiver
#

oof

#

I need to do a better abstraction for my menu preview

#

because if you add a forloop, it will not get

ocean quartz
dusky drum
#

um whats this

ocean quartz
#

Kotlin inspection for IJ plugin

dusky drum
#

innnnteresting

ocean quartz
#

Since the base is working, time to make a gh repo yay

dusky drum
#

:3

#

i gotta update my dinamic and static line handler tommorow :3

#

and then add all the commands and there we go plugin ready for public muahaha

ocean quartz
#

I actually love IJ's PsiViewer, it literally gives you everything

astral quiver
#

Yesss

pastel imp
#

psiviewer?

ocean quartz
#

Allows you to view psi elements (basically the code you're typing)

ocean quartz
obtuse gale
#

It's unbound so I can't press enter to accept the completion or whatever it's called

ocean quartz
#

Pretty sure it's just Code completion

obtuse gale
ocean quartz
#

Was replying to this

Does anyone know what this auto complete thing is called in intellij?
Not how to fix it xD
Idk how to fix that tbh

obtuse gale
#

brUh

#

it was "Complete Current Statement" under Editor Actions if anyone has this issue

pastel imp
#

@ocean quartz soooo that means it's literally 20x easier to do the GUI viewer now

#

welp depends.. you need to images with different amounts of rows and edit the "chest" name out and now you can just check for the row number and just use the image you need

#

then draw the title in the correct position

#

and then.. you would kinda need to access a db with all the items xd

#

that's the mheee part

#

I don't see how you are actually gonna draw the items

regal gale
#

Finally.. it's been 2 weeks now that I will start to convert my AdvancedTP to kotlin for the sake of

prisma wave
regal gale
#

Well, ofc i might suck at kotlin in a direction

#

For example, no idea how to use object properly.

prisma wave
#

singletons

#

Objects are basically static, but everything is static

#

Internally they compile to singletons

old wyvern
#

I miss using enum singletons in Java 😂

regal gale
#

And no idea how to use ?: either ._.

old wyvern
#

Thats an elvis operator thie

#

If lhs is null, rhs becomes the result

#
val test: String? = null
println( test ?: "Welp" )

That would result in printing out Welp since test is null

prisma wave
#

Elara will support the Elvis operator

#

But as a function

old wyvern
#

Ayyyy

#

Elara ftw

prisma wave
#
extend Result<T> {
    let ?: = (T other) => {
       return if this is Some {
           this.value
       } else other
    }
}```
#

pretty sure this will work

old wyvern
#

Yup

#

Arrow

regal gale
#

Anyway, I just used a kotlin converter tool in IntelliJ, and it showed me the solution. Between

var sbTeam: ScoreboardTeam? = null
        private set```
and ```kotlin
private var sbTeam: ScoreboardTeam? = null```, which one's better?
old wyvern
#

You forgot the arrow

prisma wave
#

Whoops

old wyvern
#

There we go

prisma wave
#

@regal gale they're different things

#

The first is public with a private setter, the second is totally private

old wyvern
#

See this is why I said mixing properties with fields was a bad idea

#

😂

prisma wave
#

¯\_(ツ)_/¯

#

Elara would never

regal gale
#

So it's acting like only getter in the other class?

old wyvern
#

I srsly hope kotlin separates them at some point

prisma wave
#

yes

old wyvern
#

Thie its basically a property implementation from other languages

regal gale
#

Ok thanks

prisma wave
#

the first one has a public getter

#

The second does not

old wyvern
#

Oh nvm he was using fields in both wasnt he

prisma wave
#

Yea

#

Well properties

old wyvern
#

Yea thats really fucked up 😂

regal gale
#
            "accept" -> {
                if (tpr.state == TeleportState.NONE) break```
In this fragment of code, break is not allowed in a when statement. So what to use instead?
prisma wave
#

probably nothing since it's an expression so every branch has to return a value

old wyvern
#

You could return unit if using it as a statement i think

ocean quartz
#

I'm sad, IJ doesn't like JavaFx so I'll have to use Swing PepeHands

old wyvern
#

Rip

onyx loom
#

im with u matt

ocean quartz
#

Was so excited to use css and boom it didn't work

#

Now i need to have java in my project

onyx loom
#

😔

#

gonna try jfx one more time actually

#

last time it didnt work for me, hopefully my luck is better today

ocean quartz
#

If you're not doing intellij plugin use tornadofx

onyx loom
#

o

#

thank

#

i totally forgot this existed

onyx loom
#

just been trying to get it working with no success sadrain

#

bed time for me now so ill be back to pain tomorrow fingerguns

silk kite
#

Huh, weird Mutual Friend blob0w0 Small world, I guess

proud kiln
#

Hi Im using deluxe tags but I would like the format to be [rank] [tag] [name] but I cant seem to get tag in the middle as its always either [tag] [rank] [name] or [rank] [name] [tag] format

#

I'm using Luck Perms

#

what do I do?

obtuse gale
vast ore
#

Basically it's not java ( it's lua )

#
    script.Parent.BrickColor = BrickColor.new("Alder")
end)```
or
```script.Parent.ClickDetector.MouseClick:Connect(function(player)
    if player.Name == "MyUsernameHere" then
        script.Parent.BrickColor = BrickColor.new("Baby blue")
    end
end)```
If anyone know then pls help me
#

Somewhy it doesn't work

regal gale
#

What exactly are you trying to do

quiet depot
prisma wave
#

I saw that, seems pretty cool

quiet depot
#

yeah, was on the roadmap

#

although that's only a part of it

#

you should be able to generate indexes for any project

#

not sure if that's been implemented yet

#

but it'll help plebs like @hot hull

hot hull
#

@quiet depot Why you bully me

astral quiver
#

Kotlin Main Kts was only one problem, transtive dependencies

#

I need to go into the Maven ou Gradle from the project to get the dependencies

#

@ocean quartz if you want to use as well to retrieve all items renders

#

To your version of preview 😄

static zealot
#

yo I know EM told me how to use PDM a few days ago but I kinda left and forgot how to do it and can't find a message. I'm using kotlin and I get this error: https://paste.helpch.at/tidetetofa.cs and this is my onEnable(): https://paste.helpch.at/dasezudeho.cpp . I remember him saying something about the libraries not existing which is true becasue the folder did generate but the libraries are not inside. Btw this is my build.gradle: https://paste.helpch.at/ihigeyaboz.cs also I did not modify anything in settings.gradle and I compiled the jar using gradle build. Anyone can enlighten me? Ty 🙂

obtuse gale
#

I do it in one line but according to bm !! was also meant to fix it

#

I think the problem is that kotlin adds in a null check somewhere

static zealot
#

so just do this? PDMBuilder(this).build().loadAllDependencies() instead of the 2 lines ?

obtuse gale
#
        "Loading dependencies".print()
        PDMBuilder(this).build().loadAllDependencies().join()
        "Loaded all dependencies".print()```
#

Thats what I had

static zealot
#

ohh I forgot .join()

#

that's my bad

#

welp the libraries work now. time to see how much I messed up the code. I already have a 2 page error 😦

astral quiver
#

Remember to always use join

#

and and to the loadAllDependencies() be the first thing that your plugin does

ocean quartz
#

@astral quiver Oooh nice, thank you! ;p

onyx loom
#

finally got it working 🌝

heady birch
#

If only it was Swing 🙂

old wyvern
#

Did it work with gradle by any chance Kali?

#

tornado only seems to work with maven for me

ocean quartz
#

Yoo Kali, I just found something super cool for UI

onyx loom
#

hello

#

Did it work with gradle by any chance Kali?
@old wyvern yeah

#

i just installed the tornadofx IJ plugin for it to create a template for me, as i was stuck for like 4 hours trying to get it to work 🌝

ocean quartz
#

JCEF

onyx loom
#

using Swing.
🌝

heady birch
#

Swing works with anything

#

And you dont need to shade in anything, unlike javafx 🤢

ocean quartz
#

But swing is awful

heady birch
#

But swing is awful
Please indicate your statement was only to invoke humour

#

Swing + infonode + JIDE

onyx loom
#

looks cool tho matt

ocean quartz
#

No lol
Outdated technology, with way too many limitations

old wyvern
#

i just installed the tornadofx IJ plugin for it to create a template for me, as i was stuck for like 4 hours trying to get it to work 🌝
I have the plugin but it doesnt seem to work fine with gradle for me

#

🤷‍♂️

heady birch
#

Immature technology, with not enough restrictions

old wyvern
#

Every thing falls apart

onyx loom
#

are u using openjdk?

old wyvern
#

Nope

#

Oracle one

onyx loom
ocean quartz
#

Oh shit this is awesome

onyx loom
#

👀

ocean quartz
#

I wonder if i need to make a website for it to load or if i can create a local one and it'd load from file, but this is amazing already

#

Ooh you can read straight from a file pogoo

prisma wave
#

@quiet depot made a reply to your Issue

dusky drum
#

wtf is open class in kotlin? and like object (not class)?

prisma wave
#

open class is a class that can be extended

#

objects are singletons

dusky drum
#

oke

prisma wave
#

they are basically static, but everything is static

#

except not really

dusky drum
#

kinda interesting

#

1 more question so i have hologram should i make runnable for each line and run that task repeating?

prisma wave
#

probably not

#

1 per hologram is probably a better idea

dusky drum
#

okay since atm i have 1 for all the holos.

heady birch
#

Holographic extension rip off 😦

dusky drum
#

?

#

i mean i have leaderboards in my plugin not the animations @heady birch

#

im making packet based holograms plugin atm?

heady birch
#

Im only kidding

dusky drum
#

okay

#

XD

#

you should probably update to 1.16 🙂

heady birch
#

It works on 1.16

#

Fine

#

Absolutley Fine

dusky drum
#

update the info then :=?

ocean quartz
#

time to play around with ktor again blurryeyes

dusky drum
#

interesting

hot hull
#

Matt I got a quick question

#

I think you know what it is fingerguns

ocean quartz
#

alias?

hot hull
#

Yes

ocean quartz
#

Working on it, the rewrite's abstraction is almost done

hot hull
grand hedge
jovial warren
#

oh my god

#

of course it has to be a rick roll

#

just leave it there for kicks lol

frail glade
#

Okie. Deleted.

#

We already have a plugin that can do that.

hot hull
#

I got rick rolled

jovial warren
#

it's in request-free as well

#

so did I

hot hull
#

I even told the dude to use a valid budget smh

jovial warren
frail glade
jovial warren
#

the funny thing is, is that actually works lol

#

@ocean quartz how did you pull that off?

ocean quartz
#

Magic

jovial warren
#

nah man I wanna know lol

ocean quartz
hot hull
#

Lots of magic

jovial warren
#

oh wow you cheat

ocean quartz
#

I cheat?

jovial warren
#

actually that's your project nvm lol

ocean quartz
#

lol

dusky drum
#

oh and @heady birch im gonna make my packet based hologram plugin realy easy to move from HD api to mine so you'll easily make your HoloExtension compatible muahaha

heady birch
#

ok

jovial warren
#

now to find out how this thing works by digging through source code lol

old wyvern
#

Minecraft video calls?

#

Anyone?

hot hull
#

Nah, OnlyFans in MC fingerguns

dusky drum
#

wat=?

old wyvern
#

Discraft

jovial warren
#

lol

dusky drum
#

CraftCord

ocean quartz
dusky drum
#

howly

#

fuck

onyx loom
#

hand reveal 👀

old wyvern
#

Ok bois time to move to Discraft

heady birch
#

@dusky drum What you gonna name it?

dusky drum
#

no idea XD

heady birch
#

I might have to make my own 😼

dusky drum
#

but its gonna be open source so pepl can help with itž

#

.,.

old wyvern
#

Matt do it fr xD

#

Have it render the discordapp

heady birch
#

Lol. I'll probably contribute to yours at some point

old wyvern
#

ofc you cant read

#

but eh

#

discraft is love discraft is life

dusky drum
ocean quartz
#

Not that hard to do it, though the project is kinda paused i lost my way into it when people started contributing good changes xD

dusky drum
old wyvern
#

😂

jovial warren
#

142 ms

dusky drum
#

yes

jovial warren
#

what are you doing lol

heady birch
#

expand it

dusky drum
#

it only happens first time

heady birch
#

or go to hotspots and filter

dusky drum
#

thats akari

#

you cant expand this

#

i kinda think it constructs classes for first time.

#

i just do this

jovial warren
#

VisualVM

jovial warren
#

for loop

jovial warren
#

okay those for loops might be your issue

dusky drum
#

why=?

#

its 1 holo in for loop

hot hull
#

Not really tho, unless you're looping through thousands

jovial warren
#

^ true

dusky drum
#

list has 2 values.

#

atm

#

so i have no idea whats happening

jovial warren
#

what else are you doing?

dusky drum
#

it only happens for first player

hot hull
#

How are you storing them btw?

jovial warren
#

^

hot hull
#

A map or a list?

dusky drum
#

mutablelist

hot hull
#

Cause like, map go brrr fingerguns

jovial warren
#

have you tried using sequences?

dusky drum
#

whats sequence?

jovial warren
#

sequences are basically Kotlin's replacement for streams

dusky drum
#

how does it look?

jovial warren
#

they're supposed to be really fast but idk whether they make much difference

#

how does it look?
wdym?

dusky drum
#

how do i use it never used it.

jovial warren
#

asSequence to convert to a Sequence

dusky drum
#

so

#

basicly

jovial warren
#

then forEach to iterate?

dusky drum
#

holograms.asSequence().forEach

jovial warren
#

yeah sounds about right

jovial warren
#

yeah

dusky drum
#

oka gonna see

jovial warren
#

idk, might improve performance, not sure how much of a difference sequences make

ocean quartz
#

Do something like this

println(
    "Time - ${
        measureTimeMillis {
            // put your register method here
        }
    }ms"
)

To see how long it takes for your register to run

jovial warren
#

yeah that will work

dusky drum
#

you mean onEnable?

#

or

#

ah

#

nvm

#

im stpid

#

sec

jovial warren
#

when you run register lol

#

also, Logger > println

ocean quartz
#

It's literally just debugging no point in using logger

jovial warren
#

Bukkit has one built-in lol

#

might as well make use of it

dusky drum
ocean quartz
#

Why?
Logger - Plugin messages
Println - Debug
This way you can get rid of debugging pretty easy when it's ready

jovial warren
#

logger.debug > for debug stuff

dusky drum
#

true

jovial warren
#

if logger.debug even exists in Bukkit logging

ocean quartz
#

Literally just search in path for println and delete everything

#

No point in overcomplicating it

jovial warren
#

it exists in java.util.logging and SLF4J

dusky drum
#

error, info, warning

#

nvm

hot hull
#

bruh I just killed a big ass fly and it was everywhere

dusky drum
#

just warinig

#

info

hot hull
#

Like the fucker legit exploded

jovial warren
#

lol

#

I was just about to say take a picture but we don't have any NSFW channels

dusky drum
#

yeh apparently first time it does it, it uses friking 150ms
next time it uses 1ms

#

wtf

jovial warren
#

what just when it's calling register?

#

show me what register does

ocean quartz
#

That's kinda normal, first time it runs it caches stuff

jovial warren
#

^ and that

dusky drum
#

so i guess its just the cache stuff

#

i guess

jovial warren
#

wait so register calls register?

dusky drum
#

yes

#

holo has its own register

jovial warren
#

what does Hologram#register do?

#

or is that NMS

dusky drum
#

yes holo is still java

#

since for some reason i cant get it to work on kotlin

jovial warren
#

okay so it's putting in to a map, which has to be instantiated if it isn't, and then creates the hologram and puts that in to the map

dusky drum
#

no

#

hologram is already crated

#

i just add player to map

#

and send packets to him

jovial warren
#

yeah sorry I think that's what I was on about lol

dusky drum
#

ow ok

#

i kinda need to fix leave event XD

jovial warren
#

and this is why we don't use Java

dusky drum
#

no

#

thats in kotlin

#

wait

#

nvm

#

its cause i remove user from map that is constatly being run thru foreach

#

for loop i mean

jovial warren
#

I was gonna say

#

it's either in Java or you're doing some horky borkyness by trying to access something within an init block which is defined underneath the init block

#

(very specific ik)

dusky drum
#

so i kinda need to fix that dont i XD

jovial warren
#

yes

dusky drum
#

should i clone viewers on each loop?

heady birch
#

And anything static

obtuse gale
#

Iterators

heady birch
#

static {} blocks

obtuse gale
#

And signal queues or something

jovial warren
#

anything static can be put in your companion object

#

and if it's required to be static, use @JvmStatic

dusky drum
#

what do you mean with static niall?

#

viewers isnt static

heady birch
#

Yeah but Im saying when you first use that static it will be initialized. incase you have anything heavy happening in static blocks e.g

dusky drum
#

oh

jovial warren
#

you should rewrite your stuff in Kotlin Niall

dusky drum
#

so i should probably use iterator?

heady birch
#

No

jovial warren
#

or are you one of those nuts who thinks Java is better

heady birch
#

No

#

But things I've written in java work fine for now. But i have more java experience and it would take a great deal of time to upgrade years old code to kotlin

jovial warren
#

true

old wyvern
#

Also, Nothin wrong with Java 🤷‍♂️

jovial warren
#

I mean, it wouldn't take you as long as you think due to Ctrl+Alt+Shift+K

prisma wave
#

muh idioms

jovial warren
#

@old wyvern I didn't say anything's wrong with it lol

old wyvern
#

or are you one of those nuts who thinks Java is better
Sounded like it

#

Anyway

#

Ctrl+Alt+Shift+KIs not a great way to convert

jovial warren
#

yeah ik

prisma wave
#

i d i o m a t i c

jovial warren
#

but it kinda works

#

what's "i d i o m a t i c" @prisma wave ?

prisma wave
#

many java design patterns are not idiomatic to kotlin

old wyvern
#

^

prisma wave
#

ctrl alt shift k will not account for that

jovial warren
#

like getters and setters

old wyvern
#

And the shortcut litrally converts it

prisma wave
#

it can convert getters & setters

jovial warren
#

even ones that aren't fields like in interfaces?

prisma wave
#

but not things like the builder pattern, overloaded methods, etc

#

idk

old wyvern
#

There is no point to direct conversion of something to kotlin with that shortcut except it adds the 1.5ish MB to your Jar

prisma wave
#

btw converting to elara will actually reduce the jar size

old wyvern
#

^

jovial warren
#

will it?

prisma wave
#

yes

heady birch
#

Yeah cos there's no jar 🤦‍♂️

prisma wave
#

by an average of 3.4mb

jovial warren
#

also why is JDK included in Kotlin code?

prisma wave
#

?

jovial warren
#

(if you don't use Java thingys)

prisma wave
#

because you're targetting the jvm?

jovial warren
#

and also why is JDK not one of those things that's provided by runtime

prisma wave
#

it is

#

lol

jovial warren
#

then why do you shade it

prisma wave
#

you don't

frigid badge
#

you don’t??

#

you shade the stdlib

#

of kotlin

old wyvern
#

You shade the kotlin stdlib

prisma wave
#

^

frigid badge
#

not the jdk

jovial warren
#

yeah true

dusky drum
#

XD

prisma wave
#

the jdk is provided by the user's JRE

old wyvern
#

It has extensions for standard java stuff

jovial warren
#

why does Kotlin runtime not provide Kotlin stdlib then?

old wyvern
#

Because there is nothing or that sorts

prisma wave
#

because that would be annoying

frigid badge
#

because there’s no such thing as kotlin runtime

prisma wave
#

Kotlin runtime isn't a thing

jovial warren
#

yeah true

prisma wave
#

it's the java runtime

frigid badge
#

it’s the java runtime

old wyvern
#

Kotlin uses library of whatever it compiles to

prisma wave
#

and unless you want people to have to install something else

#

you can't have the stdlib provided at runtime

frigid badge
#

smh bm we talking the same stuff

prisma wave
#

¯_(ツ)_/¯

dusky drum
#

yay now i kinda broke stuff....

prisma wave
#

i won't let you steal my potential xp lmao

frigid badge
#

lmao

heady birch
#

Could just use Rust to be honest

#

🙂

old wyvern
#

or Elara reversed_fingerguns

frigid badge
#

says the guy who knows jackshit about it

prisma wave
#

i'll pass

#

rust is ugly

#

elara is elegant

#

or Go

heady birch
#

Excuse me

#

Finish your Draft PR @frigid badge

frigid badge
#

unless you’ve been learning a lot lately, you’re still figuring out what traits are

old wyvern
#

tbh Go's interface typing is kinda like our contract generics xD

frigid badge
#

or you finish the pr smh

heady birch
#

I have ironically paused the project I was working on but got round to using Mutexs and guards and lifetimes and stuff

#
impl Annoying for Lemmo
frigid badge
#

lmao

heady birch
#

Have any of you seen Primer CSS? Githubs css, It actually looks very nice

prisma wave
#

@old wyvern yeah they are lol

old wyvern
#

lol

prisma wave
#

why use rust when you could use insert language here

old wyvern
#

burn

heady birch
#

Have I just found the best thing ever

prisma wave
#

no

frigid badge
#

oh jeez

dusky drum
#

i kinda found a problem using iterators.

frigid badge
#

what is it

dusky drum
#

for some friking reason

#

its broken

jovial warren
#

"98.css" oh no

old wyvern
#

VB4

#

god

prisma wave
#

lol

dusky drum
jovial warren
#

you saw nothing

prisma wave
#

absolutely nothing

jovial warren
#

indeed

#

you didn't get a screenshot so prove it

dusky drum
#

hehe so am i doing it correctly?

heady birch
#

I havnt read it yet

dusky drum
#

oke

heady birch
#

But it looks like big lag

dusky drum
#

lag?

jovial warren
#

arrow code

dusky drum
#

?

astral quiver
#

About migrating Java code to Kotlin, this wrong

dusky drum
#

i did try to migrate it but it didnt work

astral quiver
#

One of the most importants features of Kotlin is Interopbillity

jovial warren
dusky drum
#

what thats how we do it

hot hull
#

ew

dusky drum
#

its easier to read.

astral quiver
#

You should not migrate your previvous code, you should create API for better usage in Kotlin

dusky drum
#

wtf?

#

its way better to read it that way

astral quiver
#

KotlinBukkitAPI is basically that, I do not create a new Bukkit in Kotlin

dusky drum
#

why da fuk wouldnt you use indents?

astral quiver
#

I just create a set of better APIs for Kotlin

jovial warren
#

you think arrow code is better than no arrow code? what?

dusky drum
#

yes

hot hull
#

?plsnoarrowcode

compact perchBOT
jovial warren
#

arrow code is an anti-pattern

dusky drum
#

no?

#

arrow code = better

jovial warren
#

oh my god

dusky drum
#

i wont fucking use
if ()
{

}

jovial warren
#

that's not what I'm suggesting

dusky drum
#

thats what page says

heady birch
#

No he means the amount of times you nest if's. Early returns e.g = better

dusky drum
#

eh

#

i just want it to work at first

#

i deal with optimizing at end

astral quiver
#

I do not like

if()
{

}
#

as well

#

is not the Kotlin or Java convention

#

C# and C++, yes, but not Java

jovial warren
#

arrow code refers to when your code looks like this: ```kotlin
if (a) {
if (b) {
if (c) {
if (d) {

        }
    }
}

}

astral quiver
#

Yes, Arrow code is bad

#

Is bad to read as well

dusky drum
#

i mean

jovial warren
#

yeah allman is the worst style ever created in the history of bad programming styles

#

okay maybe not that bad

#

but K&R better

dusky drum
#

i cant realy shorten my arrow

#

since i need to get exactly where it failed

jovial warren
#

allman is actually against Kotlin conventions

dusky drum
#

i cant make 1 big if statement

astral quiver
#

Take that back!

dusky drum
#

no

jovial warren
#

not what I'm suggesting

astral quiver
#

Kotlin conventions is ❤️

dusky drum
#

i friking broke my plugin somehow

jovial warren
#

there is always, and that's so important let me say it again: ALWAYS a way to fix arrow code

astral quiver
#

Extracting code to a function for example

#

is a good way to prevent arrow code

#

I should be done

jovial warren
#

iterators can also fix arrow code issues in some cases

astral quiver
#

Uncle Bobs says that A function should have 3 lines

dusky drum
#

i have no idea how i broke my code.

astral quiver
#

(I don't agree, but, he was a point)

jovial warren
#

Uncle Bobs says that A function should have 3 lines
the three other functions it calls?

astral quiver
#

Exactly

#

3 lines of 3 calls

#

something in this way

jovial warren
#

I'd just abuse the fact that Kotlin allows you to use ; to separate statements on the same line and just write a shit ton of code on 1 line

#

because I big brain

astral quiver
#

lol

jovial warren
#

but I'm used to writing things on a single line anyway

#

I'm one of those who completely abuses expression functions to stop me having to specify the type explicitly

astral quiver
#

So folks, I need to work, sad, but I need :c

jovial warren
#

want an example of "it looks shit, but hey, it works"?

astral quiver
#

I really don't have any example in mind

jovial warren
#
    /**
     * Converts an enum value name to it's common name
     *
     * e.g. "AREA_EFFECT_CLOUD" becomes "Area Effect Cloud"
     */
    override fun toString() = name.replace("_", " ")
        .split(" ")
        .joinToString(" ") { string ->
            var foundFirst = false
            string.map {
                if (it == string.first() && !foundFirst) {
                    foundFirst = true
                    it
                } else it.toLowerCase()
            }.joinToString("")
        }
#

I wrote that yesterday

#

does exactly what it says in the title lol

#

it mixes imperative and declarative programming, completely abuses expression functions, takes a few minutes to understand what it does, overall I give it about a 3/10 readability

#

and it's performance probably isn't great either, but as I said, it works lol

prisma wave
#

allman is actually against Kotlin conventions
@jovial warren it is in Java too... Doesn't make it bad

jovial warren
#

it's bad enough to be against convention

prisma wave
#

Bruh that entire function probably breaks at least 10 conventions

ocean quartz
#

Convention isn't always great, following conventions blindly is even worse imo

jovial warren
#

not saying I follow convention either

prisma wave
#

You can't complain about a brace style when you're writing stuff like that

jovial warren
#

I spend time making my code contain the least amount of content possible

astral quiver
#

convention is great, be cause make all codes the same, helping new developers to join any company without need to learn a new convenction

jovial warren
#

basically I spend time making my code unreadable

astral quiver
#

Like, using k for constants and m for member properties

#

I do not like that, but this was when I do not have IDEs like IntelliJ

#

With time, your brain do not read the k or m, just know that this property is a constant or member of the class

#

this is why conventions exists in my opnion

#

is much easier to learn how to read the code when you continue to read the same code format

jovial warren
#

wdym k and m?

prisma wave
#

Single character variable names

#

Bad

astral quiver
#

kFactor = 50 = "konstant"

jovial warren
#

ah okay

#

that should actually be FACTOR imo

astral quiver
#

I agreed with you,

jovial warren
#

I believe that's probably one of the main conventions I follow: naming

astral quiver
#

Today, your brain learn about the colors

#

of the code

jovial warren
#

though doesn't the standard entail that I is supposed to prefix interfaces and Abstract supposed to prefix abstract classes?

astral quiver
#

You can now if is a member or not by the color that the IDE shows

prisma wave
#

@jovial warren there's no convention for that

jovial warren
#

ah it's just something that people do

astral quiver
#

Yes

jovial warren
#

I really don't know whether that's a good idea or not

astral quiver
#

Yes, is a BAD PRACTICE that people do

prisma wave
#

dumb

astral quiver
#

why? don't know

prisma wave
#

adding I conveys nothing

jovial warren
#

is it bad practice to prefix interfaces with I and abstract classes with Abstract and so on?

old wyvern
#

The proper way to name interfaces would be something like <Something>able ...ect...

prisma wave
#

Abstract does to a degree

#

But I doesn't

old wyvern
#

Not sure what you call it in english grammer

jovial warren
#

The proper way to name interfaces would be something like <Something>able ...ect...
not exactly, interfaces aren't always there just to represent capabilities

astral quiver
#

It is, you should have something like Name = NameImpl

jovial warren
#

yeah

old wyvern
#

I thought you were talking about the convention

jovial warren
#

yeah I am

#

but that isn't the convention afaik

old wyvern
#

The "convention" is to use interfaces for that exact purpose

#

The issue is all use cases wont obviously fall under that

jovial warren
#

I'm curious about that, time to bring up the official Kotlin conventions lol

obtuse gale
#

Is there a hover over Create class for this.

astral quiver
#

I guess we are talking about code conventions

obtuse gale
#

Wait no images

#

Darnet

jovial warren
#

okay apparently you should not use Util in class names, even though literally everyone does for their utility classes lol

prisma wave
#

Speak for yourself

#

Not in kotlin

ocean quartz
dusky drum
#

howly animated?

astral quiver
#

👀

obtuse gale
#

for getCommand("test").setExecutor(new testCommand()); In Intellij. Is there a way to hover over and press Create class (name) Just like in Eclipse

old wyvern
#

okay apparently you should not use Util in class names, even though literally everyone does for their utility classes lol
Util makes no sense in Kotlin

jovial warren
#

Not in kotlin
true, but say for example you were for whatever reason using a util class in Kotlin, you'd be left to that

astral quiver
#

I'm not liking this!!!!

prisma wave
#

You should never do that

#

@obtuse gale alt Enter

astral quiver
#

😭

dusky drum
#

@ocean quartz have you like seen trMenu?

old wyvern
#

Util pattern exists in Java because all functions must be in a class in Java

#

That is not the case in kotlin

obtuse gale
#

Thanks

ocean quartz
#

@dusky drum What is that?

astral quiver
#

I'm sad

jovial warren
ocean quartz
#

Don't be sad!

old wyvern
#

Yes

astral quiver
#

I will not be the only IntelliJ plugin

#

:c

dusky drum
#

its kinda animated Matt :3

old wyvern
#

Im pretty sure I told you that when you were working on Punishments last time

jovial warren
#

literally nobody follows that convention then

prisma wave
#

Speak for yourself again

old wyvern
#

The extensions should be in the Client file

jovial warren
#

or maybe it's just me who doesn't lol

prisma wave
#

Also I think that's for classes that you've made

ocean quartz
#

@dusky drum Oh, this is different though

old wyvern
#

You just ignored what I told you and said you wanted it that way

#

lmao

jovial warren
#

the extensions should be in the file where they're used or what?

prisma wave
#

For external classes it's obviously gonna be different

#

Yes

old wyvern
#

the extensions should be in the file where they're used or what?
@jovial warren
Yes

ocean quartz
#

@astral quiver Mine is only gonna be for my lib so dw, yours is still better ;p

jovial warren
#

what about if you use them in say 10 different places?

prisma wave
#

It makes no difference?

dusky drum
#

Oh, this is different though
i can see that you actually change like size of inv thats kinda noice :3

old wyvern
#

mhm

ocean quartz
#

Though this is a website not in game

astral quiver
#

🤔

#

This is not a IntelliJ plugin?

#

With swing stuff to preview?

ocean quartz
#

It is, but.. also website blurryeyes

jovial warren
#

what's the convention for the factory pattern?

ocean quartz
astral quiver
#

oh now

jovial warren
#

a function with the same name as the class seems to come up a lot

astral quiver
#

JCEF

#

I could use JCEF

#

😮

ocean quartz
#

It's great!

astral quiver
#

I'm really sad right now

ocean quartz
#

I'll have the backend in ktor and the plugin to read from it

astral quiver
#

I could use React or something :c

prisma wave
#

what's the convention for the factory pattern?
@jovial warren in regards to what?

jovial warren
#

"Chromium Embedded Framework framework" lol

#

@prisma wave in general

obtuse gale
#

Is there a Build Artifacts shortcut

astral quiver
#

So, this is not being render locally ? @ocean quartz

#

you are sending to a backend ?

jovial warren
#

@obtuse gale I believe you can make one

ocean quartz
#

@astral quiver I could make it render locally, but thought it be easier to be done with a backend

jovial warren
#

or there might actually already be one idk

astral quiver
#

Yes :S

obtuse gale
#

uhhh

ocean quartz
#

Using ktor to make that i legit only needed this

<div class="inventory">
    <#list 0..rows as i>
        <#if i == 0>
            <div class="top inventory-part">Test</div>
        <#elseif i == rows>
            <div class="bottom inventory-part"></div>
        <#else>
            <div class="row inventory-part"></div>
        </#if>
    </#list>
</div>
obtuse gale
#

how

heady birch
#

What template engine is that?

obtuse gale
#

How do you make a shortcut @jovial warren

astral quiver
#

What template is it?

jovial warren
#

go to keymap in settings

astral quiver
#

html template, I mean

heady birch
#

Not exactly thymeleaf

jovial warren
#

thymeleaf?

ocean quartz
#

@astral quiver Freemarker

obtuse gale
#

ok

#

Im in keymap

ocean quartz
#

Why such a hater Niall xD

jovial warren
#

I was just about to say "since when did thymeleaf generate templates" before I googled thymeleaf and it said:

dusky drum
#

hm

#

wait i made like app for developer but i think i've never got anwser XD

jovial warren
#

wat

dusky drum
#

i don't remember getting any anwser (i applied for developer role #role-request )

jovial warren
#

oof

#

that's Pig's job

#

he's the one who reads them afaik

dusky drum
#

aha

heady birch
#

How is the IChatBaseComponent serializing? That was a big hotspot for me (Only due to using it excessively)

dusky drum
#

but gotta drop that to 0.01

#

ichatbase?

#

like you told me i think

jovial warren
#

how do you serialize IChatBaseComponent often enough to worry about performance lol

heady birch
#

kiteboard animations

jovial warren
#

ah okay

heady birch
#

probably makes hundreds of them a second

jovial warren
#

is that done in adapters?

dusky drum
#

?

heady birch
#

yeah

jovial warren
#

which method?

#

sendTeamUpdate or something?

heady birch
#

its in the KiteChatComponent classes

#

the ones you said about arrow code

jovial warren
#

ah the one that handles hex stuff yeah

#

the one that you said is "pretty unique to KiteBoard" xD

heady birch
#

Yeah

jovial warren
#

is it really all that unique though?

#

it just processes &#FF0000 in to an NMS hex colour

ocean quartz
#

It's not that simple

jovial warren
#

I mean I'm not complaining I'm just curious

#

actually, the way Niall does it, is pretty simple tbh

#

well, the way Niall processes it

ocean quartz
#

Title is too dark though

astral quiver
#

I could not put color in mine yet

#

You are thing in add hover as well?

#

#DoNotKillMyProject :c

#

Item Hover

ocean quartz
#

Sounds complicated, but maybe xD

astral quiver
#

Yes, I do not do that because the user can put alot of different stuffs in the Item

#

with differents APIs

#

and for support it with PSI is really hard

#

maybe impossible

ocean quartz
hot hull
#

That main class name tho, sheesh

static zealot
#

wait is that a photo or is that a live preview?

ocean quartz
#

I mean, it's an application, ofc it'll be called Main

astral quiver
#

Live preview

ocean quartz
#

^

static zealot
#

oh that's cool

jovial warren
#

also, that package

#

teste

hot hull
#

Yea IK, but still, it hurts

jovial warren
#

unless that's a different language lol

astral quiver
jovial warren
#

actually yes it's portugese

ocean quartz
#

@astral quiver Oooh you'll have pagination working?

#

And yeah that's portuguese

astral quiver
#

I let my portuguese there? offuck