#dev-general

1 messages ยท Page 269 of 1

hot hull
#

OS, if someone is looking for that specific thing they'll find it

#

Putting it on spigot is ew, unless you plan on maintaining it

oblique heath
#

i think putting it on spigot is good especially if you dont have anything there yet

#

rack up those downloads so you can eventually put up paid plugins

half harness
#

wdym "if someone is looking for that specific thing they'll find it"

oblique heath
#

also OS because you can have a portfolio of previous works

#

that people can easily see when they want you to do something

hot hull
#

Example, I made an offline server addition for geyser and floodgate, wasn't merged to the plugin, so if someone is looking for that specifically they can easily find it on github

hot hull
oblique heath
#

exactly

#

that's what i'm in the process of doing

hot hull
#

Code is a mess tho, cause old

half harness
#

my code is probably a mess

oblique heath
#

old code > no code

half harness
#

open sourcing my messy code ๐Ÿ˜ฌ

hot hull
#

I mean I got code lol

dawn hinge
#

could clean it up before open sourcing it :)

hot hull
#

Can't say I'm lacking repos

half harness
#

๐Ÿ‘€

oblique heath
#

get to triple digits

hot hull
#

Tofpu, that's effort tho

oblique heath
#

or quadruple digits

half harness
#

i spent like 15 minutes yesterday removing most of my static stuff in one of my plugins

hot hull
oblique heath
#

digits of repos = digits of salary

hot hull
#

If only

oblique heath
#

๐Ÿง 

hot hull
#

Write a hello world in each language

#

Seperate repos ofc

oblique heath
#

naturally

#

if you come up with a decent solution within a plugin then pull that code out and make it a standalone library

hot hull
#

Already did for something

oblique heath
#

erm

hot hull
#

I'm stupid, excuse me.

oblique heath
#

whaat does that do

wanton sentinel
#

How do I make several JS files for discord.js?

#

and link them to my index.js?

hot hull
#

Ivan, an assortment of plugins for a facs server

hot hull
oblique heath
#

interesting

#
public void addCommands(final CommandBase... commands) {
        Arrays.stream(commands).forEach(this::addCommand);
    }

how have i never seen this syntax before ๐Ÿ˜ 

#

this is revolutionary

hot hull
#

Don't judge the code too bad tho

oblique heath
#

oh i'm in no position to judge

steel heart
#

probably the vararg

oblique heath
#

the (Object... objects)

#

though i was never shown how to use the stream API so i guess that's probably why i was never shown this

steel heart
#

Idk it acts like this: x(new Object(), new Object()) but then in the method it's an array

oblique heath
#

i see

#

that's pretty freaking handy ๐Ÿ˜ฆ

hot hull
#

Very yes

steel heart
#

so just remove the new Object[]{...} part

hot hull
#

Imaging having to do method.something multiple times

#

I mean the code is probably still cleaner than most spigot plugins

#

But oh well

steel heart
#

I mean many plugins would be substantially better if it wasn't for their miserable ability to abuse static

hot hull
#

I only abuse static a tad in there

#

But it's dependencies so it kind of makes sense

half harness
#

what is "coupling"?

#

I've heard that coupling is the reason why you shouldn't use static

steel heart
#

hard/tight coupling probably

half harness
#

^ that

#

what is it?

#

I've googled

hot hull
#

Tight ๐Ÿ˜

half harness
#

but im confused

steel heart
#

Well that's a very good reason not to use static in fact

#

Well it means your code gets hardly coupled Idk do you know what coupling in general means?

#

If now it's the notion of two things being connected sort of

half harness
#

but i dont get how it goes into java

steel heart
#

Well because everything you do in java is to connect different objects with each and another

half harness
#

i guess

oblique heath
#

tighter coupling means you'd need to change more parts of your code per change to the design

half harness
#

does static have tight or loose coupling?

#

sorry i noob

oblique heath
#

all this talk about coupling seems very familiar compared to the new micro architecture hype

steel heart
#

well tight coupling would for instance be this design

class Class {
  Class() {
    new BukkitRunnable() {
      public void run() {
        //code
      }
    }.runTask(Plugin.getInstance());
  }
}

//then
new Class();
half harness
#

huh

steel heart
#

In this case we have tightly coupled the instantiation of a BukkitRunnable with the Class's constructor and then tightly coupled the runTask method with the static singleton of main

#

It's bad since it effectively "hides" code and makes your code more complex unnecessarily

half harness
#

uhhhh

hot hull
#

efe?

steel heart
#

Comparing it to this for instance:

class Class {
  Plugin plugin;
  Class(Plugin plugin) {
    this.plugin = plugin;
  }

  void run() {
    new BukkitRunnable() {
      public void run() {
        //code
      }
    }.runTask(plugin);
  }
}

//then in main perhaos
Class cls = new Class(this);
cls.run();
#

now it's more loosely coupled allowing us for easier substitution as well as more maintainability since the consumer is starting the task and the consumer has to pass the plugin instance making it more obvious in addition of hiding less stuff.

#

Though sometimes you might wanna hide stuff or abstract away it. The problem is that many people do this wrong.

#

a static utility method taking ten parameters is rarely an actual utility method

#

more of a messy static method that someone didn't know where to place it

half harness
#

๐Ÿค”

steel heart
#

I mean, might not be so clear why we should go with code snippet 2 over 1 but youโ€™ll probably encounter these problems yourself in larger projects

prisma wave
lost kestrel
#

can anyone help me pls

#

i made a new greeting with mimu and it says i have to use {embed: greet} i dont know what code to use

heady birch
steel heart
#

Where's the moon

#

cap ๐Ÿ‘ฒ ๐Ÿงข stopthecap

lost kestrel
#

is tha ta noj

#

a no*

steel heart
#

@lost kestrel what is mimu

lost kestrel
#

a bot

steel heart
#

Idk

#

If you'd show me maybe I can help

lost kestrel
#

big sad

half harness
#

bm did you make ep 1 yet

#

you're very overdue

prisma wave
#

uhhhhhhhhhhh

#

yeah

#

sure

lunar cypress
#

๐Ÿ˜ณ

forest pecan
#

if you learn web dev you would know tight coupling

#

lol

half harness
#

๐Ÿ˜ 

#

also i know someone that wants to code... anything I should do?

marble wraith
#

how much the cooldown duration for using =cr command?

obtuse gale
#

alot

hallow crane
#

Why is singleton bad in the context of a spigot plugin Main Class?

prisma wave
#

it's not really

#

it already is a singleton

#

well

half harness
#

but-

hallow crane
#

Yeah I know its not really but someone said people are telling them to use DI instead

prisma wave
#

because DI is better

hallow crane
#

It's not

prisma wave
#

just because it is a singleton, that doesn't mean you should be using static access everywhere

prisma wave
half harness
#
public class SomePlugin extends JavaPlugin {
    private final static SomePlugin plugin = new SomePlugin();
    public static SomePlugin getPlugin() {
        return plugin;
    }
}
```๐Ÿ‘€
hallow crane
#

no youcant do that

#

SomePlugin (extends JavaPlugin) somePlugin;
somePlugin = this;

prisma wave
#

gross

hallow crane
#

It follows all OOP standards (because it IS in the oop standard) and there are no performance tradeoffs

half harness
#

coupling fingerguns

prisma wave
#

Static getters aren't OOP

hallow crane
#

Singleton concept is

prisma wave
#

ehh

#

debatable

hallow crane
#

come on its not debatable

prisma wave
#

Just because the pattern exists, that doesn't mean it's proper OOP

hallow crane
#

Why would they be used and implemented in major projects if they weren't proper

#
Singletons solve one (and only one) problem.

Resource Contention.

If you have some resource that

(1) can only have a single instance, and

(2) you need to manage that single instance,

you need a singleton.

There aren't many examples. A log file is the big one. You don't want to just abandon a single log file. You want to flush, sync and close it properly. This is an example of a single shared resource that has to be managed.

It's rare that you need a singleton. The reason they're bad is that they feel like a global and they're a fully paid up member of the GoF Design Patterns book.

When you think you need a global, you're probably making a terrible design mistake.
#

That is exactly why I am using singletons ONLY for my main class and nothing else.

half harness
#

bm u should join vc

prisma wave
#

I would argue the main class isn't an exception

hallow crane
#

Yes

prisma wave
#

do i have to

hallow crane
#

yeah

prisma wave
#

๐Ÿ˜ฆ

#

anyway

hallow crane
#

DI, ok, but Singleton is the pattern that is used by JavaPlugin so....

#

Imma use it

prisma wave
#

the main class isn't a traditional singleton. It doesn't explicitly control its own instance, and can in fact be instantiated twice in the context of a /reload

hallow crane
#

It's forgotten though

#

Garbage collected, correct? snapped out of existence

prisma wave
#

and can in fact be instantiated twice in the context of a /reload
actually that's not true, my bad

hallow crane
#

No you're right

#

It does

half harness
#

๐Ÿ‘€

prisma wave
#

Are you sure?

hallow crane
#

But it is snapped

prisma wave
#

I thought reload just calls onDisable and onEnable

hallow crane
#

No

#

It has to reinstantiate the entire process

prisma wave
#

okay

#

either way

#

the main class doesn't explicitly control its own instance, so it's not a traditional singleton

hallow crane
#

ok

prisma wave
#

that's not necessarily bad design, but you should at least use DI

hallow crane
#

Ok.

#

sure

prisma wave
#

ty

hallow crane
#

ok

prisma wave
#

static bad

hallow crane
#

ok

half harness
#

welp

hallow crane
#

(he's wrong)

#

yeah

hot hull
#

elara good

hallow crane
#

elara SLOW

hot hull
#

yako stfu

onyx loom
#

wrong

prisma wave
#

oh really??

half harness
#

singleton or di

prisma wave
#

oh is that so

onyx loom
#

elara very fast

hot hull
#

:))

prisma wave
hallow crane
#

elara needs to be 0.5ms

#

O(1)

#

LOL

prisma wave
#

0.5ms is pretty slow

onyx loom
#

๐Ÿ˜ฎ

prisma wave
#

couldn't be elara

hot hull
#

The execution could be faster

onyx loom
#

frosty how would they make it faster?!!?!?!

hot hull
#

Jvm compiler!!

onyx loom
#

yes !!!

hot hull
onyx loom
prisma wave
#

well we are preparing for that

#

need to mentally prepare myself for the hell that's gonna be typing and understanding bytecode

onyx loom
#

dw king

#

u got this king

prisma wave
#

๐Ÿ˜ค

ocean quartz
#

Sounds fun ๐Ÿ˜ฌ

hot hull
#

Matt, what sound even more fun is finishing triumph chat!

old wyvern
#

Actually

#

theres one specific thing we forgot

#

#m-o

prisma wave
#

?

#

o

hot hull
#

What's #m-o

old wyvern
#

channel

#

just abbrv coz I didnt want to type the entire thing

ocean quartz
#

I wanna work on the expansions but i first need to finish the basics ๐Ÿ˜ฉ

onyx loom
#

โ˜น๏ธ

prisma wave
#

see im not the only person who procrastinates!

old wyvern
#

๐Ÿฅฒ

hot hull
#

Fuck this rona man

ocean quartz
#

Ikr, i need this shit to end

static zealot
#

random info. I've finally got BF II downloaded. Even on low it barely runs ๐Ÿ˜ฆ Sad day

#

oh

#

wrong channel

#

fuck

#

me

hot hull
#

Kinky Blitz

static zealot
#

xD

#

damn this sucks man. The game is so nice. and also Nvidia Geforce Now doesn't accept the game since its in origin games launcher even tho I got it thru Epic Store

#

btw BattleFront II is free on epic store still. if anyone wants to get it

hot hull
#

Wrong channel again

#

You wanna be fucked again?

static zealot
#

yes please

ocean quartz
#

@prisma wave What would you do?

val users = mutableSetOf<ChatUser>()
fun getUser(uuid: UUID) = users.find { it.uuid == uuid }
// or
val users = mutableMapOf<UUID, ChatUser>()
fun getUser(uuid: UUID) = users[uuid]
prisma wave
#

map is nicer

#

any reason you'd want to use a Set?

ocean quartz
#

I thought it was odd to have uuid both as key and inside the value object

prisma wave
#

I don't think so

ocean quartz
#

Fair yeah, i'll do map

prisma wave
#

You're associating by the "primary key"

#

๐Ÿ’ฏ

hot hull
#

I have uuid as value even though I store it almost all the time

jovial iris
#

Hi i really need help

#

like fast

steel heart
#

?help

compact perchBOT
#
FAQ Answer:
ยป Give the helpers some details
ยป Ask suitable questions
ยป Be polite
ยป Wait

Source

jovial iris
#

In a plugin that i built

#

when i extracted the plugin, i found a file called "yggdrasil_session_pubkey.der"

#

Someone told me that they are almost positive its a session ID stealer

#

and I'm not sure

#

can anyone tell me what that means? or if its not meant to be there? because im not sure why its there

static zealot
#

anything inside it?

#

also can you link plugin code?

#

is it MCAuthLib?

ocean quartz
jovial iris
#

ok

#

so its not a session ID stealer?

prisma wave
#

yggdrasil is mojang's auth lib

jovial iris
#

the only way i can think it getting there is if when i built artifacts in intellij is if it was malicious

ocean quartz
#

What the hell even is a "session ID stealer"?

prisma wave
#

i doubt it's malicious

#

.der files contain certificates

#

not much you can do with that

jovial iris
#

Basically its able to steal your session ID, allowing the person to log in to your minecraft account without a password @ocean quartz

ocean quartz
#

How would a plugin do that? It's nothing to do with the client

half harness
#

can't u just log out and in and make a new SID?

#

that too

jovial iris
#

ok tyvm

static zealot
#

in java is it better to do String.valueOf(int) or is it ok to do "" + int ?

half harness
#

"" its shorter ๐Ÿ™‚

ocean quartz
#

First one

half harness
#

welp

#

lol

#

xD

#

whats difference?

#

o

#

what is it?

static zealot
#

well I mean I'll trust Matt anyways xD even if he gives me the wrong answer lmao

#

I'll never trust you lmao

half harness
#

lol

ocean quartz
#

Iirc "" + int will do more, it'll use a string builder to create the final string, while String.valueOf basically calls Integer.toString which is less steps

static zealot
#

wait but then Why shouldn't I use Integer.toString() ?

#

or should I use that lmao xD

steel heart
#

Some compilers switch String.valueOf to "" + x

static zealot
#

I don't know a lot of java methods

steel heart
#

Well String::valueOf is a null safe version of Object::toString

#

and Integer::toString just fabricates a string representation of an integer

static zealot
#

That's a lot of words that I need google translate for lmao

ocean quartz
#

Why does IJ's bytecode viewer suck for java

ocean quartz
lunar cypress
#

not generally, no.

#

that is, it isn't specified that way

#

And on later versions a lot has changed

prisma wave
#

yeah it uses a fancy MethodHandle thing in newer versions iirc

lunar cypress
#

yeah

#

The real reason you should be using String.valueOf or Integer.toString instead of concatenation is that the latter is confusing

#

and the former are simply cleaner

ocean quartz
#

That result i got was on Java 15 though, but yeah being cleaner is a better reason

lunar cypress
#

mind telling me the exact process?

#

and the code?

ocean quartz
#

Was just simple

String s = "" + number;
System.out.println(s);

Then just replace it with value of

lunar cypress
#

how did you compile

#

or just run javap -v YourClass

#

and say what major and minor version say

half harness
#

uh ohhhhhhhhhhh

static zealot
#

Java is so fucking messy sometimes.

prisma wave
#

consider using elara instead

static zealot
#

I mean I use kotlin but I'm learning java rn.

stuck harbor
#

im over here learning go

#

pretty cool language from what ive seen from it

#

and ive only really covered the basic syntax

steel heart
#

javascript is nice

stuck harbor
#

but the way scopes are defined in go

#

ewwww

prisma wave
#

scopes?

stuck harbor
#

i mean uhh

#

ya know

prisma wave
#

afaik go's scoping is pretty normal?

#

unless you mean something else

stuck harbor
#

yeah i kinda worded that badly

prisma wave
#

wdym then

lunar cypress
#

I think go is one of the few languages that I genuinely have no interest in learning whatsoever

half harness
#

lol

prisma wave
#

๐Ÿฅฒ

#

In my experience you don't "learn" Go

#

it's very predictable

surreal quarry
#

go learns you

stuck harbor
#

ya know how in go, if you capitalise the name of a function

prisma wave
#

oh

#

yeah

#

meh

#

I don't have a problem with that

stuck harbor
#

i like using lowerCamelCase or whatever its called, and capitalising the first letter feels odd to me

prisma wave
#

definitely a unique way of doing it, but not necessarily a bad way

lunar cypress
#

I think go is one of the few languages that I genuinely have no interest in learning whatsoever
Go, C#, what else

steel heart
#

C++ ?

stuck harbor
#

C++ good

steel heart
#

Ye its cool

static zealot
#

I forgot all the C++ I've learnt in 4 years lmao

prisma wave
#

Not a fan of C#

stuck harbor
#

also learn rust or learn death

prisma wave
#

Rust

#

๐Ÿคค

lunar cypress
#

C++ sucks but it's certainly more interesting than the others I've listed

prisma wave
#

C++ actually takes thought to learn

stuck harbor
#

yeah it hurts my head

#
{ (and you can initialise variables here for some reason)

}
#

head hurt

lunar cypress
#

wdym

#

{ int i = 0;
} valid java

stuck harbor
#

i have very specific problems with most languages haha

lunar cypress
#

or do you mean that legacy function parameter notation from C

stuck harbor
#

idk i stopped learning C++ after a while

#

i wanna get back at it tho

steel heart
#

I like javascript

#

it's clean

stuck harbor
#

runs

prisma wave
stuck harbor
#

i use js for machine learning sometimes

steel heart
#

still abusing Dave ๐Ÿ˜ฆ

stuck harbor
#

O(n)

#

my guy

#

thats not a great O notation

prisma wave
#

better than O(n!)

steel heart
#

O(-1) is the best

prisma wave
stuck harbor
#

i mean, yeah

stuck harbor
prisma wave
#

look

steel heart
lunar cypress
prisma wave
#

i tried to use maps

#

but im not writing a hash implementation for every single type we have

steel heart
prisma wave
#

so a list of entries is easier ๐Ÿ™ƒ

prisma wave
steel heart
#

you sure?

prisma wave
#

but any constant time can be reduced to O(1)

#

I think so?

stuck harbor
#

wouldn't that make it go down in cost?

lunar cypress
#

no

steel heart
#

haven't seen the power of the dark side then Ig

lunar cypress
#

that is not how this works

stuck harbor
#

lol wheeee

prisma wave
lunar cypress
#

The way this works is like this:
You describe an operation using a polynomial function. Then you look at the part of the polynomial with the strongest growth and take out constant factors. now you have big O

#

there is a formal definition for this as well but it's probably easier to understand this way

prisma wave
#

3n^2 + 2n + 3 => n^2

lunar cypress
#

And although yes, practically you can't have -1, you can still derive big O from it

stuck harbor
#

and coolio

lunar cypress
#

which would be 1 because -1 = -1 * 1

#

or -1 * x^0, if you will

stuck harbor
#

alright thanks

#

:)

prisma wave
#

anyone wanna COC?

lunar cypress
surreal quarry
#

sure BM

old wyvern
#

wait

prisma wave
#

Cool

#

ayy

surreal quarry
#

ayy

#

waht

#

thats raw

old wyvern
prisma wave
#

hot

#

would be nicer in elara though ๐Ÿ™‚

old wyvern
#

true

#

elara js?

#

xD

prisma wave
#

๐Ÿ˜ฎ

old wyvern
#

I mean that probably wont need much work

#

but yea xD

prisma wave
#

idk lol

surreal quarry
#

did you just add that to barry

old wyvern
#

No

#

The link was generated by a bot

#

lol

surreal quarry
#

ah nice

prisma wave
#

can it start the game?

surreal quarry
#

game.start

#

smh

old wyvern
#

yea

#

one sec

prisma wave
#

ah nice

surreal quarry
#

we need a COC intellij plugin

distant sun
#

Fr

old wyvern
#

There we go

prisma wave
#

bruh this type inference

#

it makes things so hard to debug

surreal quarry
#

the COC?

prisma wave
#

just f# in general

#

probably easier in a proper IDE

#

but here it's hellish

surreal quarry
#

oh you're using f#

old wyvern
#

That was annoying

#

I didnt see the + xD

surreal quarry
#

share code

old wyvern
#

I was like how is this 300 something

surreal quarry
#

lol

old wyvern
#

xD

ocean quartz
lunar cypress
surreal quarry
#

i wanna know why Int.pow isn't a thing

old wyvern
#

Double.pow is

surreal quarry
#

yea ik

#

it just means you gotta do like Int.toDouble.pow(blah).toInt

prisma wave
#

jeez

#

That took way longer than it should have

old wyvern
#

Might have been because of how the language handles <Number>.

#

f#

prisma wave
#

Idk how it handles number

old wyvern
#

I meant kotlin for that

#

Was to the int.pow thing

#

I think the error from the compiler once was that it saw a double or something

prisma wave
#

oh

old wyvern
#

Actually maybe no

#

I have no idea

prisma wave
#
let parts = 
    [0 .. x - 1] 
    |> List.map (fun i -> words.[i])
``` something was going wrong here for ages, idk what though
old wyvern
#

๐Ÿ˜ฌ

prisma wave
#

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

ocean quartz
oblique heath
#

have any of you guys had experience with the PLAN plugin, or more specifically the crazy number of mysql connections it seems to make

obtuse gale
#

> stares at LP with 10 conns per instance by default

oblique heath
#

at least LP lets you specify the amount

obtuse gale
#

Tru

oblique heath
#

which is actually very much appreciated, pretty much any setting i'd realistically want to change is available to be set

obtuse gale
#

LuckPerms ๐Ÿ˜

steel heart
#

luckperms added fabric support

#

remarkably quick tbh

#

nice one oliver

ocean quartz
#

@lunar cypress Oh yeah, 15 uses makeConcatWithConstants

frail glade
#

Damn, Kotlin has been pumping out new versions fast recently. Wonder why.

onyx loom
#

they scared of elara

ocean quartz
frail glade
#

Who's that?

onyx loom
#

andrey breslav ๐Ÿ˜

#

leader of kotlin

static zealot
#

ex*

onyx loom
#

yes

ocean quartz
#

One of the co founders of Kotlin

static zealot
#

was he a good guy?

onyx loom
#

good question

ocean quartz
#

Was he? @prisma wave

static zealot
#

hmm

#

he's ex Kotlin

#

he's not co founder of Kotlin according to his LinkedIn

#

yo I'm going to make a LinkedIn just to show people why not to hire me.

#

I wonder if singing in with google account is a good idea

onyx loom
#

using ur real name absolutely isnt

ocean quartz
#

I guess project lead, i think he was founder no co, yeah

static zealot
#

ye I'm going to make an account called Blitz Gamer

#

and gonna say I'm the best time waster

prisma wave
static zealot
#

going to ruin my future

prisma wave
#

He basically designed it all

onyx loom
#

ah. great man then!

static zealot
#

ah that's why he says ex-Kotlin

prisma wave
#

well

static zealot
#

because he was Kotlin

prisma wave
#

He forgot to add tuples

#

So no

#

Evil man

onyx loom
#

๐Ÿ™„

#

still dont understand what a tuple is

#

u said "a list but not a list"

static zealot
#

In mathematics, a tuple is a finite ordered list of elements. An n-tuple is a sequence of n elements, where n is a non-negative integer. There is only one 0-tuple, referred to as the empty tuple. An n-tuple is defined inductively using the construction of an ordered pair.

prisma wave
#

It's usually a very short, immutable sequence of values

onyx loom
#

terrible idea

prisma wave
#

Usually used to return multiple values

#

Not rly

onyx loom
#

no

#

i am right with everything

prisma wave
#

Pair<A, B> < (A, B)

ocean quartz
#

A to B > ^

prisma wave
#

That's still a Pair though

#

You couldn't put that as a map key

#

Whereas a tuple could

ocean quartz
#

Fair

lunar cypress
static zealot
#

yo someone can give me a wiki or a course or something for java? and I'm not talking just basics and just briefly explaining them. I want something to explain me in more detail lets say. there are terms and stuff I don't understand or don't even know about or how to use. is oracle docs good? xD

onyx loom
#

yea sure

prisma wave
#

oracle docs are pretty good

onyx loom
static zealot
#

Kaliber I've read the entire docs of kotlin

prisma wave
static zealot
#

twice

onyx loom
#

oph yeah i boosted server

static zealot
#

or maybe even 3 times

onyx loom
#

๐Ÿ˜Ž

static zealot
#

wait elara has a discord server?

prisma wave
#

Yup

onyx loom
#

wow

#

uncultured

prisma wave
#

Or a matrix

static zealot
#

you guys ever knew this?

The name Elara is a girl's name of Greek origin.
Elara, a lover of Zeus who gave birth to a giant son (ouch); it's also the lovely name of one of the moons of Jupiter.

prisma wave
#

Didn't know the first bit

onyx loom
#

it's also the lovely name of one of the moons of Jupiter
๐Ÿ‘

prisma wave
#

But it was named after the moon yeah

static zealot
#

yeah

#

good thing the moon was named

#

after the girl

#

xD

onyx loom
#

shoulda called it Odrigga

static zealot
#

welp idk how long the docs of java are but see you on the other side

prisma wave
#

They're pretty detailed

#

What exactly are you looking for?

static zealot
#

everything

#

xD

prisma wave
#

o

#

I thought you knew java lol

static zealot
#

well I know basics and stuff but if it is to make a big project you'd see so much shit in it that you'd die just from looking at the first 3% of it

prisma wave
#

fair enough

static zealot
#

well at least that's what I think

#

never tried

#

taking on a big project

#

xD

prisma wave
#

java -> kotlin is probably easier than the other way around

#

So

#

Yeah

static zealot
#

I mean I've taken a java course. not yet fully done I have like 1 week left but they offered their own custom classes to make it easier and stuff and dind't really explain. well it would probably be helpful for someone that never programmed but I have 4 years of C++ so the basics are not hard for me to understand for a lot of languages

prisma wave
#

You should find java easy then

#

With 4 years of C++

static zealot
#

yeah 4 years but believe me wasn't that much xD

#

like the teacher was great

#

and gave us a lot of tips not just about programming just life and other stuff. One of the best person I've ever met but due to us having a big exam after we finish high school to go to uni she head to spend most of the time to teach us what the exam required

regal gale
static zealot
#

like I can give you the hardest problem on the exam to see what's all about xD

#

it will take a while to translate unless google helps xD

prisma wave
#

Ok lol

static zealot
#

not that this will help anyone just to understand what the hardest thing was to do after 4 years of teaching.

onyx loom
#

Q1:
Print Hello World in c++
10 marks

static zealot
#

nah first question is always some simple math problem

#

like this was the first 3+5.0/2+2 and you have 4 variants to chose from

#

second is a recursive function

#

there are like 9 questions but they get "harder" very quick I guess

lunar cypress
prisma wave
#

yeah that's what I meant

lunar cypress
#

And yes that's isomorphic to a matrix with one row/column

prisma wave
#

I guess that's also a polar coordinate though lol

obtuse gale
#

I mean after all it's just a pair lol

#

You can read and interpret it however

lunar cypress
#

Well, it is one possible representation of an abstract concept

#

This is what the linear algebra I'm doing right now is all about

forest pecan
#

im so depressed i made a big ass sorter in mc and it doesnt work

#

it took so long to build

obtuse gale
half harness
#

rip

obtuse gale
#

The widespread general "Server Optimization Guide" will fuck with hopper transfer rates

#

Messing with sorters

#

@forest pecan

#

can someone help me setup composter php im first time using it and i dont get it from toutorials its too much for me, but i really need it for my mc server website

#

dm me if you can help

forest pecan
#

the redstone

#

its broken

#

like the item just doesnt even go into the chest

#

lol

static zealot
# prisma wave Ok lol

welp I've done it xD ```yml
The "expenses.in" file has 10^6 or less lines, each line containing three natural numbers in the range [1,10^2], representing, in this order, data on one purchase: The type of product purchased, the number of such products purchased and the price of a product. The numbers on the same line are separated by a space.
TODO: Print on screen the biggest sum spent on all products of the same type and the number of products that the sum was spent on. Design a runtime-efficient algorithm.

Example: If the "expenses.in" file has the contents under, on the screen will be displayed: 26 2

4 1 10
1 16 1
4 2 8
2 1 5
1 5 2

Extra todo: Describe in natural language the designed algorithm, justifying its efficiency.

#

this is what 4 years of C++ required from us xD

#

its just about being careful at reading the instructions. because they literally had 15 lines explaing this shit. and the words used are usually very weird. They're doing that intentionally. sometimes they even have to give points to everyone because their instructions are not specific enough.

#

also you're welcome for the xp lmao

prisma wave
#

Oof*

#

Let me have a look in the morning

#

Late now

static zealot
#

late? its 3 am here so must be 1 am for you

jovial iris
#

?paste

compact perchBOT
#
FAQ Answer:

Paste Services
When asking for help with a config/menu/code issue please use one of these:
(However we do prefer if you used our paste :))
โ€ข HelpChat Paste - Usage
โ€ข Hastebin

jovial iris
#

hastebin seems to be broken r/n

static zealot
#

use another pasting service like the helpchat paste or pastebin since they have a dark theme now

#

even tho its not that good

jovial iris
#

oh ok

#

Basically, I'm getting errors on line 83, where it says "boolean current is already defined in the scope", yet when i comment that line out, when i try to use "current" below that, it breaks and says no defined variable. Am I doing something wrong?

https://paste.helpch.at/cizidomihu.js

static zealot
#

that's a lot of else - if's

jovial iris
#

Is there anything im doing wrong thats throwing up the error? it worked before but now its no longer working =/

forest pecan
#

I have one question

#

why are you using Boolean instead of boolean?

obtuse gale
#

Tristate thinksmart

static zealot
#

because he's a cool kid

obtuse gale
#

WAIT I shit you not Bungee components api uses Boolean as tristate for decorations such as italics, bold and that kekw

static zealot
#

Oliveoil, don't lkill me I was joking

forest pecan
#

fefo should i stream smp today

obtuse gale
static zealot
#

yes please

#

give link

#

to twitch

forest pecan
#

my item sorter

#

doesnt work

#

ugh

#

im going to stream in 20 min

static zealot
#

its pretty easy to make one

forest pecan
#

to prepare stuff

static zealot
#

2 repeaters, 1 torch 4 redstone I think

forest pecan
#

its a multi item sorter

static zealot
#

and 2 or 3 hoppers

#

for each item

#

ah multi items per chest

#

that's hard

forest pecan
#

yeah

static zealot
#

I usually quit at 1 item

#

lmao

forest pecan
#

lol

static zealot
#

I've done a lot of redstone but still there's a lot of stuff I don't know or just don't want to learn

forest pecan
#

sometimes redstone dissapoints

#

sometimes it doesnt

jovial iris
forest pecan
#

very big

#

so ig imma stream

#

lol

static zealot
#

k lol

#

link ?

jovial iris
#

wait what

static zealot
#

he's gonna stream SMP

forest pecan
obtuse gale
#

ebic

jovial iris
#

blitz is there any chance you could help me figure out whats wrong? its still broke

static zealot
#

nope. I'm just gonna break it even more.

#

lmao

jovial iris
#

Well darn

static zealot
#

oh 5 viewers

jovial iris
#

can anyone else help? ;w;

obtuse gale
#

Damn, I love it when I live chat with paypal for like 2 months going back and forth, and they finally wanted to schedule a call, and its literally just a switch they need to flip on their end

jovial iris
ocean quartz
steel heart
#

nullability ๐Ÿคก

hot hull
#

@prisma wave How jucky is this?

        Stream.of(
                new CropGrowthListener(boosterStorage),
                new EntityDeathListener(boosterStorage),
                new McMMOGainListener(boosterStorage),
                new ShopSellListener(plugin)
        ).forEach(it -> {
            if (!it.isPluginInstalled()) {
                logger.log(Level.INFO, String.format(
                        "Skipping %s registration, as plugin %s is not installed.",
                        it.getClass().getName().replace(".", " ").split(" ")[4], it.getRequiredPluginName()
                ));
                return;
            }

            it.initializeRequirements();
            pluginManager.registerEvents(it, plugin);
        });
obtuse gale
#

lmao java

hot hull
#

:C

prisma wave
#

Hmm

#

Fine, I guess

hot hull
#

quick question, can I just map.toString() -> write to file

lunar cypress
#

Quick answer, yes

#

But I presume your real question is if you can read it to a map again

hot hull
#

mhm

hot hull
onyx loom
#

Map.fromString ๐Ÿ™ƒ

hot hull
#

Oh yea not even using a map, it's a set

winter iron
#

@prisma wave

plugin.server.onlinePlayers.map { it.name }.filter { it.startsWith(args[0]) }
``` can it be simplified?
prisma wave
#

I don't think so

winter iron
#

damn ๐Ÿ˜ฆ

lunar cypress
#

Pls use sequences

winter iron
#

heh

obtuse gale
#

halp

#

forEach not in order

distant sun
#

or use filter { it.name.startsWith(args[0]) }

distant sun
#

that means not a HashMap / HashSet

obtuse gale
#

order doesnt matter tho does it

#

i mean

#

like its all running at the same time

#

and in the wrong order

#

and its just an arraylist

distant sun
#

mhm

#

dunno then, sorry

#

I dont use forEach too often

lunar cypress
#

@obtuse gale code?

obtuse gale
#

one sec

distant sun
#

why the fuck isn't String#format a non-static method smh

surreal quarry
#

its like "blah".format(blah)

#

iirc

distant sun
#

not on java 8

#

d;jdk string#format

ruby craterBOT
#
public static String format(Stringย format, Object...ย args)
throws IllegalFormatException```
Description:

Returns a formatted string using the specified format string and arguments.

The locale always used is the one returned by Locale.getDefault(Locale.Category) with FORMAT category specified.

Returns:

A formatted string

Throws:

IllegalFormatException - If a format string contains an illegal syntax, a format specifier that is incompatible with the given arguments, insufficient arguments given the format string, or other illegal conditions. For specification of all possible formatting errors, see the Details section of the formatter class specification.

Parameters:

args - Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments is variable and may be zero. The maximum number of arguments is limited by the maximum dimension of a Java array as defined by The Javaโ„ข Virtual Machine Specification. The behaviour on a null argument depends on the conversion.
format - A format string

distant sun
#

@quiet depot almost close

#

there we go

quiet depot
#

?

distant sun
#

trim, repeat, charat, concat xD

quiet depot
#

fifth is correct

#

must be reversed oof

#

make issue pls

distant sun
quiet depot
#

that raedme is so ugly tho

#

only the logos r good

ocean quartz
#

Piggy, can you add a โŒ reaction to let us delete the message? (maybe only support+), to reduce spam in #development

distant sun
#

^

winter iron
#

Does Enum#values() return the enum values in order of entry?

distant sun
#

yes

winter iron
#

pog

distant sun
#

d;jdk enum#values()

ruby craterBOT
#
public static Month[] values()```
Description:

Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

Returns:

an array containing the constants of this enum type, in the order they are declared

quiet depot
#

wtf

winter iron
#

LOL

distant sun
#

works very nice pig ๐Ÿคฃ

winter iron
#

still going

distant sun
#

d;jdk Enum#values

ruby craterBOT
#
public static Month[] values()```
Description:

Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

Returns:

an array containing the constants of this enum type, in the order they are declared

quiet depot
#

no 5 is the right one

#

it's just showing a child method instead of the right one

#

the desc is correct tho

distant sun
#

ic

#

gl fixing that xd

winter iron
#

its when people click the reaction

#

it changes

#

๐Ÿ˜ฎ

#

kewl

distant sun
#

wont be a better idea to make the menu work only for the message author @quiet depot ?

quiet depot
#

issue pls

frigid badge
#

I need some opinions.
I have a Mod class which can be enabled, disabled etc.
I also have a UI and some mods can change depending on the ui (e.g. think changing the speed of a player).

Would I have the Mod be able to access the UI and add listeners itself or do I have the UI have the listeners and tell the mod to update?

distant sun
#

wew lemmo asking for help

frigid badge
#

I'm making an abstraction layer between the actual pointers and memory modification

#

so you can just use actual objects and not some memory address

frigid badge
#

@quiet depot opinion

#

@prisma wave opinion?

hot hull
#

@frigid badge Oh hi

quiet depot
#

@frigid badge i say first one

#

dependency inversion rule

frigid badge
#

that would also mean I'd have to have the enable checkboxes be listened on from in the mod

hot hull
#

Wait a second

#

Lemmo making mc ploogin?

frigid badge
#

no

prisma wave
#

This isn't MC right?

frigid badge
#

isn't even java or mc related

prisma wave
#

Yeah I'd say first one again

hot hull
#

Bruh what? "eg. Think changing the speed of a player"

quiet depot
#

e.g. means example

hot hull
#

I know Piggy..

frigid badge
#

is that the only thing you read from that entire message?

hot hull
#

I naturally assumed he was making a plugin by that example

quiet depot
#

he was providing a minecraft specific example to make it more understandable for us

prisma wave
#

UI shouldn't depend on any other part of the application

hot hull
#

No Lemmo, I sorry, I just not very bright

prisma wave
#

Afaik

frigid badge
#

@hot hull it's for cod

#

fyi

old wyvern
#

Is it just for enable/disable lem?

frigid badge
#

nah

old wyvern
#

no I mean as in the effect on the UI

frigid badge
#

nah the UI has sliders and shit

#

dropdowns

#

and they all need to update a mod object

old wyvern
#

Maybe you could try a pattern like MVVM or something then

prisma wave
#

Yea

frigid badge
#

kinda already do that tbf

#

could extend that more maybe

runic flume
#

Does anyone happen to know a really good and easy to use JSON storage (setters and getters ofc) library?

prisma wave
#

Gson

steel heart
#

json simple ๐Ÿคก

runic flume
#

aight, cheers

prisma wave
#

Moshi is faster if you're feeling quirky

hot hull
ocean quartz
#

@prisma wave Any idea what this warning means?
Type mismatch: type parameter with nullable bounds is used T is used where T was expected. This warning will become an error soon

prisma wave
#

possibly

#

Context?

ocean quartz
#
operator fun <T> set(property: Property<T>, value: T) {
    settingsManager.set(property, value)
}

The value

lunar cypress
#

And what is settingsManager.set

ocean quartz
#

<T> void set(@NotNull Property<T> var1, @NotNull T var2);

lunar cypress
#

T can be anything

#

E.g. Any?

#

Then you could be passing null there

ocean quartz
#

But for it to be Any? wouldn't T need to be T?

lunar cypress
#

no

#

T is just a placeholder for a type

#

and Any? is a type

ocean quartz
#

Alright, that makes sense, I guess T : Any fixes it

lunar cypress
#

it should

weary epoch
#

@prisma wave tutorial whenโ„ข๏ธ

prisma wave
#

;-;

#

asap

steel heart
#

okay so if I have git submodule repos, why wont the parent git module repo see any changes in the submodules

ocean quartz
jovial warren
#

sealed interfaces?

prisma wave
#

like a sealed class

#

but an interface

jovial warren
#

yeah I got that part, I was more referring to the purpose

#

like what use could one have for a sealed interface?

prisma wave
#

they're quite niche

#

but Java is adding them so

#

it makes sense that kotlin would follow suit

ocean quartz
#

What is the use of a sealed class btw?

prisma wave
#

in kotlin they're usually for fancier enums

ocean quartz
#

Ooh okok

frigid badge
#

I hate languages having the same keyword but for different things

steel heart
#

fucking java still hasnt added those

prisma wave
#

they're also often good because you can guarantee an exhaustive pattern in something like a when expression

prisma wave
steel heart
#

well isnt a preview

prisma wave
#

in j15

steel heart
#

and its not lts ftr :[

jovial warren
#

Java's added sealed classes, but they're so verbose lol

ocean quartz
prisma wave
#

I think java's implementation is pretty good actually

steel heart
#

"verbosity is good"

prisma wave
#

Kotlin's requires all of the subclasses to be in the same file

#

whereas java lets you spread them out more

jovial warren
#
public abstract sealed class Vehicle permits Car, Truck
steel heart
#

f x( { d o ] -> } [ ds

#

basically every anti verbose language

jovial warren
prisma wave
#

yeah

#

Sealed classes are used for representing restricted class hierarchies, when a value can have one of the types from a limited set, but cannot have any other type. They are, in a sense, an extension of enum classes: the set of values for an enum type is also restricted, but each enum constant exists only as a single instance, whereas a subclass of a sealed class can have multiple instances which can contain state.
@ocean quartz

#

The key benefit of using sealed classes comes into play when you use them in a when expression. If it's possible to verify that the statement covers all cases, you don't need to add an else clause to the statement. However, this works only if you use when as an expression (using the result) and not as a statement.

steel heart
#

epic

#

ebic

lunar cypress
#

sealed classes can be seen as equivalent to sum types/unions

prisma wave
#

indeed

ocean quartz
#

Gotcha, thank you

prisma wave
#

a finite known set of subtypes

jovial warren
#

they're mostly useful when you want to make a class that has a known number of subclasses

prisma wave
jovial warren
#

and you don't want to allow pesky outsiders to inherit from them lol

lunar cypress
#

that's less of a reason, in my opinion

#

because you could just make the constructor internal or something to achieve the same

prisma wave
#

yeah the main benefit is for exhaustive pattern matching afaik

lunar cypress
#

the point really is that there is a fixed set of specialisations

heady birch
#
int getCenter(Shape shape) {
    return switch (shape) {
        case Circle c    -> ... c.center() ...
        case Rectangle r -> ... r.length() ...
        case Square s    -> ... s.side() ...
    };
}

Okay but this is neat though

steel heart
#

oo

winter iron
#

any idea why intellij freezes everytime i try access the Material enum?

winter iron
#

is it just because of the amount of values it holds?

steel heart
#

its humongous

prisma wave
#

make sure you're on latest version

#

that should've been fixed

winter iron
#

i is

prisma wave
#

return match

steel heart
#

return map

#

wow bullies

#

just cuz mine is shortest

heady birch
#

Actually no, in rust, the return is optional, therefore, one could simply use just match ๐Ÿ˜„

steel heart
#

noobs

prisma wave
#
let getCenter(Shape shape) => match shape {
  Circle => shape.center()
  Rectangle => shape.length()
  Square => shape.side()
}
#

๐Ÿ™‚

#

the hero we need

steel heart
#

wait how did I set an integer to Nan ?

prisma wave
#

not the one we deserve

heady birch
#

Not get_center ?

prisma wave
#

you can only borrow so much from rust before you simply become rust

steel heart
#

int x = NaN; doesnt work bruuuuuh

heady birch
#

No upper case, just prefix t_ for types ๐Ÿ™‚

steel heart
#

nested types?

#

t_typeof_(t_typenested)

prisma wave
#

so many purple names nowadays

#

what happened to good old fashioned blue

steel heart
#

what happened to you as well

prisma wave
#

idk

#

i woke up one day and suddenly it was yellow!!

steel heart
#

tier 7 what notion of color does it have?

prisma wave
#

tier 7 sucks

#

worst tier

steel heart
#

ye true

onyx loom
#

man how did u end up 100k xp more than me bm

steel heart
#

Kaliber

prisma wave
#

skill

steel heart
#

tier 7

#

lol

onyx loom
#

we were neck and neck at like tier 6 ๐Ÿ˜”

prisma wave
#

๐Ÿ˜”

steel heart
#

noobs

prisma wave
#

u fell off after your nitro expired

steel heart
#

Tier nine is orange right?

prisma wave
#

but im not gonna grind out xp anymore so someone will probably overtake me pretty soon

#

idk

steel heart
#

I think I saw it on my mobile

onyx loom
#

yes orange

#

#bot-commands conclure

frigid badge
#

depends on what you want to code in js

steel heart
#

make a discord bot

#

or fake virus messages

#

lol

prisma wave
#

you need to learn babel grunt webpack node express angular react and vue and a few others

frigid badge
#

lmao

steel heart
#

angular ๐Ÿ˜ฎ

frigid badge
#

It heavily depends on what you want to use js for

#

cause only knowing plain js won't get you anywhere nowadays

steel heart
#

d;Object

ruby craterBOT
#
public class Object```
Object has 10 methods.
Description:

Class Object is the root of the class hierarchy. Every class has Object as a superclass. All objects, including arrays, implement the methods of this class.

winter iron
#

[18:54:37 WARN]: [PlaceholderAPI] Loaded class net.milkbowl.vault.economy.Economy from Vault v1.7.3-b131 which is not a depend, softdepend or loadbefore of this plugin. What are these random ass warnings i get for multiple different plugins

#

how can i get rid of them

distant sun
#

cant

#

is just another stupid implementation of spigot

winter iron
#

๐Ÿ˜ฆ

#

i cry

distant sun
#

I mean, you can make papi depend on vault

#

and the other plugins

winter iron
#

just by editing the plugin.yml right?

distant sun
#

but I have a feeling that it sometimes display that message anyways

#

yea

#

butttt

winter iron
#

long day

#

no thanks

distant sun
#

some plugins just load dependencies from other jars because that's how spigot works (I guess?)

#

even if they aren't meant to

winter iron
#

It is what it is

distant sun
#

for example ChunkMaster loads kotlin from one of my plugins, even though is shaded on another package

winter iron
#

as long as its not red im good with it

distant sun
#

you can ignore it

forest pecan
#

its not about the color which matters

#

you have to understand what they are

winter iron
#

is fine

distant sun
#

you have to understand what they are
stupid things added by spigot ^

winter iron
#

it dont break server

forest pecan
#

well if a plugin breaks it doesnt stop the server it disables itself

#

unless something malicous or fishy

#

is inside that plugin

winter iron
#

Anyone able to hop on my server and help me test something quick

forest pecan
#

sure

distant sun
#

what does "native" mean on kotlin?

onyx loom
#

kotlin native?

#

it compiles to machine code afaik, instead of jvm/js

distant sun
#

Kotlin/Native is a technology for compiling Kotlin code to native binaries, which can run without a virtual machine. It is an LLVM based backend for the Kotlin compiler and native implementation of the Kotlin standard library.
makes sense

prisma wave
#

yea

#

no JVM

winter iron
#

how would i go about simulation players on my server

#

i wanna test plugin with multiple players but i dont got alts like that

distant sun
#

offline mode

winter iron
#

how does that work

steel heart
#

idk no authentication

distant sun
#

yea

winter iron
#

hmmm

#

what about peformance testing

onyx loom
#

unit tests ๐Ÿ˜ƒ

oblique heath
#

spark ๐Ÿคค๐Ÿคค๐Ÿคค

steel heart
#

mad sus

runic flume
#

Quick question, do I have to close the previous inventory if I wanna open the next one?

hot hull
#

In newer versions yes

runic flume
#

If I do, my cursor goes back to the center

#

It's annoying

steel heart
#

indeed

runic flume
#

If I want to open a new inv, do I have to like replace the items or what

steel heart
#

ye boi

runic flume
#

thats fucked up

onyx loom
#

spigot ๐Ÿ™‚

runic flume
#

wdym spigot

onyx loom
#

minecraft ๐Ÿ™‚

runic flume
#

owh

#

xd

onyx loom
#

dogshit game

jovial iris
#

Bruhh

#

my file isn't building again...

#

I'm not sure why, it says that its building but there is no output file.

#

are there any known reasons why it would just not build?

runic flume
#

Code plz

jovial iris
dawn hinge
#

where you trying to build the file