#dev-general

1 messages ยท Page 111 of 1

jovial warren
#

okay lesson learned also: don't commit from GitHub, it's an absolute pain to then merge that branch back in to master

topaz bay
#

@hot hull ....

#

no

#

Youre joking right?

hot hull
#

Dude I've no idea what any of this shit is, blame Piggy

topaz bay
#

bruh

jovial warren
#

learn it then

hot hull
#

Don't bruh me

topaz bay
#

Youre such a 4head

jovial warren
#

isn't actually that hard

topaz bay
#

He meant import the project

#

As in File -> New/Open/Import

#

But you dont need to do that, just click the add button when you right click the build file

jovial warren
#

yeah that'll work

topaz bay
#

@jovial warren wdym by that?

#

it's an absolute pain to then merge that branch back in to master

jovial warren
#

idk what his issue is lol

#

oh that

#

so basically, I updated BardyBot's licensing on GitHub, and didn't know that would create a different branch

#

so I just had to:

Commit
Push (didn't work, didn't know why)
Pull
Merge
Commit
Push
topaz bay
#

It did because you chose to make a new branch

#

You didnt have to

jovial warren
#

I didn't...?

topaz bay
#

You did

#

lol

jovial warren
#

I purposefully chose to commit to the master branch though ๐Ÿค”

topaz bay
#

Also, youre supposed to make a PR from that

#

And then merge into master, and drop the other branch

#

Then its just a pull from github

jovial warren
#

that's what I had to do, just not through that way

topaz bay
#

I guarantee you, you did not choose commit to master

#

If you did, it would not have made a branch

jovial warren
#

I did originally, but maybe me changing the license template then changing it back refreshed the settings

topaz bay
#

its commit to master by default

jovial warren
#

it wasn't for me

#

actually yes it is

topaz bay
jovial warren
#

I probably chose the bottom option like a dumbass

#

also what does Verified mean?

#

will my commits only be verified if they use a GPG key?

#

because I use an ED25519 KEY atm

topaz bay
#

Where do you see verified?

#

On an ORG?

jovial warren
#

on the commit I did from GitHub's create new file thingy

topaz bay
jovial warren
#

oh I have to sign them yeah

#

how do I do that?

topaz bay
#

There is 0 reason to do this

jovial warren
#

I thought by using an SSH key It'd already be signed

#

true I guess

errant geyser
#

Sx did you just leak your email address and your name?

prisma wave
#

classic mistake

#

@topaz bay boutta dox you >:)

jovial warren
#

ranald.taylor@gmail.com

#

how tf did you guys spot that

prisma wave
heady birch
#

Not as bad as committing a live payment database with my credit card info in

#

#oops

jovial warren
#

oh you didn't

heady birch
#

No lmao

jovial warren
#

was gonna say

prisma wave
#

almost forgot!

topaz bay
#

I don't think thats a leak

#

My public website leads to my linkedin, which has my full name

errant geyser
#

Ah

topaz bay
#

@prisma wave we do not fear kotlin

#

You should have put java interop there

#

lol

#

fear null*'

#

fuck

prisma wave
#

java interop isn't that bad

#

I'll do a similar one tomorrow

errant geyser
prisma wave
#

ew

errant geyser
#

You can look at the whole thing if you click the link I sent

#

Not mine

prisma wave
#

i dont want to

errant geyser
#

You know you do

#

its a one class plugin

prisma wave
#

๐Ÿคฎ

errant geyser
#

Its actually awful

#

Why is everything static

hot hull
#

What the fuck is that katsu

errant geyser
#

just got sent to me ยฏ_(ใƒ„)_/ยฏ

prisma wave
#

report it

errant geyser
#

Is that even a thing you can do?

jovial warren
#

okay that's arrow code

errant geyser
#

Its also static abuse and a one class plugin

onyx loom
#

๐Ÿ™‚

jovial warren
#

and I thought my himalayas in BardyPunishments was bad

#

wait no not that

onyx loom
#

i mean thats still pretty bad

errant geyser
hot hull
#

Invalid plugin.yml here version: @version@

#

wHy

jovial warren
#

will that even work or what?

prisma wave
#

process resources plugin

jovial warren
#

I remember in maven it's ${project.version}

hot hull
#

This is gradle tho you 4head

jovial warren
#

true

hot hull
#

KM, I knew I shouldn't have removed that :kek:

prisma wave
#

smh

errant geyser
#

I always remove that

onyx loom
#

on the topic of abominations

jovial warren
#

remove what?

errant geyser
#

The process resources plugin

onyx loom
jovial warren
#

also, this dreamcompass doesn't even fucking use build tools or an IDE

prisma wave
#

that's a lot of var

#

too much

onyx loom
#

gotta be var

hot hull
#
processResources {
    from(sourceSets.main.resources.srcDirs) {
        filter ReplaceTokens, tokens: [version: version]
    }
}

Should be correct yea KM?

errant geyser
#

Whats up with var?

prisma wave
#

you need to import smth iirc

#

var bad

hot hull
#

Yea the tools thingy

jovial warren
#

if it used an IDE it would be in src/ and if he was using build automation, src/main/whatever

errant geyser
#

y KM?

prisma wave
#

make everything final unless you have a specific reason for it not to be

#

^

jovial warren
#

oh he doesn't even use a fucking package

prisma wave
#

guess < 1 || guess > 10 @onyx loom I would do guess !in 1..10 instead

jovial warren
#

this prosteDeniGC guy is just on another level of stupidity

onyx loom
#

oh sweet

prisma wave
#

honestly not bad

#

apart from all the var

old wyvern
#

in is a operator?

hot hull
#

Bardy, why you just dissing everyone out here lmao

prisma wave
#

it's a keyword

hot hull
#

Yugi, it is in kotlin

prisma wave
#

well kind of

old wyvern
#

yea

prisma wave
#

a keyword-operator

old wyvern
#

feels weird

prisma wave
#

you get used to it

jovial warren
#

Bardy, why you just dissing everyone out here lmao
I ain't dissing them I'm just stating facts

onyx loom
#

does it count as spaghetti bm? as im calling main again if i want to restart program

errant geyser
#

?plsnoarrowcode @bleak igloo thinks this isn't arrowcode, but staircase code or something

prisma wave
#

not really

old wyvern
#

shoudlnt it be !(guess in 1..10) or soemthing like that

prisma wave
#

nah

errant geyser
#

?plsnoarrowcode

compact perchBOT
prisma wave
#

you can have !in

old wyvern
#

NOT operator works with a keyword?

#

welp

jovial warren
#

you used a when so I give you a ๐Ÿ‘

old wyvern
#

I see

onyx loom
#

๐Ÿ™‚

prisma wave
#

it works with in

#

and also with is

onyx loom
#

it was an if statement at first haha

old wyvern
#

what is is used for?

prisma wave
#

it's like instanceof

old wyvern
#

ah

prisma wave
#
if(sender !is Player) {
  sender.sendMessage("only players can use this")
  return
}```
old wyvern
#

I see

prisma wave
#

and then you also get smart casting which is cute

old wyvern
#

oh so in a block which assets it is something it is auto cast to that?

prisma wave
#

yep

old wyvern
#

nice

prisma wave
#

a little more powerful than that

old wyvern
#

That should defenitely reduce a lot of unneeded shit

prisma wave
#

but yeah after that return it's asserted that sender is a Player so you don't need to cast

old wyvern
#

is explicit casting still available?

prisma wave
#

when you need it

#

val player = sender as Player

jovial warren
old wyvern
#

ah

jovial warren
#

apparently you should use as? T instead of as T?

prisma wave
#

they're different things

#

use as if you're confident that it is T, otherwise use as?

jovial warren
#

the reason why I don't in that though is because as? T ?: // do something covers three different cases

prisma wave
#

three?

#

pretty sure it's 2

jovial warren
#

it was three in my case though

prisma wave
#

it's actually only one here: ```kotlin
sender as? Player ?: doSomething()

`doSomething` if sender is not a Player
onyx loom
#

i got rid of a var bm are u proud of me

prisma wave
#

yes

#

much better

jovial warren
#
val nowPlaying = musicManager.player.playingTrack

val userData = nowPlaying?.userData as Member?
    ?: return channel.sendMessage("**You haven't queued any music yet!**").queue()

in that case, as? T would cover nowPlaying, userData, or nowPlaying.userData being null I think, something like that

old wyvern
#

is that a blank true expr for a ternary or something else?

onyx loom
#
        "yes","y" -> main()```
prisma wave
#

it's elvis operator @old wyvern

onyx loom
#

inline ๐Ÿ˜Ž

prisma wave
#

x ?: doSomething() = if(x == null) doSomething()

topaz bay
#

@jovial warren that should be as?

old wyvern
#

ah I see

jovial warren
#

yeah but that would lead to messy code sx, that's why it isn't

topaz bay
#

and remove the nullability of Member

#

No it wouldnt

#

as? is the safe cast operator

#

Should be nowPlaying?.userData as? Member

old wyvern
#

so the function called after elvis should return of the casted type?

jovial warren
#

that message should ONLY be sent if nowPlaying?.userData is not Member? and it's null

prisma wave
#

it can do

topaz bay
#

What do you think what I gave you does...

prisma wave
#

@old wyvern it's just a null check. so you can do things like getString("key") ?: "defaultValue"

#

or you can return

topaz bay
#

If the value is null or its not Member, your left side would be null

prisma wave
#

or anything else

topaz bay
#

which would trigger the elvis

jovial warren
#

yeah the three cases I have for that is:

  1. If nowPlaying is null
  2. If nowPlaying?.userData is null
  3. If nowPlaying?.userData is not of type Member
old wyvern
#

oohh ok

prisma wave
#

why make userData nullable

jovial warren
#

because the way it works, it's Object

#

I have to assign that manually

prisma wave
#

wat

jovial warren
#

lemme bring up the code where I do just that

topaz bay
#

jesus...

#

gross

jovial warren
#

no idea why but that's how lavaplayer works

#

what's wrong with my code this time?

#

if you say it's not allman I swear

hot hull
#

What isn't ๐Ÿ˜Ž

topaz bay
#

I still dont see why you would assert a nullable type

prisma wave
#

it's not allman

#

๐Ÿ˜ 

topaz bay
#

On the right side of a cast

hot hull
#

And yes, the lack of allman is disturbing

topaz bay
#

It doesnt make sense

jovial warren
#

because Message#member I think it is is nullable

#

though I am giving it a non-null member

prisma wave
#

why would it be?

topaz bay
#

members are from guilds

jovial warren
#

it's null when the sender isn't a member

prisma wave
#

a message will always be sent inside a server, so it would be by a member

topaz bay
#

messages can be in private channels

main fox
#

hi i have a problem with DeluxeMenus-1.13.3-DEV-87

prisma wave
#

oh yeah true

topaz bay
#

@jovial warren You should still not be casting to a nullable type

jovial warren
#

true

#

now it's as Member though but that'll throw an NPE if that is null

#

and it'll be null if it hasn't been assigned

#

if someone tries to display the queue when no tracks are playing and none are queued it'll return null there

topaz bay
#

Thats why you use as??

jovial warren
#

but as covers those three cases I mentioned

prisma wave
#

and?

topaz bay
#

No, it doesn't

#

The safe accessor is what operates on the left side

jovial warren
#

actually those three cases are exactly what I want

#

I'm stupid

topaz bay
#

nowPlaying?.userData will resolve to either null or Any, resulting in Any?

#

You would then do as? Member to resolve to either null or Member, giving you Member?

#

Which you then have an elvis for

#

Which result in the value after that line being Member

jovial warren
#

if nowPlaying is null, obviously nothing's been queued
if userData is null, nothing's been queued either
and if it's not a type of Member, nothing's been queued either

#

so yeah that's fine actually

#

I'm big brain

#

anything else wrong with that code?

topaz bay
#

Yes

#

Everything

jovial warren
#

what about it?

topaz bay
#

Its just messy

jovial warren
#

how do you think I can make it not messy then?

#

I'll consider any suggestion that isn't "use allman"

hot hull
#

use allman

jovial warren
#

get out

hot hull
#

no

jovial warren
#

I swear you don't even use it

hot hull
#

I do sometimes

topaz bay
prisma wave
#

frosty is smart

topaz bay
#

Look at this section of code

hot hull
#

It'd be so much nicer with allman

jovial warren
#

yeah I'll admit that's not the nicest

topaz bay
#

You have an anon object

#

You mix block and expression bodies

jovial warren
#

anon?

topaz bay
#

You mix inline statements and blocked statements

#

Its a fucking mess

#

Anonymous

jovial warren
#

yeah true

#

that's the way it's done on the thing I followed though lol

prisma wave
#

that's java though

#

classes are cheap in kotlin

jovial warren
#

maybe it is worth making my own impl of it

#

what tf do I call it though?

topaz bay
#

You wanna know a little trick to instantly make disorganized code look slightly more organized?

jovial warren
#

what

topaz bay
#

Change loop to looping

jovial warren
#

okay yeah idk what else to do about those

topaz bay
#

So that it aligns

jovial warren
#

okay

topaz bay
#

same with this

#

And those should be private

jovial warren
#

that's now called looping by the way, that map

topaz bay
#

shorter statement should be first

#

It should also be lexicographically first

jovial warren
#

again, that's the order it came from the demo

prisma wave
#

also you could just use a Set<Long> instead of Map<Long, Boolean>

topaz bay
#

empty line before the return

jovial warren
#

how am I gonna get a boolean from that Set<Long>?

topaz bay
prisma wave
#

Set#contains

topaz bay
#

that regex should be in a companion object

jovial warren
#

oh yeah ofc

prisma wave
#

and a constant

jovial warren
#

constant? where?

topaz bay
#

Thats.. yeah?

#

Its a regex object, so it cant be const

jovial warren
#

okay I didn't know what else to do about the getter

prisma wave
#

yeah

topaz bay
#

but in a companion object, its a pseudo constant

prisma wave
#

indeed

jovial warren
#

loadAndPlay came straight from the demo, with a few changes to make it work how I wanted it

topaz bay
#

All of these should have a space before the final statement

jovial warren
#

also, companion object inside of the object?

topaz bay
#

Oh, I didn't notice this file was a single object

#

No, you can just make it a private property in this object

jovial warren
#

yeah, otherwise I'd have to instantiate it

prisma wave
#

you technically have to anyway

#

it's just done by the compiler

jovial warren
#

yeah

#

the whole point of using Kotlin though is so things like that are done for you

topaz bay
#

WHAT

jovial warren
#

getters and setters are made for you, so are things like singletons when using object

topaz bay
#

Side note, this is a MAJOR SRP violation

jovial warren
#

SRP?

prisma wave
#

single responsibility principle

old wyvern
#

Single Responsibility

jovial warren
#

oh yeah, right

topaz bay
#

Dude....

#

Those code generation aspects are so unbelievably beneath "the whole point of using Kotlin"

jovial warren
#

the type inference and removal of boilerplate are why I use it

#

also maybe this whole thing just needs a rewrite

topaz bay
#

You think?

jovial warren
#

I know

#

the reason why I look at demos and stuff though is because I lack so much creativity that I don't know how to structure my own project

hot hull
#

a debug boolean should be a static final var inside my main, or?

jovial warren
#

var?

hot hull
#

variable

jovial warren
#

isn't that variable?

#

yeah that's what I was saying

#

final can't be changed, variables can

old wyvern
#

java, not kotlin

jovial warren
#

or is that not how variables work in Java

hot hull
#

Dude can you read what I ask before starting to saying random things..

old wyvern
#

xD

topaz bay
#

A variable is anything

prisma wave
#

several people are typing

hot hull
#

Like legit, not mad, just confused as hell as to why you start saying random shit

topaz bay
#

where it be local or a field

old wyvern
#

he didnt mean var in that context bom

jovial warren
#

it should just be a static final Boolean since there isn't really a point in inferring types here

topaz bay
#

No one uses variable to denote mutability

hot hull
#

Sx, asking specifically for a debug context

prisma wave
#

private static final

topaz bay
#

I wasnt talking to you @hot hull

heady birch
#

Dude can you read what I ask before starting to saying random things..
@hot hull No

prisma wave
#

priavate

#

lol

heady birch
#

i dont think it should be frosty

#

maybe make it a config option

jovial warren
#

No one uses variable to denote mutability
in Kotlin they do

#

maybe not in Java

hot hull
#

it is a config option..

heady birch
#

ok

#

make it a config option

hot hull
#

Just how should I pass it around through the plugin itself

heady birch
#

config

hot hull
#

Imma smack you Niall

prisma wave
#

inline class >:)

heady birch
#

get it from config

jovial warren
#

you making a class of constants?

hot hull
#

No just that one single debug

heady birch
#

DebugOptionConfigValueProvider

hot hull
#

Niall, smh

jovial warren
#

tf

hot hull
#

Might as well just make a seperate plugin just for the debug option and register it with a bukkit provider, ye Niall?

prisma wave
#

AbstractConfigValueFactorySupplierBean.kt

hot hull
#

Do I have to ask again, or can I get a straight answer?

prisma wave
#

make a constant or something that you pass around

#

depending on use case

jovial warren
#

public static final Boolean VALUE = value?

prisma wave
#

this is really overthinking it lol

topaz bay
#

Depends on how large the plugin is

#

If it was pretty big, I would use a logger that wraps whether debug messages get sent or not

hot hull
#

I've got like 10 debug messages all together

old wyvern
#

Why would a debug boolean be final?

hot hull
#

Yugi

old wyvern
#

yea?

hot hull
#

Because it doesn't change during runtime?

#

And because why would you reasign it?

old wyvern
#

Debuging with constants?

#

welp I assumed you were to store some result

prisma wave
#

static private volatile final String isDebugging = "false";

old wyvern
#

nvm then

hot hull
#

Gonna refrain from asking such complex questions in the future sheesh

#

Cause I see y'all brains just went haywire

jovial warren
#

@prisma wave just no

prisma wave
#

yes

hot hull
#

why a string KM ;C

#

Make it an int

jovial warren
#

always access modifier first

old wyvern
#

StringBuffer isReBugging

#

โ˜ ๏ธ

jovial warren
#

lol

old wyvern
#

idek at this point

#

im out

#

ciao

hallow crane
#

I think we're past the point of "where do access modifiers go"

#

what's the difference between private and public?

heady birch
#
RegisteredServiceProvider<DebugConfigOptionProviderService> debugConfigOptionProviderServiceRegisteredServiceProvider = Bukkit.getServicesManager().getRegistration(DebugConfigOptionProviderService.class);

if (debugConfigOptionProviderServiceRegisteredServiceProvider != null) {
  DebugConfigOptionProviderService debugConfigOptionProviderService = debugConfigOptionProviderServiceRegisteredServiceProvider.getProvider();
 
 System.out.println(debugConfigOptionProviderService.isDebugEnabled());
else {
  System.out.println("No registration for debug config values!");
}

jovial warren
#

oh my god

prisma wave
#

BEAUTIFUL

heady birch
#

This is the standard

rotund egret
#

if(String#contains("false"))

prisma wave
#

now that is enterprise ready code!

jovial warren
#

lol

heady birch
#

This is good

jovial warren
#

what's the difference between private and public?
go take a Java course yako

heady birch
#

Because if you want to change your DebugConfigOptionProviderService in the future it is perfectly possible

old wyvern
#

Someone take this man's shrooms away

heady birch
#

Other plugins can also use your DebugConfigOptionProviderService

#

to find out if your plugin is set to debug mode

hallow crane
#

strings can be private right?

jovial warren
#

get out

heady birch
#

Yeah

hot hull
#

Niall

#

Can I get some of that weed u smoking

errant geyser
#

Yako you're trolling again

jovial warren
#

it's kinda not that funny any more yako

hallow crane
#

that's my day today ๐Ÿ™‚

#

vibin'

jovial warren
prisma wave
#
val engine = ScriptEngineManager().getEngineByName("JavaScript")
val debugging = URL("https://google.com/search?q=Am+I+Debugging").openStream().readBytes())
engine.eval(debugging)

fun isDebugging(): Boolean {
  return engine.eval("!!this.isDebugging")
}
#

this is the real way to do it

heady birch
#

Lol

jovial warren
#

is that a double space between the function and the colon?

#

get outta here

heady birch
#

hang on

prisma wave
#

whoops

heady birch
#

arnt you getting a script engine in a script engine

ocean quartz
#

@topaz bay On Arcade you have var currentGame = null as? Game? what would be different if it was just as instead of as??

heady birch
#

ArcadeBoard?

prisma wave
#

no

#

it's kotlin getting the javascript engine

heady birch
#

It looks cool I really want to try out its api

jovial warren
#

as? Game? is just redundant isn't it?

prisma wave
#

it supposedly makes indentation look nicer

jovial warren
#

it's a safe cast to a nullable type

topaz bay
#

@ocean quartz Im pretty sure nothing

#

I did that to get rid of the warning for it

#

Since IntelliJ knows that it will not pass

jovial warren
#

wait wtf?

ocean quartz
#

Gotcha, just curious since I tried it now and it didn't warn me or anything to do it without ?

jovial warren
#

you're casting null to Game??

topaz bay
#

@ocean quartz was the target nullable?

ocean quartz
#

Yeah

jovial warren
#

const val thePointInThat = null

topaz bay
#

It might have changed since I last worked on this project

#

Its kinda old

ocean quartz
#

Ohh okok nice, I like that more than var currentGame: Game? = null

topaz bay
#

Oh no, I actually had it backwards

#

It gives that warning when the target isn't nullable

jovial warren
#

why would you have it as null in the first place though?

topaz bay
#

which ya know... makes sense

#

lol

ocean quartz
#

Yeah xD

topaz bay
ocean quartz
#

Bardy, null is useful

topaz bay
#

I guess I just did it for my own clarity?

jovial warren
#

no idea

#

Bardy, null is useful
maybe

topaz bay
#

Considering there can be a valid state in which there is no game, I'd say its rather useful

jovial warren
#

someone gimme a hand with this rewrite

topaz bay
#

This entire thing could technically just be a giant state machine

#

But the game is already a state machine, and nested state machines are...

#

๐Ÿ‘€

jovial warren
#

someone help me structure this project lol

#

as I said, cannot structure projects at all

topaz bay
#

no

jovial warren
#

guess I'll just leave it then

errant geyser
#

What project?

jovial warren
#

BardyBot

#

gotta rewrite him

#

but I cannot structure projects whatsoever

ocean quartz
#

That's why you structure before you write it xD

prisma wave
#

use spring

#

ez structure

jovial warren
#

Spring? teach me the ways then

#

@heady birch oh mighty Spring senpai teach me the ways xD

errant geyser
#

What would you actually use Spring for?

jovial warren
#

no idea

#

never ever used it before

errant geyser
#

Neither. I know it has a use but idk wtf it is

hot hull
#

dEbUg

[18:54:56 INFO]: Executing 'default' motd for user Frcsty (a1b72b20-97e0-476e-8a78-db9c9dcf93a4)
[18:54:56 INFO]: Executing 'VANISH' action for user Frcsty (a1b72b20-97e0-476e-8a78-db9c9dcf93a4)
jovial warren
#

nice

errant geyser
#

Frosty if you were in Kotlin you could just do "any string".debug() and format stuff if ya wanted

#

With extension functions ^

jovial warren
#

@prisma wave what's the point though? won't that just use up more resources than it's worth? what can I even use Spring to do?

prisma wave
#

he will be in 27 days ๐Ÿ˜Ž

#

it has a DI framework

#

which makes structuring things easier

jovial warren
#

DI framework?

prisma wave
#

dependency injection

old wyvern
#

Dependency Injection

jovial warren
#

ah okay

errant geyser
#

Dependency injection

prisma wave
#

like guice but cooler

jovial warren
#

tf is guice?

topaz bay
#

bruh

errant geyser
#

nerd stuff

jovial warren
#

I've heard of it I think but never used it

old wyvern
prisma wave
#

another DI framework

#

but marginally less cool than spring

jovial warren
#

what can I use Spring to do though?

errant geyser
#

DI

prisma wave
#

everything

jovial warren
#

and that's it or what?

topaz bay
#

spring and guice is very far from comparable

#

spring is an entire framework

old wyvern
#

It can do more than just DI

topaz bay
#

It just has DI capabilities

#

You would use spring to create entire applications

#

platforms

#

backends

#

whatever

jovial warren
#

also, which one of these things under "Why Spring" would I be using? idk what any of these are

#

Microservices, Reactive, Event Driven, Cloud, Web Applications, Serverless, Batch

#

tf are any of those?

#

also, is Spring going to run on my 1GB RAM AWS free tier?

prisma wave
#

maybe

topaz bay
#

Spring is very multifaceted

#

Its not like a giant monolith of a base that you write on top of

#

You only include what you actually use

heady birch
#

I like it

#

@jovial warren Think it would

jovial warren
#

also how does one begin with a rewrite? just delete everything and start over?

heady birch
#

I usually do that

topaz bay
#

just checkout another branch

heady birch
#

Or move old files to a different package

jovial warren
#

and you do that how sx?

heady birch
#

But then I end up importing the wrong classes ๐Ÿ˜ฆ

topaz bay
#

In intellij, just right click it go down to git

#

go to branches

#

and checkout a new one

#

name it "rewrite"

#

ezpz

jovial warren
#

checkout tag or revision or new branch?

topaz bay
#

What did I say to do?

jovial warren
#

you said checkout a new one

topaz bay
#

A new what though

#

...

jovial warren
#

branch

#

right

topaz bay
#

Exactly.

jovial warren
#

okay new branch is done

#

now how do I use it?

topaz bay
#

Thats it...

heady birch
#
@GetMapping("/greeting")
  public String greetingForm(Model model) {
    model.addAttribute("greeting", new Greeting());
    return "greeting";
  }

  @PostMapping("/greeting")
  public String greetingSubmit(@ModelAttribute Greeting greeting) {
    return "result";
  }

"Were using AI to greet the user's of our website- invest in us today"

jovial warren
#

what do I do with my old code?

topaz bay
#

Youre using it

#

You can delete it if you want

#

or move it to the test sources and use it as reference

jovial warren
#

okay now time to start over

topaz bay
#

doesnt really matter

jovial warren
#

well I've got it on GitHub anyway

#

it's gone now

topaz bay
#

I mean...

#

well yeah, thats what the new branch is for

#

All of the original code is still on the master branch

hot hull
#

Go judge Sx

topaz bay
#

No

hot hull
#

Yes

heady birch
#

@hot hull dont like the new design

topaz bay
#

Effort

heady birch
#

change it back

jovial warren
#

one cannot simply command another to do what he or she wishes and expect them to comply @hot hull

hot hull
#

In mother russia you can

#

Niall, wdym?

heady birch
#

weird theme

topaz bay
#

?

jovial warren
#

is that the new crap or the old one?

hot hull
#

new one, it looks quite nice with dark theme

jovial warren
#

I hate the new one

heady birch
#

can you make it dark

#

how do I make it dark on my repositories

topaz bay
#

dark reader

#

lol

jovial warren
#

as I said, bar is too far left, everything's too fat and rounded

prisma wave
#

why is e.printStackTrace() only printing out java.lang.NullPointerException ????

jovial warren
#

dark reader makes GitHub look atrocious

hot hull
#

Your screen is doodoo Bardy

jovial warren
#

Stylus with StylishThemes/GitHub-Dark is good

heady birch
#

why is e.printStackTrace() only printing out java.lang.NullPointerException ????

#

Lol

jovial warren
#

Your screen is doodoo Bardy
says the one using 4:3

heady birch
#

ceo of TimerTasks

#

executors

hot hull
#

oi, mine atleast fits the theme now

topaz bay
#

This looks so much fucking better

jovial warren
#

agree to disagree definitely

topaz bay
#

Now all they did to do is widen the actual code browser

hot hull
#

WELCOME TO THE KORM FIELDS

heady birch
#

@prisma wave Idk I always notice something weird about catching exceptions in an anonymous class though

topaz bay
#

please do shut up

jovial warren
#

Now all they did to do is widen the actual code browser
yeah that might help it a bit

heady birch
#

They seem to fail silently for me

prisma wave
#

yeah me too @heady birch

jovial warren
#

now time to learn Spring

#

what can I actually use Spring for though?

prisma wave
#

I can't express how much I want to pummel the lead engineer behind CompletableFuture to death right now

jovial warren
#

CompletableFuture?

#

why

#

you using Java?

prisma wave
#

mhm

#

i am close to death

jovial warren
#

also, what's wrong with it?

prisma wave
#

I wish they wouldn't fail silently

#

it makes debugging so hard

jovial warren
#

use .join() for testing then

prisma wave
#

i am partly

old wyvern
#

isnt there a exceptionally()?

prisma wave
#

but I don't have the willpower to change everything

#

yes

#

except it doesn't seem to work

old wyvern
#

wdym?

heady birch
#

you got to put the try catch within the future

jovial warren
#

that'll probably work

old wyvern
#

exceptionally must be chained to the stage with the exception btw

prisma wave
hot hull
#

Hey, atleast you're using allman

prisma wave
#

ofc

#

it's not all bad

hot hull
#

Also, catching pokemon I see

prisma wave
#

trying to ๐Ÿ˜”

#

oh shit it works

#

yay

topaz bay
#

youre doing that wrong

prisma wave
#

ik

#

it's all a mess

#

but what part specifically?

topaz bay
#

Are you not able to chain those operations?

prisma wave
#

oh possibly

#

yeah downloadPom returns a CompletableFuture<byte[]> so

topaz bay
#

there should be a function for chaining that that with PomParser#extract

hot hull
#

I'm slightly annoyed you use e instead ex btw KM

topaz bay
#

^

heady birch
#

chain Did you mean Pipeline?

hot hull
#

Oh god

#

Not this again

topaz bay
#

No, I don't....

#

Because its method chaining

heady birch
#

the Netty pipeline is one of human civilisation's greatest acheivements

prisma wave
#

wait no downloadPom is blocking

#

that's why I use supplyAsync

topaz bay
#

yeah? so?

prisma wave
#

I can't chain it

jovial warren
#

yeah downloadPom returns a CompletableFuture<byte[]> so
can you even pass primitive types to generic type params?

prisma wave
#

it doesn't return a CompletableFuture

#

arrays aren't primitives

jovial warren
#

yeah ik that

#

but you're passing a primitive type keyword

#

didn't know you could do that

prisma wave
#

yeah well byte[] isn't a primitive so it works fine

jovial warren
#

also, which Spring Boot version should I use

heady birch
#

latest

jovial warren
#

is using a SNAPSHOT a good idea?

#

afaik SNAPSHOT means it's unfinished

heady birch
#

@prisma wave Huh????

#

Since when

#

I just tried byte[] as a map key

#

It worked

topaz bay
#

?

prisma wave
#

oh I see what you mean

jovial warren
#

also, isn't thenApplyAsync redundant in this case since you've already used supplyAsync

prisma wave
#

I thought you meant chain directly onto the result of extract

#

@heady birch since always I think

topaz bay
#

@jovial warren most likely

jovial warren
#

is using a snapshot version of Spring a good idea by the way?

#

because @heady birch you said latest

prisma wave
#

should be fine

jovial warren
#

the latest is 2.4.0 which is a snapshot

#

okay

#

also tf am I gonna want to depend on for this?

#

like what from Spring do I need?

prisma wave
#

spring data probs

heady birch
#

Depends on what you want to do

jovial warren
#

I'm making a music bot

#

maybe with some per-guild settings

#

so probably Spring Data Redis

#

because me like Redis

heady birch
#

github.comโ€™s server IP address could not be found.

jovial warren
#

haha lol

#

also what's the difference between Spring Data Redis and Spring Data Reactive Redis?

#

because I imagine I'm gonna wanna be using K-V Redis

topaz bay
#

reactive one probably includes a pub/sub framework

jovial warren
#

apparently it says "Access Redis key-value data stores in a reactive fashion with Spring Data Redis"

#

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

#

also I could make a web-based config panel idk yet

#

I'll just leave messaging out of it for now

#

what's Spring Batch?

heady birch
#

I think its for processing big data but ive never used it

#

like large csv files

jovial warren
#

is that something I should be doing?

prisma wave
#

yeah it does

jovial warren
#

generating a project in a zip then importing

prisma wave
#

i prefer to use the intellij one

jovial warren
#

can you make a Gradle project through the Spring option?

prisma wave
#

yes

jovial warren
#

what does one select?

#

Groovy?

jovial warren
#

oh nice

#

okay

#

but this very much lacks options

prisma wave
#

there are more on the next page lol

jovial warren
#

guess I can add them later

prisma wave
#

it wraps the entire website into intellij

jovial warren
#

what do I need to select? Spring and Kotlin/JVM?

#

and then next

#

hold on

#

this is creating a new project

prisma wave
jovial warren
#

what about if I want to convert my current project to Spring

#

or should I just delete it and recreate it

prisma wave
#

that sounds like a bad idea

jovial warren
#

one agrees

prisma wave
#

you'd be rewriting/restructuring everything anyway

jovial warren
#

I guess so

#

so I might as well

#

also idk about you guys but I remember sometimes trying to recreate a project with the same artifact ID in Maven and it say something like the old project already exists in Maven's thingy or whatever

#

does that happen with Gradle as well?

#

also is it the Spring Initializr I want to use to create a project then?

prisma wave
#

yes

jovial warren
#

okay

#

what Java version should I use or does it not really matter all that much

heady birch
#

Eh 8 is a safe choice

jovial warren
#

also why tf is the default version 0.0.1-SNAPSHOT lol

#

what should my version start at?

#

I would've thought 1.0 but according to this, apparently not

#

nvm about that, what's Spring Boot Admin?

#

also I see this uses Gradle's Kotlin DSL

#

also,

@SpringBootApplication
class BardyBotApplication

fun main(args: Array<String>) {
    runApplication<BardyBotApplication>(*args)
}

that's all you get?

prisma wave
#

if you want more look into JHipster

#

now that really does everything for you

jovial warren
#

so how does one use this then?

prisma wave
#

the initalizr is mostly for setting up dependencies

heady birch
#

Jhipster looks wack

jovial warren
#

anyone know how I use this now?

heady birch
#

use what

jovial warren
#

Spring

heady birch
#

make a service to do something in

#

maybe like

#

JDAService

#

annottate with @Service

#

in the constructor do you JDA setup and login

jovial warren
#

I can't do that in the constructor

#

well, not in the ClassName() type of constructor anyway

prisma wave
#

init

jovial warren
#

does it need to take params?

prisma wave
#

what?

jovial warren
#

I mean does the class need to take constructor params

prisma wave
#

which class

jovial warren
#

the service class

prisma wave
#

oh

#

no

#

unless you need any params

jovial warren
#

also there is one thing I miss from Maven

prisma wave
#

which is?

jovial warren
#

and that's auto completion

prisma wave
#

what about it?

obtuse gale
#

hey! can a developer msg me what knows what mongo and redis is and ow ton use it

prisma wave
#

stick to one channel fella

topaz bay
#

Download the all distribution, instead of the bin

#

And you get better completions

jovial warren
#

how do I do that?

topaz bay
#

I'm pretty sure Intellij prompts this

#

When you make a gradle project

#

Go into the wrapper properties file

obtuse gale
#

umm

topaz bay
#

Change bin to all

#

And reload the project

jovial warren
#

okay

topaz bay
#

It's not going to cover every possible thing, but it should give more completions

jovial warren
#

wait is this gonna be 145 MB every time I make a new project?

obtuse gale
#

can some one help me dev

topaz bay
#

No?

#

That's not how the wrapper works

jovial warren
#

and also, by completions, I meant the group and artifact ids

topaz bay
#

Use the package plugin

jovial warren
#

that'll give me auto completions on those?

topaz bay
#

It'll give you a full maven repo searcher

#

Show you all versions

jovial warren
#

which package plugin by the way?

topaz bay
#

Tell you if there's updates

#

The one from jetbrains

jovial warren
#

is it an IJ plugin?

#

ah okay

topaz bay
#

Yes

jovial warren
#

sorry I was searching the gradle plugins repo lol

topaz bay
#

It can add and remove dependencies from your build

#

And it works for gradle and maven

#

It's fire

jovial warren
#

also with DSL do methods like implementation have to have brackets after them or can I use implementation "groupid:artifactid:version" still?

prisma wave
#

the dsl needs brackets

#

bc it sucks

#

well that's not the reason

#

but it sucks

obtuse gale
#

can a dev help me?

prisma wave
#

ask your question fella

#

and this channel isn't for support

topaz bay
#

They're parentheses you nerds

prisma wave
#

no

#

no they're not

topaz bay
#

Yes they are

#

And I will fight to the death over this

jovial warren
#

in the UK we call () brackets

obtuse gale
#

anyone here a dev

#

if so

jovial warren
#

in the US you may call them parentheses

obtuse gale
#

can some one help me

jovial warren
#

what do you want for the last GOD DAMN TIME

ocean quartz
#

ask your question fella
and this channel isn't for support

obtuse gale
#

ik

#

no one helps

jovial warren
#

you've asked about 5 times now

obtuse gale
#

ik

jovial warren
#

what do you expect

obtuse gale
#

no one

jovial warren
#

ask again

obtuse gale
#

xd

#

can some one help me

prisma wave
#

...

jovial warren
#

with what????????????????????????????????

obtuse gale
#

Removing redis and mongo from a pl and making it flat file

prisma wave
jovial warren
#

why tf would you want to remove redis and mongo?

obtuse gale
#

bc

#

i cant afford a good databse

#

๐Ÿ˜ญ

jovial warren
#

redis is ultra fast and mongo is a decent database engine

prisma wave
#

lol

obtuse gale
#

xd

prisma wave
#

you can get free mongo hosting

#

do you have the plugin source?

obtuse gale
#

ik

#

there shit

#

yes

jovial warren
#

MongoDB Atlas isn't shit

prisma wave
#

here's the million dollar question

#

do you know java?

jovial warren
#

make that two million

onyx loom
#

no

obtuse gale
#

it is

jovial warren
#

do you know java?
still waiting on a response

obtuse gale
#

no

prisma wave
#

well then

jovial warren
#

oh ffs

obtuse gale
#

i need redis

prisma wave
#

this is gonna be painful fun

obtuse gale
#

and mongo

onyx loom
obtuse gale
#

x d

#

can u help?

prisma wave
#

I thought you just said you wanted to remove redis and mongo

jovial warren
#

send me the damn code

ocean quartz
#

Not without you knowing Java

obtuse gale
#

it dont work like that

#

no

#

you

ocean quartz
jovial warren
#

send me the damn code

topaz bay
#

Oh what a joy

prisma wave
#

truly

#

I can't wait

#

this is gonna be great and not at all painful

onyx loom
#

๐Ÿ™‚

heady birch
#

No I want to do it

frail glade
#

@prisma wave Holy crap. So this does runtime at a gradle level vs having to put anything in your code?

prisma wave
#

Yep! It looks through your dependencies and generates a dependencies.json file that's read at runtime automatically

frail glade
#

Does it handle package relocating in shadowJar?

prisma wave
#

Not at the moment, although I'm not actually sure it's necessary.

frail glade
#

How does it know where to download the dependencies from?

prisma wave
#

The gradle plugin scans every repository in the repositories block and basically does trial and error (with some caching in future) to see if the dependency is present. If it is, it marks that down. If it doesn't find any it looks inside Maven central and a special repo for spigot at runtime

#

the file it generates looks like this json { "repositories": { "maven": "https://hub.spigotmc.org/nexus/content/repositories/snapshots/", "maven2": "https://oss.sonatype.org/content/repositories/snapshots", "maven3": "https://oss.sonatype.org/content/repositories/central" }, "dependencies": [ { "groupId": "org.jetbrains.kotlin", "artifactId": "kotlin-stdlib-jdk8", "version": "1.3.72" } ] }

ocean quartz
#

That's pretty cool ;o

frail glade
#

Can you have it do maven first?

#

I'm like ready to drop what I have to switch to this already.

prisma wave
#

a maven plugin?

frail glade
#

No like mavencentral

prisma wave
#

oh yeah

frail glade
#

Or will that be pulled from mavenCentral()

prisma wave
#

good question lol

#

I think I've got it set to ignore mavenCentral since that repo is always present

#

but with a bit of refinement I could get that working

frail glade
#

That would be amazing. Can you link the GitHub for this?

#

Only other thing I could think of would be a possible way to change the name of the folder it does the downloads to? Maybe a configuration in the gradle script?

prisma wave
#

That's an option

frail glade
#

Beautiful.

prisma wave
#

although since it's supposed to be a global directory I think that might defeat the point

frail glade
#

Oh so it's not in the plugin folder itself

#

Ahh

prisma wave
#

no everything gets put inside PluginLibraries

frail glade
#

Ahh

#

I would love to be a beta tester when you make those changes to add maven central in it.

prisma wave
#

Great

#

I'll get working on them, shouldn't take long

#

to clarify - it does check maven central, but the gradle script won't explicitly mark it

frail glade
#

Yeah, I was just hoping it would be possible to specify for it to check maven central first before my own stuff.

prisma wave
#

Yeah that makes sense

#

saves requests and for safety

frail glade
#

Yup.

prisma wave
#

I'll see what I can do

frail glade
#

Does this support transitive dependencies too?

prisma wave
#

Yep

frail glade
#

Jesus christ

#

You're like my new favorite person

prisma wave
#

ahaha

#

good to hear it lol

#

It should be pretty cool once it's fully working

frail glade
#

Indeed. Super excited.

topaz bay
#

Woooowwww no one was excited about dependency loader

#

;(

prisma wave
#

I'm sorry to say i've not even heard of that

frail glade
#

Throw me a DM or ping when it's ready to be tested.

prisma wave
#

Will do

topaz bay
#

Its what youre doing

prisma wave
#

well for one thing that's maven

#

and also this is automatic

#

no manual configuration required

topaz bay
#

Its maven cause its almost 4 years old

#

And the automatic part is fun... but still

#

Same thing

prisma wave
#

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

#

mine is cooler though

topaz bay
#

Oh please

#

This project is actually the first thing I ever put in maven central

#

Its what I submitted for my application

distant sun
#

@prisma wave runtime dependencies? ๐Ÿ˜ฎ

prisma wave
#

Yep

#

FANCY runtime dependencies

distant sun
#

dop3

prisma wave
#

Maybe even magic

distant sun
#

Make the directory path configurable pls ๐Ÿ™

prisma wave
#

can do

#

although it still seems to defeat the point ๐Ÿค”

distant sun
#

I want it inside my plugin folder ๐Ÿ˜•

prisma wave
#

ah yeah

#

fair enough

distant sun
#

:)

#

ty for taking my suggestion into account and turn this into a project

#

โค๏ธ

prisma wave
#

haha np

#

it's good people are interested

distant sun
#

ly

prisma wave
#

for a beta at least

frail glade
#

Ty

prisma wave
distant sun
#

wait

#

are they runtime dependencies or not? :))

prisma wave
#

they are

#

they're downloaded at runtime

frail glade
onyx loom
#

pog indeed

rotund egret
prisma wave
#

that's... Scary

rotund egret
#

Lmao

#

First time I've seen it

onyx loom
#

tasty

#

@prisma wave is there any downsides to downloading at runtime?

prisma wave
#

No massive ones

#

it increases startup speed ever so slightly

onyx loom
#

ebic

prisma wave
#

and possibly breaks some obscure spigot premium rule idk

onyx loom
#

f spigot

prisma wave
#

But in general yeah it's a better solution than shading

#

F spigot indeed

rotund egret
#

I doubt it, pretty sure Griefdefender downloads at runtime

prisma wave
#

Yeah featherboard too

#

afaik as long as it runs offline after initial startup it's fine

rotund egret
#

Luckperms I think does as well?