#dev-general

1 messages ยท Page 179 of 1

empty flint
#

or maybe I'm flattening the wrong thing

#

So I have [[[a]], [[b],[c]], [[d],[e]]]

#

and I need [[a],[b],[c],[d],[e]]

prisma wave
#

List.flatten?

ocean quartz
#

@prisma wave If i wanted to multiline a function chain how would it work?

some-list 
  map add-1 
  filter is-even 
  forEach (it) => { 
    print it 
  }
```?
prisma wave
#

I think so

#

Afaik the parser won't care about whitespace

#

Well it shouldn't

empty flint
#

List.flatten?
@prisma wave yeah but it gives me [[a]], [[b],[c]], [[d],[e]]

prisma wave
#

It barely works right now lol

ocean quartz
#

Multiline looks a bit odd without parenthesis and dots
Pretty cool though

prisma wave
#

@empty flint so map that with flatten again

#

Yeah I like it

#

And you could always use the parentheses and dots

#

They're just optional

old wyvern
#

yea currently the infix chains are single lined

prisma wave
#

Ah ok

ocean quartz
#

Also why did you guys choose to go with let for variables?

prisma wave
#

reads more naturally imo

old wyvern
#

Also reads better than val and var which was the other choice

errant geyser
#

It looks cool, and its more englishy than other options

ocean quartz
#

As a non native English speaker it confuses me a bit more

prisma wave
#

Piggy was asking that too a while ago

#

Hm

#

Well Rust and JS use let too

old wyvern
#

Its also the "syntax" you would generally use in maths to assume variables

prisma wave
#

^

#

I think in general (maybe not in your case) it is easier to understand than val/var

distant sun
#

What do you guys use to find the cause of lag from a server, other than timings?
For some reason the server of my client die randomly.

onyx loom
#

shouldve used final String string = "string"

prisma wave
#

๐Ÿ˜ณ

#

@distant sun profiler

ocean quartz
#

I guess for me is that var could be easily translated to my language while let would.. definitely be interesting xD
Pretty cool anyways, good job on it ;p

prisma wave
#

Ty :)

onyx loom
#

yes gj

prisma wave
#

That makes sense

onyx loom
#

im proud of u

distant sun
#

Can you do that on a server?

prisma wave
#

Yes

distant sun
#

How

prisma wave
#

Although I will mention it doesn't actually work

#

Run the server though intellij @distant sun

distant sun
#

-.-

empty flint
#

@empty flint so map that with flatten again
@prisma wave Oh sorry I was wrong, so I actually get [[a],[bc],[de]]

distant sun
#

I cant lol

onyx loom
#

so when we gonna start circlejerking elara

ocean quartz
#

Use JProfiller

prisma wave
#

Like the parser and lexer works, you can make variables but nothing else

#

@onyx loom now

errant geyser
#

Yugi defo didnt carry the team for the parser Thank

#

Kali it already began

onyx loom
#

elara good kotlin bad ๐Ÿ˜ณ

ocean quartz
#

Yugi is a bless

prisma wave
errant geyser
#

^

empty flint
#

So flatten() is working from the inside-out and not from the outside in

distant sun
#

Use JProfiller
@ocean quartz still, doesnt the server have to run on my pc?

ocean quartz
#

You can run jprofiller in the server

#

i think

empty flint
#

How do I use the spread operator without passing it as varargs?

prisma wave
#

What

distant sun
#

Isnt jprofiller paid?

empty flint
#

Because I have [[a, b, c],[d, e, f]] and I need [a, b, c],[d, e, f] but flatten() gives me [a, b, c, d, e, f]

ocean quartz
#

I think there is a free version or trial not sure

empty flint
#

so if I could spread [[a, b, c],[d, e, f]] as if it was for a varargs value I'd get [a, b, c],[d, e, f]

onyx loom
#
repl.it

SIMP Intro Simp is a simple language. It is easy to understand and write: its small keywords and easy to access characters were written with the keyboard in mind. It is interpreted and as of right now quite complete. Features Input/Output Numerous data types: Strings Numbers -...

#

nice

prisma wave
#

@empty flint isn't [a, b, c],[d, e, f] impossible to express in a single value?

#

that would be a tuple / Pair

empty flint
#

well it's actually an n-tuple

#

but it's all encapsulated by a list

#

it's complicated ^^

#

Basically I need to generate a list of lists, right

errant geyser
#

You want to unwrap a 2d array then?

empty flint
#

and the elements of list A (the lists) are generated by some objects I have in another list

#

so I have my List<Foo>

#

that has to map to List<List<String>>

#

and each Foo can generate an unknown number of List<String>s

#

So I thought I could encapsulate all the generated lists inside one list and get a List<List<List<String>>> and then just flatten it, but it flattens the inside list, not hte outside one

#

and I actually need to spread it

#

not flatten it

#

xD

prisma wave
#

uh

#

xy problem?

empty flint
#

Lemme get some pseudocode going so you understand better

ocean quartz
#

Sounds to me like you're overcomplicating what you want with all the nesting lists

empty flint
#

yes

prisma wave
#

^ seems like it

empty flint
#

help

prisma wave
#

that's also a lot of O(n) operations

#

bad

onyx loom
#

@prisma wave should u not include the elara github on the repl.it page?

prisma wave
#

could do

onyx loom
#

idk if its needed, but would be nice id say

prisma wave
#

just cba

#

it's currently in sync with the github

#

so it would have to reference itself i guess

#

idk

empty flint
#
Foos.map { foo ->
  ArrayList<List<String>>().apply {
    add(foo.primaryList)
    if(foo.hasMoreLists) {
      foo.moreLists.forEach { moreList -> 
        add(moreList)
      }
    }
  }
}
prisma wave
#

@onyx loom updated it

onyx loom
#

๐Ÿ‘

turbid ocean
#

have guild plugin supported 1.16.2?

prisma wave
#

#guilds

#

๐Ÿ˜ฆ

distant sun
#

Welp, time to learn how to read a profiller smh

prisma wave
#

they're pretty simple

#

most of the time

distant sun
#

Idk

#

Hopefully spark will help us

#

I dont mind learning more stuff about performances

empty flint
#

Ayyy I did it. I'm an idiot.

#

Can't map a list directly to something else. It maps all the elements

#

Foos.let {...} did the trick

#

ty for your attention

prisma wave
#

i am pretty sure there's a better way to do that

#

with fold or something

jovial warren
#

hey @heady birch how tf did you get this plugin to work when it creates loads of new instances of objects in the constructor that take the not yet initialised plugin as a parameter

prisma wave
#

it doesn't have to be initialized

#

it just could cause problems if it isn't

jovial warren
#

it does

#

basically, it initialises the storage manager, which initialises the YAML storage provider, which attempts to load a file in it's initialisation that requires plugin not to be null as it calls plugin.getDataFolder()

#

okay he doesn't actually

#

again just luyten being trash

pastel imp
#

yo matt

distant sun
#

yoyo

ocean quartz
#

I need someone's opinion thonking
So I'll have a permission annotation and a requirement one (in a way it seems redundant)
The requirement will be global, and permission only on certain platforms
To abstract it well, i was thinking about treating a permission as a requirement, meaning when a command registers it will register a personal requirement for permission
Sounds like a good design or hacky?

#

And yo

pastel imp
#

hows the Intellij GUI viewer plugin going? (if you are doing it)

ocean quartz
#

Not working on it yet

pastel imp
#

YET

#

oof me be big hyped for it

#

lol

#

me gud gramar

ocean quartz
#

Cuz IntelliJ is funky with Javafx and swing sucks

pastel imp
#

that's facts

errant geyser
#

I also require the MF rewrite dad kthxbye

versed ridge
#

What's that?

#

IntelliJ GUI viewer

pastel imp
#

it's like a plugin

ocean quartz
#

His suggestion to make a plugin to view the GUI you're making in real time on a tab on IJ

pastel imp
#

^^

jovial warren
#

that could be useful

pastel imp
#

so you don't need to open minecraft

#

etc

#

ye very useful

#

my friend's bukkitkotlinapi has it

jovial warren
#

Bukkit Kotlin API?

pastel imp
#

unfortunatly only works for who's using the api

#

ye

#

or BUKKRIPT

#

as he also calls it

jovial warren
ocean quartz
#

Yeah

jovial warren
#

wow that actually looks pretty good

pastel imp
#

yes that

#

ye he's a good dev

jovial warren
#

and it uses kotlinx.serialization and coroutines

pastel imp
#

he's big dev

prisma wave
#

he also uses pdm :)

pastel imp
#

that's his hobby actually

#

he's a dev at a company

jovial warren
#

developing's my hobby too xD

pastel imp
#

not sure which

ocean quartz
#

Actually imma ping him something

pastel imp
#

what exactly lol?

#

I have direct contact with him so

ocean quartz
#

@astral quiver No plugin que voce fez para IJ, voce usou TornadoFx?
Eu tentei e falhei por completo xD

pastel imp
#

oh ye he's here

#

didn't even saw it

#

lol

jovial warren
#

I think it's google translate time lol (for me)

pastel imp
#

nha

#

Matt is portuguese too

#

xd

#

(actual fact almost no one knows)

#

ok now it makes sense

jovial warren
#

yeah I think I knew that

ocean quartz
#

I am a mix match of a mess

pastel imp
#

I only found out some weeks ago

#

xd

jovial warren
#

if it's on his GitHub page (which I just found it is) then yeah I knew it lol

pastel imp
#

I am a mix match of a mess
@ocean quartz same

jovial warren
#

I didn't remember it but I know it

pastel imp
#

I am half luxembourgish half portuguese

#

oof

#

and I speak 7 languages?!

ocean quartz
#

Half Brazilian, half Portuguese, engaged to an American

pastel imp
#

oof

jovial warren
#

I'm just English lol

pastel imp
#

welp that's actually cool

#

english?

#

british or american?

jovial warren
#

English, meaning the country within the United Kingdom, England

pastel imp
#

welp both are english

#

oof

jovial warren
#

nope

pastel imp
#

I did not know that fact

jovial warren
#

the US speaks English, but is not English

#

"English" means both the language and the place of origin

#

and in this context, I mean the place of origin

pastel imp
#

oof thx for the info

astral quiver
#

Oh

#

Hi

pastel imp
#

@ocean quartz ^^

astral quiver
#

Yes I did a IntelliJ plugin

jovial warren
#

not what he asked

#

he asked if you used TornadoFX

astral quiver
#

I do not actually, I really like it, but I do not use it

pastel imp
astral quiver
#

I was hopping to Jetpack Compose join the JVM

ocean quartz
#

Oh okay, i tried using it but IJ didn't like it too much xD

jovial warren
#

TornadoFX is Kotlinified JavaFX isn't it

astral quiver
#

Actually, the Jetbrains is working on bring Jetpack Compose to Desktop

#

Yes, is a DSL for JavaFx

#

Is pretty cool

jovial warren
#

yeah I've seen it

#

and used it somewhat

astral quiver
#

but, Jetpack Compose is comming to Desktop already

#

and will be nice to use

jovial warren
#

what kinda Desktop?

astral quiver
#

JVM currently

#

but I guess Kotlin Native too

jovial warren
#

so it's cross-platform then

astral quiver
#

With the anoucement of Kotlin Multiplatform Mobile today

jovial warren
#

meaning I can use it on my Arch Linux system is what I'm getting at

astral quiver
#

maybe in the near future, Jetpack Compose works on iOS

pastel imp
#

souza LIVEEEEEE estou em depre

astral quiver
pastel imp
#

wait jetpack works on IOS?

#

lol

astral quiver
#

Not yet

pastel imp
#

oh so they announced it will

jovial warren
#

what even is JetPack? lol

astral quiver
#

and I don't know if their is a port being build somewhere

pastel imp
#

any predictions ?

jovial warren
#

sorry, I don't do Android development

astral quiver
#

Jetpack Compose is the New UI framework for Android

#

Is like React, Flutter

jovial warren
#

ah okay

astral quiver
#

BUTTT, the part that is really nice too is that it is focus on Kotlin Multiplatform, not be supporting ALL PLATFORMS but, by working with the Multiplatform COMMON CODE

pastel imp
#

but wait so you use jetpack for the IJ plugin?

#

I am kinda confused rn

astral quiver
#

iOS is not implemented, but this does not mean that anyone could implement, because, the code is already their

#

Jetpack Compose, when is got better for Desktop we will be able to create IJ plugins with it as well

pastel imp
#

ye but which one are you currently using though?

astral quiver
#

About KotlinBukkitAPI and Bukkript, I'm working on it alot

#

I'm writing PDM PR to support more cases

prisma wave
#

Did someone say PDM

#

:)

ocean quartz
#

Oh no you summoned him

pastel imp
#

lol

#

everyone runs

astral quiver
#

PDM is really really really noice

pastel imp
#

So let me correct myself..

ocean quartz
#

It is known that he lurks in the dark until PDM, Elara, Clojure, or "Java bad" is mentioned

pastel imp
#

KBA is an api for kotlin

astral quiver
#

I'm working now on supporting submodules PDM

pastel imp
#

and Bukkript is an actual plugin like (the s word) but much much better using kotlin as language

#

correct?

distant sun
#

Elara bad

prisma wave
#

wow

#

Rude

astral quiver
#

Bukkript brings the Kotlin Scripting to Bukkit

#

Is a plugin that reads the scripts from a folder, compiles it and loads it

#

With it, their is IntelliJ support as well for the scripts

#

So you have the nice power of the IntelliJ when writing Kotlin

pastel imp
#

GUI viewer plugin

astral quiver
#

Yes, their is a GUI Viewer as well

pastel imp
#

the one thing I hate you for not doing it for java

errant geyser
#

Gaby

pastel imp
#

that's like the 1% I hate you

errant geyser
#

You have sinned

pastel imp
#

the other 99% is just love

astral quiver
#

Java bad

#

๐Ÿ‘€

errant geyser
#

He is a wise one

pastel imp
#

gets attacked by 31239 Java devs in here

prisma wave
#

yeah they just don't have the right to an opinion

errant geyser
#

Lmao

pastel imp
#

F

errant geyser
#

I actually audibly snorted at that one

old wyvern
#
Java bad

๐Ÿ™ƒ

#

Elara good

pastel imp
#

lol what?

astral quiver
#

This is what @pastel imp is talking about

errant geyser
#

Elara > everything

astral quiver
#

I guess I already share with you folks

prisma wave
#

Elara scripting API?!?1?1??!!

pastel imp
#

I am sharing everything in here burv xd

errant geyser
#

So many plans

old wyvern
#

Yess

#

Elara spigot hook time

prisma wave
#

Ez

pastel imp
#

btw @astral quiver if you want you can "advertise" the project in #showcase if ya want to get people's attention

#

xd

errant geyser
#

Are we having java interop?

pastel imp
#

wth is elara?

old wyvern
prisma wave
#

Good language

astral quiver
#

Not yet

errant geyser
#

You have SINNED sir

#

Check showcase

astral quiver
#

I'm working on a big shift for the project

prisma wave
#

Depends if we're compiling to Java bytecode or something else

#

Interop from native would probably be difficult

errant geyser
#

I think we'd better compile to java bytecode

pastel imp
#

I'm working on a big shift for the project
@astral quiver am I NOT informed?

prisma wave
#

Probably a better idea

old wyvern
#

We could without compiling to bytecode ๐Ÿ˜‚

astral quiver
#

I'm relocating all its APIs because that could have conflict with another Spigot plugin that uses Kotlin

old wyvern
#

I mean on jvm

#

Reflection

prisma wave
#

We'd also needs VM if we compiled to native

old wyvern
#

Odin style

prisma wave
#

Yeah but reflection bad

astral quiver
#

And I'm using PDM

#

so the JAR FILE will be small

pastel imp
#

I do not know wth pdm is but seems gud

errant geyser
#

PDM, the official MLM scheme of Help Chat

prisma wave
#

:)

errant geyser
#

โ„ข๏ธ

old wyvern
#

We can hopefully rig a good enough vm together

pastel imp
#

lol

prisma wave
#

VMs are effort though

#

wow

pastel imp
#

fail

prisma wave
#

Barry

astral quiver
#

PDM is the best gradle plugin ever

prisma wave
#

Free my man

astral quiver
#

!!!

prisma wave
#

Literal injustice

errant geyser
#

Rude Barry

old wyvern
#

I mean we have all the time in the world technically

prisma wave
#

True

errant geyser
#

True

#

Technically we have 3x that

pastel imp
#

what does pdm do exactly?

#

in which cases is it used?

errant geyser
#

With 3 people

prisma wave
#

Magic

astral quiver
#

Exacly

#

Magic

errant geyser
#

Big brain stuff

prisma wave
#

Runtime dependency downloading

old wyvern
#

Runtime depedency downloading

astral quiver
#

With MAGIC

prisma wave
quiet depot
#

the heck is an mlm scheme

astral quiver
#

You just put the dependency and its downloads

old wyvern
#

Multi level marketing

prisma wave
#

Pyramid scheme

errant geyser
#

Multi level marketing, pyramid scheme

quiet depot
#

o

pastel imp
#

so as you said.. makes the jar file "smaller"?

prisma wave
#

yes

#

With magic

pastel imp
#

but magic needs fuel?!

astral quiver
#

PDM next level -> change the JavaPlugin to insert the loader ๐Ÿ‘€

old wyvern
#

Shrink ray

errant geyser
#

U got relocation done yet BM

prisma wave
#

It also features NO relocation and compliance with spigot resource guidelines

astral quiver
#

when you put ASM at the project, we can do that

prisma wave
#

๐Ÿ˜ฌ

old wyvern
#

๐Ÿ˜‚

astral quiver
#

Just for checking in

prisma wave
#

I'm scared of relocation

errant geyser
#

F

prisma wave
#

Just kinda ignoring it for now

astral quiver
#

I can publish plugins with PDM, right?

quiet depot
#

fr just use luckoโ€™s lib bm

astral quiver
#

If not, I will have a fucking talk with MD5

quiet depot
#

he literally has a lib just for relocating jars at runtime

prisma wave
#

Probably will

errant geyser
#

LP is a complicated boi

astral quiver
#

Maybe is not the best choose

prisma wave
#

Would be nice to have everything in-house tho

astral quiver
#

and ASM is so hard

#

to relocate, no

errant geyser
#

Convert his code to kotlin and clean it up

#

Ez

astral quiver
#

To do magic stuffs......

prisma wave
#

@astral quiver there's a bit of ambiguity. I think you should be able to publish them but ashu's got rejected so...

#

Pretty sure it fits within the rules just fine

astral quiver
#

Okay, tkx

#

I will publish KotlinBukkitAPI

#

I will also write a post about it

old wyvern
#

Issue is only woth premium plugins

astral quiver
#

I a big library, I have so many things to say about it

old wyvern
#

They state rhat the plugins should work staright off without internet connection

astral quiver
#

But I will focus in the IntelliJ plugin

prisma wave
#

Hmm

astral quiver
#

because it is the only one that haves ๐Ÿ‘€

old wyvern
#

God I cant type agaon

prisma wave
#

Don't some premium plugins do dependency downloading though?

pastel imp
#

which should work with default GUI making

old wyvern
#

Dont think so km

pastel imp
#

this thing is just

#

GUD

#

I WANT IT

astral quiver
#

How you can send images here

#

and I don't?

#

:c

pastel imp
#

me big boi

astral quiver
#

really sad

pastel imp
#

me big tier 2

prisma wave
#

?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.

astral quiver
#

oh

#

nice

pastel imp
#

I just know that...

#

I want it

#

lol

#

no

#

just the link

#

lol

#

ye

#

welp

#

let me help you

astral quiver
#

tkx

pastel imp
#

you gotta be active to get tier 2 boi

#

xd

prisma wave
#

How is a Bukkript script different to a normal kotlin script?

astral quiver
#

The Hotreload stuff makes me pretty satisfying

#

From main.kts ?

#

Is build with the Kotlin Scripting API

#

focus on Bukkit

#

Bukkit Imports, plugins that you have on your folder is put in the Classpath and you can use it

prisma wave
#

Ah I see

quiet depot
#

voteparty does dependency downloading

#

but it gets a free pass

pastel imp
#

(SORRY for the s word ๐Ÿ˜ญ )

quiet depot
#

cuz the functionality of the plugin already depends on internet access

astral quiver
#

Also, you can use NMS in it as well

#

The project find your SERVER JAR in your server as well

pastel imp
#

THAT I didn't knew

astral quiver
#

And all of it works in the IntelliJ

prisma wave
#

@quiet depot weird, since Ashu's is the same but got rejected

#

Is that an arrangement with spigot staff?

quiet depot
#

no but

astral quiver
#

Currently I'm working on a Project Wizard for KotlinBukkitAPI

quiet depot
#

gian might have accepted it for us

#

i canโ€™t remember if he was still staff then

astral quiver
#

and have a better icons for the Bukkript script in the IntelliJ

#

Let me get some screenshots

pastel imp
#

wdym

#

Kotlin logo inside a bucket is already a gud icon

astral quiver
#

Not that

pastel imp
#

you mean the script icon?

astral quiver
#

No

#

I sec

pastel imp
#

oks

#

I am almost tier 3 hehe

astral quiver
#

Hope one day, KotlinBukkitAPI helps developers in a way that PDM does

static zealot
#

yo so with PDM instead of implementation I use pdm ?

astral quiver
#

Yes

pastel imp
#

that's not confusing at all

wheat plume
#

why using skripts

#

when you can learn java

astral quiver
#

why using skripts

wheat plume
#

and maybe get a job in future :>

astral quiver
#

when you can use Bukkript?

wheat plume
#

heard that first time

astral quiver
#

Hope you heard that more times

wheat plume
#

at least it is in kotlin

ocean quartz
astral quiver
#

@pastel imp

astral quiver
#

Tkx, you are a good friend

pastel imp
#

nha I am just a big fan

quiet depot
#

that seems perfectly fine @ocean quartz, having permissions as requirements

pastel imp
#

oof

#

but thx

#

xd

#

still waiting for livestream though

ocean quartz
#

Nice, that'll make it much simpler to implement

astral quiver
#

That was the icons that I was talking about

pastel imp
#

those are the plugins it supports?

astral quiver
#

For you find Bukkript folder faster

#

No

#

Bukkript supports every simple plugin that exists

#

I do not have a plugin supoort stuff, the Bukkript just work with

#

You can write your on plugin and you will be able to use their API in Bukkript

quiet depot
#

@ocean quartz out of curiosity, how do you plan to implement requirements via annotation?

#

considering they canโ€™t store things like consumers

pastel imp
#

@ocean quartz out of curiosity, how do you plan to implement requirements via annotation?
@quiet depot assuming it's for his command framework?

quiet depot
#

thatโ€™s one of the reasons I dislike annotations, theyโ€™re too limited

pastel imp
#

You can write your on plugin and you will be able to use their API in Bukkript
@astral quiver understood so it's just like a "spigot"

#

but actually not

#

welp

#

hard to explain

astral quiver
#

Yes, Kotlin DSL help me alot

pastel imp
#

welp never rlly used kotlin

ocean quartz
#

@quiet depot My current idea is just to do the same i do in the JDA implementation
Which is the same way i do the messages and completions
With String IDs like @Requrement("#requirement-id")

pastel imp
#

besides for gradle

#

as I use build.gradle.kts

quiet depot
#

why

#

groovy is perfectly sufficient

pastel imp
#

kinda started like that

#

and now I always do it

#

idk why

#

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

#

anyways

astral quiver
#

So folks, good development for every one, I will do my own

#

Just to know

wheat plume
#

Groovy better

astral quiver
#

do you folks know Kord?

pastel imp
#

@quiet depot My current idea is just to do the same i do in the JDA implementation
Which is the same way i do the messages and completions
With String IDs like @Requrement("#requirement-id")
@ocean quartz but then you would need to set the requirement id to an requirement somewhere nha?

#

where would it be?

quiet depot
#

sounds like something sxtanna would make/made (kord)

astral quiver
pastel imp
#

that's actually interesting

prisma wave
#

Welcome... to the korm fields...?

#

๐Ÿ˜”

ocean quartz
#

@pastel imp Same way as the messages/completions, on enable or something like that you register it
commandManager.registerRequirement("#id", sender -> sender.doesSomething)

pastel imp
#

hmm wouldn't that be a pain in the ass?

quiet depot
#

i donโ€™t like that separation

pastel imp
#

ye

#

same

#

couldn't you do something like @Requirement("hasPermission:PERM")

#

idk

ocean quartz
#

Yeah it's pretty annoying but, there isn't many ways around it when working with annotations

quiet depot
#

thatโ€™s also undoubtedly disgusting, but Iโ€™d prefer that over the alternative

pastel imp
#

ye also don't rlly like it much

quiet depot
#

matt this is why you donโ€™t use annotations like this

pastel imp
#

but hey... it's better than the other way

#

matt this is why you donโ€™t use annotations like this
@quiet depot I mean I like how he uses annotations for the MF

#

makes things "easier" to understand

#

in MY personal opinion

quiet depot
#

Iโ€™m not a fan of annotations in general

static zealot
#

latest v of PDM is 0.0.25? Can't find it anywhere

astral quiver
#

0.0.26

static zealot
#

oh nvm

#

yeah just saw it xD

#

I'm legally blind

#

:))

pastel imp
#

you got a certificate for that blitz?

astral quiver
#

hopefully, I a finish my lastest PR, will be 0.0.27

#

๐Ÿ‘€

ocean quartz
#

Yeah i know, but other implementations of commands i've seen always were pretty annoying compared to annotations
So that's why i went with it
If i can think of something better I'll do it though
Still idea storming

pastel imp
#

@quiet depot actually curious.. how would you do.. without annotations...?

prisma wave
#

@astral quiver yeah I'll update when you're done :)

static zealot
#

another thing. if I use pdm do I need to relocate ?

quiet depot
#

for a command framework, I much prefer the more traditional route of just passing the command name via the super, and having an execute method with the sender, and arguments

astral quiver
#

Tkx alot ๐Ÿ˜„

prisma wave
#

@static zealot we don't talk about that

#

Atm relocation isn't supported

pastel imp
#

doesn't seem that "clean"?!

astral quiver
#

Do you folks have permission to send emote from another server?

prisma wave
#

Which hasn't caused any major problems yet

static zealot
#

so I don't relocate anymore?

prisma wave
#

I plan to add it soon

quiet depot
#

it seems perfectly clean to me afonso

prisma wave
#

No need anymore

pastel imp
#

test it? souza

astral quiver
#

I'm working on a PR that will make relocation easy

prisma wave
#

When it does get added, it will be something that pdm supports automatically

static zealot
#

kk that's why I asked. wasn't sure if its still needed

prisma wave
#

Rather than a per-plugin thing

astral quiver
#

if you have a private repository

#

that is my case

static zealot
#

ah

pastel imp
#

it seems perfectly clean to me afonso
@quiet depot welp that's in the eyes of an experienced dev

#

xd

prisma wave
#

@astral quiver how does it make relocation easy?

pastel imp
#

by clean I also mean easy to understand and less "lines"

astral quiver
#

For me, I can have a module that will be published relocated

#

and use PDM to download it

prisma wave
#

ah yeah

#

Although

#

Isn't that not really relocation?

astral quiver
#

Isn't

quiet depot
#
public final class TestCommand extends Command {
    public TestCommand() {
        super("test");
    }

    @Override
    public boolean execute(@NotNull final CommandSender sender, @NotNull final String[] args) {
        sender.sendMessage("hi");
    }
}```
astral quiver
#

Currently I'm working on submodules PDM resolver

quiet depot
#

idk what the alternative is for mf

#

but that seems perfectly clean to me

prisma wave
#

Alrighty

astral quiver
#

If you have to build a module, that depends from another module that has PDM

quiet depot
#

@pastel imp

astral quiver
#

it will get the PDM declarations

prisma wave
#

Very nice

pastel imp
#

hmm welpwith an

#

with annotations you can reduce that to 3 lines? oof

#

without counting public final class TestCommand extends Command {

quiet depot
#

does it require registration somewhere else though?

pastel imp
#

yes?

quiet depot
#

so 4 lines, and separation

pastel imp
#

but atleast you can do cmd, cmd2, cmd 3

#

you can register everything with one line

quiet depot
#

thatโ€™s not a benefit, thatโ€™s encouraging you to violate the single responsibility principle

pastel imp
#

true

#

which is somewhat good?

quiet depot
#

no thatโ€™s bad

#

you should always strive to follow the principle

pastel imp
#

but what's the real difference then?

prisma wave
#

I mean, arguably having requirements in the same class as the actual execution is an SRP violation

quiet depot
#

well bm, if the class is merely a command class, I think anything relating to that command, can be in that class

static zealot
#
* Exception is:
org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'me.bristermitten.pdm', version: '0.0.26'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'me.bristermitten.pdm:me.bristermitten.pdm.gradle.plugin:0.0.26')
  Searched in the following repositories:
    Gradle Central Plugin Repository``` something did not go right xD
prisma wave
#

yeah I agree

#

But there's always a degree of ambiguity

#

@static zealot Buildscript ?

ocean quartz
#

@pastel imp The difference in the two methods is not the command registration itself, but the components of it
For example both needs the command to be registered, either through command map or what
But the big difference is while one handles the requirements etc in itself, the other requires it to be registered elsewhere

pastel imp
#

oooh

#

makes sense

quiet depot
#

just as a key note, registration of my commands is handled automatically via a form of classpath scanning

#

I assume the same canโ€™t be done for mf by default, as the command class doesnโ€™t store itโ€™s own command? What I mean by that, is itโ€™s registered like getCommand(โ€œtestโ€).setExecutor(new MFTestCommand());

#

that is bukkit api ^ but in the context pretend itโ€™s mf api

pastel imp
#

commandManager.register(new CommandHat(configManager));

quiet depot
#

so โ€œtestโ€ isnโ€™t stored in mftestcommand, but โ€œtestโ€ is stored in my testcommand, so registration can be automated

#

or am I wrong?

ocean quartz
#

Yeah, i'd need to be done like commandManager.register(new MfTestCommand())
I could make it be registered from classpath, but that'd remove the dependencies stuff
Unless used Guice or something like that for dependency injection

quiet depot
#

wait so then how does mf know to make mftestcommand respond to โ€œtestโ€?

pastel imp
#

ye that's another thing...

static zealot
#

what BM? you want my build.gradle?

pastel imp
#

dependency injection

prisma wave
#

@static zealot yep

static zealot
astral quiver
#

@prisma wave you Implement the all the maven logic your self?

static zealot
#

here you go

astral quiver
#

like Snapshot Artifact

#

Read POM

#

Because if I know, when is snapshot, the Jar is located in the name-version-date

#

Pretty cool

ocean quartz
#

When the command is registered an instance of bukkit's Command is created and registered in the command map, this will handle all the commands stuff with the normal onCommand(CommandSender sender ..), once the command typed is the one registered or subcommand it'll invoke the method from the stored mf command

quiet depot
#

I think Iโ€™ve just got a fundamental misunderstanding of mf

ocean quartz
#

In a way it's more like a wrapper

prisma wave
#

@static zealot you got anything special in your settings.gradle?

static zealot
#

never changed it

prisma wave
#

@astral quiver yeah, all that is handled in common-lib

static zealot
#

rootProject.name = 'WorldTeleport'

prisma wave
#

I'll probably repurpose it to a general maven library

#

Weird

#

@astral quiver does 0.0.26 work for you?

static zealot
#

1 sec am doing it again

#

build successfull

prisma wave
#

Oh

#

Weird lol

static zealot
#

I mean I kinda know what it was. well what it said it was. no idea what it means :)))

astral quiver
#

Yes

#

What is the version of you Gradle?

static zealot
#

7.0

#

something to do with offline mode?

#

or online mode?

prisma wave
#

๐Ÿ‘€

#

Wait

#

Does it work or not

static zealot
#

it recommended me to turn it on for PAPI as well, did it and now everything is back to normal

#

yeah it does

prisma wave
#

ah ok

static zealot
#

I'm just saying that's what it "recommended" just click accept or whatever and it works xD

prisma wave
#

yeah offline mode won't query any repositories

#

It'll just look at the cache

static zealot
#

no idea when I turned on offline mode. does it automatically turn on if your internet stops working or something ?

prisma wave
#

idk

#

Never had a use for it

#

Maybe

static zealot
#

yeah I moved and I was without internet for a day and I just did some random things in IIJ. probably I pressed or did something then

prisma wave
#

Ah makes sense

#

All working now?

static zealot
#

yep yep

prisma wave
#

Awesome

static zealot
#

yep. ty ty

astral quiver
#

Hope you do not hate my big code

#

with fold, filter, and stuffs

#

๐Ÿ‘€

static zealot
#

btw this is all I have to do on plugin enable right? kotlin val dependencyManager = PDMBuilder(this).build() dependencyManager.loadAllDependencies()

astral quiver
#

no

static zealot
#

huh?

astral quiver
#

use loadAllDependencies().join()

#

because loadAllDependencies will return a CompletetableFuture

prisma wave
#

^

#

Nice PR btw, will have a look in the morning as it's night here and I'm on mobile

astral quiver
#

No problem, glad I can help

#

with join() will block until download the PDM downloads and loads everything to you use

prisma wave
#

Appreciate all your contributions :)

astral quiver
#

: )

tight ginkgo
#

help guys

#

my plugin dont start ๐Ÿ˜ฆ

prisma wave
#

And also

#

Send the error

tight ginkgo
#

sorry!

astral quiver
#

I have a crazy idea for PDM, insert the new PDMBuilder(this).build().loadAllDependencies().join() on the top of the Plugin onLoad

#

using ASM

#

๐Ÿ‘€

#

Crazy idea

prisma wave
#

๐Ÿ‘€

#

Johnny was doing something similar I think

astral quiver
#

Oh nice

prisma wave
#

He did it with the class so dependencies were loaded before plugin initialisation

astral quiver
#

The NMS project?

#

Your he is doing for PDM?

prisma wave
#

For pdm

#

I'm not sure why he needed it tbh

#

But he was using the class in onLoad

pastel imp
#

oof some people be like: flexing IJ Ultimate

onyx loom
#

๐ŸŒ

static zealot
#

ugh do I still use gradle shadowJar to build the jar? when using pdm

onyx loom
#

no

static zealot
#

gradle pdm ?

onyx loom
#

jar.dependsOn project.tasks.getByName('pdm')

#

put this in ur build.gradle

static zealot
#

yep got it

onyx loom
#

then just gradle build

static zealot
#

ah ok. ty ty

#

welp I messed something up

prisma wave
#

Error?

static zealot
#

on it xD

prisma wave
#

Ah yes

#

that one

#

Send your main class

static zealot
#

1 sec

prisma wave
#

You gotta do PDM loading first

static zealot
#

oh

astral quiver
#

I still use shadowJar because I relocate the dependencies using it

prisma wave
#

Also if you're using kotlin you need 1 of the Intrinsics workarounds

#

Eg the Elvis operator / !! / Doing everything in 1 line

static zealot
#

wait so first in onEnable or just at the beginning of the class ?

astral quiver
#

I recommmend you add it at the onLoad

onyx loom
#

onLoad and doing it on 1 line works for me

astral quiver
#

or in the no args constructor

#

works for me as well

static zealot
#
        val dependencyManager = PDMBuilder(this).build()
        val onLoad = dependencyManager.loadAllDependencies().join()!!``` ?
astral quiver
#

you do not need this

#

I use like this:

#
public MyPlugin() {
  PluginDependencyManager dependencyManager = PDMBuilder(this).build()
  dependencyManager.loadAllDependencies().join()
}
#

or you can add to the first thing in your onLoad

prisma wave
#

@static zealot use !! on build(), otherwise Kotlin will try and null check it

static zealot
#

ohh

#

but it tells me its unnecessary xD I'm rly confused rn.

prisma wave
#

yeah it will say that

#

Basically kotlin tries to null check things, even if it's unnecessary

#

And the null checks use a class that doesn't exist yet

#

The easiest workaround is to do everything in 1 line

hot hull
#

Good morning Niall

heady birch
#

@jovial warren mainly for future changes. so if I added a new capability the previous ones would already have it, and id have to change them

#

as for your second question i've only just thought about that. It seems to work for now at least... i can probably move it all to on enable if any issues happen

empty flint
#

i am pretty sure there's a better way to do that
@prisma wave As always, you were right. I completely forgot that fold was a thing

empty flint
#

What should I call my IntelliJ plugin? I'm thinking "MineCode" or something

obtuse gale
#

zwhats it do

empty flint
#

Starts a mc server to test the plugins you develop in IJ with directly in IJ

#

and enables hotswapping

obtuse gale
#

oo fancy... ive been doing that manually up til now...

empty flint
#

me too ๐Ÿ˜›

#

That's why I wanna make a plugin

#

Sooo

#

MineCode?

distant sun
errant geyser
#

@empty flint sounds good

obtuse gale
#

why are spring beans so inconsistent lol....

#

Like 50% of the time I turn my bot on it registers the listeners and the other 50% it just does nothing

hot hull
#

Baked beans

obtuse gale
#

ha ha very funny ex dee

obtuse gale
#

bruh im literally sitting here restarting my bot until it decides to register the listeners

hot hull
#

@quiet depot How would you approach dynamic listener registration (ie. a user specifies PlayerJoinEvent to be registered, then it'd do some magic and register that listener which would fire a Frozen equivalent of that event), doable or nah?

prisma wave
#

Class generation fingerguns

hot hull
#

Further elaboration is required fingerguns

#

I have a sm0l brain

prisma wave
#

it's probably an incredibly bad idea

quiet depot
#

wat

prisma wave
#

But you could use something like cglib to dynamically generate classes that wrap the event or whatever

#

Not real sure what you're asking tbh

hot hull
#

Well I can't think of anything else other than legit just having a boolean on each to see if it get's registered

quiet depot
#

cglib is old and shouldnโ€™t be used

prisma wave
#

Doesn't guice use it?

quiet depot
#

consider something modern like bytebuddy

prisma wave
#

Oh no bytebuddy*

#

Yea

quiet depot
#

guice maintains their own ver iirc

#

of cglib

#

so they get a free pass

#

also guice is old stuff

#

probs made before bytebuddy was a thing

#

anyway no, donโ€™t use code generation for this

#

while kinda iffy, Iโ€™d honestly just have an eventhandler for every event you wish to support

#

that may be an issue to support across versions tho

#

so maybe a dynamic solution (such as code gen) would be preferred

#

if you go that route, I wouldnโ€™t generate event classes like bm suggested, Iโ€™d add some code to call your own event handler when any event is run; a single place

#

that way code gen is only done once, at startup, and itโ€™s as little as possible

hot hull
#

I'll read more about it, I'm just experimenting right now so wanna try obscene things fingerguns

empty flint
#

Soooo

obtuse gale
#

sooo

#

What should I do if something doesnt exist in the config for a plugin?

empty flint
#

Aparently BuildTools won't run properly if it can't print its output

#

lol

hot hull
#

If it's a message, return something like this AJ

"Object key '$key' has not been found within 'messages.yml'!"
jovial warren
#

I wish Java had templates lol

hot hull
#

Thoughts?

class FrozenJoinListener(private val registration: ListenerRegistration) : ActionListener {

    @Subscribe
    fun onEvent(event: FrozenJoinEvent) {
        println("Executed @${event.eventName}")
        
        registration.responseRegistration.call(
                ActionResponse(
                        event.player,
                        null
                )
        )
    }

}
#

(null cause I haven't set it up yet)

steel heart
#

Why have your own event listener though

#

I mean use the system from Bukkit?

hot hull
#

it's for bungee and spigot

#

That's all through an event bus

steel heart
#

So like a proxy-backend server event

#

Or smtng

hot hull
#

ish yea

#

It's all ugly af right now cause you I'm big brain and will probs do multiple iterations before I settle on something

steel heart
#

Lol

leaden plank
#

How can I return from a task(using Aikar's TaskChain) so it returns from a method?

 Location groundLevel(Location loc)
    {
        return Tutplugin.newChain().async(() ->
        {
            for (int i = 0; i < 1000000; i++)
            {
                Tutplugin.newSharedChain("groundLevel").async(() ->
                {
                    Material block = loc.getBlock().getType();

                    if (block == Material.AIR)
                    {
                        loc.subtract(0, 1, 0);
                    }
                    else if (block == Material.GRASS_BLOCK)
                    {
                        return loc;
                    }


                }).execute();
                
            }

        }).execute();
    }```
hot hull
#

lol, IJ

_root_ide_package_.com.github.frcsty.load.Loader
jovial warren
#

oof

obtuse gale
#

why my bean not happening

jovial warren
#

because you are one

astral quiver
#

Everyone is using Kotlin here, this is very nice

jovial warren
#

yeah

#

Kotlin > Java

astral quiver
#

Always

obtuse gale
#

because you are one
๐Ÿ˜ฆ

#

My command registration bean happens but my listener registration doesnt

heady birch
#

Whats wrong with the beans?

obtuse gale
#

broke

heady birch
#

Show where you define each bean

obtuse gale
#

@Service
class ListenerRegister @Autowired constructor(
    private val attachment: Attachment,
    // A shit ton more
    private val jda: JDA
) {
    @Bean
    fun listeners() {
        println("Registering listeners")
        jda.addEventListener(attachment)
        // A shit ton more
    }
}```
jovial warren
#

@Autowired constructor is redundant btw

obtuse gale
#

wait really

jovial warren
#

yeah

#

what does listeners() return?

obtuse gale
#

er

#

nothing

#

does it need to return something?

heady birch
#

๐Ÿคฆโ€โ™‚๏ธ

jovial warren
#

@Beans are used for defining things that return things, to be dependency injected

obtuse gale
#

ive got other beans that work that dont return anything lol

jovial warren
#

use @PostConstruct to make that method run when the @Service is being constructed

obtuse gale
#

so what should i return lol

#

ah ok

heady birch
#

Beans are meant to return something

#

Yeah what bardy said is better

obtuse gale
#

when do services get constructed/

#

Like will it be before jda is instansiated

heady birch
#

Also i'm not sure, but is @Configuration required specifically for registering beans?

jovial warren
#

^ no

#

I use @Component to register beans

prisma wave
#

Elara > Kotlin

heady birch
#

Awesome then its the same as Service, just for clean I guess

hot hull
#

GCode > Elara

prisma wave
#

๐Ÿ˜•

astral quiver
#

Spring and JDA ๐Ÿ‘€

jovial warren
#

@prisma wave I had a look at Elara last night, and tbh, it's actually not that bad

prisma wave
#

indeed

#

It's very good

#

I am pro language designer

astral quiver
#

Spring is in everything

jovial warren
#

you're not a pro compiler designer though

prisma wave
#

Not yet

#

We're doing a full rewrite and making a compiler in Go

#

so I will be soon

heady birch
#

Lol you could literally use rust

astral quiver
#

But is more build your own

jovial warren
#

@prisma wave make your compiler in C++ so it runs really fast

quiet depot
#

no

astral quiver
#

Rust >>>

quiet depot
#

you make your compiler in the language youโ€™re making

jovial warren
#

or Rust yeah

#

yeah make the Runtime environment in Rust then

prisma wave
#

Go is fast

quiet depot
#

how fast is elara?

prisma wave
#

N/A

quiet depot
#

well

prisma wave
#

The evaluator barely exists lol

#

It's just a Lexer and parser rn

astral quiver
#

Lol

quiet depot
#

imo you should make your elara compiler, in elara

prisma wave
#

We will eventually

#

But you have to write one in something else first

#

it's like the chicken and the egg

quiet depot
#

ye, go is fine for the initial

onyx loom
#

will u carry on elara even if u dont win

prisma wave
#

Go is a good choice I think

#

Yeah

onyx loom
#

exciting

#

respectable

prisma wave
#

Very exciting

quiet depot
#

oh right this is for a comp

#

forgot thay

#

that*

prisma wave
#

yep

quiet depot
#

is there a prize?

prisma wave
#

$10000

hot hull
#

it's like the chicken and the egg
So BM, what was first?

onyx loom
#

10k ๐Ÿ˜ณ

astral quiver
#

Do you check the Kotlin Multiplatform Mobile yesterday?

prisma wave
#

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

quiet depot
#

do you remember my suggestions?

jovial warren
#

make an IntelliJ plugin so that it is properly recognised and syntax highlighting works as well, or something like that

prisma wave
#

Some of them

hot hull
#

Do you know how many chicken nuggets you could buy with that

quiet depot
#

considering thereโ€™s a prize, might be worth reevaluating them

hot hull
#

Atleast 5

quiet depot
#

because thereโ€™s some serious inconsistencies

prisma wave
#

Yeah I think it is a little inconsistent right now

quiet depot
#

is there a spec written?

prisma wave
#

Nothing formal

quiet depot
#

is everything at least there?

prisma wave
#

I started writing a grammar but then realised it was a waste of time

jovial warren
#

also what is it with you and programming languages

astral quiver
#

If my knowledge of parser

prisma wave
#

Most of it is in the ANTLR grammar I wrote a while ago but we've changed some things since then

#

also what is it with you and programming languages
@jovial warren they're cool

astral quiver
#

Is basically not exists

#

But write IntelliJ plugins is not hard

#

That's a guide to how to add custom language support to IntelliJ

jovial warren
#

also does it have proper function type inference?

#

something that Kotlin lacks that kinda triggers me

prisma wave
#

it will eventually

#

But in a clever way

astral quiver
#

It's getting better the type inference in the 1.4

prisma wave
#

yeah it is

astral quiver
#

Call reference update I really like

quiet depot
#

so bm, is there a spec that contains everything? idc if itโ€™s formal or not, so long the info is there

#

cuz if there is, might make a pr

prisma wave
#

interesting

#

i can write one

#

the only thing is probably outdated

astral quiver
#

Was kinda annoying to see that a function supports but because is not the same type you can't fit on it

#

Elara is actually pretty cool

#

Great job Alex

prisma wave
#

Ty :)

#

although it wasn't just me

#

Yugi did most of the parser and katsu made most of the original lexer

#

i just did most of the design and finishing touches

onyx loom
#

have u spoke to sx about elara since Kappa

prisma wave
#

nope

#

im scared to mention it

onyx loom
#

๐Ÿ˜‚๐Ÿ˜‚ ๐Ÿคฃ

astral quiver
#

The design is pretty

prisma wave
#

Yeah I agree

#

although it's quite inconsistent right now

astral quiver
#

The one thing I do not like is be able to use and not use parentheses to call

#

This is a inconsistent that groovy has that I don't like

onyx loom
#

i quite like the way u can call without parens

prisma wave
#

^ me too

#

it's optional ofc

astral quiver
#

Because I hate see a code base with the two types of call

prisma wave
#

but in lots of cases it can be a lot cleaner

onyx loom
#

tbh the only time u would use the parens is for calling without params

prisma wave
#

yeah and if there's any ambiguity

onyx loom
#

so when u do call the function, its easily noticeable and then when u have a param it looks cleaner

hot hull
#

How does one make a SortedMap mutable?

#

Or am I just hella dumb?

prisma wave
#

they already are

hot hull
#

Ah ok

#

I was dumb

astral quiver
#

I want to break my computer every single time that I go to the maven central to peak some dependency and it's returns in the gradle format that NO ONE USES

hot hull
#

Been awake since 4:20 am, so don't judge me fingerguns

#

SrSouza, excuse me what

prisma wave
#

oh the group: blah @astral quiver ?

jovial warren
#

yep

#

and also compile

hot hull
#

Ah that

prisma wave
#

disgusting

astral quiver
#

Yessss

hot hull
#

I thought you said gradle bad -.-

jovial warren
#

that's the most annoying part, compile

#

I mean, in DSL, the separated format looks better imo

#

since it's just implementation("group","artifact","version")

astral quiver
#

Gradle Is beautiful, gradle is my love

jovial warren
#

^ same

#

Kotlin + Gradle Kotlin DSL is best imo

onyx loom
#

๐ŸŒ

astral quiver
#

Yessss

jovial warren
#

though some people think Kotlin DSL is crap because it is really verbose

#

cough @prisma wave cough

astral quiver
#

It's getting better

prisma wave
#

it is

#

dsl bad

#

groovy good

jovial warren
#

Groovy DSL bad Kotlin DSL good

astral quiver
#

The old tasks system

prisma wave
#

groovy dsl isn't a thing

onyx loom
#

groovy good

prisma wave
#

it's just how gradle is supposed to be used

jovial warren
#

it's called Groovy DSL everywhere

#

they're both DSLs

astral quiver
#

Kotlin good boy from papa

prisma wave
#

but one's good and one isn't

astral quiver
#

The Kotlin one

#

๐Ÿ‘€

jovial warren
#

@prisma wave in your subjective opinion

prisma wave
#

objective

#

kotlin dsl too verbose and slow

#

groovy flexible and good

jovial warren
#

what?

#

Kotlin DSL isn't slow

astral quiver
#

The two are good

prisma wave
#

slower than groovy

jovial warren
#

Groovy is ew though

astral quiver
#

But that fact is that Kotlin DSL was a crap tooling but was one