#dev-general

1 messages ยท Page 20 of 1

distant sun
#

Sealed means only certain classes can extend it iirc

old wyvern
#

15- preview and 17- released for sealed in java

pastel imp
#

instead of a single class

#

hence why I asked if this would work

agile galleon
#

that's what we were suggesting?

pastel imp
#

oh

old wyvern
ocean quartz
#

It's the best way to handle that

old wyvern
#

^

pastel imp
#

I am so confused ngl

ocean quartz
#

You don't want a single class that does half of things half the time

#

Single responsibility principle

pastel imp
#

will have to research those

#

Okay, so just to confirm if I understood correctly, create a sealed class (like GameItem or whatever) with all the common stuff everything has, then create a class for each game which has more detailed/uncommon proprieties?

prisma wave
#

the only difference between sealed and abstract is that sealed can't be extended by anyone

#

only you can extend a sealed class

#

which means you get some nice safety benefits but other than that it's the exact same

pastel imp
#

okay but like. is the logic correct that I sent?

prisma wave
#

and switch expression exhaustiveness relieved

#

yeah ig

crude cloud
#

there is little benefit from sealed types in a project that isn't meant to be consumed as a library/framework

prisma wave
#

true

#

except the aformentioned switch niceness

ocean quartz
#

Yeah mostly nice for switch

prisma wave
#

although...

#

you could argue that even needing switch on subtypes in an OO context is bad design

crude cloud
#

yes

pastel imp
#

I am shit at making good coding designs lol

#

chances are, even with what you guys told me, I probably will fk up somewhere and do a bad design

#

lol

prisma wave
#

obviously

old wyvern
#

Haskell moment : relieved :

oblique heath
#

prolog moment

prisma wave
#

prolog relieved

pastel imp
#

now that I think about it, is all this really needed for a discord bot?

crude cloud
#

"a discord bot" doesn't really mean anything, it doesn't have any measures or limits

#

it's like saying "a minecraft server"

#

what you decide to include or exclude in it is up to you

pastel imp
#

gonna be real, I am a bit lost on how to properly execute this, I understood the theory you guys gave, but executing it is a bit different, but we will see

ocean quartz
#
interface Item {
  val name: String

  fun printItem()
}

class ColoredItem(color: String, override val name: String) : Item {
  override fun printItem() {
    println("$color-$name")
  }
}

class ShapedItem(shape: Shape, override val name: String) : Item {
  override fun printItem() {
    println("$shape-$name")
  }
}

fun doSomethingToItem(item: Item) {
  item.printItem()
}

fun main() {
  doSomethingToItem(ColoredItem("#fff", "bob")) // prints -> #fff-bob
  doSomethingToItem(ShapedItem(Shape.ROUND, "no-bob")) // prints -> ROUND-no-bob 
}

@pastel imp Still confused?

pastel imp
#

thanks

ocean quartz
#

Yes cuz java would be bigger and I aint typing more than that

pastel imp
#

fair

rotund egret
#

kotlin makes great shorthand for java

solemn laurel
#

kotlin is just skript ๐Ÿ˜Ž

cinder flare
#

someone should recreate Skript on the JVM platform

ocean quartz
#

That's already a project actually

cinder flare
#

oh shit that's actually kinda cool

manic vector
#

Yo guys, is there a way to prevent player from using crafting table to fix tools? Like merging 2 swords/pickaxes/whatever toghether?

#

Like setting the result to null?

solemn laurel
solemn laurel
#

yes... PrepareItemCraftEvent

manic vector
#

I mean a event called when player fix tools by merging them

solemn laurel
#

hmm, maybe. im not sure if there is

#

it seems a little specific to deserve an event

#

oh

#

found this on another thread

#
call PrepareItemCraftEvent
check if event.isRepair() and then remove the result
#

apparently PrepareItemCraftEvent has an isRepair method xD

#

simple enough

manic vector
#

Yeah

#

Perfect

#

Tysm โค๏ธ

ruby dew
#

JVM itself is already a running plugin for all the platforms

#

and java bytecode is essentially skript

#

so java is basically a scripting language lmao

prisma wave
#

theres no such thing as a scripting language

#

it's a completely arbitrary term that doesnt actually tell you anything

ruby dew
#

it suffices as long as it tells me something lol

cinder flare
#

yeah scripting language is pretty unhelpful

#

a better (though still critically flawed) distinction that people often correlate with "scripting language" is interpreted language

#

which primarily applies to languages like Python, JS, PHP, Ruby, etc. that aren't compiled

#

but I mean, technically languages like Java and Kotlin and C# are interpreted by the JVM, though they go through a compilation step first

ocean quartz
#

Well, the languages are compiled, the bytecode is interpreted

cinder flare
#

yeah bam i stand by my point lol

rotund egret
#

My favorite part of programmer culture is designing terms and systems and then disregarding terms and systems later

hard dagger
prisma wave
#

that's interpreted languages

potent nest
gusty fulcrum
#

Is mcm down?

humble prism
cursive jolt
#

unfortunately it's still up for me

#

I got excited when I saw "goodbyte MC-Market..." as an announcement

#

but also unfortunately that was just the renaming announcement

hard dagger
prisma wave
#

what is a scripting language?

#

so hang on

#

if i wrote a compiler for python, is it still a scripting language?

crude cloud
#

From that perspective then java is also a scripting language, since you can simply do java Whatever.java, passing a source file rather than a compiled classfile

prisma wave
#

true!

hard dagger
crude cloud
#

so java is then an interpreted language, a compiled language and a scripting language

#

all in a single runtime

hard dagger
#

How is it interpreted

crude cloud
#

I can just pass and run from a source file

#

without compiling anything

hard dagger
#

Im pretty sure that compiles it in the bg

crude cloud
#

it sure does but does that mean if i'm using V8 then javascript is no longer an interpreted language?

hard dagger
#

This is gonna get a bit confusing woth definitions

#

java launcher automatically invoking the compiler and storing the compiled code in-memory

hard dagger
#

Ig thats interpreted then (java not tallin abt js)

crude cloud
#

exactly

#

it would be incredibly stupid if an "actual interpreted language" runtime didn't compile it to any form of ast before processing it

#

and parse every single thing every time lol

near crown
crude cloud
#

no

near crown
#

k

hard dagger
crude cloud
#

no, but it certainly is the first step before getting to bytecode

#

my comment was more about a runtime that does not perform any kind of compilation and does absolutely every single thing on the fly every time

#

even an ast would be helpful to have cached for that

pastel imp
#

uhm random question, taking into account that there are several stuff in this object, would you prefer something like object.getName() (aka a method for each data) or should I store the data in a hashmap and get it via object.get(Type.NAME)? (PS: technically not all data needs to be present, if it isn't, it should return --) What could be the better practice/design?

prisma wave
near crown
#

hey

prisma wave
#

absolutely not

near crown
#

absolutely bruh

half harness
#

lol

crude cloud
#

lol

hard dagger
half harness
#

I personally prefer getX rather than get(Type)

#

for ex in Spigot, not all Attributes are supported on every entity, whereas with getX, you could just have an interface for that method (and IJ gives a warning for getting attributes because it is nullable which might get annoying to do Objects.requireNonNull)

distant sun
cinder flare
#

gimme that postgres hand sanitizer

static zealot
cinder flare
#

awe sweet

#

excellent turnaround on that

manic vector
#

Is it just me or PrepareGrindstoneEvent is not working?

wind patio
#

what is not working exactly

crude cloud
#

the PrepareGrindstoneEvent

#

duh

wind patio
#

fr?

#

didn't realise

#

not like there can be some event-related methods that he's trying to call and it's not working

half harness
#

BlockExplodeEvent#getBlock returns air

#

great

dense dew
pastel imp
#

although their tracking site doesn't work

#

Also, will probs have to pay 20 bucks of fees according to the email

#

:-:

static zealot
pastel imp
#

I received my email the 12/01

#

shouldn't take much time for you

dense dew
pastel imp
#

I assume that's what you have to pay for delivery

#

etc

#

no idea

#

first time that participated in Hacktoberfest

static zealot
#

delivery is supposed to be free but there could be import taxes.

#

I believe those are what can end up costing you money.

pastel imp
#

how am I even supposed to pay for this ๐Ÿ‘€

#

oh I am blind

#

there's an invoice number and reference

humble prism
#

cheap**

#

(for the tshirt itself) not shipping

dense dew
#

my tshirt weights 0.00 lbs ๐Ÿ˜

queen saffron
#

Congrats you've bought air

pastel imp
#

but welp

half harness
#

aww I want a shirt :(

#

I didn't know what to PR to though

#

rip

pastel imp
#

we were hosting a UI-UX web project

#

basically several css/html components

#

etc

forest pecan
#

Intellij be trippin ๐Ÿ’€

#

I invalided caches, deleted all of gradle caches, and when i import my gradle project and build it with the gradle command it's successful but in Intellij its just syntax errors everywhere for some reason

half harness
#

worth a try

forest pecan
#

idk what i did

#

but it fixed it

#

lol

ruby dew
#

so when is the gatekeeper gonna open up the gate?

#

like it keeps asking you for the proof, but can you control the gate opening condition tho?

#

does that involve messing with chatgpt? like beta character ai or something?

#

@inner umbra i actually did the thing you tried to accomplish using simpler alternatives,
just by replacing the packet listener in the pipeline by my custom packet listener
theres no need for messing with low level socket tho (too hard for me lolz)

#

also tried to bait for downvotes in the mean time

#

also i could mess with the player counts and stuffs lmao

hard dagger
#

literally every time i use copilot it writes incorrect tests that i dont notice and spend 500 mins debugging my code when the test is wrong not the code

#

and then i disable it cuz bad but then i have to write so boilerplate so i turn it back on and cycle repeats

#

๐Ÿ˜ญ

ruby dew
#

chatgpt

glass vine
wind patio
#

it's like blindly copying from stack overflow, plopping it in without adjusting it and expecting it to work out of the box

hard dagger
#

but the reason i use gh copilot is when im lazy

#

cuz tests are boring af

crude cloud
distant sun
#

:)))

#

Could not resolve io.papermc.paper:paper-api:1.19.3-R0.1-SNAPSHOT.
I hate when this happens p.p

#

ah great, I had java 8 sdk for some reason

potent nest
crude cloud
#

nah

hard dagger
#

But my conclusion is yes because i like big numbers (like coverage)

inner umbra
ruby dew
ruby dew
#

cpp or java?

#

if its made in cpp i will give it a 10000 / 10

inner umbra
#

java

#

But with how simplistic it is I'm sure the code can be ported to any language. (or at least most lol)

prisma wave
oblique heath
quiet sierra
#

The real fun is the login process

crude cloud
#

encryption and compression yay

#

dynamically added during login ๐Ÿ˜ƒ

inner umbra
pastel imp
#

I am being forced to learn packets ๐Ÿ˜ข

#

fking OSI and TCP

crude cloud
#

lol i remember having to study that in hs

#

then i went ahead and never used any of that knowledge and it vanished from my mind, crazy

wind patio
#

Packets in high school what the fuck

crude cloud
#

communication systems

#

studied for electronics technician in hs

wind patio
#

Yeah well I wasnt aware schools around the world have that kind of stuff in hs

pastel imp
#

ye

#

in luxembourg you can choose a so called "section"

#

for the last 4 years of hs

#

(total is 7 years in hs)

#

I studied 2 years engineering

#

and now on my first of informatics

#

(you have to do engineering to be able to go to informatics, don't ask me why)

#

but yeah, like emily said, communication systems. We are literally just learning how protocols work like OSI and TCP... Overall networks, the types (LAN, PAN, MAN, WAN and GAN), circuit- & packet switching, etc.

#

Now we are going a bit deeper into the layers of OSI & TCP respectively

#

anyways enough speaking ๐Ÿ’€

agile galleon
#

yeah we have middle and highschool combined into one and you can choose between 3 "directions" in the highschool part of the time spent there

cinder flare
pastel imp
#

that's quite limited ngl

#

only 3 options xD I am not used to that

agile galleon
#

yeah what do you have

pastel imp
#

Here you have at least 8 directions you can follow for the last 4 years in hs

agile galleon
#

shesh

crude cloud
agile galleon
#

yeah i get confuselled with different school systems and I don't exactly remember my time there

crude cloud
#

same

cinder flare
#

yeah no not here lol, you just take high school and get like, total of 8 electives over 3 years

crude cloud
#

every time brits or people from the us talk about this or that grade i'm like

#

uh

cinder flare
#

well at least we don't have sixth form

#

in most of the US, it's: 1-5th grade Elementary, 6-8th grade Middle School/Junior High, 9-12th High School

pastel imp
#

For context, you go from 1st to 6th in primary school and then in highschool it's from 7th to 1st grade

#

confusing, ik.

agile galleon
#

i see

#

we have schools based on such topics

pastel imp
#

But for the first 2 years you have 8 options, and then you have for the last 2 years, 15 options lol

agile galleon
#

damn

#

all in one school?

pastel imp
#

but ye pretty much yes

agile galleon
#

lulz

pastel imp
#

in my hs I have 12 from those 15

#

11*

#

Although my hs is specialized and known for being the best in informatics

agile galleon
pastel imp
agile galleon
pastel imp
#

(totally hate it, but I understand it sadly)

agile galleon
#

same goes with french here lmao

pastel imp
#

fair

#

although I also hate french

#

sus

agile galleon
#

lmao

pastel imp
#

you saw nothing

agile galleon
#

what language you speaking then?

pastel imp
#

I am portuguese

#

so at home portuguese

#

but like

#

speak with friends etc?

agile galleon
#

yeah

pastel imp
#

there's no specific language ๐Ÿ’€

agile galleon
#

or with your teacher idk

pastel imp
#

everyone pretty much knows 5 languages

#

so we do a big mix

#

if we don't know a word in luxembourgish, we say it in english

#

some convos legit start in portuguese, go to french, then to english, back to portuguese, then luxembourgish, then french, then german, then english, then french again and end with portuguese again

#

๐Ÿ˜‚

agile galleon
#

Ech Lรฉift waarm Bunnen!

pastel imp
#

the power of speaking 5+ languages be like

agile galleon
#

lmao

pastel imp
agile galleon
#

and I can't deal with 4 languages lmao

pastel imp
#

xD

#

You kinda get used to it in luxembourg

#

since you are forced to know at least 4

#

AKA the 3 main ones french, german and luxembourgish... and english although it isn't main

#
  • your own language, since most people here come from the outside and know another language
#

like me with portuguese

agile galleon
#

nice nice

pastel imp
#

in theory, if we count the languages I can only speak a tiny bit

#

I know 9 languages

#

๐Ÿ’€

agile galleon
#

mr language god

pastel imp
#

nha

#

my cousin wins

#

she knows 16 languages

agile galleon
#

no shut up

pastel imp
#

excluding dialects lol

agile galleon
#

i give up

pastel imp
#

She LOVES languages

#

lol

#

she has traveled the world

#

good life ngl

cinder flare
pastel imp
cinder flare
#

that helps less

#

like left to right?

#

why are there two headers for the columns?

pastel imp
#

exactly the point

#

uh

#

1s

#

red is from 4th to 3rd (hs)

#

blue is from 2nd to 1st (hs)

#

the numbers represent the grade

cinder flare
#

why are there two rows

#

and why do they not go down

pastel imp
#

the letters behind is just the acronym for that section

cinder flare
#

like what do the numbers mean

pastel imp
cinder flare
#

so there's multiple 3 and 4 grade?

pastel imp
#

besides in A3D, that's just arts and 3d stuff

pastel imp
agile galleon
#

what the jesus

pastel imp
cinder flare
#

look at that bad boy

#

so hard to grasp

pastel imp
cinder flare
#

you read it top to bottom lol

agile galleon
#

yeah like the mcdonalds menu

cinder flare
#

like any well formatted data visualization

pastel imp
#

how many students does a high school in america even has?

#

or in germany?

agile galleon
#

800

cinder flare
cinder flare
pastel imp
agile galleon
#

they be getting less and less

cinder flare
#

my high school had 3000 students and we were only grades 10-12, some people i know went to schools with 400 people from 9-12

pastel imp
#

we have ~1k

agile galleon
#

nice

#

and I still have no idea how 800 people fit in the building

pastel imp
#

now I am going to google german schools

#

I am curious

agile galleon
#

dont

pastel imp
#

you are near me

#

so I assume it's similar

agile galleon
#

i am what

pastel imp
#

the country

#

not you

#

this looks nice

agile galleon
#

xD

pastel imp
#

kinda similar to a school we have here too

agile galleon
#

i mean yeah

pastel imp
#

do you also have like swimming pools and football fields?

#

integrated to the highschool

agile galleon
#

we don't usually have swimming pools

pastel imp
#

oh k

agile galleon
#

although there is usually one near

pastel imp
#

fair enough

agile galleon
#

luckily for me my swimming pool was like 10 meters away xD

pastel imp
#

WHEN I had swimming

#

mine was legit in the same building at my old high school

agile galleon
#

that looks clean

pastel imp
#

ye my old hs was quite new

#

and modern

#

it had like pretty much everything you can imagine

agile galleon
#

like half of the schools I went to are >50 years old

pastel imp
#

also at my old hs

agile galleon
#

wasn't that bad tbh

pastel imp
#

I believe that

#

I switched schools specifically because of sections

#

they didn't had GIN (informatics) where I was

#

this one is older

#

although with the renovations it looks basically new

agile galleon
#

but we're really behind in it here KEKW_laugh

#

not in my school particulary but in germany

pastel imp
#

oof

#

different countries

#

different management

agile galleon
#

def

pastel imp
#

luxembourg is also technically "rich"

agile galleon
#

shitty politics currently here

pastel imp
#

everyone says I am in a private school

#

jokes on them, it's a public school

agile galleon
pastel imp
#

I am rlly glad government here prioritizes education a lot

agile galleon
#

i can see

pastel imp
#

we are also the first country in europe (even world?) to have 100% free public transports

agile galleon
#

gimme

pastel imp
#

you might get it soon

agile galleon
#

i mean I have free cause school but

pastel imp
#

I recall hearing that several countries in the EU loved the idea

agile galleon
#

that not gonna work out here in Germany though

#

cause Deutsche Bahn

#

is shit

pastel imp
#

but then you come here and it's everything free

#

then to go back is also free lmao

#

you only pay in germany

#

in that case

agile galleon
pastel imp
#

it's quite confusing

agile galleon
#

germany is in europe afaik, iirc

pastel imp
#

bruh brain fart

#

meant germany to luxembourg

#

๐Ÿ˜‚

agile galleon
#

yeah go shit on DB

#

we hate it too

pastel imp
#

xD

#

welp should probably go to sleep

agile galleon
#

but it's like state stuff that's half privatized that didn't work out correctly, has expensive tickets and is ALWAYS late

pastel imp
#

gotta wake up at 6am ๐Ÿ’€

agile galleon
#

same

pastel imp
#

so we only sleeping like 5h30mins

#

lmao

agile galleon
#

although if I sleep now, I'll be tired in the morning

pastel imp
#

ye.. happens to me too..

#

If I sleep more than 3 hours, I wake up dead

#

I either sleep less than 3h or more than 8h lmao

agile galleon
#

same

pastel imp
#

in between and I am dead

agile galleon
#

stupid but true

pastel imp
#

but I am tired so will just... sleep ๐Ÿ’€

#

bye, gn, nice talk

agile galleon
#

gn

wind patio
distant sun
#

๐Ÿ˜ญ why are my colleagues always like this

hard dagger
#

w indentation
w naming conventions
w java 8
w DRY

sly sonnet
#

why cant the property be just put inside the switch?

distant sun
#

Why can't he use Enum#valueOf ๐Ÿ’€

remote goblet
#

that makes me break down emotionally

hard dagger
potent nest
#

switch might be faster

#

They probably benchmarked it PepeLa

hard dagger
#

but its a premature optimization

#

"Premature optimization is the root of all evil"

hard dagger
#

lol

#

actually i have a proj with jmh open rn

agile galleon
crude cloud
#

I've had that happen before, I think it's updating the message that does that on the client

agile galleon
#

yeah

#

fixed it

pastel imp
#

doesn't it go away on client restart?

forest pecan
#

all those modifiers ๐Ÿ’€

#

public abstract static sealed

#

i wonder what else you can add

hard dagger
#

strictfp

#

redundant cuz its always strictfp now but u can

forest pecan
#

Ngl tho strictfp can be useful at times

#

Like yeah its a joke cause you never have to touch it 99.9% of times

#

but sometimes in like for ex a multiplayer game you don't want calculations to be different

prisma wave
#

as of java 17 it is literally useless

forest pecan
#

Wait yeah lmao i just checked

prisma wave
#

also non-sealed is slightly longer than sealed if ur going for longest modifiers

#

im still not over the hyphenated keyword

#

where is strict-fp!

forest pecan
#

!sealed ๐Ÿค“

prisma wave
#

real

cinder flare
#

surely that's just the default

prisma wave
#

no

forest pecan
#

its to allow already sealed classes to be unsealed

prisma wave
#

^

cinder flare
#

oh I see

#

how does that work

prisma wave
#

sealed class subtypes are sealed by default

forest pecan
#

^

cinder flare
#

ah

prisma wave
#

so you have to explicitly mark them as non-sealed

cinder flare
#

that does indeed make sense

forest pecan
#

you can seal certain part of the hierarchy while also unsealing others

cinder flare
#

imagine knowing things about java

#

im a python dev now

#

all i know is self and **kwargs

prisma wave
#

i hope you die in a horrific and tragic fashion

cinder flare
#

kwargs makes for nice to use interfaces

#

java is also kind of nice

#

languages without function overloading are not nice

forest pecan
#

php is also kind of nice

cinder flare
#

what

#

no

forest pecan
#

lol

prisma wave
#

bro tried sneaking php in there

cinder flare
#

im ngl, my dream api is one function that takes like up to 20 kwargs and has every option you'd want as a kwarg

prisma wave
#

thought we wouldnt notice

cinder flare
#

java and especially rust like separate classes/objects just for configuration are the bane of my existence

prisma wave
#

what the hell

#

that's a terrible take

cinder flare
#

nah bro

#

i want one like database.connect() that takes every connection parameter i might want

#

you can split it up yourself like in the implementation if you want

prisma wave
#

terrible

cinder flare
#

but constructing 5 configuration objects just to make one thing makes me want to stab someone

prisma wave
#

grow up

#

all i can say

cinder flare
#

what lol

#

what benefits does that even apply

#

it just makes more objects in memory

prisma wave
#

who cares

cinder flare
#

me and the lines of code it takes to create them

#

like they're literally just data classes

#

just pass the params straight in what's the point

prisma wave
#

and you dont need to write functions with 30 parameters

#

and yes i know you said kwargs

cinder flare
#

yeah you only use the ones you want

#

that's the point

#

like 3 required params and the rest optinoal

#

cause most people won't use like any

prisma wave
#

you could say the same about config objects

#

look at like hikari

#

you make a single config wrapper, set the normal attributes and then never touch it again

cinder flare
#

yeah but config objects take a line to instantiate then a line per setting

#

instead of just inline params

prisma wave
#

.let {} ๐Ÿค“

cinder flare
#

they have that in java?

prisma wave
prisma wave
# cinder flare they have that in java?
 public static <T> T also(T t, Consumer<T> consumer) {
        consumer.accept(t);
        return t;
    }   
 return also(vehicleFactory.createVehicle(vehicleConfig),
                curry(flip(this::spawnVehicle)).apply(location)
        );
``` ๐Ÿ˜
#

worst thing ive ever written

cinder flare
#

bro yeah what lol

#

just gimme kwargs

prisma wave
#

no

prisma wave
cinder flare
#

what do i want to deserialize, i'm putting arguments into a function

prisma wave
#

well for example, database credentials

#

from a config

cinder flare
#

i rarely need to copy and if i want to, i can make a python dict and then spread keyword it out

cinder flare
crude cloud
#

imagine if you could do

ConnectionFactory cf = ConnectionFactories.get(args[0]);

and took something like r2dbc:driver://user:password@host:port/database?prop1=val1&prop2=val2 and realised what driver to use from it too
damn if only there was a database connection library that did it

cinder flare
#

what lol

prisma wave
cinder flare
#

i don't want connection strings

#

i want type safe parameters

#

named parameters, even

#

very easy to read

prisma wave
#

bro talking about type safety in python ๐Ÿ˜ญ ๐Ÿ˜ญ

cinder flare
#

well theoretical type safety lol

prisma wave
#

barking up the wrong tree mate

cinder flare
#

unenforced type hints ๐Ÿ˜Œ

hard dagger
#

So useful

cinder flare
#

yeah they're good for my ide

hard dagger
#

Actual static typing is way better

cinder flare
#

to be fair I did just recently get bitten by doing a refactor of a form and trying to access old data

#

i agree

prisma wave
cinder flare
#

i would love a statically typed language with a kwargs style

hard dagger
#

Builder pattern ๐Ÿ™„

prisma wave
#

OOP ๐Ÿคฃ

cinder flare
#

builder pattern is certainly an improvement over making 15 data objects

#

but still kinda yucky

sweet cipher
prisma wave
#

yeah that's literally just a record type lmao

cinder flare
#

i've recently noticed kotlin's like "builder" init block thingy where you like pass in this and set stuff

prisma wave
#

like the exact same thing

sweet cipher
#

So then how would you make that statically typed

cinder flare
#

it's pretty sweet

prisma wave
#

in other words

#

a data class

cinder flare
#

yeah less so the actual mechanics of it and more the style

#

i guess you can do that with just optional unordered named arguments

sweet cipher
#

But don't you not have to pass all the possible values?

prisma wave
#

yeah so default values

hard dagger
#

Why not just use a map

prisma wave
#

easy in kotlin

prisma wave
cinder flare
#

yeah what lol

cinder flare
#

just nobody in other languages ends up doing that

hard dagger
cinder flare
#

and some languages don't even have function overloading so it gets even worse

prisma wave
cinder flare
#

what is the 2 stars for? python? lmao

hard dagger
#

Yes

cinder flare
#

i mean the primary reason i use python now is Django

sweet cipher
#

Because Python is 2 stars out of 10

cinder flare
#

no other web framework has come close

hard dagger
hard dagger
cinder flare
#

messy? it's one of the most structured, that's why I love it so much

#

it's batteries included and has an awesome structure for everything

#

excellent conventions for where every type of file goes, configuration in the programming language instead of like xml files, awe man it's great

prisma wave
#

@cinder flare gimme a good example of what you want

#

im not trying to argue

#

just experimenting

prisma wave
#

ok

#

oh my

#

thats a lot

cinder flare
#

yeah

#

but you only end up using like, 4 or 5

#
        con = Connection(LDAPPool.pool, auto_bind='NO_TLS', client_strategy=SYNC,
                         user=settings.LDAP_AUTH_CONNECTION_USERNAME,
                         password=settings.LDAP_AUTH_CONNECTION_PASSWORD, check_names=True)
hard dagger
cinder flare
#

that's my usage

cinder flare
#

i dunno, i just really like batteries included frameworks

prisma wave
#

config files are good actually

cinder flare
#

building my own from a microframework is ass

prisma wave
#

config in code is nice and all

#

but in practice

#

config files are far easier to hotswap

#

no need to recompile anything

cinder flare
#

the point is .env files bm

#

read and validated at runtime

prisma wave
#

hows that any different to a config file

cinder flare
#

not checked into your version control

hard dagger
#

why is that required for xml??

cinder flare
cinder flare
hard dagger
cinder flare
#

okay

half harness
hard dagger
#

and u can use env vars in spring for everything

cinder flare
#

okay but i'm not using spring brother

prisma wave
cinder flare
#

the point is docker integration

#

that's the biggest thing

half harness
#

like nodejs

#

besides that idk

cinder flare
#

and docker mostly lol

crude cloud
#

i'm sure spring has docker integration lol

cinder flare
#

yes but that's not what i'm talking about

#

you make one .env file with your postgres user/pass/host/etc. and then import it into your web app and into the postgres docker container so that they match

#

but yeah most of my opinion on web frameworks is batteries-included vs not

#

there aren't many batteries included and basically all the big ones have a thing i don't like

#

Spring is in Java, Rails is kind of outdated and is in Ruby, Laravel is in PHP

#

and that's basically all the batteries-included frameworks i can think of

prisma wave
#

what's wrong with spring being in java?

cinder flare
#

Java is tedious to write for many reasons lol

prisma wave
#

ok so use kotlin then

#

or scala

cinder flare
#

yeah i mean i feel like if i ever to swap it'll be spring with kotlin

rotund egret
#

jython

cinder flare
#

but still i dunno how much i like spring, annotation hell and all that

prisma wave
#

or jython!

#

perfect

cinder flare
#

the organization feels bizarre from what i've seen

#

oh I also quite like languages with map literals I've come to realize

#

like that's a big part of why i like python so much

hard dagger
#

use groovy ๐Ÿ’€

prisma wave
#
[(a, b),
 (c, d)]
``` ๐Ÿ˜Œ
cinder flare
#

lol

prisma wave
#

best literals

cinder flare
#

i mean the good old json-style ```python
dict = {
'pog': 3,
'gamer': 'pogchamp',
}

#

what, it just makes the most sense to my brain

#

maybe i've looked at too much json lol

hard dagger
#
def map = ["name":"Jerry", "age": 42, "city": "New York", "hobby":"Singing"]

close enough

cinder flare
#

oh yeah i mean that could be okay

#

is that groovy though lol

hard dagger
#

yes lmao

cinder flare
#

oh no

hard dagger
#

why groovy is the best lang ever

#

nothing wrong with it

cinder flare
#

you're dissing my language choices and you like groovy lol

hard dagger
#

im not that crazy

cinder flare
#

ah

prisma wave
#

might try again tomorrow

hard dagger
#

spock alr tho

prisma wave
#

you could do it with like a type level list of all the set attributes

#

and then have calling the function like merge that list with the defaults

#

somehow

cinder flare
#

moral of the story, i feel like kotlin is my best way forward in terms of modern language for web backend but there aren't any really good batteries-included frameworks

#

maybe C# and ASP.NET Core? I've heard good things from one of my friends but the ecosystem is kinda cringe i feel like

prisma wave
#

F#

#

๐Ÿ˜Œ

cinder flare
#

i mean yeah theoretically i would like to

rotund egret
#

Kotlin#

cinder flare
#

but i think im at a point where i just want a nice procedural lang yk

prisma wave
#

ew

cinder flare
#

there really aren't that many nice ones though man, it's kinda painful

#

oh I also just had to do a MIPS assembly assignment

#

so maybe that's why I'm pining for super high level languages lol

prisma wave
#

you know whatโ€™s even higher level than procedural?

ocean quartz
# cinder flare but still i dunno how much i like spring, annotation hell and all that

Dude Spring is magical, I am having to learn backend dev so I've been watching our backend dev do things and it's bizzare, add a class here add annotation there, and boom you have a microservice fully functional
I'm always like "what wtf, how does that work" - "I have no idea" lmao
Jokes aside, it surprises me how much is done for you in the background and just adding a few annotations change the behaviour completely
Sometimes you add a library that you don't even have to touch and it'll change how everything behaves

cinder flare
#

though even DRF uses annotations, i dunno, the java lifestyle just feels so outdated

#

maybe it's better in Kotlin?

ocean quartz
#

Probably, never really used it with Java so can't comment on the differences

#

I do know it works nicely with coroutines and kotlinx.serialization

cinder flare
#

well that doesn't sound so bad then

#

maybe I should reevaluate

hard dagger
#

u should try micronaut its more modern and if u know spring u dont its easy to learn

cinder flare
#

my thing is I want batteries-included

#

i don't want to find a separate orm and authentication framework and serialization library and template engine and piece em all together

hard dagger
#

u dont have to tho

#

spring handles most config

cinder flare
#

isn't micronaut, as the name implies, a micro framework?

hard dagger
cinder flare
#

it does not look very opinionated

#

convention over configuration, etc. etc.

hard dagger
#

thats good

cinder flare
#

well no because that's what I like about Django

#

there's one big tool for a lot of things

#

there's one ORM, there's one templating language (mostly), there's one file for your views and it's called views.py, etc.

#

makes it easy to scale and makes it easy to get acquainted with a new project if you are introduced to one

hard dagger
distant sun
#

When adding ads to a website, can you somehow make google place the ads in specific places where you want them to be so it doesn't break the design??

distant sun
#

oh so you add hat ins with class adsbygoogle, nice

pastel imp
#

FINALLY

#

received my Hacktoberfest stuff

static zealot
#

damn. I didn't even receive an email yet

distant sun
#

๐Ÿ˜ฆ

#

congrats afonso

pastel imp
#

ty

distant sun
#

I still cant track mine ffs

ocean quartz
#

Gaby be like

pastel imp
#

also received these

static zealot
static zealot
distant sun
distant sun
pastel imp
#

My beloved

distant sun
#

PROCESSED AT LOCAL DISTRIBUTION CENTER
11:45 PM EET, ROBUHC, RO
yesterday ๐Ÿ˜ฎ

#

looks like the tracking url is broken on mobile, but works fine on desktop

pastel imp
#

had to patly 6 bucks

#

god damn taxes

pastel imp
#

I didnt think about trying it on mobile

#

so I just didnt track it

#

lmao

distant sun
#

yeah it says Bad Request on mobile

pastel imp
#

came home today to find out it came today

#

but it wasnt working for me either

#

yo what

#

and 100 bucks credit in digital ocean

distant sun
#

damn what

pastel imp
#

quite a W

potent nest
distant sun
#

oh .. I didn't realise it is http in email

potent nest
#

Yeah I've only seen it today too

distant sun
#

looks like I have 200$ credits on digital ocean, is that some new user bonus?

pastel imp
#

cause the 100$ credits I got were from a qr code

#

totally different page

distant sun
#

it expires in 60 days, I think it is

pastel imp
#

oh

#

then it might be? no idea

distant sun
#

nvm I got an email saying I've received 200$ "promotional credit"

#

no

#

@pastel imp did you got the code via email?

distant sun
#

wrong channel, and you need to verify your purchase and to be patient

pastel imp
#

behind this

distant sun
#

yeah but from where Afonso?

#

ohhhhh

#

lol

pastel imp
#

xd

chilly zenith
#

@hot widget Don't mass ping.

timber oak
#

Which server jar would you guys say is the most efficient in 1.19?

#

As in Paper, Purpur etc

half harness
#

there's also a newer one which is a fork of Pufferfish but I don't remember the name

timber oak
#

Oh wow dkim lvl 7, nice

#

I'll try Pufferfish then, ty

ocean quartz
#

Paper is more than enough for most people, if you want more custoizability then Purpur

half harness
#

I mean he specifically mentioned most efficient ๐Ÿคท
I personally use paper since my updater script uses paper and I couldn't find a pufferfish api

timber oak
#

But going from 1.12.2 to 1.19 is a huge change in required performance, right?

ocean quartz
#

Yes, but not as bad as how 1.13 was

timber oak
#

I see, what makes the later versions require better hardware? New map generation?

#

I mean itโ€™s a lot of things, but what are the main reasons

#

From 1.12.2 to 1.19 for example

agile galleon
#

just look at the changes

agile galleon
#

ooh downloads

distant sun
agile galleon
#

yeap wanted to find the link

ocean quartz
#

But ofc there are optimizations they do once in a while like in 1.15

ionic gust
#

im so used to spigot's command handling that i remade it in JDA (java discord api) ๐Ÿ˜ญ

#

my god its so scuffed

cursive jolt
#

don't use pufferfish api

#

it's the same api as paper

ionic gust
#

rekt

#

no argument

half harness
#

like this?

#

I hope you didn't

#

๐Ÿ’€

#

it's fine for minecraft but not so much for discord

ionic gust
#

just like how commands r created/managed by the plugin (in this case, the bot)

#
public abstract class CoCommand {
    @NotNull protected final Cobalt cobalt;

    protected CoCommand(@NotNull Cobalt cobalt) {
        this.cobalt = cobalt;
    }

    public abstract void onCommand(@NotNull SlashCommandInteractionEvent event);

    @Nullable
    public Collection<Command.Choice> onAutoComplete(@NotNull CommandAutoCompleteInteractionEvent event) {
        return null;
    }
}
#

then i just extend the abstract class when making new cmds ^

#

here's simple one without autocomplete:

public class Invite extends CoCommand {
    public Invite(@NotNull Cobalt cobalt) {
        super(cobalt);
    }

    @Override
    public void onCommand(@NotNull SlashCommandInteractionEvent event) {
        if (isOwner(event)) event.replyEmbeds(new CoEmbed(CoEmbedType.SUCCESS)
                .setTitle("Bot invite")
                .setDescription(cobalt.jda.getInviteUrl(Permission.ADMINISTRATOR))
                .build()).setEphemeral(true).queue();
    }
}```
#

matt is typing im going to get bullied now ๐Ÿ˜ญ

ocean quartz
#

Oh dw nothing to do with your problem, it's actually me that have a problem

ionic gust
cinder flare
ionic gust
ocean quartz
#

I need a math expert, given 2 points in a grid, how would you count how many points are available inside?
Under you'll see an example of an it on an inventory, the top stone is at min position which is 2, 2 (starting from 0 ofc), the second stone is at max position which is 4, 4, the area would be 9 slots, I can get to it using 2 fors, like:

for (row in min.second..max.second) for (col in min.first..max.first) {
    counter++
}

Counter would be 9, but I'd like this to be done with math instead, any big brains?
I know (min.second..max.second).count().times((min.first..max.first).count()) gives the same result which I could turn into some funky math but idk if there is something better and it's too late for my brain to think

ionic gust
cursive jolt
#

(4 - 2 + 1) * (4 - 2 + 1)

ocean quartz
#

Yeah that one I had gotten, was expecting to need to type less kek

ocean quartz
cinder flare
#

area = length * width is what i'm guessing

#

which is true for rectangles lol

ocean quartz
#

Ah, well it'd all turn back into the range count above, aka what define sent

#

I'll just go with it, too tired

ionic gust
cinder flare
#

is that range count just subtraction?

#

because you can do that with just subtraction

ocean quartz
#

Yeah it is

cinder flare
#

ah okay good

half harness
#

๐Ÿค”

fair latch
#

With DeluxeMenus , is it possible to add a custom item game in menus ?

distant sun
#

ask in multiple channels, see if anyone knows LOL

static zealot
fervent tinsel
#

smth like that

wind patio
#

(abs(x2-x1)+1) * (abs(y2-y1)+1), no?

#

given your example
(abs(5-3)+1) * (abs(5-3)+1) = (2+1) * (2+1) = 3*3 = 9

fair latch
#

Who knows how to disable possibility to Push other players

#

I can move a player from spawnpoint to warzone . How to disable it

wind patio
#

Some .yml server config does that, I think. paper or spigot one, idrm

fair latch
#

I have configs

#

But where :-'(

agile galleon
#

google it

wind patio
#

there, I did googling for you

fair latch
#

I have spigot

#

wait

#

I found solutions

#

I have to download some specific plugins

#

Thanks

wind patio
#

well, don't

#

use paper

sly blaze
#

How can I get the name of everyone within the Guilds category, I tried that but it's returning []


        List<String> guildc = ylc.getStringList("Guilds.");

I want to get the "TKBOGAESFOLADO" and the "gate" etc, everything inside "Guilds"

  TKBOGAESFOLADO:
    Owner: YTDragon00100
    Name: TKBOGAESFOLADO
    Level: 0
    Members:
    - YTDragon00100
  gate:
    Owner: YTDragon00100
    Name: TKBOGAESFOLADO
    Level: 0
    Members:
    - YTDragon00100
mental trench
#
Set<String> names = ylc.getKeys(false);```
sly blaze
#

would this get only the guild names?

mental trench
#

i have no clue what are the guild names

sly blaze
#

TKBOGAESFOLADO and gate?

mental trench
#

but it will return

#

RKBOGAetc

#

gate

sly blaze
#

ah ok

#

that's exactly what I wanted I'll be here

mental trench
sly blaze
#

in case I'm going to need a List<> and the way you sent me didn't work very well

#

I need a List<> for me to use in the hashmap I created

half harness
#

(if you do it on the ylc variable)

rotund egret
#

Configurate is pretty hot

half harness
#

for a couple reasons

#

๐Ÿฅฒ

sly sonnet
#

i mean it still works

half harness
#

ye

#

but kotlinx >>

#

๐Ÿ˜Œ

sly sonnet
#

what's that

half harness
#

configuration library for kotlin

#

but

#

I can agree that spigot config = bad

rotund egret
half harness
#

ye thats what i mean

#

i should've clarified tho

#

thx for the clarification

distant sun
#

does IJ have that side bar thing from VSC where you can see your code and where you are currently?

crude cloud
#

there's a plugin for it

#

@ocean quartz knows

ocean quartz
#

Codegleance or something like that

#

Ah CodeGlance3 is the actual name

queen saffron
#

Close enough xD

distant sun
#

thanks bb

crude cloud
#

np

queen saffron
quaint isle
#

who needs regex when there's chat gpt ๐Ÿ˜

rotund egret
#

Just going to make an api call to chat-gpt to format something for me instead of using a regex expression

queen saffron
#

50$ a month

agile galleon
wind patio
#

first mistake is running on windows ๐Ÿ’€

#

first thing I notice is entities, chunks and tile entities drop down at the moment when tps drops

#

and you're using clearlag - dont

agile galleon
#

Not my profile, thank you very much

wind patio
#

I'm not a certified spark profile analyzer so dont take my word for it, this is just what I noticed

agile galleon
#

Yeah no it makes complete sense

timber oak
#

Is it possible to update a 1.12.2 world to 1.19? Even though the world generation is entirely different?

static zealot
#

I'm not entirely sure. I know between some versions you basically have to upgrade version by version but idk for how many versions that works

crude cloud
#

pretty sure you can upgrade just by straight up running the newer version, but of course make backups as always before performing major updates

humble prism
#

U mostly can, u can't downgrade tho, and World generation will only affect new chunks that hasn't been generated, except for the new world height

rose wharf
#

How to make in the plugin to appear behind the player particles OR resistance appeared?

timber oak
#

I see, thanks

tidal pecan
#

i have a vehicle plugin and when i try to place it says you cant place vehicle in this world

#

why ๐Ÿ˜ญ

wind patio
tidal pecan
#

ik that i was saying why like someone who just lost a love one would say why

#

and i wont say why just for you bbg ๐Ÿ˜‰

#

nvm i figured it out

pastel imp
#

me reading this: ๐Ÿ’€

wind patio
half harness
#

Is there a way to bring back the warning that occurs when you run/debug a configuration already running?
I accidentally pressed the checkbox to disable it ._.

crude cloud
half harness
#

missing ๐Ÿ˜–
oh well its not a huge deal

#

for me that checkbox says "Store as project file" instead

#

oh nvm found it

#

it was below in a dropdown "Modify options"

#

ty

crude cloud
#

what intellij version do you have?

#

help โ†’ about

#

actually i don't care

cinder flare
#

i usually just stop responding to their pings/messages

#

but this is much funnier

crude cloud
#

lol

agile galleon
#

I agree

wind patio
#

recommend me an idea for a website for my bachelors degree project

static zealot
#

So people can add images of a cat and add metadata such as cat species, age, etc they can also use filters to get an image of a cat that is a specific species and between ages x and y

wind patio
#

so basically an image storing platform, similar to, let's say, imgur?

wind patio
pastel imp
#

I mean, does a bachelor project need to be unique/fancy?

#

lol

#

doesnt it just need to prove you know what you are doing?

static zealot
#

Or I guess that's what tags are for

wind patio
#

but fancy - easier pass, as usual

static zealot
#

what's wrong with my idea? Are cats not fancy enough for you? :))

distant sun
pastel imp
#

fair enough

distant sun
#
export declare type InferIdType<TSchema> = TSchema extends {
    _id: infer IdType;
} ? Record<any, never> extends IdType ? never : IdType : TSchema extends {
    _id?: infer IdType;
} ? unknown extends IdType ? ObjectId : IdType : ObjectId;```
This looks .. cursed
pastel imp
#

Guys

#

and girls

#

I have an urgent question.

#

How to deal with procrastination? ๐Ÿ’€

static zealot
pastel imp
#

pure example of procrastination be like

remote goblet
#

its been so long since ive written a kotlin plugin im kinda struggling

#

ive completely abandoned all my knowledge of this language

distant sun
#

Ikr

spring yew
long dagger
#

you gotta have that alpha male top g mindset

zinc vapor
#

is it possible to edit a datapack with just the given zip?

#

or would i need the source code or something

humble prism
#

The datapack/zip is the source

#

Iirc

distant sun
#

Yes

rose wharf
#

NICEEE!!!!!!!

#

I received all JetBrains products for free

#

Yay!!!

spring yew
#

student license op

rose wharf
agile galleon
obtuse gale
#

hi guys

crude cloud
#

hi

wind patio
#

well, you could write some code for it

#

probably

distant sun
sly sonnet
#

What is the correct way to compile chat-chat?

#

because i can't seem to be able to do that