#dev-general

1 messages · Page 163 of 1

steel heart
#

any1 here plays valorant ?

jovial warren
#

nope

steel heart
onyx loom
#

ew

steel heart
#

how dare you

jovial warren
#

it would be so handy if there was a way to magically add a superinterface to other libraries' classes without having to provide a custom version of those libraries

#

since if I could do that, I wouldn't need both of those annoying af constructors

#

@prisma wave you know they added in an easy way to create functional interfaces btw in Kotlin 1.4? I swear it's totally pointless due to higher-order functions

prisma wave
#

yeah i know

#

it's not useless

#

a functional interface is more descriptive than a higher order function

#

since you can change the function name and stuff

steel heart
#

ow does kotlin have functional interfaces?

jovial warren
#

yeah ofc it does

prisma wave
#

it does now

surreal quarry
#

👀 whats a functional interface. im stupid

steel heart
#

ahh

#

lambdas with other words

prisma wave
#

not exactly

steel heart
#

I mean kinda

prisma wave
#

@surreal quarry in java think Supplier, Consumer, etc

#

interfaces with a single abstract method

jovial warren
#

Anything Java can do, Kotlin can do better

steel heart
#

allowing a lambda or method reference

#

bardybom

#

tru

surreal quarry
#

whats the declaration for one

prisma wave
#

in what language

surreal quarry
#

kotlin

#

i wanna play around with it

prisma wave
#
fun interface Name {
  fun doSomething() 
}
surreal quarry
#

ty

steel heart
#

would be the same as java almost

prisma wave
#

then you can do ```kotlin
fun take(name: Name)

take {
blah
}```

steel heart
#

no arrow?

jovial warren
#

like I straight up nicked Octo's MessageResolver from Matt's Framework for JDA, but I managed to completely remove the functional interface

#

@steel heart no...?

prisma wave
#

rather than kotlin take(object : Name { override fun doSomething() { blah } })

onyx loom
#

yeah ofc it does
@jovial warren ofc it does when it just came out Kappa

prisma wave
#

@steel heart arrow is for parameters

#

not necessary if there aren't any

steel heart
#

yeah ik but you dont use it in kotlin?

jovial warren
#

it had it before @onyx loom since Java has had it since like Java 6 or something

steel heart
#

well im kotlin noob so I know nothing

prisma wave
#

wdym

jovial warren
#

Java 8 my bad

prisma wave
#

@jovial warren lambdas were a thing in java 8

#

yea

jovial warren
#

I've never worked with anything prior to Java 8

steel heart
#
method(() -> {

});
``` how would this be in kotlin?
prisma wave
#

``kotlin

#

oop

#
method {
  
}```
jovial warren
#
method {

}
prisma wave
#

or ```kotlin
method({

})```

#

but you can remove the parens if it's the last parameter

jovial warren
#

but IJ will scream at you for that

surreal quarry
#

ide will give you a warning tho

#

yea

steel heart
#

hmm thats interesting

jovial warren
#

you can do things like: ```kotlin
method(value1, value2) {
// perform an action
}

steel heart
#

but I mean you never use a lambda or method reference in kotlin?

prisma wave
#

that is a lambda

jovial warren
#

????

#

yes you do

prisma wave
#

function references are the same as java

steel heart
#

no I mean like the arrow specifically then

prisma wave
#

that's just... not the syntax

#

lol

jovial warren
#

arrows are stupid lol

steel heart
#

oh well

prisma wave
#

kotlin has arrows

jovial warren
#

true

steel heart
#

when do I use them?

jovial warren
#

higher-order functions

surreal quarry
#

to name the variable used in the lambda

steel heart
#

sounds like star wars

prisma wave
#
doSomethingWithCallback { value -> 
  value.blah
}```
jovial warren
#

basically providing a function as a parameter

prisma wave
#

that's equivalent to value -> value.blah @steel heart

jovial warren
#

like this: ```kotlin
fun myFunction(action: () -> Unit) {
// do something
}

steel heart
#

yeah

#

Unit thats the void thing right?

jovial warren
#

yep

steel heart
#

which you can return

prisma wave
#

not exactly

#

but yes

jovial warren
#

yep

steel heart
#

all this kotlin things is overwhelming but feels like losing weight

#

which is nice

prisma wave
#

kotlin good

steel heart
#

yeah ima convert my plugins probably

#

but I want an api in java still

prisma wave
#

why?

#

it's basically the same

#

interop

steel heart
#

for end developers who doesn't know kotlin

prisma wave
#

eh

steel heart
#

I mean like making it compatible atleast

prisma wave
#

screw them

#

it is compatible

onyx loom
#

make them learn kotlin fingerguns

prisma wave
#

kotlin and java are 100% interoperable

steel heart
#

how compatible?

jovial warren
#
  1. Fuck them
  2. They can still use Kotlin stuff in Java
steel heart
#

yeah ik

#

but you'd have to change some stuff to make it java compatible?

prisma wave
#

nothing major

jovial warren
#

no...?

steel heart
#

or is it always by default?

prisma wave
#

occasionally you need an annotation or something

steel heart
#

hmm

prisma wave
#

but most of the time it's directly compatible

steel heart
#

thats not a big deal

jovial warren
#

as long as you don't use coroutines you should be fine

steel heart
#

doesnt work with java right?

jovial warren
#

unless Java can now magically cope with them

prisma wave
#

it would

#

it would just be incredibly messy

steel heart
#

alright

prisma wave
#

since the kotlin compiler generates a lot of stuff for coroutines

steel heart
#

well I just need my java devs to be able to code with my api without any problem

#

then alg

jovial warren
#

any way to annotate an annotation with @Suppress and have all of the classes it annotates also be suppressed?

prisma wave
#

@steel heart easy

jovial warren
#

@steel heart just tell them to learn Kotlin

#

unless they're die-hard Java fanboys lol

steel heart
#

like I was

jovial warren
#

so was I

steel heart
#

but I betrayed myself :p

jovial warren
#

but I'm a lazy bastard so I've always been wanting a way to have to do less work with the same outcome

prisma wave
#

Gaby is the only one who still says kotlin bad

#

I'm so proud

jovial warren
#

that's because @distant sun is a 3 head

steel heart
#

well java is doable

#

but it gets boring writing the same stuff all the time

onyx loom
#

weve converted everyone 😍

old wyvern
#

No, ill still stand by all languages good

jovial warren
#

since I switched to Kotlin, I look at Java now and go "do I really have to use that shit again?"

onyx loom
#

No, ill still stand by all languages good
@old wyvern exactly, kotlin good 🌚

#

but shit, that means java good 👀

jovial warren
#

@old wyvern all except JS I can agree with

old wyvern
#

JS has its place

steel heart
#

js is powerful

old wyvern
#

It aint great

surreal quarry
#

so say i have something like this weird example https://paste.jaims.dev/qifefahoni.cs

I could do that with just a normal interface afaik, so when does a functional interface provide a benefit

old wyvern
#

But its everywere

jovial warren
#

JS deserves no place in this world

prisma wave
#

I like JS

old wyvern
#

Its not thaat bad

#

Not too great either

prisma wave
#

@surreal quarry SAM conversion

jovial warren
#

JS is by far the worst programming language ever created

#

and that's taking languages like C and BASIC in to account, and also C++ (that shit)

old wyvern
#

Id not say that

#

If thats what you think you should probably look up more languages

#

Anyway

#

Fuck

#

4:30am

#

Im ded

prisma wave
#

JS is nowhere near the worst language

#

rip

jovial warren
#

Indian time zones eh

steel heart
#

I prefer TS over JS but js can be nice

prisma wave
old wyvern
#

Im probs going to skip algebra class today

#

Wont wake up by 8

steel heart
#

oof

prisma wave
#

3.5 hours sleep

#

impressive

jovial warren
#

@prisma wave other than Haskell, C or C++ (okay, maybe that means JS isn't the worst), name me a worse language

steel heart
#

Skript

prisma wave
#

none of those are bad

jovial warren
#

C++ is shit

prisma wave
#

how?

old wyvern
#

No its not

jovial warren
#

you have to do memory management yourself ffs

steel heart
#

thats handy

prisma wave
#

that's not a bad thing

old wyvern
#

You probably just have a bad understanding of it

prisma wave
#

it means it's fast

surreal quarry
prisma wave
#

and efficient

jovial warren
#

I suppose

old wyvern
#

you have to do memory management yourself ffs thats not bad at all

prisma wave
#

i mean it's no clojure

#

but it's not bad

old wyvern
#

Ew

steel heart
#

lol

old wyvern
#

😂

prisma wave
#

🙄

jovial warren
#

why do you always quote using backticks btw @old wyvern rather than right click -> quote? I'm just curious lol

prisma wave
#

everybody hating when they dont even know the language

old wyvern
#

I dotn have that on my phone bard

jovial warren
#

what?!?!

prisma wave
#

old app version?

old wyvern
#

I do normal quotes when on pc

jovial warren
#

what you using? a Nokia? ffs lol

prisma wave
#

you can hold down on the message

old wyvern
#

I guess probably bm but I do remember updating

#

No bard?

#

On android 10 os, I think im on a pretty recent update

jovial warren
#

it was a joke lol

prisma wave
#

android 10 gang

onyx loom
#

quotes have been a thing for ages now

jovial warren
#

Android 10 gang yay

onyx loom
#

android 8 😭

steel heart
#

I have iphone but I gotta agree android is better

old wyvern
steel heart
#

iphones business is so shady

prisma wave
#

bullying fortnite

jovial warren
#

checks if Samsung Galaxy S8 is actually running Android 10...

#

ah shit

onyx loom
#

lmao i just did that with checking for android 8 😭

jovial warren
#

running Android 9

prisma wave
#

smh

jovial warren
#

@old wyvern you must have an old version of Discord then thonking

old wyvern
#

Oh only reason im on 10 is coz this phone is part of the android one program

#

Its pretty recent bard

onyx loom
#

i might just get android 10 cus samsung obviously wont update for me 😦

old wyvern
#

Like a week or 2 maybe

prisma wave
#

in other news i would like to announce that I am beginning to develop ClojureOS

onyx loom
#

NO

prisma wave
#

there is no mouse

#

you just write clojure

#

and it does stuff

jovial warren
#

that's gonna be slow as fuck

prisma wave
#

uh no

#

no sir

#

no siree

old wyvern
#

One sec

steel heart
#

it does stuff
lol

old wyvern
#

I have something for u bm

prisma wave
#

👀

jovial warren
#

unless you're doing an Android and only having the UI run on the JVM

old wyvern
#

Somewhere in my memes folder

#

Lemme open laptop for a sec

prisma wave
#

everything runs on Clojure

#

the kernel is clojure

#

it's all clojure

jovial warren
#

nobody writes a kernel using JVM

onyx loom
prisma wave
#

ClojureOS does

#

we will just use Graal

#

it'll be fine

jovial warren
#

well as I said it'll be super slow

prisma wave
#

have faith in rich hickey

#

he will get us through these dark times

#

brave man

#

so brave

#

but never appreciated

onyx loom
#

have faith in rich hickey
@prisma wave hows the onlyfans 😳

prisma wave
#

😏

steel heart
#

lol

jovial warren
#

one thing I do love is that by updating Octo to use GPL, I'm now breaking my own license lol

#

completely changing the subject

prisma wave
#

wow

old wyvern
#

@prisma wave

#

now back to bed

prisma wave
#

IS THIS

#

clojure slander?!?!?!?!

#

😡

#

go back to bed

old wyvern
#

Ill have to look up what slander means so gimme a sec

jovial warren
#

since BardyBot is licensed under MIT and it uses Octo which is licensed under GPL, I'm breaking my own license lol

prisma wave
#

you won't wake up

#

🙂

old wyvern
#

oh, yes, yes it is

#

gn

jovial warren
#

should I change BardyBot to GPL or Octo to MIT?

prisma wave
#

both

#

whatever clojure uses

old wyvern
#

you won't wake up
@prisma wave
👀

prisma wave
#

clojure slander is not acceptable

#

have a nice day 🌚

old wyvern
#

🍉

steel heart
#

XwatermelonsugarproX

prisma wave
surreal quarry
#

just put them in photoshop and set opacity to 50% on one

prisma wave
#

don't have photoshop

#

and i'm also lazy

surreal quarry
#

lmao

#

ill do it for 45

onyx loom
#

lmao

prisma wave
#

45 what

#

cents?

surreal quarry
#

dollars

prisma wave
#

or dollars

surreal quarry
#

its a good deal

prisma wave
#

😶

surreal quarry
#

thats over 50% off

prisma wave
#

you are a fraud

surreal quarry
#

i do very good work

prisma wave
#

fraud

steel heart
#

someone link me to the kotlin reddit

prisma wave
#

i will have your head

surreal quarry
#

r/kotlinmemes

prisma wave
#

it's great

#

would be nice if it was clojurememes

#

but oh well

steel heart
#

that will have to wait

onyx loom
#

wait till im dead xd

prisma wave
#

that can be arranged

steel heart
#

lol

onyx loom
steel heart
#

I can do after my game is done

onyx loom
#

(dont)

prisma wave
#

fulfill mine clojure 🌚

steel heart
#

uh sure just lemme win

onyx loom
#

fulfill mine 🔪 🌝

prisma wave
#

😰

onyx loom
#

deleted before i get service muted 🙃

prisma wave
#

ye lol

steel heart
#

fullfill mine GrievDance KEKWjava

#

okay wait how do I inspect element in discord now again

prisma wave
#

ctrl shift i

surreal quarry
#

did the budget come down

#

after my quote

steel heart
#

bruh why no work

#

aight lets go browser then

prisma wave
#

clojr

steel heart
#

wait svg is the vecttor format thingy right?

prisma wave
#

yes

#

have you seen him

surreal quarry
#

what is that good for other than like web icons lol

prisma wave
#

please

#

i need to find him

#

please

steel heart
#

irl?

prisma wave
#

has anyone seen him

#

tell me his address

steel heart
#

looks like luke skywalker

surreal quarry
#

is it you 👀

prisma wave
#

no

#

hes someone i need to find

steel heart
#

why?

#

you mind telling whats the reason

prisma wave
#

personal

steel heart
#

like is it your future partner or just someone you are a pure fanboy of

prisma wave
#

both

#

well

#

kind of

steel heart
#

lol

prisma wave
#

he is very important to me

surreal quarry
#

lmao

prisma wave
#

i need an address

#

asking for a friend

surreal quarry
#

dm him fingerguns

prisma wave
#

cant

#

he doesnt follow me

#

i need to find his location

#

his exact location

surreal quarry
#

to like kiss him orrrr

steel heart
#

lol

prisma wave
#

and the names of all his family

steel heart
#

LOL

prisma wave
#

preferably credit card details too

surreal quarry
#

i can give you the first and last 3 numbers of his credit card

#

nothing more

prisma wave
#

ok

#

do you have birthday

#

and mothers maiden name

onyx loom
#

atleast its a start fingerguns

prisma wave
#

pls

#

i need it

surreal quarry
#

lmao

prisma wave
#

can anyone help

quiet depot
#

i have the credit card

prisma wave
#

wow

#

i will pay

onyx loom
#

why does rick have more followers than andrey 😭

quiet depot
#

694208008135

onyx loom
#

this is unacceptable

prisma wave
#

👀

#

thank you great pig

#

@onyx loom because unlike evil dirty stinky disgusting horrible andrey he is actually good at making programming languages

onyx loom
#

lets put that to the test

quiet depot
#

u know who else is good at making languages

surreal quarry
#

bm i can give you his github account details and you can transfer ownership of clojure to yourself

prisma wave
#

yes

#

do

#

it

#

🙂

quiet depot
#

james

#

gosling

onyx loom
#

damn he even got more followers than james

prisma wave
#

password didnt work

onyx loom
#

lol

prisma wave
#

do you have any ideas

quiet depot
#

i said it was credit card

prisma wave
#

oh yeah

#

idk how us system works

quiet depot
#

his password is “1234”

prisma wave
#

ok new question who has password

#

i need it

surreal quarry
#

social is goslingJames69420

prisma wave
#

dont mention that disgusting name

#

horrible man

onyx loom
#

lol imagine ur parents dying to him

#

lol

prisma wave
#

dont mock me

#

i was alone

#

abandoned

#

james had left me for dead

#

and then rich found me

#

and showed me the light

#

and im sure one day you small minded people will find it too

#

just not today

#

🙂

onyx loom
#

never

#

id rather learn java than clojure

#

#sorrynotsorry

surreal quarry
#

id rather stick with kotlin fingerguns

prisma wave
#

the brainwashing is strong with this one

#

wake up keeple

#

andrye doesnt care about you

#

rich does

#

he is a benevolent dictator for life

onyx loom
#

what if rich is brainwashing u?

prisma wave
#

he wouldnt

#

he is a good man

surreal quarry
#

say im making something where you can get a user, and if the user exists, it will return the user, otherwise it will either return null, or throw an exception

what is best? make it nullable or throw an exception

remote goblet
#

my discord bot

#

is going to get its dick chopped off

prisma wave
#

@surreal quarry personal preference

surreal quarry
#

for a lib

prisma wave
#

I prefer nullability since it gives you more scope in how you handle it

#

Obviously there's optionals too

surreal quarry
#

alright

onyx loom
#

@remote goblet u love chopping peoples dicks off

remote goblet
#

yes

#

its a hobby

onyx loom
#

😳

steel heart
#

think that should be it

#

no money needed

#

(;

surreal quarry
#

:clojuremoon:

onyx loom
#

:kotlinmoon:

#

😦

steel heart
#

@prisma wave look at my art

prisma wave
#

Oh my god

#

good god

#

You are a saint

steel heart
prisma wave
steel heart
#

epic

prisma wave
#

So epic

surreal quarry
#

very indeedly epic

#

e🅱️ic

steel heart
#

btw can you have gifs but like svg

prisma wave
#

clojure moon

steel heart
onyx loom
#

😭

prisma wave
#

PIN IT

#

That's perfect

#

I love you

#

Clojure Moon

steel heart
prisma wave
#

Put it on kotlinmemes

#

I'll pin it there

steel heart
#

lol aight

onyx loom
#

NO

#

it does NOT belong there

steel heart
#

well my reddit is deactivated rn so I cant

prisma wave
#

Shall I post it?

#

@onyx loom it has kotlin in it

#

It's a kotlin meme

onyx loom
#

😐

steel heart
#

also btw should I have

class ApiImplLol {
  private Map<K, V> map;
  ApiImplLol(Map<K, V> map) {
    this.map = map;
  }
}
//or
class ApiImplLol {
  private Map<K, V> map;
  ApiImplLol(Consumer<Map<K, V>> consumer) {
    this.map = new HashMap<>();
    consumer.accept(map);
  }
}
//or
class ApiImplLol {
  private Map<K, V> map;
  ApiImplLol(UnaryOperator<Map<K, V>> function) {
    this.map = function.apply(new HashMap<>());
  }
}```
prisma wave
#

Is that a joke

steel heart
#

no but like which one

prisma wave
#

First one

#

Always

steel heart
#

or should I create an empty hashmap so it wont be null

prisma wave
#

Just @NotNull it

steel heart
#

Hope not some stupid dev is gonna ignore it

prisma wave
#

If they do it's their fault when stuff breaks

#

alternatively

#

Kotlin it

steel heart
#

tru tru

#

also hmm I have like several maps in one of my interfaces which consist of maps and are all related to loottables so maybe I should make a seperate interface for that

#

consider long classes and interfaces is not nice

prisma wave
#

Possibly

steel heart
#

Consider srp

prisma wave
#

Indeed

ocean quartz
onyx loom
#

thats nice

ocean quartz
onyx loom
#

holy shit

#

kotlin be booming

#

so when will we be seeing 1 billion devices use kotlin on their website? xd

surreal quarry
#

lmaoo

ocean quartz
#

Those are contributors ;p

onyx loom
#

ik ik

obtuse gale
#

Finally something that is coming along

surreal quarry
#

dang thats really cool

obtuse gale
#

Took quite a while

viscid charm
#

YO is it okay to do something where I understand the code BUT I dont seem to memorize like 99% of it when doing coding for spigot things?

#

Do i need to memorize it or wat? Or is it good enough just to understand it

#

oh thats liEK cluescrolls @obtuse gale

#

is it possible in 1.8?

ocean quartz
#

Dw about it, you memorize stuff with time
90% of programming is googling stuff
70% of that is stack overflow

viscid charm
#

dO YOU think i shud still utilize shit i dont get in my code?

obtuse gale
#

wdym

#

Dont use code if you dont understand it

#

That being said dont just not use it - understand it

viscid charm
#

Ok

#

BUT Yo

#

What you guys think about this?

#
    public static String getConfigString(String text) {
                
        return ChatColor.translateAlternateColorCodes('&', main.getConfig().getString(text));
        
    }```
#

Is that bad?

#

Like my utils

#
    public static String applyColor(String text) {

        return ChatColor.translateAlternateColorCodes('&', text);

    }
    
    public static String getConfigString(String text) {
        
        //return main.getConfig().getString(text);
        
        return applyColor( main.getConfig().getString(text));
        
    }
}```
obtuse gale
#

with that second one doesnt main have a high chance of being null - since its static?

#

But I mean yeah its proboably fine

viscid charm
#
public static ItemStack buildItem(Material material, Short s, String name, String ... lore)``` Do you guys konw waht the ... means?
#

I was taught that ... meant like however many parameters after

obtuse gale
#

... means you can specify multiple strings for the lore im pretty sure

#

Then I think its treated like an array or something

distant sun
#

varargs

hot hull
#

@viscid charm Your main will be null in your util class

obtuse gale
#

unless JavaPlugin#getPlugin which is 🤮

viscid charm
#

Ok ima talk about that aftrer a whiel but yo I was wonder lets say I show you guys something right? THen, you guys suggest me something better. Now is it better to use that? Lets say I understand it, but will 100% forget it after that time. Also lets say if I dont understand it?

obtuse gale
#

its just important you understand it

empty flint
#

If you understand it you won't forget it because you will intuitively do the thing that works better because you understand why it does

#

If you don't understand you might forget, but that's life.

viscid charm
#

hmm shit but you think if I see it enough times I will understand it?

empty flint
#

No. If you don't understand it, ask us and google until you do.

viscid charm
#

cus I HATE just memorizing. Makes me feel like a spigot dev whos plugisn iwll lag and be buggy

old wyvern
#

You dont have the memorize the exact code. Just the steps involded, i.e, the algo

empty flint
#

Every single one of us has to memorize a lot of things. The basics are just rules that you have to know, there is no understanding to them.

#

Nothing wrong with memorizing

old wyvern
#

Memorizing code as it in is redundant and error prone

empty flint
#

What sets a good programmer apart from a mediocre one is, among other things, that they can derive new and creative code from the rules and code they have memorized in the past.

old wyvern
#

Understanding and knowing how it works, you should be able to build it back up

#

code they have memorized in the past.Its usually not "The code they have memorized in the part". You depend on the logic you used, not the actual code word for word

#

That would be pretty stupid to try to remember large blocks of code exactly

empty flint
#

Memorizing code as it in is redundant and error prone
@old wyvern Depends on the lines of code imho. Memorizing that you have to do "System.out.println(...)" to print a line is certainly easier for a beginner than to understand what System and out mean and why it is that you have to use them to print to stdout

#

I don't mean whole algorithms of course. Just one or two lines that you don't have to necessarily understand to the fullest but use over and over again

old wyvern
#

No, it makes more sense to anyone once they understand println is a function in a field called out in the System class

viscid charm
#

But lets say I understand what system and out mean and why you have to use them to print stuff BUT, I FORGET System.out.println() <- What do you think?

empty flint
#

But lets say I understand what system and out mean and why you have to use them to print stuff BUT, I FORGET System.out.println() <- What do you think?
@viscid charm Why would you forget though?

viscid charm
#

i mean this is extreme example but

old wyvern
#

If you know what system and out means how do yo forget what it does

empty flint
#

No, it makes more sense to anyone once they understand println is a function in a field called out in the System class
@old wyvern Hm do you think about System.out when you use println() every time?

distant sun
#

sout

old wyvern
#

You could alternatively also openup the javadocs to the class you are looking at

#

@old wyvern Hm do you think about System.out when you use println() every time?
Yes

empty flint
#

Yes
@old wyvern Idk I just type it and don't think about what it is or does anymore because I don't need to recall that information for my purposes. Of course I know, but I don't even ask myself why it is the way it is...

old wyvern
#

You should ask youself why something works more often then. Simple soln

empty flint
#

I disagree, I don't have to ask myself because I know and not only that, I know that I know so I don't need to ask.

old wyvern
#

And mint, if you ever come across forgetting a method name, you can just look its javadoc up or open it in intellij with ctrl + left click

#

I disagree, I don't have to ask myself because I know and not only that, I know that I know so I don't need to ask.
@empty flint Thats pretty bad

#

Thats like saying "It works, so it works, I dont care"

#

Pretty ignorant

#

Anyway

empty flint
#

What's wrong with that?

#

Why is it ignorant if it works?

old wyvern
#

Because you dont seem to know what you are even doing in your case

#

Ignorance

empty flint
#

I compare it to driving. When you do something so many times, you don't need to actively think about what you are doing to do it correctly. As long as no accidents happen, that's perfectly fine.

#

In fact if you have to think about what you are doing when re-using code, you aren't re-using code at all. You're inventing code anew every time.

old wyvern
#

Re-using code would be pulled out as common as a function, not copy pasted everywhere

#

What age are you in

#

I compare it to driving. When you do something so many times, you don't need to actively think about what you are doing to do it correctly. As long as no accidents happen, that's perfectly fine.
Ok so lets say you dont know how to shift from gear 1 to gear 2, You keep driving in gear 1, You may not meet an accident but you wil probably wreck your gearbox

#

I cant think of a better example with cars

empty flint
#

There's no effective difference between knowing that the System class has a member called out and that has access to a lot of print methods you can use and knowing that you can print stuff using System.out.println(). When you don't need to explain why the code does what it does it's perfectly fine to just recall that it does it when you need to print something.

old wyvern
#

If you think that using something just coz it works without understanding what you actually do is right, God save you my guy

empty flint
#

You can call that ignorant, I would call it efficient. Provided you don't have to think about what it does when somebody asks.

old wyvern
#

There's no effective difference between knowing that the System class has a member called out and that has access to a lot of print methods you can use and knowing that you can print stuff using System.out.println(). When you don't need to explain why the code does what it does it's perfectly fine to just recall that it does it when you need to print something.
You are speaking in general, not just about the println's class here, think about the shit you speak

empty flint
#

Ok so lets say you dont know how to shift from gear 1 to gear 2, You keep driving in gear 1, You may not meet an accident but you wil probably wreck your gearbox
@old wyvern Nope, wouldn't pass the exam and get your license. I'm talking about experienced drivers. You don't forget things like shifting gears.

old wyvern
#

If you are experienced driver how do you not know how to use your car

empty flint
#

Experience.

old wyvern
#

By experience, you mean they need to know the things they use initially, i,em shifting gears, what pedals do what...ect...

#

There not much analogy to go into with this example

#

But in general, Remembering something huge as code is asking for trouble

viscid charm
#

Ok so when I am doing a dependency injection I always remember to do it but I remember ugh first create constructor of that class.
But this wouldnt occur to someone whos a pro in java

empty flint
#

By experience, you mean they need to know the things they use initially, i,em shifting gears, what pedals do what...ect...
@old wyvern Yes, you go through a learning process of course.

old wyvern
#

Yea, but here you seem to not want to go through the learnign process

#

"That pedal works, so imma go with it"

empty flint
#

But in general, Remembering something huge as code is asking for trouble
@old wyvern I said before I don't mean complete algorithm implementations. You learn the algorithm and derive your own implementation from that.

viscid charm
#

Isnt going thru learnign process once and then just use it like u normally do unless something changes I think

empty flint
#

Yea, but here you seem to not want to go through the learnign process
@old wyvern No, I went through the learning process so many times I don't have to acknowledge that I know stuff I don't need

old wyvern
#

Isnt going thru learnign process once and then just use it like u normally do unless something changes I think
If you have gone through it once, you understand what it does and are nto using it "coz it works"

#

No, I went through the learning process so many times I don't have to acknowledge that I know stuff I don't need
You do need to know that

viscid charm
#

Ok guys lets say I wanna do this:

ItemUtils.giveItemToPlayer(player, ItemUtils.getItem(whitescroll, 1)``` I do that and it gives me the custom item. I got the giveItemToplayer part done, player part is good but, I am trying to create a method getCustomItem( Name of the custom item, amount) <- to give me item in the config. I am having trouble. THis is what I have so far not sure how to do this typa thing yet.

```JAVA
    public static ItemStack getItem(String customitemname, int amount) {

        ItemStack item = ItemUtils.buildItem((Material)main.getConfig().get("custom-items.material"), (short)main.getConfig().getInt("custom-items.data"), ConfigUtils.getConfigString("custom-items.name"), ConfigUtils.getConfigString("custom-items.lore"));
        item.setAmount(amount);
        return item;

    }```
#

Right now my config looks like this

#
custom-items:
 name: "&eHello"
 material: DIAMOND
 data: 0
 lore:
 - "&7Hello"
 - "&7You yoo"```
#

How do I make it into something like this

#
custom-items:
 customdiamond:
  itemname: "&eHello"
  material: DIAMOND
  data: 0
  lore:
  - "&7Hello"
  - "&7You yoo"```
empty flint
#

Let's agree to disagree

old wyvern
#

set it to under "custom-items.customdiamond"

empty flint
#

I do need to know that but I don't need to recall that knowledge

old wyvern
#

Let's agree to disagree
I do indeed disagree with you

empty flint
#

I can see that

old wyvern
#

I do need to know that but I don't need to recall that knowledge
You clearly dont as you mentioned earlier tho

#

No sure whats the point of going on with this than wasting time

empty flint
#

Well I specified what I meant more clearly

old wyvern
#

You kept going into the println function. Nothing else

#

Anyhow, I really have other work to finish

empty flint
#

because it's a good example.

old wyvern
#

You still do not seem to care what you did to call that

viscid charm
#

but like this doesn't really help

#

custom-items.customdiamond

#

I want to make it so i can make as many custom items

empty flint
#

Because it doesn't matter in that moment.

viscid charm
#
 customdiamond:
  itemname: "&eHello"
  material: DIAMOND
  data: 0
  lore:
  - "&7Hello"
  - "&7You yoo"
 customdiamond2:
  itemname: "&eHello"
  material: DIAMOND
  data: 0
  lore:
  - "&7Hello"
  - "&7You yoo"```
old wyvern
#

You would be setting to the path "custom-items.<itemName>" where <itemName> represents the title of the item like customdiamond

viscid charm
#

still having trouble figuring it out hmm

#

Yea ia m stuck on this

#

Ok how would I replace <customname>

    public static ItemStack getItem(String customitemname, int amount) {

        
        ItemStack item = ItemUtils.buildItem((Material)main.getConfig().get("custom-items.<customitem>.customdiamond.material"), (short)main.getConfig().getInt("custom-items.<customitem>.customdiamond.data"), ConfigUtils.getConfigString("custom-items.<customitem>.customdiamond.itemname"), ConfigUtils.getConfigString("custom-items.<customitem>.customdiamond.lore"));
        item.setAmount(amount);
        return item;

    }```
hot hull
#

Just use the customitemname string..

#

And lowerCamelCase for variables please, you'll find it much easier to read

viscid charm
#

ok so i did this

#
    public static ItemStack getItem(String customitemname, int amount) {

        String material1 = ConfigUtils.getConfigString("custom-items.<customitem>.customdiamond.material").replace("<customitem>", customitemname);
        Material material = Material.matchMaterial(material1);
        int data = main.getConfig().getInt("custom-items.<customitem>.customdiamond.data".replace("<customitem>", customitemname));
        String itemname = ConfigUtils.getConfigString("custom-items.<customitem>.customdiamond.itemname".replace("<customitem>", customitemname));
        String lore = ConfigUtils.getConfigString("custom-items.<customitem>.customdiamond.lore".replace("<customitem>", customitemname));

        ItemStack item = ItemUtils.buildItem(material, (short)data, itemname, lore);
        item.setAmount(amount);
        return item;

    }
#

@hot hull can you tell me good name for material1 and material?

#

fetchMaterial?

dusky drum
#

no Material.getMaterial(mat)

light leaf
#

I'm not sure if it was already mentioned, but you can serialize and deserialize an item stack at once

dusky drum
#

well if you save it that way then ye

viscid charm
#
    public static ItemStack getItem(String customitemname, int amount) {

        Material material = Material.getMaterial(ConfigUtils.getConfigString("custom-items.<customitem>.customdiamond.material".replace("<customitem>", customitemname)));
        int data = main.getConfig().getInt("custom-items.<customitem>.customdiamond.data".replace("<customitem>", customitemname));
        String itemname = ConfigUtils.getConfigString("custom-items.<customitem>.customdiamond.itemname".replace("<customitem>", customitemname));
        String lore = ConfigUtils.getConfigString("custom-items.<customitem>.customdiamond.lore".replace("<customitem>", customitemname));

        ItemStack item = ItemUtils.buildItem(material, (short)data, itemname, lore);
        item.setAmount(amount);
        return item;

    }```
#

Ahh like taht

light leaf
#
configuration.set("item", itemStack);
ItemStack itemStack = configuration.getItemStack("item");
dusky drum
#

the easiest way would be like paul said

viscid charm
#

I dont get it tho

hot hull
#

Why are you replacing the string tho?

dusky drum
#

idk he could just join 2 strings together

hot hull
#

Just do something like
"custom-items." + customitemname + "tralala"

#

Would be so much nicer in kotlin but fingerguns

dusky drum
#

example
"custom-items." + customitem+ ".customdiamond.itemname"

viscid charm
#

O WTF

#

you can do that?

old wyvern
#

yea

viscid charm
#

for getting the config value?

#

wow.....

hot hull
#

It's a string

viscid charm
#

MAAAAAAAAAAAn that would hav ebeen so much less headaches

old wyvern
#

Its not about the config

hot hull
#

It's just java

dusky drum
#

but kotiln is even easier :3

#

"text.$name.yes"

viscid charm
#

LOL I needa learn JAVAV first

hot hull
viscid charm
#

before i even consider kotlin

#

How long u been coding Yugi?

hot hull
#

Atleast 2 days

old wyvern
#

since like 2010-11

viscid charm
#

O wow...

#

how old are u?

dusky drum
#

lel

viscid charm
#

thats like 10 years

old wyvern
#

18, almost 19

viscid charm
#

u started coding at 10/11?

heady birch
#

2008 gang 🙂

old wyvern
#

yea initally was just a lot of vb

#

yea

heady birch
#

vb too

viscid charm
#

o we did vb in school way back

heady birch
#

I remember making the GUI apps

#

then wondering why the buttons wouldn't do what I named them to do

old wyvern
#

Yea I did so many dumb as shit back then xD

dusky drum
#

i started coding when i was like 12 XD (python)

heady birch
#

Realised I had to program them 😦

viscid charm
#

how old are u now?

onyx loom
#

vb gang 🤢

dusky drum
#

17

viscid charm
#

5 years dam

#

wish I had learnt coding early :/

dusky drum
#

ye but i started coding java like 2 years ago

old wyvern
#

How old are you?

dusky drum
#

and kotlin about 1-2 weeks

viscid charm
#

21

old wyvern
#

What do you study?

hot hull
#

Never too late Pepper

viscid charm
#

wat do u mean?

old wyvern
#

^ mhm

#

Oh like what are you currently studying?

viscid charm
#

Learning java atm

dusky drum
#

...

old wyvern
#

I meant academically

viscid charm
#

well Spigot API

#

OH

#

I dont go to college

old wyvern
#

oh I see

viscid charm
#

ye

old wyvern
#

Anyway, you can start at any age thats fine. Lets just say I had nothing to do at that time so I spent too much time on my pc

dusky drum
#

just why is there
Material#matchMaterial
and
Material#getMaterial?????????????

viscid charm
#

In high school grade 10 i did

#

Programming

old wyvern
#

C ?

viscid charm
#

Iw as top of my class as well

#

No it VB

old wyvern
#

GJ

viscid charm
#

But i got caught helping out other kid

dusky drum
#

wtf is VB=?

old wyvern
#

oh they teach VB in school?

viscid charm
#

with assignemetns

#

Visaul Basic

old wyvern
#

Visual Basic

viscid charm
#

So I neve rtook programming in grade 11

prisma wave
#

vbscript

viscid charm
#

which is where they teach JAva

dusky drum
#

eh we learn c++ at school...

viscid charm
#

biggest regret

old wyvern
#

I remmber back in the day with vb6 xD

#

god

prisma wave
#

schools should have mandatory clojure lessons

dusky drum
#

.,.

hot hull
#

Imagine actually learning programming at school GWempOof

old wyvern
#

no, school needs to provide elara lessons

dusky drum
#

frosty programing at that school is cout << "THIS IS TEXT" << endlM

old wyvern
#

Very imp

hot hull
#

Yugi, you disgust me

old wyvern
dusky drum
#

🤔

hot hull
dusky drum
#

😆

viscid charm
#

was one of my biggest regrets

#

:/

#

to not take programming

#

in grade 11

dusky drum
#

gotta love how gta v doesnt support racing wheels

prisma wave
#

racing wheel looks like clojure moon

dusky drum
#

.,.

old wyvern
dusky drum
#

fuj

hot hull
#

^

prisma wave
#

having to put this is kinda annoying

dusky drum
#

no brackets thats like lua

hot hull
#

Why is it all a string tho?

old wyvern
#

True might add something in the preprocessor to fix that later on

viscid charm
#

Yo how od u get good at understanding code quickly?

old wyvern
#

Why is it all a string tho?
@hot hull

prisma wave
#

in a unit test @hot hull

old wyvern
#

Coz thats a ss from the tests

#

xD

hot hull
#

Okay good

dusky drum
#

ss imagine having letters as grades wut

hot hull
#

God knows what y'all weebs will figure out with this shit

#

@viscid charm You don't

dusky drum
#

you gotta have numbers

old wyvern
#

with what frost?

hot hull
#

Elara

old wyvern
#

Wdym?

dusky drum
#

Elara (mythology), mother of the giant Tityos in Greek mythology

hot hull
#

forget about it

old wyvern
#

God knows what y'all weebs will figure out

dusky drum
#

Elara (moon), a moon of Jupiter named after Elara

prisma wave
#

yea

#

i just looked up random moons

#

for the name

#

lol

#

they usually have good names

dusky drum
#

wtf

old wyvern
#

xD

#

Titan

prisma wave
#

too edgy

dusky drum
#

my name is still the best :3

onyx loom
#

what about moon M13FD4321?

dusky drum
#

what about no?

onyx loom
#

🙁

old wyvern
onyx loom
#

i think its a good name

old wyvern
#

Pasiphae

prisma wave
#

moon names are great sources of names

old wyvern
#

Metis

#

xD

dusky drum
onyx loom
#

sxtanna Kappa

prisma wave
#

too soon

#

😦

dusky drum
#

Hiʻiaka

prisma wave
#

good name

#

easy to pronounce

dusky drum
#

S/2015 (136472) 1

#

Io

#

Io

viscid charm
#

yo you guys know why this isn't working

old wyvern
#

I like E13D485F444A

prisma wave
#

damn that moon is clapped

onyx loom
#

😂😂😂

old wyvern
#

That looks like a view fromma microscope

dusky drum
#

i dont think E13D485F444A is moon?

old wyvern
#

No idea

viscid charm
#

nvm i know why

prisma wave
#

allman good clojuremoon

dusky drum
old wyvern
#

allman good, but not for java :clojuremoon:

#

oof

dusky drum
#

Become elon musk:
X AE A-Xii

prisma wave
#

@old wyvern wrong clojuremoon

old wyvern
#

@prisma wave wrong 🎃

prisma wave
#

pff

old wyvern
#

xp farmin hard xD

prisma wave
#

that doesn't look like clojure moon to me

#

🙄

old wyvern
#

It had clojure in its name, so i cant possibly use it 😎

prisma wave
#

lies

#

wait

#

😡

#

clojure good

#

i will not hear anymore

old wyvern
#

clojure sad, you will hear more

viscid charm
#

Brister Mitten how old are you?

prisma wave
#

16

viscid charm
#

Didnt u say u been coding for 6 yeaers?

#

dam

prisma wave
#

closer to 5

#

but yeah

dusky drum
#

craz

viscid charm
#

How many plugins approx did u make for Java Spigot. In total. Even the shitty ones that you delete and stuff?

prisma wave
#

lol that's a good question

#

maybe rougly 100-150 in 5 years idk

dusky drum
#

howly fk

prisma wave
#

my old eclipse workspace has about 50 things in

#

and thats a few years old

dusky drum
#

ew eclipse

prisma wave
#

ik

#

from 2017

dusky drum
#

but you gotta start with something :3

obtuse gale
#

how many are unfinished projects lol

#

cos ive probably got 50 of them

old wyvern
#

I was pretty reluctant to move from eclipse initially too tbh

viscid charm
#

But honestly its better to learn this shit early, ur IQ is much higher, it deteriates when oyu get older. Depends on diet and shit as well

old wyvern
#

🤷‍♂️

prisma wave
#

pretty much anything is better to learn early

viscid charm
#

12 is peak btw

#

yup

#

Nah cus I say this if u know any professional gamers

#

you will see they retire at like

#

age 22

#

23

#

Csu their reflexs and shit just aint fast enough

dusky drum
#

cause they have to much money already

old wyvern
#

I dont understand what a "Professional Gamer" is supposed to mean tbh.

viscid charm
#

Like

#

People lieke Faker

#

If you ever played league of legends

old wyvern
#

Does it refer to like streamers or soemthing?

obtuse gale
#

who tf is faker

viscid charm
#

No

old wyvern
#

I played a bit

viscid charm
#

Like

#

They have worlds tournament each year

#

1 - 2 mil prize

old wyvern
#

Oh I see

viscid charm
#

Dota has like 8 or 16 mil total prize pool

#

So people from all over the world

#

these guys littearlly their JOB is to play

#

they are like athletes but for the game

#

IF U played league of legends you know

#

to be challenger is Insanely hard

old wyvern
#

That sounds pretty weird but the irony is that I study game developement 🙃

viscid charm
#

These guys shit on challengers lol

#

ALso theres like 5 players

#

team basesd game

hot hull
#

Yugi, 2021 new year resolutions, participate in a game jam fingerguns

prisma wave
#

YES

#

we should all do that

old wyvern
#

I am participating in one next year

prisma wave
#

start a team or something

old wyvern
#

But its to create a game

#

not play one

hot hull
#

I mean yea..

old wyvern
#

oh I meant I dont understand how people consider playing games a profession

#

ok maybe it pays once in a year if you are lucky right?

viscid charm
#

Lol u guys how hard it is??

old wyvern
#

How do you sustainably earn?

viscid charm
#

Oh

#

stream and stuff

#

They stream

#

SO THEY GET THOUSANDS OF twitch streamers

#

EVEN IF U GOT no personality

old wyvern
#

xD

viscid charm
#

EVNE If ur a challenger

#

u get a lot of views on twitch

old wyvern
#

I see

viscid charm
#

BTW Faker gets like insane amount

#

30-40k

#

viewers

old wyvern
#

start a team or something
@prisma wave
Im in

viscid charm
#

HE was offered like 10 mil to JOIN the NA team

#

he refused

#

hes korean btw

old wyvern
#

wow

viscid charm
#

But rememebr hes BEST OF the BEST

hot hull
#

Who

viscid charm
#

Your better off creating apps on iOs and Andriod and make

#

Faker <-

#

for League of legends

prisma wave
#

kotlin

hot hull
#

No I mean who asked fingerguns

viscid charm
#

He won like 2 or 3 championships

#

asked what?

hot hull
#

Forget about it

old wyvern
#

Your better off creating apps on iOs and Andriod and make
@viscid charm
?

prisma wave
#

"unkillable demon king"

#

😬

viscid charm
#

Make money than proffesional gamer

old wyvern
#

yea

viscid charm
#

AND its not fun btw

hot hull
#

I mean whatever floats your boat, if you're good at it, you're bound to make some profit

viscid charm
#

These guys play on average 12 hours

#

like its a fking job

old wyvern
#

I not that great at playing games, I enjoy it a lot tho

viscid charm
#

yea no i am explainign cus like Yugi was suprised to hear about the faker hting

#

10 mil thing

#

[09:49:34] [Server thread/ERROR]: Could not load 'plugins/FreshCrates.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml

#

strange

#

name: FreshCrates
version: 1.0
author: FreshPepperMint
main: me.freshpeppermint.FreshCrates
description: Crates plugin
load: STARTUP

#

thats my plugin.yml

#

nvm got it

dusky drum
#

gotta start working on some packet editing, gotta make clickable per player holograms.

#

with like multiple pages and that stuff

hot hull
#

Have fun kek

dusky drum
#

ye thats gonna be fun

hot hull
#

The clickable part is easy, just the per player is a kek

dusky drum
#

but i have no idea how to check where on placeholder player clicked

#

per player is simple

#

just mutablemap with data for each player

#

then just edit entitymetadata packet

hot hull
#

cool

dusky drum
#

but i have no idea how to check where on stuff player clicked

#

i need to make ray tracing or something?

#

to check if player clicked on part where it says next or back?

hot hull
#

¯_(ツ)_/¯

dusky drum
hot hull
#

yup

dusky drum
#

i want to make something like that

hot hull
#

Although that shitty recording hurts

dusky drum
#

open it in browser

#

its green due to discord

hot hull
#

effort

old wyvern
#

Maybe spawn invisible bats with no AI and gravity where you need to check clicks

dusky drum
#

nu

#

will figure it out someday.

#

i dont want bats

hot hull
#

Just check how CMI does it fingerguns

dusky drum
#

kd,a,d

#

its probably obfuscated

#

and i dont have 15€ to buy it

hot hull
#

Yugi, how would you manage the rotation of it tho

dusky drum
#

^^^^

#

its probably some raytracing

hot hull
#

Cause the bat would have to be moved around on the actual line, which I doubt you can detect (easily)

dusky drum
#

i mean i could check if player clicked entity (armorstand)

#

and then do some hacky stuff with offsets where exactly he clicked?

hot hull
#

Make sure you consider the rotation

dusky drum
#

ye

#

thats where ray-tracking comes in place

heady birch
#

he making KiteHolograms

static zealot
#

KiteHolograms soon™️ ? Or is that actually a thing?

heady birch
#

Probably never

#

TrHologram exists

static zealot
#

oh

dusky drum
#

???=?

#

im trying to copy CMI holograms.

#

or at least implement functionality into HolographicDisplays

static zealot
#

welp looks like TRH has that

#

already xD

dusky drum
#

hmm

static zealot
#

never heard of this plugin until now

dusky drum
#

same

#

omg its open sourced

#

lets seeee

#

eh but its only detecting if you clicked hologram and not where

heady birch
#

Awesome kotlin

static zealot
#

yeah so it will only detect if you click on the middle of the holo

#

because that's where the armourstand is

dusky drum
#

ye

#

so no ray tracing there

#

basicly checking if user clicked hologram is ez as fk

heady birch
#

You can use this algorithm I made back i-

#

sorry im busy and have to go

static zealot
#

xD

dusky drum
#

XDDD

#

i wish HD was packet based ( less lag on server i guess)

static zealot
#

I mean isn't TR menu?

hot hull
#

Gasper, just rewrite HD from scratch

#

NeutralHolograms fingerguns

dusky drum
#

XDDD, ah i stick with my naming style (simplecrops, simpleholograms - yes do this mahahaha, simplefly)