#dev-general

1 messages ยท Page 156 of 1

surreal quarry
#

wheres your final tho?

onyx loom
#

true

surreal quarry
#

also the indentation again lmao

empty flint
#
method(
  a = a,
  b = b
)```

@surreal quarry I ike that, kinda. It just seems unnecessary

pastel imp
#

bois how tf do I use ' in the lore in DM

onyx loom
#

atleast ur using allman too xd

prisma wave
#

Using allman before I even knew what allman was ๐Ÿ˜Ž

pastel imp
#

it's giving NPE

#

sooo

prisma wave
#

Allman good

pastel imp
#

kinda sucks

prisma wave
surreal quarry
#

yea i guess blocky but it also prevents errors for example if you thought your variable was a type its not, it won't compile

#

but if it just accepted anything, you could run into issues with that

prisma wave
#

There's no cleaner way of doing it really

#

It's the best way that will work in every situation consistently

surreal quarry
#

yea

onyx loom
#

int randomx = (int) (Math.random() * 100000); serious question, whats the (int) for?

empty flint
#

Allman is da wey

surreal quarry
#

its a cast

onyx loom
#

what does Math.random return?

empty flint
#

int randomx = (int) (Math.random() * 100000); serious question, whats the (int) for?
@onyx loom Math.random() probably returns a double

prisma wave
#

a double yeah

onyx loom
#

yea thats what im thinking

surreal quarry
#

yea im pretty sure its a double

onyx loom
#

ok makes sense then

surreal quarry
#

from 0 to 1 or something

onyx loom
#

i just thought u were casting it for no reason ๐Ÿ˜†

prisma wave
#

I wasn't that shit

surreal quarry
#

wait whats allman

#

what am i missing

empty flint
#

wait whats allman
@surreal quarry coding style

onyx loom
#

fun main
{
code
}

#

in a nutshell

surreal quarry
#

ah ok

#

thats ugly

#

lmao

prisma wave
#

Everyone says that

#

It reads better though

onyx loom
#

yea u cant disagree with that

prisma wave
#

You can distinguish where blocks start and end better

obtuse gale
#

yea u cant disagree with that
@onyx loom watch me

prisma wave
#

haters ๐Ÿ˜”

onyx loom
#

i mean i use k&r myself

#

but i dont hate allman

surreal quarry
#

i sorta like it for classes and stuff but like

            if(player.hasPermission("knightzmc.heal"))
            {
                player.setHealth(20);
            }
            else
            {
                player.sendMessage(ChatColor.GOLD + "Sorry, you don't have permission to use " + ChatColor.GREEN + "/heal");
            }```
just looks so much worse than
```java
            if(player.hasPermission("knightzmc.heal")) {
                player.setHealth(20);
            } else {
                player.sendMessage(ChatColor.GOLD + "Sorry, you don't have permission to use " + ChatColor.GREEN + "/heal");
            }```
to me
empty flint
#

it is ugly and I hate it but it's effective in what it does. I use k&r because my work requires it and I don't want to mix ๐Ÿ˜ฆ

#

'it' being Allmann

prisma wave
#

Why does everyone think it's ugly

#

It looks fine in the IDE

#

Smh

surreal quarry
#

idk i think its probably cause im not used to it

prisma wave
#

Yeah I guess

surreal quarry
#

like if i used it for a couple days i would get used to it

prisma wave
#

You do

ocean quartz
#

Personally i don't like it, i find it harder to figure what starts where
But i'll say, it look cleaner

empty flint
#

It makes it easier to fuck up indentation aparently ๐Ÿ˜›

prisma wave
#

Uh

onyx loom
#

how?

prisma wave
#

^

surreal quarry
#

its like the opposite lmao

prisma wave
#

You'd be using an IDE anyway

#

Unless you're insane

empty flint
#

check the if(args[0].equalsIgnoreCase("off")) line

#

and if block

prisma wave
#

I don't think you should be using that code as a good example

#

For anything

#

Lmao

surreal quarry
#

yea lmao

onyx loom
#

๐Ÿ˜†

empty flint
#

Allman only invented it to puff up his commited lines of code provemewrong

prisma wave
#

๐Ÿค”

#

i mean is that such a bad thing?

onyx loom
#

getting paid per line = allman

#

ez money

prisma wave
#

you could just hold down enter for ez money

surreal quarry
#

just changed my editor to allman and formatted it to see lol

onyx loom
prisma wave
#

Ahriwjabtienw

empty flint
#

you could just hold down enter for ez money
@prisma wave empty lines do not count afaik

prisma wave
#

:(

ocean quartz
surreal quarry
#

thats just my settings being weird i think

prisma wave
#

@onyx loom purge that

onyx loom
#

oops

prisma wave
#

Allman good my code from 2017 bad

onyx loom
#

public class KnightzMCRandomTP extends JavaPlugin{ u only have urself to blame. AJ was just following ur footsteps ๐Ÿ˜ญ

empty flint
#

player.sendMessage(ChatColor.GOLD + "You were teleported to X: " + ChatColor.GREEN + randomx + ChatColor.GOLD + " Y: " + ChatColor.GREEN + randomy + ChatColor.GOLD + " Z: " + ChatColor.GREEN + randomz);

chonkers string concatenation holy moly

#

Why would you ever do that to the compiler?

surreal quarry
#

holy christ

quiet sierra
#

If they count the ; just paste that

#

You can infinitely chain ;

surreal quarry
#

blocky send that in a real code block with the java lang

prisma wave
#

๐Ÿ‘€

#

@empty flint I have no respect for the Java compiler

#

Not after what happened ๐Ÿ˜ญ

onyx loom
#

๐Ÿ˜ญ

surreal quarry
#

y'all were talking abt this earlier

#

what happened lmao

#

im interested

onyx loom
#

nasty stuff ๐Ÿ˜ญ

empty flint
#

blocky send that in a real code block with the java lang
@surreal quarry Bruh, ChatColor.applyWhateverTheFuckTheMethodIsCalled('&', "String with &6proper&r colorcodes"

prisma wave
#

Java burned down my house and slaughtered all my family

#

basically

empty flint
#

Not after what happened ๐Ÿ˜ญ
@prisma wave What happened?

prisma wave
#

^

surreal quarry
#

no blocky i mean like ```

#

not `

#

lmao

onyx loom
#
            player.sendMessage(ChatColor.GOLD + "You were teleported to X: " + ChatColor.GREEN + randomx + ChatColor.GOLD + " Y: " + ChatColor.GREEN + randomy + ChatColor.GOLD + " Z: " + ChatColor.GREEN + randomz); ```
prisma wave
#

James gosling in human form came to my house and killed everyone

#

Evil man

empty flint
#

no blocky i mean like ```
@surreal quarry Oh my bad. I misunderstood. Why does that matter tho?

onyx loom
#

@surreal quarry Bruh, ChatColor.applyWhateverTheFuckTheMethodIsCalled('&', "String with &6proper&r colorcodes"
@empty flint translateAlternateColorCodes ๐Ÿ™‚

surreal quarry
#

you can specify a language with ```

prisma wave
#

syntax highlighting @empty flint

#

^

empty flint
#

James gosling in human form came to my house and killed everyone
@prisma wave In human form as opposed to his goose form?

onyx loom
#

evil man

prisma wave
#

His other form is too horrible to mention

empty flint
#

syntax highlighting @empty flint
@prisma wave Whatever, that's not the point of my remark

prisma wave
#

I can't think about it

#

That evil man

surreal quarry
#

@ocean quartz ill give you $20 if you can find a way to implement code blocks into your markdown thing lmao

empty flint
#

James gosling in human form came to my house and killed everyone
@prisma wave And the first thing you did was decide to get back at him by writing disturbing amounts of terribly inefficient string concatenation and forcing the compiler to eat it like it's a fat starving kid at the fair and the code is a cake eating contest?

surreal quarry
#

that would be the only right thing to do in that situation

prisma wave
#

@empty flint precisely

#

My revenge plan was slow and elaborate. Step 1 was to torture the compiler, in hope of giving Java devs everywhere depression

empty flint
#

@ocean quartz ill give you $20 if you can find a way to implement code blocks into your markdown thing lmao
@surreal quarry I'll add another $20 if you can emulate discord in minecraft chat so we can actually share code with eachother while playing the game

#

My revenge plan was slow and elaborate. Step 1 was to torture the compiler, in hope of giving Java devs everywhere depression
@prisma wave Ah but you forgot one thing

surreal quarry
#

ive started a chain reaction of pinging matt

#

thats my bad

prisma wave
#

What's that

empty flint
#

Java devs don't give a shit about your jvm instance fingerguns

prisma wave
#

oh they will

#

Mark my words

#

They will

surreal quarry
#

i think we should delete java from the universe

#

and force kotlin upon everyone

prisma wave
empty flint
#

Mark my words
@prisma wave SkyClojurenet incoming?

prisma wave
#

It has a K in it

#

Sounds good to me

surreal quarry
#

what level is it where you can change your nickname

#

3?

prisma wave
#

you gotta boost

surreal quarry
#

oh ok good

#

im doing that in like 5 days anyways

prisma wave
#

Piss off Barry

surreal quarry
#

barry a hoe

prisma wave
#

When clojure rules the world the first thing I will do is execute Barry

#

Wait no

#

James gosling first

#

Then Barry

empty flint
#

Barry who?

surreal quarry
#

good plan

prisma wave
#

the bot

empty flint
#

I got a friend named Barry

prisma wave
#

Hmmm

surreal quarry
#

@compact perch and your friend

empty flint
#

The bot is called barry?

prisma wave
#

He can go too

surreal quarry
#

we will end all barrys

prisma wave
#

Can't take any risks

empty flint
#

Idk man, Barry is a really nice guy

prisma wave
#

all Barry's will be purged under Clojurenet

surreal quarry
#

safety first fingerguns

prisma wave
#

^

#

better safe than sorry

surreal quarry
#

first barry will give me a lot of xp

prisma wave
#

He could be a significant threat

surreal quarry
#

then we execute barry

empty flint
#

But... I like Barry ๐Ÿ˜ฆ

prisma wave
#

I like this plan

#

@empty flint then you'll be executed too ๐Ÿ™‚

empty flint
#

@empty flint then you'll be executed too ๐Ÿ™‚
@prisma wave What the fuck for?

prisma wave
#

Corroborating with a known Barry

empty flint
#

Also how is this in dev-general and not in off-topic?

surreal quarry
#

this is more of a dictatorial regime. if you don't agree with the plan, you become a part of the plan

prisma wave
#

^

onyx loom
#

im doing that in like 5 days anyways
@surreal quarry get that multi spin fingerguns

empty flint
#

Corroborating with a known Barry
@prisma wave You mean collaborating?

prisma wave
#

Clojure already has a Benevolent Dictator, we just need to remove the "Benevolent"

#

Uh

empty flint
#

corroborating... my sides dude

surreal quarry
#

wdym kaliber

prisma wave
#

Possibly

#

Oh whoops

#

Yeah collaborating

surreal quarry
#

do you get to do the multiplier thing when you boost

onyx loom
#

yes sir

empty flint
#

He's not a known barry though

#

quite a private guy, doesn't like to be in the public eye

surreal quarry
#

im gonna have to learn what boosting gives you cause i feel like theres a lot i don't know

empty flint
#

so he's not known, he's just barry

prisma wave
#

he's known now

#

Clojurenet sees everyone

empty flint
#

oh yeah?

#

find him

onyx loom
#

PUNCHED 3 JAVA USERS IN THE JAW TODAY. HELLA PROUD
still gets me every time

surreal quarry
#

lmaop

prisma wave
surreal quarry
#

i joined the sub

#

im proud to be a part of kotlinmemes

prisma wave
#

Welcome

empty flint
#

still gets me every time
@onyx loom Where is that from?

onyx loom
#

welcome

prisma wave
#

It's great

#

r/kotlinmemes @empty flint

onyx loom
#

kotlinmemes subreddit

prisma wave
#

join

surreal quarry
#

r/kotlinmemes

prisma wave
#

Now

#

It's great

surreal quarry
#

good sub

prisma wave
#

the best some would say

surreal quarry
prisma wave
#

Some very clever people have said that it's the best subreddit, and you know, I think we should believe in them

onyx loom
#

ever thought about if u have job interview and they find ur reddit account bm ๐Ÿ˜ฌ

prisma wave
#

I'm trying not to think about it

surreal quarry
#

honestly we are all praying that our social medias aren't found for jobs and college

onyx loom
#

eh i dont have any anyway so im fine fingerguns

surreal quarry
prisma wave
#

๐Ÿ‘€

#

Where's that from

#

The pinned post?

prisma wave
#

welp

#

They should've used kotlin to write nginx

onyx loom
#

clearly

surreal quarry
prisma wave
#

I am unironically very proud of kotlinmemes

#

It's great

surreal quarry
#

lmao

onyx loom
#

the only perfect thing in this world is Kotlin you uncultured swine
fingerguns

empty flint
#

honestly we are all praying that our social medias aren't found for jobs and college
@surreal quarry Can't find something 17 year old me murdered so a chick I went on a bad date with couldn't stalk me ๐Ÿ™ƒ

prisma wave
surreal quarry
#

impressive

prisma wave
#

21 members is a monumental occasion

#

It should be celebrated in style

surreal quarry
#

yes

onyx loom
#

it only happens once

surreal quarry
#

hopefully

prisma wave
#

Indeed

#

Hopefully

#

Lol

onyx loom
empty flint
#

This was the image btw
@prisma wave SumBody once told me, the world was gonna roll me

surreal quarry
#

lmaoo

prisma wave
empty flint
#

My dumb ass was legit looking for the lyrics in the image

#

because one word in it sounds similar to the beginning

onyx loom
empty flint
#

lmao

prisma wave
#

there we go

#

Perfect

empty flint
#

val chad = Chad(). Beats null into submission on a daily basis.

#

I love this subreddit already

prisma wave
#

It's great

surreal quarry
#

im just glad we know when our lines end fingerguns

prisma wave
#

dumb Java users needing semicolons

#

Couldn't be me

onyx loom
#

๐Ÿคฎ

#

still verbose AF

surreal quarry
#

imagine

prisma wave
#

idiots

#

Cringe idiots

onyx loom
#

images u can hear

surreal quarry
#

thank god

#

i was hoping at least one person got it

prisma wave
#

Can you vote on my new kotlinmemes post pls

#

pls*

surreal quarry
#

should i vote Andrey

onyx loom
#

๐Ÿ™‚

prisma wave
#

vote whoever would win in a fight

surreal quarry
#

"Brian" lmao

onyx loom
#

brian do pretty strong tho ๐Ÿ˜ณ

surreal quarry
prisma wave
#

poor brian

#

Should've used kotlin

onyx loom
#

true

empty flint
#

@prisma wave Why does Kotlin actually let you do Map.put(...) instead of the [...] assignment?

prisma wave
#

why wouldn't it?

surreal quarry
#

you can do either fingerguns

empty flint
#

idk IntelliJ always tells me to convert it to an assignment

#

I was just wondering why

prisma wave
#

because the set syntax is more idiomatic

#

and cleaner

empty flint
#

can you restrict varargs to be a set?

steel heart
#

No

#

But you can convert it?

prisma wave
#

not at compile time

#

But yeah

empty flint
#

I mean converting it doesn't make a difference there. I basically need varargs of key/value pairs and I want to add them to a map in my class

#

just wondering what would happen if the same key was entered twice

prisma wave
#

Map.put overrides

#

So that

#

You're using Pair right?

empty flint
#

yeah

#

basically copying the code from mapOf(...)

prisma wave
#

Good good

empty flint
#

hm if I add a secondary constructor with one more parameter, can I make that parameter not be part of the class?

#

Hm wait it is already so

#

what?

prisma wave
#

Parameters for secondary constructors aren't part of the class

#

That's the point

empty flint
#
class Log {
    constructor(data: String) {
        // code
    }
    constructor(data: String, numberOfData: Int) {
        // code
    }
}```
#

what about this then?

prisma wave
#

what about it

empty flint
#

is numberOfData part of the class?

prisma wave
#

no

#

Neither is data

empty flint
#

ph

#

oh

prisma wave
#

secondary constructors are parameters only

empty flint
#

so in the secondary constructor, can I call the primary constructor and add stuff?

prisma wave
#

Yes

empty flint
#

Like in java you can do

prisma wave
#

in kotlin it's kotlin constructor(blah) : this(blah.something)

empty flint
#

im not sure that's correct

#

yeah

#

ok

#

'that' being my java assumption

#

not sure how it went in java anymore

prisma wave
#

mhm

empty flint
#

it's been so long

prisma wave
#

lol

#

That's how Java does it yeah

ocean quartz
#

Or in that case it could also go like:

class Log(data: String, numberOfData: Int = 0)

And have a default value so it's not always required in the constructor nor need a second one

prisma wave
#

^

empty flint
#

Or in that case it could also go like:

class Log(data: String, numberOfData: Int = 0)

And have a default value so it's not always required in the constructor nor need a second one
@ocean quartz That's directly from this kotlin tutorial: https://www.programiz.com/kotlin-programming/constructors#:~:text=UNKNOWN Age %3D 0-,Kotlin Secondary Constructor,are created using constructor keyword.&text=In Kotlin%2C you can also,in Java)%20using%20this()%20.

prisma wave
#

You can also overload the companion object's invoke() operator function to make fake constructors

#

Which is deliciously hacky

empty flint
#

ok I'm too stupid for this shit, can you guys help me out?

prisma wave
#

with what

empty flint
#

I have this data class:

data class Attribute<T> (val name: String)

and I want to add this secondary constructor:

constructor(name: String, vararg pairs: Pair<Context, T>) {
  //how do I invoke the primary constructor here? this(name)?
  //and do stuff with the pairs that only god can judge...
}
ocean quartz
#

With this()

empty flint
#

With thie()
@ocean quartz Sounds medieval

prisma wave
#

Lol

ocean quartz
#

Phone typo xD

empty flint
#

Love it!

#

๐Ÿ˜„

prisma wave
#

I think a better solution would to just have the pairs in the primary constructor

empty flint
#

except:
Expression 'this' of type 'Attribute<T>' cannot be invoked as a function. The function 'invoke()' is not found

#

I think a better solution would to just have the pairs in the primary constructor
@prisma wave No can do chief. I don't want the pairs to be part of the class.

prisma wave
#

yeah because that's not how kotlin constructors work

ocean quartz
#

Tbh i find secondary constructor quite unnecessary in Kotlin most of the times since you can have default values

prisma wave
#

@prisma wave No can do chief. I don't want the pairs to be part of the class.
They don't have to be

empty flint
#

They don't have to be
@prisma wave Teach me

prisma wave
#

They can be a parameter without a backing property

#

just don't have val

empty flint
#

a what now?

prisma wave
#

a property with the parameter value

#

like this.blah = blah

#

if you don't have val or var before the parameter, it will just be a parameter

empty flint
#

Data class primary constructor must have only property (val / var) parameters
Primary constructor vararg parameters are forbidden for data classes

prisma wave
#

Oh

#

its a data class

#

ic

empty flint
#

I did say it was

#

twice

prisma wave
#

Oh yeah

#

It's late I didn't notice

#

Anyway

#

Can you send the full class

empty flint
#

It's fine

#

No it's ugly and I don't want it to bear its ugly head to the world just yet

#

No srsly it's a work in progress so it's gonna be really bad. Do you still want it?

prisma wave
#

Yeah

#

For context

#

I'll resist the urge to correct any problems lol

empty flint
#

=paste?

#

how does that work again

prisma wave
#

Yea

empty flint
#

=haste

compact perchBOT
#
HelpChat Paste

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

empty flint
#

there it is

#

Good ol' Barry

prisma wave
#

=paste

compact perchBOT
#
HelpChat Paste

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

prisma wave
#

Works too

empty flint
#

being a Barrybro

prisma wave
#

Execute all Barry's

empty flint
prisma wave
#

Hm

#

I am pretty sure you could just assign stuff in the secondary constructor manually

#

Like this.name = name and stuff

empty flint
#

the this(...) doesn't work in the secondary constructor. idk how to assign the name to this.name

prisma wave
#

Without calling another constructor

empty flint
#

But...

#

that's the java wey

#

Java bad

prisma wave
#

Just do it manually

#

Sometimes it's necessary

empty flint
#

I was told Kotlin knew this shit since it was born

prisma wave
#

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

#

Messy workarounds are necessary in every language sometimes

ocean quartz
#

People do a bunch of hacky stuff on c++ to deal with pointers

empty flint
#

Ayyyy I knew it was possible:

#
constructor(name: String,/*
        val permission: Permission,*/
        vararg pairs: Pair<Context, T>) : this(name/*, permission*/) {
        //do stuff with pairs nobody can know about...
}
#

is there a cleaner way to do this more declaratively:

for(pair in pairs) {
  contextualValues[pair.first] = pair.second
}
#

instead of telling it to do a for loop...

#

Teach me the way, Clojure

prisma wave
#

contextualValues.putAll(pairs) I think

#

or just a forEach

empty flint
#

Excuse me. Why do those 2 have the same signature?!

public constructor Attribute<T>(name: String, vararg pairs: Pair<Triple<Network?, Rank?, UUID?>, T>) defined in me.blocky.ranks.datastructure.parameter.Attribute

public constructor Attribute<T>(name: String, vararg pairs: Pair<Context, T>) defined in me.blocky.ranks.datastructure.parameter.Attribute
surreal quarry
#

they both take a string and a pair probably

prisma wave
#

Type erasure

#

@empty flint

empty flint
#

crap

#

can I define an infix function that takes a triple on one side and a value on the otherรŸ

#

like the to infix for pair...

#

public infix fun <A, B> A.to(that: B): Pair<A, B> = Pair(this, that)

#

I'd want to achieve something like (a, b, c) to value

prisma wave
#

you could just the existing to function?

empty flint
#

does that work?

prisma wave
#

why wouldn't it?

empty flint
#

val pair2 = (networkA, rankA, worldA) to "test"

#

doesn't work

prisma wave
#

oh

#

That's not how you define a Triple?

#

kotlin doesn't have tuples

empty flint
#

I'd want to achieve something like (a, b, c) to value
@empty flint Did I stutter? ๐ŸŒ

prisma wave
#

impossible

empty flint
#

kotlin doesn't have tuples
@prisma wave wait really?

#

aaaah

prisma wave
#

Yes

empty flint
#

I mean I guess it makes sense

#

whatever

prisma wave
#

Pair and Triple are the closest analogies

empty flint
#

So another question then about its weirdness:

#

Attribute("A", contextA to "contextA") works but Attribute(name = "A", contextA to "contextA") doesn't

prisma wave
#

Because you can't mix named and indexed arguments

#

Because of ambiguity

#

Although you can in 1.4 iirc

onyx loom
#

kotlin 1.4 is the answer to everything

prisma wave
#

Truly

empty flint
#

Kotlin 1.4? is it out yet?

prisma wave
#

It's in RC

onyx loom
#

soonโ„ข๏ธ

prisma wave
#

โ„ข๏ธ

empty flint
#

Got it.

#

pairs = *arrayOf(contextA to "contextA") is a suggestion from IntelliJ

#

What's the * in front of the arrayOf called? How do I google for that?

prisma wave
#

spread operator

empty flint
#

idk why the arrayOf is needed here

prisma wave
#

because it's varargs

#

You have to use the spread operator on an array

drowsy widget
#

Hey Iโ€™ve seen videos on like tornados chasing people but what if the dragon chased someone?

#

Would this be possible

empty flint
#

You have to use the spread operator on an array
@prisma wave why is that necessary? doesn't the vararg parameter show as an array within the function?

prisma wave
#

it does, but again it's to prevent ambiguity

#

It you had a vararg Any

#

And you passed an array it would be unclear what you were trying to do

#

The spread operator makes it explicit that you're passing the array's elements as varargs

#

Not the array itself

empty flint
#

ah got it got it

#

so the spread operator basically unwraps the elements in the collection for the compiler

#

I think I got it now

#

ty โค๏ธ

prisma wave
#

Np

ocean quartz
#

Minecraft doesn't support \n without splitting the message into two right?

surreal quarry
#

i don't think so but i saw smth yesterday that made me think it might i just haven't been able to try it

#

might be worth a shot

hot hull
#

And the requests have gone to shit again ๐Ÿ˜‚

regal gale
#

?

hot hull
regal gale
#

I didn't see anything lol

empty flint
#

Is there a difference between removing an element from a map and setting it to null in Kotlin?

empty flint
#

A data class with private primary constructor exposes the constructor to the copy(...) method.

steel magnet
#

How do i do 1.16 bungee cord?

obtuse gale
#

I think the api is pretty similar to the spigot one

steel magnet
#

i need to set it up

obtuse gale
#

youll just have to add it to ur build.gradle then bam

steel magnet
#

i had 1.15 done but i need to update to 1.16 but it just says

#

ERROR -----------------------------------
ERROR Unable to find BungeeCord-1.15.jar
ERROR Please upload a Jar file to be able to start your server.
ERROR -----------------------------------

obtuse gale
#

first up wrong channel but I mean your issue is self explanatory

#

its looking for a jar file called BungeeCord-1.15.jar

steel magnet
#

ye

#

wait im dumb

#

nvm

#

ty

tacit cave
#

hello

#

can we give permission to player with attachment even we're using luckperms?

#

or we have to use their api?

hot hull
#

Kotlin fellas, how would one make the i mutable?

for (i in from until to) {
obtuse gale
#

gonna be honest I have never used a for loop in kotlin I dont think.,.. lol

old wyvern
#

The I shouldnt be mutable in any case frost

#

Use step if you want to increment in larger numbers

hot hull
#

I'll try a different approach

old wyvern
#

Sure

young cove
#

Is someone know if it's possible to display a scoreboard objective in player list to only some people ?

remote goblet
#

I believe so yes

#

But eh who knows

young cove
#

๐Ÿ˜„ Good news so, I try to search for packets but I can't find a javadoc or an example

remote goblet
#

Itโ€™s either very simple or involves a fair amount of packets

young cove
#

I would prefer the first case :p

remote goblet
#

Wouldnโ€™t we all

prisma wave
#

@empty flint data classes should be for data only, they shouldn't be validating the data they get. Make a factory function / class

#

I would just not worry about the copy method

#

Just don't use it if you're concerned

#

Alternatively, take wrapper classes that perform validation instead of stuff like Strings

foggy pond
#

Lol tf, Sublime Text is 80$?!?

#

I was thinking that I might as well buy it if it's like 10$ to support the devs

#

but 80$ bruh

obtuse gale
#

o

prisma wave
#

It costs as much as WinRar

#

That is, technically paid but you can use it for free forever

quiet depot
#

unlimited trial

#

on another note fuck winrar, 7zip masterrace

prisma wave
#

^

obtuse gale
analog crater
#

Is there a certain rank for external emojis..

#

Because I cang use my 7z emoji :(

hot hull
#

Get gud fingerguns

regal gale
#

=roleperks

#

=roleperk

#

?roleperks

compact perchBOT
regal gale
#

Not listed there ๐Ÿ‘€

prisma wave
#

You gotta boost

hot hull
#

Or get helpful/Support

prisma wave
lunar cypress
#

Hi I'm helpful

#

:yeehaw:

obtuse gale
#

ok this question is quite basic
how to get my code work using IntelliJ ? (not talking about compile )

hot hull
#

:what:

obtuse gale
#

how to run code in intelliJ

#

Run configurations

#

where ?

#

if its like a public static vodi main intellij should show a green triangle thing next to it

#

otherwise you gotta go lik

#

eedit > run configurations

#

then ?

#
package me.Pindicator.work;
public class Work {
    public static void main() {
        System.out.println("Hello I m a Noob");
    }
}

is this correct ? (cause I can't run my code)

steel heart
#

I think you need String[] args parameter in the method

obtuse gale
#

^

steel heart
#

Or like a string array / string vararg

obtuse gale
#

just type psvm or main in intelliJ and hit enter

#

ok String[] args worked but I did something else with idk

#

?

#

anyways thx Aj and Bukkit

tacit cave
#

Hello

#

May i ask a simple question?

#

How do i play sound to player (visually)

obtuse gale
#

visually?
wdym?

#

lol what

tacit cave
#

i mean

#

nvm

analog crater
#

Does anyone know of a cheap host with gpus?

keen creek
#

Im trying to check what if the block a player ender pearls onto is stone but I cant get it to work
I have

@EventHandler()
    public void enderPearlThrown(PlayerTeleportEvent event) {
        if (event.getCause() != PlayerTeleportEvent.TeleportCause.ENDER_PEARL) return;
        Location to = event.getTo();
        Location from = event.getFrom();
        Block block = to.getBlock();
        if (block.getRelative(BlockFace.DOWN).equals(Material.STONE)){
            System.out.println(block);
            event.setCancelled(true);

        }
        System.out.println(to);
        System.out.println(from);
    }
obtuse gale
#

Define not working

#

maybe you need to call .getType on the getRelative

#

idk what getRelative returns tho, im guessing its a block

keen creek
#

i gtg to bed now :(

quiet depot
#

Does anyone know of a cheap host with gpus?
@analog crater reliablesite has a gpu bearing server for $99

analog crater
#

I'm a uni student who pays for uni. I dont have a spare 99 dollars a month for a server in florid

#

Florida

quiet depot
#

good luck finding a server with a gpu for any less

analog crater
#

Fuck

#

Time to get a loan

quiet depot
#

what do you need it for anyway?

analog crater
#

A heavy gpu based backend as a poc

#

I thought it would a lot cheaper

#

Likd 20 30 dollars a month

quiet depot
#

lol no

analog crater
#

Slow cpus it is

quiet depot
#

actually you might be able to get something cheaper from aws

analog crater
#

Oo how much and where is it hosted?

quiet depot
#

yeah give me a minute

#

gotta figure out how to use aws' stupid site

analog crater
#

K thanks

quiet depot
#

yeah nope

#

not happening sorry

#

I don't know how to navigate this site

#

lets see if I have more luck with google cloud & azure

analog crater
#

Ok lol. Preferably one is uk

quiet depot
#

you can't afford to be picky

analog crater
#

Ok

quiet depot
#

welp

#

azure is definitely out of your price range

analog crater
#

How much?

quiet depot
#

hundreds

analog crater
#

Damn.

quiet depot
#

google cloud is also out of your price range

#

reliablesite is your best bet

analog crater
#

Oh rip ok

#

I will rewrite to be cpu heavy instead

quiet depot
#

does your uni not provide resources for this sort of thing?

analog crater
#

They do but I havent got access for it for a while and they're not the best

heady birch
#

I cannot reproduce this dudes error

#

absolutley no idea why it happens

steel heart
#

There is no way to extend a package private class in another package right?

quiet depot
#

not at compile time, no

steel heart
#

with reflection?

quiet depot
#

no

steel heart
#

ok good

quiet depot
#

via the instrumentation api though

#

:)

steel heart
#

bruh

ocean quartz
#

make a package with the same name as the original, extend it and make it public ez

hot hull
#

Anyone got any cool projects/knows of any, which handle 3D chunk rendering into a web window (similar to what dynmap does, but 3D)

quiet depot
#

well that's not in another package so

#

dynmap is 3d tho

ocean quartz
#

Make your own, it'll be a fun challenge

hot hull
#

Might need to, dynmap has so much unnecesarry shit

#

Didn't know it had 3D tho thonking

regal gale
hot hull
#

Also by 3D I don't mean just a top down view, meaning time to make something myself fingerguns

old wyvern
#

dynmap isnt top down, eh but yeat not 3d, somewhat of a 2.5D render

hot hull
hot hull
heady birch
#

add more

empty flint
#

@empty flint data classes should be for data only, they shouldn't be validating the data they get. Make a factory function / class
@prisma wave I have a factory method. That's exactly the problem. I only want the class to be made via the factory but the copy method is made public by the data class...

prisma wave
#

if you absolutely need the data validation then make wrapper classes of the data you're taking

quiet depot
#

bukkit seems to for the most part, treats empty slots as null

#

except when it comes to the crafting slots

#

what the fuck

hot hull
#

kek

ocean quartz
#

Yup it's stupid

quiet depot
#

I also love how they don't follow the protocol standard either lol

hot hull
#

An idiot designed these

quiet depot
ocean quartz
#

Lmao

hot hull
#

Sheesh

quiet depot
#

in the words of our very own frosty

#

smooth brain

ocean quartz
#

Another fun thing, if you check for slot clicking on an inventory, clicking on a chest triggers a player inventory click as well on the same slot

quiet depot
#

yikes

#

actually iirc, the bukkit slots are based off nms

#

still stupid tho

#

i'm basing papi's api on the protocol

#

that's the only approach that makes sense imo

hot hull
quiet depot
#

you need more memory

ocean quartz
#

Dedotated wam

hot hull
#

But I no have anymore dedotated wam

ocean quartz
#

Download more

quiet depot
#

^

hot hull
#

:((

compact perchBOT
#

@quiet depot, Added download-ram to the faq.

quiet depot
#

important faq

hot hull
#

But no seriously, am I just fucked or?

old wyvern
quiet depot
#

But no seriously, am I just fucked or?
@hot hull yes

#

buy a new pc

hot hull
#

Go donate fingerguns

quiet depot
#

nah

#

u can disable the daemon

#

and just build raw

hot hull
#

I'm doing commissions all the time

quiet depot
#

takes longer tho

hot hull
#

And where would one disable daemon

quiet depot
#

where the google guide says to

ocean quartz
#

Let's make a go fund me for frosty

hot hull
#

Let's not

quiet depot
#

how much money u got frosterino

hot hull
#

What are you my finance manager

#

Not enough, I'm getting there, just not enough

quiet depot
#

yes

#

i'm just curious

hot hull
#

I told you, not enough

jovial warren
#

@quiet depot what in the hell is that class name?

#

(Discord rich presence)

quiet depot
#

well

#

you see

hot hull
#

BukkitPlayerInventory

#

What's wrong with that?

jovial warren
#

that's some Enterprise Logicโ„ข๏ธ right there

hot hull
#

Ah I see

quiet depot
#

it provides the functions of the PlayerInventory type, for the bukkit binding

jovial warren
#

is that PAPI 3 btw?

quiet depot
#

yea

jovial warren
#

also how far away from eCloud 2 3? is it 3? (I think so) being a little bit more open are you btw?

quiet depot
#

erm not sure

heady birch
#

Very

jovial warren
#

because I really wanna contribute to that

heady birch
#

The technology has changed

#

I dont really know how it works

quiet depot
#

last I heard they were trying to work out "crnk" for expansion uploading

#

idk

#

something like that

jovial warren
#

not using Spring anymore @heady birch ?

heady birch
#

Yeah we are

jovial warren
#

wdym by the "technology has changed" then?

heady birch
#

Originally traditional monolithic application using thymeleaf for frontend

#

Is now split to Vue

jovial warren
#

yeah you should use Vue that's a good idea

heady birch
#

And implementing a RESTful api for the frontend to use

jovial warren
#

wait what?

quiet depot
#

the backend & frontend are decoupled

jovial warren
#

the frontend literally runs on the same server as the backend

#

wait what?

#

why?

heady birch
#

It was seperated into two repos

jovial warren
#

ah okay

heady birch
#

Isn't that how vue works?

jovial warren
#

actually you might be are most likely right

heady birch
#

Frontend is on Lemmo

#

I think it might be really good as a single page application

jovial warren
#

yeah Vue is really good at that

ocean quartz
#

I thought Lemmo was more of a backend guy

jovial warren
#

are both of them still restricted projects at the moment with only key trusted members having access btw?

heady birch
#

Believe so

#

I think they wanted to open source when it gets completed

jovial warren
#

yeah Piggy's already said that I think

#

but by the time it's open-sourced there won't really be all that much to contribute since most of it'll be done

#

it'll just be bug fixes and performance upgrades

quiet depot
#

I thought Lemmo was more of a backend guy
@ocean quartz lemmo is full stack

ocean quartz
#

Ooh okok

jovial warren
#

what does full stack mean?

quiet depot
#

everything

jovial warren
#

ah okay

#

thought so

#

yeah I wish I could be a full stack developer but I just don't have the creativity element

#

it's why my portfolio still hasn't been created

#

I can do the backend no problem, but I can't design for the life of me

quiet depot
#

I mean full stack is kinda a meaningless keyword these days lol

#

cuz javascript

jovial warren
#

true

quiet depot
#

if you know javascript, you're basically full stack

jovial warren
#

which I don't

#

is it worth learning JS?

quiet depot
#

yes

old wyvern
#

Yes

quiet depot
#

by far the most useful language

jovial warren
#

because from what I've seen it's a horrible language

quiet depot
#

it is

old wyvern
#

Horrible, but widely used

quiet depot
#

extremely important language to know

#

arguably the most important

jovial warren
#

can anyone here who knows both Kotlin and JS tell me if JS is anything like Kotlin (what I'm used to)?

quiet depot
#

kotlin can compile to js

jovial warren
#

yeah I know

onyx loom
#

kotlin/js fingerguns

quiet depot
#

they're not similar though

jovial warren
#

should look in to that

quiet depot
#

except perhaps syntactically

jovial warren
#

the biggest difference I can think of is types

quiet depot
#

js is more similar to java regarding syntax

jovial warren
#

Kotlin has type inference whereas JavaScript has no types at all

hot hull
#

If you know java learning js is easy

jovial warren
#

or at least, gives so little fucks about types that it's as if it doesn't

#

somebody point me in the right direction of where to get started learning

hot hull
#

But I mean kotlin can compile to js so fingerguns

heady birch
#

kotlin makes sense

#

reading javascript you kind of just have to guess what variables are

jovial warren
#

I do wanna explore more languages, since so far I've only ever used Java, Kotlin, very very minimal C and C#, a tiny bit of Dart and TS, and a bit of Python

heady birch
#

not to mention those {} object things that dont even have a spec or anything

jovial warren
#

what might be a good idea for my first JS project (just to get a large feel for what it's like) is me making an implementation for BardyBot's REST API (when I actually finish it lol)

old wyvern
#

Kotlin has type inference whereas JavaScript has no types at all
@jovial warren
argueable

prisma wave
#

I like js objects

#

Call me weird

#

But they're cool

jovial warren
#

also what do you guys write JS in?

old wyvern
#

Its just dynamically typed

#

Front ends for websites mostly for me

jovial warren
#

it's types are a joke though you gotta agree with that

old wyvern
#

And canvas games

jovial warren
#

also I mean IDEs

heady birch
#

rest apis ๐Ÿคข

old wyvern
#

it's types are a joke though you gotta agree with that
Why?

prisma wave
#

@jovial warren vsc or ij

quiet depot
#

ide isn't needed for js

#

I use sublime

old wyvern
#

same

prisma wave
#

yea any text editor will do

jovial warren
#

you can cast from a boolean to an integer or a string or pretty much anything

quiet depot
#

I actually prefer js to python

jovial warren
#

all of those types should be mutually exclusive imo

heady birch
#

let a = true
a = 0
a = a
console.log (a)

b

old wyvern
#

Wha?

quiet depot
#

yea well they're not bardy, cuz js is weakly typed

jovial warren
#

yeah I was saying they should be, I know they aren't

old wyvern
#

you can cast from a boolean to an integer or a string or pretty much anything
https://developer.mozilla.org/en-US/docs/Glossary/Type_coercion

jovial warren
#

it's surprising how JS has such good performance tbh though

ocean quartz
#

I'm sad people don't like JQuery, i find it much easier than JavaScript

static zealot
#

who doesn't

#

?

#

I do

ocean quartz
#

I've seen a lot of people complain about it

old wyvern
#

I'm sad people don't like JQuery, i find it much easier than JavaScript
Who doesnt like jquery?

jovial warren
#

JQuery?

#

heard of it, never used it

quiet depot
#

jquery is an old framework

#

people don't like it, because the newer ones do everything better

#

that doesn't stop me from using jquery though

old wyvern
#

Which one replaces jquery?

ocean quartz
#

TypeScript maybe?

static zealot
#

yeah? I want to know

old wyvern
#

I have just been using that since I started js

quiet depot
#

typescript is a language

static zealot
#

oh heard of typescript

jovial warren
#

wait how is JS the world's most popular programming language?

ocean quartz
#

Oh forget what i said

jovial warren
#

according to W3Schools it is anyway

quiet depot
#

typescript is a language developed by microsoft to bring the joys of static typing to javascript

old wyvern
#

wait how is JS the world's most popular programming language?
Well lets see..., used on all webbrowsers?

quiet depot
#

wait

#

typescript is microsoft right?

jovial warren
#

true @old wyvern

old wyvern
#

Yea vbscript

jovial warren
#

that's not what confuses me though

quiet depot
#

ah yeah ts is definitely microsoft

ocean quartz
#

Yeah it's Microsoft

quiet depot
#

python is technically the most used language

jovial warren
#

what confuses me is how creatures from the same species as me have decided that this language is good

quiet depot
#

although frankly I've got no idea what in lol

#

where tf is python used on such a large scale

old wyvern
#

python is technically the most used language
More than js?

quiet depot
#

yes

jovial warren
#

Python isn't used on a large scale

#

afaik anyway

old wyvern
#

Wow did not see that coming

jovial warren
#

you'd have to be a fool to use Python on a large scale

quiet depot
#

maybe I've just been reading the stats wrong

#

python could simply be just the most known language

#

yeah i think that's the case actually

#

cuz i read elsewhere that java is still the most used language

jovial warren
#

apparently JS is first, then Python second, followed by Java third and PHP fourth

ocean quartz
quiet depot
#

too much conflicting shit

#

what do those stats represent matt?

jovial warren
#

yes you heard me right, people also use PHP, a language literally known for being filled with security flaws (and also pretty slow and crap)

static zealot
#

idk but I just got a random email saying that python jobs are not as popular due to COVID and if I want I can join their team and they'll offer me 6 months of training or somethign xD

ocean quartz
#

The PYPL PopularitY of Programming Language Index is created by analyzing how often language tutorials are searched on Google.

static zealot
#

never in my life did anything python related xD

quiet depot
#

what tf do you do in a python job

#

seriously

ocean quartz
#

Doesn't really represent the most used

quiet depot
#

I just can't imagine where python would be used in real life

old wyvern
quiet depot
#

for anything that isn't quick shitty pocs

old wyvern
#

oh matt posted it

jovial warren
#

yes, programmers hire people for Python programming

hot hull
#

How is kotlin not up there :((

ocean quartz
#

The same way xD

old wyvern
#

Kotlin is

#

#12

hot hull
#

Too low if you ask me

prisma wave
#

not for long

static zealot
#

its getting there

old wyvern
prisma wave
#

Helpchat will single handedly make it #1

jovial warren
#

I think Kotlin will rise toward the top

#

I reckon in a few years you could see Kotlin make at least top 10, if not top 5

#

but it depends

prisma wave
#

Actually make clojure #1 and Kotlin #2

ocean quartz
#

Sadly i understand, a lot of tutorials and stuff about Kotlin tend to be for android, and most people search for java related things for Kotlin

quiet depot
#

people like rust more than kotlin

prisma wave
#

Yeah they are

old wyvern
jovial warren
#

that's what Kotlin does lol

prisma wave
#

99% of the Kotlin userbase is for android

#

Ironically

jovial warren
#

@prisma wave probably

ocean quartz
prisma wave
#

not literally 99%

jovial warren
#

how is Go at 13?

prisma wave
#

How isn't it?

#

Go is decent

jovial warren
#

idk never used Go, no idea what it's like

quiet depot
#

go's cool

static zealot
#

CM you should start making kotlin tutorials xD

ocean quartz
#

Go is fast

quiet depot
#

very simplistic

old wyvern
#

Go is pretty good

prisma wave
#

Not rust fast but pretty fast

jovial warren
#

@static zealot that might actually be a good idea

prisma wave
#

@static zealot I'm making a Java one rn, plan to move to kotlin later

ocean quartz
jovial warren
#

let me collaborate to that please @prisma wave xD

prisma wave
#

Poor groovy

old wyvern
#

Sad

prisma wave
#

@jovial warren it's a long way away lol

#

Where is Clojure?

old wyvern
#

I vote for Groovy Mitten for the sake of it

jovial warren
#

I want Kotlin Mitten back

prisma wave
#

You get the next best thing

old wyvern
#

oh Jython

jovial warren
#

@prisma wave get out

prisma wave
#

:)

old wyvern
#

Fuck

ocean quartz
old wyvern
#

Holy mother of...

prisma wave
#

@ocean quartz what's Clojure at?

quiet depot
#

jython

jovial warren
#

@ocean quartz it's such a poor language though

quiet depot
#

the best python implementation

ocean quartz
#

Not on the list @prisma wave

prisma wave
#

Jython good

old wyvern
prisma wave
#

Clojure bad

heady birch
#

Wheres rust

prisma wave
#

Dead language rust

#

dead and bad

jovial warren
#

it's funny how most of the top languages are either languages that have been around for decades, or languages that are very easy to bodge shit together with, or both

old wyvern
#

Rust got rusty

ocean quartz
prisma wave
#

Ha

#

Kotlin wins

ocean quartz
#

Good increase

quiet depot
#

๐Ÿ˜ฎ

#

i thought rust was ahead of kotlin

heady birch
#

yeah but thats biased

prisma wave
#

Apparently not

heady birch
#

the media wont show rust growth

#

educate yourself!

prisma wave
#

I would've thought the same thing

jovial warren
#

what's Rust like?

heady birch
#

sleepy joe biden

jovial warren
#

I've heard it's stupidly safe

prisma wave
#

Rust bad

old wyvern
prisma wave
#

I like dart

#

It's boring

#

But nice

ocean quartz
#

Be darting

jovial warren
#

the only use for Dart is Flutter

old wyvern
#

Havent tried it yet

prisma wave
#

It's a mix of Kotlin and JS from what I've seen

old wyvern
#

Ah

jovial warren
#

Flutter is really handy for making cross-platform applications though

prisma wave
#

It's boring but in a good way

#

Flutter good

ocean quartz
#

Oh made by Google

heady birch
#

Trash

ocean quartz
quiet depot
#

does it have proper multi threading or is it nodejs style :/

ocean quartz
#

I'm not sure

dusky drum
#

interesting

heady birch
#

Proper multithreading

#

Did someone say rust

prisma wave
#

Looks like it's python style multithreading

quiet depot
#

haven't looked at that portion of python yet

#

i should probably resume my study

prisma wave
#

Well async / await

#

Idk

jovial warren
#

one thing that I find a bit confusing with Python, especially coming from Java/Kotlin, is the label thingys

#

I think that's what they're called anyway

#

they're written the same as annotations but do different things

lunar cypress
#

Decorators you mean?

jovial warren
#

yeah that's the one

#

what do they actually do again?

hot hull
#

They decorate fingerguns

lunar cypress
#

They let you intercept function calls

#

For example

jovial warren
#

funnily enough, annotations are just one of those things that I've never actually created and defined interally

lunar cypress
#

Annotations suck unfortunately

jovial warren
#

I mean, they look pretty easy to do in Kotlin with KAPT

#

but in Java you gotta do it with pure reflection from what I've seen

old wyvern
#

Wdym?

#

Annotations dont require reflection

jovial warren
#

idk

#

from what I've seen you have to get the object as its class and check if it has an annotation present

#

or maybe I've just been looking at one very specific example

ocean quartz
#

It's kinda reflection but kinda not, it comes from the class, so simple getClass

quiet depot
#

it is reflection

jovial warren
#

yeah that's what I meant by reflection

old wyvern
#

yea nvm I didnt think it fully through

jovial warren
#

the only place I've ever used reflection is with org.reflection's Reflections#getSubTypesOf method

quiet depot
#

that is not reflection

#

that is in fact, the polar opposite of reflection

#

despite the name

#

ClassGraph has the ability to "invert" the Java class and/or reflection API, or has the ability to index classes and resources. For example, the Java class and reflection API can tell you the superclass of a given class, or the interfaces implemented by a given class, or can give you the list of annotations on a class; ClassGraph can find all classes that extend a given class (all subclasses of a given class), or all classes that implement a given interface, or all classes that are annotated with a given annotation. The Java API can load the content of a resource file with a specific path in a specific ClassLoader, but ClassGraph can find and load all resources in all classloaders with paths matching a given pattern.

#

classgraph's description is excellent

#

it applies to org.reflections aswell

frail glade
#

Brister

#

PDM when

ocean quartz
#

Pressure ๐Ÿ‘€

jovial warren
#

is PDM not already available and ready for use?

frail glade
#

Relocations aren't done yet

#

I'm just giving him shit. I can't even really use my PC yet until I get my wifi adapter.

jovial warren
#

lol

heady birch
#

PAPI3 when

jovial warren
#

PAPI 3 is still in the making

#

I thought you'd have access to that repo

heady birch
#

yes

#

annotation placeholder ๐ŸŒ

jovial warren
#

annotation placeholder?

heady birch
#

@Placeholder("name")
public String somePlaceholder() {
return "lol";
}

jovial warren
#

ah okay

#

that'll be quite useful actually

onyx loom
#

PAPI3 when
@heady birch u tell me

#

pls

hot hull
#

Kali, Piggy said it's at like 50%