#dev-general

1 messages ยท Page 380 of 1

forest pecan
#

!!!

#

!!!!

#

ban

#

!!

#

say coc k frosty

hot hull
#

Ikr Starmism, Piggy is an aussie so weird that they'd remove it

prisma wave
#

wtf

cinder flare
#

i feel like bm just walked in on some weird shit lmao

forest pecan
#

Let's start haskell convo!

hot hull
#

@ocean quartz Wakey wakey, how do I have an optional argument in mf cmds?

quiet depot
#

wait what's wrong with cunt

onyx loom
#

@Optional frosty

hot hull
#

blacklisted apprently

quiet depot
#

this is actually a word I use daily irl

prisma wave
forest pecan
#

please rise

#

to our national anthem

prisma wave
#

๐Ÿ˜ซ

hot hull
#

Kali, :C

forest pecan
#

Use

sinful parcel
#

i need to watch more oracle tutorials on how 2 plugin without putting it all in Main.java

forest pecan
#

OptionalInt

#

use OptionalInt

onyx loom
#

wat

onyx loom
#

@Optional is an annotation in mf-cmds

quiet depot
#

what the fuck, that's a thing

#

that's cool

ocean quartz
hot hull
#

hah same thing

onyx loom
#

smh

sinful parcel
#

Btw guys

hot hull
#

oh

#

I see, danke Matt

onyx loom
#

๐Ÿ˜

hot hull
#

Oh Kali, I didn't even see yours smh

cinder flare
#

lmao Matt the savior

#

haha

sinful parcel
#

How come a lot of plugins are coded on this 'jdk' called 'openjdk' how does oracle allow this? i signed up for a account! what are these fraudelent jdks doing?

hot hull
#

oracle is fucking shite

forest pecan
#

its not fradulent

#

lol

hot hull
#

Don't use oracles jdks

forest pecan
#

it will work on any jdks

#

if you use openjdk

cinder flare
#

use AdoptOpenJDK

forest pecan
#

you have to sign up for a fucking account for oracle these days

sinful parcel
#

Already do, I've loved the switch

lunar cypress
#

the oracle jdk is based on open jdk

#

and it's mainly interesting for big companies that need oracle to fix stuff for them

forest pecan
#

lol

#

big companies begging

sinful parcel
#

Interesting

cinder flare
#

it's the same reason RHEL exists

sinful parcel
#

but why do i see SO MANY tutorials telling to download oracle jdk? was this whole signup for the jdk thing new?

cinder flare
#

f in chat for CentOS

sinful parcel
#

Oh makes sense then

cinder flare
sinful parcel
#

I might go back to that 1 hour tutorial for a plugin then and ignore the oracle part

lunar cypress
#

the FSF is a "hot meme"

forest pecan
#
public class OptionalCock {

}
#

help

#

someone fill in this class for me

sinful parcel
onyx loom
#

private Suck suck = new Suck();

public Suck balls() {
return this.suck;
}

forest pecan
#

๐Ÿ˜

cinder flare
#

๐Ÿ‘€

forest pecan
#

damn

#

hole.receive mm

onyx loom
#

receive ๐Ÿคจ

cinder flare
#

yeah

#

what else is the hole doing huh?

forest pecan
#

ur right

onyx loom
#

oh nvm the hole ๐Ÿ˜‚

cinder flare
#

that right there is dependency injection at its finest

forest pecan
#

holes are only for going into

#

otherwise

#

it wouldnt be called a hole

ocean quartz
#

Shouldn't it extend Optional?

sinful parcel
#

Can we deprecate Optional

cinder flare
#

i dunno i used kotlin man

forest pecan
sinful parcel
#

Not enough people use it

onyx loom
#

that is not really a reason to deprecate something

#

Optional is very useful

forest pecan
#

a lot of people use it

#

LMFAO

sinful parcel
#

lol im new to java

forest pecan
#

and as said above

#

not a reason to deprecate

sinful parcel
#

so, how does deprecating work

forest pecan
#

0_0

ocean quartz
#

Deprecating means it's discouraged to use because it'll be removed at some point

onyx loom
#

u would usually deprecate something in turn for a better method, allowing people to switch over to the new method before it is fully removed for example

sinful parcel
#

Interesting, I'll remember that

cinder flare
#

oh dude did you guys know that gradle doesn't support jdk 16?

#

i had to downgrade to jdk 15

onyx loom
#

iirc someone said the RC version does

half harness
#

RC?

cinder flare
#

racecar gradle? ๐Ÿ˜ฎ

oblique heath
cinder flare
onyx loom
tranquil crane
#

you what

forest pecan
#

:((((((( so much wrong

#

with that class rn

ocean quartz
#

BukkitTask br where does the r come from lol

cinder flare
#

bukkitrunnable?

sinful parcel
#

No idea, some of the stuff in the code is HIGHLY questionable.

#

Got any dependencies? Lemme slap them into the resources folder

lunar cypress
#

tf

#

perhaps the worst place to put them

sinful parcel
#

Yeah, I was questioning it aswell. This was put in the pom.xml file to stop it from being jarred or whatever

      <resource>
        <directory>resources</directory>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </resource>
cinder flare
#

mmm maven go brrrr

sinful parcel
#

Not trashing on the guy's code, but why?

half harness
#

wait

#

is it possible to exclude all files in resources folder when shading in gradle?

cinder flare
#

I mean, I presume so

ocean quartz
#

What would be the point of that?

half harness
#

just curious

pale shell
#

how do you add kotlin support to maven?

cinder flare
#

answer: swap to gradle :)

hot hull
#

You switch to gradle

pale shell
#

i wanna go to gradle trust me

#

I love gradle

#

the person i'm coding for is using maven

hot hull
#

Then tell them to switch to gradle

prisma wave
#

IJ can set it up automatically

#

But yeah

#

^^

cinder flare
pale shell
#

I might complain to them saying we need to use gradle

cinder flare
#

now that's a good idea

pale shell
#

gradle is just like so good

#

might even be better than kotlin

cinder flare
#

the best is kotlin syntax for gradle

#

best of both worlds

regal gale
#

I think i did this before

#

Can't remember now ._.

ocean quartz
cinder flare
jovial warren
#

right, I'm currently trying to fix a bug with tags in Krypton (they're throwing all sorts of errors, though they still seem to work on the client's end, no idea), and basically, what I need to do is load in a bunch of JSON tags from memory and perform lookups to find other tags to get all of the top-level values

#

I realise that's a terrible explanation, so let me use some resources to help

half harness
cinder flare
jovial warren
half harness
#

no i didn't

half harness
cinder flare
half harness
#

oh

jovial warren
#

now, in each one of those files, there's a values array

#

and that value array may either contain a namespaced key pointing to a block state in the registry

#

or it may contain a #, indicating it points to another tag

#

what I need to do is search through all of these tags and get all of the bottom level tags

#

and that points to sand.json

cinder flare
#

excuse me, mister, what is a top-level/bottom-level tag?

jovial warren
#

when I say bottom level, I mean one that doesn't have a #

cinder flare
#

so non-referential tags, okay

jovial warren
#

a.k.a one that is a block/fluid/entity/item's resource location

jovial warren
cinder flare
#

and a simple for loop over all of these bad boys ain't cuttin' it?

jovial warren
#

wdym?

#

show me what you mean rather than telling me please ๐Ÿ™‚

cinder flare
#

just looping through all of the tags and checking if they have a # doesn't work?

jovial warren
#

tried that

#

but there seems to be some weird issues with duplicates and other BS

cinder flare
#

wtf how could there be duplicates? hmmm

jovial warren
#

and the code is just confusing me

cinder flare
#

so these values change at runtime?

jovial warren
#

no

cinder flare
#

oh

jovial warren
#

we load them in from JSON files

cinder flare
#

oh I see

jovial warren
#

the numeric ID is just as simple as looking it up in the registry

#

but for that, I need the namespaced key

cinder flare
#

so hold on, could you not just check every single file, and every single array, and cache your tags or whatever?

#

or is that not the problem

jovial warren
#

idfk what the problem is

#

my own code is confusing me

cinder flare
#

oh no

#

sleepy time?

half harness
#

oof

cinder flare
#

cause I'm about getting there too bro

jovial warren
#

sleepy time? it's 5PM

cinder flare
#

stayed up all night designing shit in illustrator lmao

#

hey man, a nap can be extremely refreshing

jovial warren
#

a nap isn't something I can do

cinder flare
#

I tried to take a nap yesterday, and woke up 6 hours later :/

jovial warren
#

lol

#

I just don't sleep in the day time

cinder flare
#

and that's why I have yet to sleep and it's now 10 am :)

jovial warren
#
fun getDeepTags(tag: Tag): Set<NamespacedKey> {
    val tags = mutableSetOf<NamespacedKey>()
    tag.data.values.forEach { value ->
        if (value.startsWith('#')) {
            val subTag = getDeepTags(allTags.first { it.name == value.substring(TagManager.NAMESPACE_CHARACTERS) })
            tags += subTag
        } else {
            tags += value.toNamespacedKey()
        }
    }
//        tags.filter { it.startsWith('#') }.forEach { value ->
//            println(value)
//            tags += getDeepTags(allTags.single { it.name == value.substring(NAMESPACE_CHARACTERS) })
//        }
    return tags
```this is the code I tried
#

the commented out stuff is the old code

pale shell
jovial warren
#

first caused some really weird issues

#

@pale shell yes

pale shell
#

i mean i gotta convince the other dev to allow me to move over to gradle first. smh

jovial warren
#

ez

#

"Gradle good, Maven bad, so we're moving to Gradle"

pale shell
#

LOL

jovial warren
#

xD

cinder flare
jovial warren
#

yeah

#

single throws an error for duplicates though

#

and first just, well, breaks

cinder flare
#

does it... need to?

#

what do the #'s point to

#

other tag files?

jovial warren
#
Non [a-z0-9/._-] character in path of location: minecraft:banners ????????????????????????????????base_stone_nether???base_stone_overworldbeacon_base_blocks?????bedsYZVWTRXNSPMLQUKObeehives??bee_growables???????
birch_logs%1*7buttons?????
```that's what happens with `first` lol
jovial warren
pale shell
#

I'm not joking, whenever I make a new project setting it to gradle is the main priority now

cinder flare
#

well if you're already going through every single one, why check for what it references?

#

if it's a #, just skip it

#

you'll get to whatever it was referencing eventually, no?

jovial warren
#

I swear if that works

#

Non [a-z0-9/._-] character in path of location: minecraft:anners ????????????????????????????????base_stone_nether???b lol

cinder flare
#

bro what in the fuck

#

your file path must be fucked up or someting

#

what does TagManager.NAMESPACE_CHARACTERS look like

ocean quartz
#

._-

cinder flare
#

wait but that's not even being run hang on a sec

#

how are you running every getDeepTags() on every Json file?

#

using a File object as the directory?

jovial warren
#

oh btw, I've just thought of why your solution wouldn't work

#

let's just put this into context

cinder flare
#

mmk

jovial warren
#

say we want to tell the client all the logs that burn

#

we need to tell them the IDs of every single one of the logs that burn

#

e.g. all of the IDs of the dark oak logs, oak logs, acacia logs, birch logs, jungle logs and spruce logs

cinder flare
#

so hang on

#

why even are there #'s

#

why not just reference everything and have duplicate references?

jovial warren
#

because that's wasteful lol

cinder flare
#

well it's obviously causing significant problems, no?

jovial warren
#

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

#

also, these aren't my files btw

cinder flare
#

well just modify them

jovial warren
#

let's just make that clear, these aren't mine

#

these are generated by the data generators

cinder flare
#

imagine how easy life would be if you just had to loop through the thing and cache those references

#

way less computationally expensive

#

oh no okay I see why it does it now

jovial warren
#

what did you find?

cinder flare
#

an example of a # lol

#

i hadn't seen one until now

jovial warren
#

lol

cinder flare
#

okay wait, so that method returns a Set of keys right?

#

and you want all of them in the new set if it has a # in it

#

oh wait can you add sets together in kotlin

jovial warren
#

ofc

cinder flare
#

god damnit i love it so much okay

#

well nevermind then lol

jovial warren
#

you can add sets together

#

lemme take another look at vanilla's tags packet actually

cinder flare
#

the whole operator overloading thing and using += on a data structure makes my brain go poo poo

onyx loom
#

its pog

jovial warren
#

yeah vanilla does it exactly how I'd expect

#

it just does a deep lookup on the values and sends all their protocol IDs

cinder flare
#

ain't that what you're doing too?

jovial warren
#

trying to, yeah

#

vanilla seems to do it when it loads the values though

#

wanna see some vanilla code?

cinder flare
#

and you do it... when?

#

yes

jovial warren
cinder flare
#

oh fuck decompiled code gets me every time

jovial warren
#

lol

cinder flare
#

have they never heard of a json library?

#

or do they use a different storage method

#

cause it seems they're making fucking readers themselves

jovial warren
#

they use Gson

cinder flare
#

hmmm okay

jovial warren
#

there is a Gson call in there

#

GsonHelper.fromJson

cinder flare
#

so, just a thought, what if we split up your complicated af one liner into a few lines that are easier to understand

jovial warren
#

well, a call that takes a Gson object

#

what one liner?

cinder flare
#

the .first one that is causing problems

jovial warren
#

allTags.single { it.name == value.substring(NAMESPACE_CHARACTERS) } this is really easy to understand

#

NAMESPACE_CHARACTERS is 11 btw (amount of characters to remove #minecraft:)

cinder flare
#

I don't know what .single does

jovial warren
#

what do you think it does

#

just take a guess

cinder flare
#

gets a single value?

jovial warren
#

matching the given predicate, yes

#

or throws an error if there are either 0 or more than 1 elements matching said predicate

cinder flare
#

okay so I still don't understand the "really easy to understand code"

jovial warren
#

allTags is a combination of all the tag sets

cinder flare
#

essentially that is supposed to get the referenced # tag from the cached list of tags?

#

and then get all of its tags

jovial warren
#

yes

cinder flare
#

and then slap it into the new cache

#

okay

jovial warren
#

no, not slap it into the new cache

cinder flare
#

but somewhere, the directory is being royally fucked

#

the new set whatever

jovial warren
#

it just returns the set and that's directly sent

#

so it stupidly computes them every time

#

because laziness fingerguns

cinder flare
#

are these sets that this function returns stored somewhere?

jovial warren
#

nope

cinder flare
#

okay so, right, what if we preloaded all of these into a nice data structure like a hash table and just looked it up in O(1) time every time we needed it

jovial warren
#

exactly what I should be doing

cinder flare
#

oh

#

just do it then bro

jovial warren
#

the problem is that I don't seem to have the brain power for that rn

cinder flare
#

can't be that hard, just iterate through every file and call that method, slap it into a data structure, bam easy pickings

#

and if it's a #, just ignore it

#

easy squeazy

jovial warren
#

I'm gonna get out pen and paper to solve this myself

cinder flare
#

wot

#

we just did

#

it's like, a few changes at most

jovial warren
#

also, I learn by example

#

you gotta show me, talking at me goes in one ear and out the other

cinder flare
#

hmmm

#

okay well where would be a good time to preload these bad boys?

#

like, at what point in the server bootup can you load all these guys into memory

jovial warren
#

yeah that's what I'm thinking of doing

cinder flare
#

okay, okay im just trying to help you brainstorm

#

at whatever point you choose, you can do something along the lines of ```java
hashtable<tags> = new hashtable;
for (file in (dirWithTags)) {
hashtable += getDeepTags(file);
}

#

and that is rough pseudocode

#

but you get the idea right

jovial warren
#

yeah I do, but... idk, this is just confusing me

#

idk whether it's me being tired or not being assed or what but idk

cinder flare
#

alright how bout this

jovial warren
#

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

cinder flare
#

im heading to taco bell, want anything?

#

maybe a taco or two?

jovial warren
#

lol

cinder flare
#

crunchwrap supreme?

#

it'll cheer you up, get you back in the coding mood

jovial warren
#

gl sending that across the pond before it goes off

#

nah I'll figure something out

cinder flare
#

yeah it'll be fine, trust me

#

alright bet bro

#

i wanna see some top-tier Krypton caching

#

this is one time where it's okay to have a few longs lying around ;)

jovial warren
#

there won't be any longs lying around

cinder flare
#

yeah yeah, tags or whatever

#

are they strings?

#

strings are probably worse than longs anyways

half harness
#

isn't short better than int?

#

but how do i make short variable since iirc i can't just do short s = 4

cinder flare
half harness
#

o

#

i thought it was better-

cinder flare
#

dkim we live in a day and age where like 2 bytes don't matter in the long run

half harness
#

lol

cinder flare
#

you can afford to use ints for everything number related :)

half harness
#

what about longs :)

cinder flare
#

longs for extra storage

half harness
#

what about long for everything

#

:)

ocean quartz
cinder flare
#

as long (heh) as you don't have a few million being generated per player, it's okay

obtuse gale
#

Java is stupid as fuck

#

And you have to cast it

#

short s = (short) 4;

#

Literally the dumbest shit ever

cinder flare
#

im glad they discourage it

hot hull
#

Anyone else finish the entire plugin, and then test it for the first time

#

Or is that just me

cinder flare
#

see im not smart enough to make my own plugins from scratch, so I can't relate

hot hull
#

lol

cinder flare
#

but it sounds like a feasible plan if you are very well coordinated and know what you want to accomplish quickly

ocean quartz
cinder flare
#

haha, TriumpChat go brrrrr

hot hull
#

Lmao

half harness
#

i wonder who thought of lmao

hot hull
#

Gonna test it rn, will let you know if shit works out the bat

half harness
#

one time i made a <100 line plugin and it didn't work first try

#

๐Ÿ˜ฆ

hot hull
#

heh another madlad shutting down tasks async like you're supposed to

cinder flare
#

fuckin mythicmobs

#

i could never bro

obtuse gale
#

Doesn't Bukkit shut tasks down for you...?

cinder flare
#

you should be stopping your own stuff in onDisable()

#

that's like, the whole point

obtuse gale
#

But Bukkit does unregister services, listeners and cancel your tasks

cinder flare
#

Yes, but it also gives the warning because you should be doing that yourself

obtuse gale
#

That doesn't make any sense

#

Why would it take care of it

cinder flare
#

have you never put anything in onDisable Fefo?

#

alright that's it, it's taco bell time

lunar cypress
#

Where the bytes might matter is in arrays

#

You wouldn't use int arrays to represent bytes at a low level, even though byte can't represent unsigned 8 bit numbers

hot hull
#

spot the issue

#

I'm a retard

forest pecan
#

we all know you are an idot!

#

๐ŸŒš

half harness
#

wouldn't it be auction_worth_database not auction_worth_db thonking

half harness
#

wdym

ocean quartz
#

I'm a retard

jovial warren
#

lol

#

ffs I just can't do this tag loading BS

#

I'm literally ๐Ÿค this close to just hard coding it all and saying fuck it

onyx loom
#

hard coding ๐Ÿ˜ซ

jovial warren
#

well if you find a way to do this then let me know

#

because I'm all out of both ideas and patience

onyx loom
#

sure... ๐ŸŒš

cinder flare
#

Bardy I got you a 2 pack of cinnabon bites, cheer up

jovial warren
#

lol

ocean quartz
jovial warren
ocean quartz
#
  • Person with a bad nickname
half harness
#

;-;

jovial warren
#

what's that? your mum's house phone number? doge_ahaha

onyx loom
#

man thats like 2 phone numbers

jovial warren
#

lol

#

would be quite funny if dkim broke rule #1 of nicknames

cinder flare
#

They don't have very much sugar, but they'll still be good!

jovial warren
#

which is to never ever put any personal information in them

#

nice

#

also, wanna see the whacky file reading logic Nicole wrote to make tag loading work inside IJ btw?

#
val jarFile = File(javaClass.protectionDomain.codeSource.location.toURI())

var fileSystem: FileSystem? = null
val rootPath = if (jarFile.isFile) {
    fileSystem = FileSystems.newFileSystem(URI("jar:${jarFile.toURI()}"), mapOf<String, Any>())
    fileSystem.getPath("/registries")
} else {
    Paths.get(URI("file://${javaClass.classLoader.getResource("registries")!!.file}"))
}

val entries = Files.walk(rootPath, Int.MAX_VALUE)
    .filter { !Files.isDirectory(it) && it.toString().endsWith(".json") }
    .collect(Collectors.toList())

fun getTagsAtPath(path: String, type: String) =
    entries.filter { it.parent.toUri().toString().removeSuffix("/").endsWith(path) }.map {
        val tagName = NamespacedKey(value = it.fileName.toString().removeSuffix(".json"))
        create(InputStreamReader(Files.newInputStream(it)).readText(), tagName, type)
    }.toSet()

blockTags = getTagsAtPath("registries/tags/blocks", "blocks")
entityTypeTags = getTagsAtPath("registries/tags/entity_types", "entities")
fluidTags = getTagsAtPath("registries/tags/fluids", "fluids")
itemTags = getTagsAtPath("registries/tags/items", "items")

fileSystem?.close()
```this is what I have to deal with
half harness
#

woa

ocean quartz
#

Hideous

jovial warren
#

and any of you who think "why don't you just read the file using the class loader?", yeah... that was tried many, many times

frail glade
#

Matt sees !! and freaks out.

jovial warren
#

forgot there was even any !!s in there

ocean quartz
#

Always!

cinder flare
#

oh that actually kinda slaps tho

half harness
cinder flare
#

why aren't you using that Bardy

jovial warren
#

I am

cinder flare
#

oh excellent!

jovial warren
#

that's the code Nicole wrote

cinder flare
#

who

jovial warren
#

that's how it reads tags

#

@tranquil crane

prisma wave
#

every day this codebase makes me more and more depressed

cinder flare
#

oh I see someone of competence, very nice

prisma wave
#

i am ashamed to be a part of this organisation

jovial warren
#

well give me a hand trying to fix it then

prisma wave
#

๐Ÿ‘

jovial warren
prisma wave
#

๐Ÿ™‚

ocean quartz
jovial warren
#

"someone of competence"

frail glade
#

TIL there's a guice-related thing for Kotlin.

prisma wave
#

this is actually cursed

frail glade
jovial warren
#

sorry, er... who spent hours and hours finding out how chunk data works? how reading MCA files works? how to read NBT? how NBT even works?

jovial warren
#

I love Koin, BM hates it because it encourages property-based injection

prisma wave
#

You're reassigning a global nullable mutable variable in the initialiser of another variable

#

Jesus

cinder flare
ocean quartz
#

Koin is kinda ugly

prisma wave
prisma wave
#

Idk how many times I need to say it

oak raft
#

did u get those

cinder flare
prisma wave
#

Property injection is awful

oak raft
#

taco bell????

cinder flare
#

yeah????

oak raft
#

wait ar ethose donuts

jovial warren
cinder flare
#

they're cinnabon bites

oak raft
#

I've neevr tried those

jovial warren
#

it still allows constructor-based DI

oak raft
#

were they good?

prisma wave
#

The idiomatic way of doing it with Koin is property injection

#

Therefore Koin is bad

jovial warren
#

I mean, I personally quite like property injection tbh

jovial warren
#

means I get to keep my constructor

cinder flare
#

i got them for Bardy

jovial warren
#

lol

cinder flare
#

and now he's happy cause he has a solution

#

it all worked out

jovial warren
#

no he doesn't

cinder flare
#

wot

#

I thought nicole's code was 10/10

jovial warren
#

that's not what that code does lol

cinder flare
#

wtf im gonna cry

jovial warren
#

that code just reads the files

oak raft
#

I don't think they have those in Canada starmism

jovial warren
#

it doesn't actually group the tags

cinder flare
#

well get nicole to write some more code then

prisma wave
#

there isn't a single mexican food place where I live

#

Genuinely depressing

cinder flare
jovial warren
#

lol

oak raft
#

no

#

canada good

#

everywehre else bad

oak raft
#

we have snow

cinder flare
#

so do I

jovial warren
#

I mean, I'm not going to disagree that the UK is bad, but I'm not going to agree that Canada is the best place in the world

oak raft
#

starmism r u an american

cinder flare
#

bro bri ish accents are 100% more redeemable than canadia not having cinnabon bites

#

yes ofc

prisma wave
#

lmfao

oak raft
#

hmmmm

#

so ur northern

cinder flare
#

nope

ocean quartz
#

Irish accent is the superior accent

cinder flare
#

the rocky mountains go all the way to mexico bro

oak raft
#

oh yeah

#

ok well we have maple syrup

#

im sure u don't ๐Ÿ˜ค

cinder flare
#

i know, i've had it

#

i literally have a little bottle on my night stand for some reason

#

it's been there for years

oak raft
#

o_O

prisma wave
oak raft
#

why

cinder flare
#

it's a good luck charm

oak raft
#

well the point still stands

#

canada >

hot hull
#

No

cinder flare
#

canada arrow?

oak raft
#

canada is better

#

than anything

cinder flare
#

hmmm

#

no cinnabon makes me angy though

oak raft
#

yeah me too honestly

#

I wanted to try them

#

but I can't ๐Ÿ˜ฆ

prisma wave
#

make them yourself

cinder flare
#

just cross the border bro

oak raft
#

just cross the border lol

#

and step on american territory? nahhhhhh

prisma wave
#

not worth it

oak raft
#

yeah I might as well cross the sea to join bm

#

in the mighty uk

cinder flare
#

bm you literally have soldier as your pfp, I think you're betraying his morals with that statement

prisma wave
#

i am not sure the tf2 soldier is a good stereotype of american people

hot hull
#

@cinder flare So so far two issues, me being incapable of writing the correct db, and me putting () around the select statement cause I'm a retard

cinder flare
hot hull
#

I have a coffee, so something to snack on would be nice yes

cinder flare
#

hmmm okay

prisma wave
oak raft
#

how do u take ur coffee frosty

cinder flare
#

well I already went, you'll have to wait until like tomorrow or whenever I go next

oak raft
#

that's the real question

cinder flare
#

Bardy already claimed today's haul

hot hull
#

needle, and I stick it in my arm

cinder flare
#

oooh, very classy

oak raft
#

thonking interesting

prisma wave
#

american people getting takeaway every day

#

classic

frail glade
#

Chill

oak raft
#

is that what you guys do in wherever you live frosty?

cinder flare
#

nah he's got a point

oak raft
#

fristy lmao

cinder flare
#

fristy gonna get frisky ๐Ÿ‘€

oak raft
#

๐Ÿ‘€

hot hull
#

Everything else seems to function properly fingerguns

ocean quartz
#

@old wyvern Even though the configuration extends compileOnly it's showing as compileClasspath thonking

prisma wave
#

i mean

half harness
#

us < all

onyx loom
#

LMAO

#

other way round buddy

prisma wave
#

that's just not true though is it

half harness
prisma wave
#

correct

cinder flare
#

yeah no he has a point

sweet cipher
forest pecan
#

or deleted

half harness
#

๐Ÿคฃ

forest pecan
#

he deleted 2 github comments

#

lmao

obtuse gale
oak raft
#

what would !!true mean?

cinder flare
#

uh

#

true

forest pecan
#

null checking true?

#

lol

cinder flare
#

yeah haha

forest pecan
#

or am i on crack

cinder flare
#

in java, that's negating a negation

oak raft
#

this is the question I was presented lmao

half harness
#

not !!variable

#

lol

obtuse gale
half harness
cinder flare
#

not not, not not, not not, not not

#

da da da da da da daah!

ocean quartz
forest pecan
#

4 github stars already

#

sheesh

#

yea it isn't

#

i forgot what it was

cinder flare
forest pecan
#

lol

#

get rekt

ocean quartz
#

!! basically means "Throw NPE"

forest pecan
#

oh

#

its ?

cinder flare
#

!! is unsafe null access operator

half harness
#

?: = nullcheck

cinder flare
#

if it ain't null, it'll still work

half harness
#

and ?.

cinder flare
#

if it is, it'll pull a java and throw a NPE

forest pecan
#

yea lol

half harness
#

!! = good

forest pecan
#

good for APIs

#

and also configuration shit

jovial warren
#
fun <K, V, T, R> Map<K, V>.transform(function: (Map.Entry<K, V>) -> Pair<T, R>): Map<T, R> {
    val temp = mutableMapOf<T, R>()
    for (entry in this) {
        temp += function(entry)
    }
    return temp
}
```now that is a function and a half
cinder flare
#

holy wow

#

you couldn't make a fucking json reading loop but you can produce that

jovial warren
#

lol

ocean quartz
jovial warren
#

dkim what the actual fuck

cinder flare
#

wow that is... something

jovial warren
#

the way you're meant to avoid a singleton is DI

half harness
#

it was

#

you need the context

#

ofc i use di

jovial warren
#

also, all that function does is allows me to remap every element in a map

ocean quartz
#

No context can save you from that

half harness
#

..

cinder flare
sweet cipher
prisma wave
#

JS be like if (!!1)

jovial warren
#

it avoids me having to write someMap.mapKeys {}.mapValues {}

jovial warren
forest pecan
#

lol

prisma wave
#

mutableMap ๐Ÿคข

cinder flare
#

yeah that's Bardy right there

jovial warren
prisma wave
#

dont care

jovial warren
#

also, bonus of that function means I only copy the map once

prisma wave
#

Be the better person ๐Ÿ™‚

cinder flare
#

im out of cinnabons, so not great

half harness
#

what are cinnabons

half harness
#

๐Ÿค” taco bell has that?

cinder flare
#

you bet

half harness
#

ive always ate tacos from taco bell

cinder flare
#

bro taco bell tacos are like, mediocre

#

the real shit is the crunchwrap supreme

prisma wave
#

use ktx.collections.immutable ๐Ÿ™‚ ๐Ÿ‘

cinder flare
#

and i also like chicken quesadillas

prisma wave
#

quesadillas are amazing

half harness
#

how do i convert mutable map -> immutable

prisma wave
#

.toBlah

#

.toMap()

half harness
#

o

jovial warren
#

avoid that where you can though

cinder flare
#

just hit em with a nochange

jovial warren
#

as toMap creates a copy of the original map

half harness
prisma wave
#

and?

half harness
#

i thought immutable = good

jovial warren
#

it is

#

but don't overuse it is all I'm saying

half harness
#

y

#

ok

prisma wave
#

what

#

No

half harness
#

uh

prisma wave
#

Use that shit everywhere

half harness
jovial warren
#

and fill up your memory with shit, nice one BM

prisma wave
#

If performance is an issue then use a persistent implementation

#

Duh

ocean quartz
#

Immutable everything

cinder flare
#

awe yeah, put the java GC to work

half harness
#

except that i dont have 2 million variables

jovial warren
prisma wave
#

depends on the implementation

jovial warren
#

and if they're even useful for like 99% of my use cases

prisma wave
#

Lists are probably just a slightly fancy singly linked List

#

Sets and Maps will be a bit more complex

cinder flare
prisma wave
#

Lots of implementations are tree-based afaik

#

Linked lists are cute

cinder flare
#

yeah im still wrapping my head around trees and shit

jovial warren
#

also, I think Kotlin's built-in "immutable" lists are actually fake immutable lists

prisma wave
#

that is correct

#

It's compile time immutability only

jovial warren
#

yeah

forest pecan
#

๐ŸŒš

jovial warren
jovial warren
#

isn't that what immutability is though?

prisma wave
#

Not exactly

jovial warren
prisma wave
#

kt standard types are internally mutable, but they only expose a read-only interface

half harness
#

lol that was what i thought when they told me it

prisma wave
#

Nothing's stopping you from just casting to the mutable counterpart and causing havoc

jovial warren
#

ik that

cinder flare
#

well it's better than all the shit we have in java man

jovial warren
#

lol

cinder flare
#

val's give you a sense of safety, at least

#

kinda like the TSA

jovial warren
cinder flare
#

what's wrong with what I said hmm

jovial warren
#

no more fake immutability

prisma wave
#

I think kt missed a trick by not adding collection literals

cinder flare
#

isn't that that one guy's fault

jovial warren
#

oh I wish I had those so badly

prisma wave
#

selfish and corrupt Andrey

jovial warren
#

we have array literals for annotations but that's about it

jovial warren
cinder flare
#

yeah Andrey

jovial warren
#

show me

onyx loom
#

collection literals would be so nice

prisma wave
#

lists should be lazy too

#

In fact make everything lazy

cinder flare
#

just like the programmers using them!

ocean quartz
#

Andrey and his evil deeds!

forest pecan
#

LazyBM

prisma wave
ocean quartz
#

Ex-kotlin

jovial warren
#

wait what happened though

cinder flare
#

Everything you've ever loved? He killed it

#

Your family? Gone

jovial warren
#

like what?

cinder flare
#

Kotlin's good features? Reduced to atoms

jovial warren
#

show me some stuff

prisma wave
#

tuples

#

collection literals

jovial warren
#

show me

prisma wave
#

companion fun

#

Monads

#

Monoids

#

Functors

jovial warren
#

I have to see this for myself

prisma wave
#

Type classes

jovial warren
#

reference an issue

prisma wave
#

?

cinder flare
#

he got rid of or denied implementing all of those things bardy

jovial warren
#

wow

cinder flare
#

we would've had a much more functional kotlin without him

jovial warren
#

you know we still can get those features

#

if we push enough

cinder flare
#

yeah they're trickling in, but he caused years of delays

prisma wave
#

FP idiots be like "muh referential transparency!" Bro just use inline functions ๐Ÿ™‚

jovial warren
#

if the community pushes enough, JetBrains will listen

prisma wave
jovial warren
#

so what

#

he's gone now

#

what's he gonna do

cinder flare
#

he has a point

ocean quartz
#

He'll murder your family

cinder flare
#

true, he did it to BM

#

that's why he's so bitter

half harness
#

is haskell a good language to learn

#

or not

cinder flare
#

yes

#

why not broaden your mind

half harness
#

uhhhh

jovial warren
cinder flare
#

maybe you'll gain enough braincells to understand how maps and shit work

prisma wave
cinder flare
#

cause i need some of that

prisma wave
#

Unironically yes

jovial warren
#

I mean, destructuring, Pair and data classes do kinda replace those

prisma wave
#

๐Ÿคข

half harness
#

bms literally the only one that uses haskell though

prisma wave
#

no I'm not

half harness
#

so if i need help = no hope

prisma wave
#

Yugi knows it

#

Johnny knows some

cinder flare
#

bro BM is on top of it

prisma wave
#

Lemmo uses it in his job afaik

cinder flare
#

he is literally 10/10 support

half harness
#

since ur only online during helpchat's "peak-times"

prisma wave
#

Or at least knows it very well

#

Wot

half harness
#

there are like 8 hours where helpchat is super active

#

then the rest its just like 3 people

prisma wave
#

Ivan knows at least the basics too

ocean quartz
prisma wave
#

lmao

cinder flare
#

bro I wish someone paid me to learn haskell

#

i'd totally do it

prisma wave
#

Even worse

cinder flare
#

oh shit yeah you're right

prisma wave
#

Which probably isn't hard

cinder flare
#

hooo boy you overestimate my brain function

#

i got confused by Bardy's use of .first

#

i think it'll be a while lmao

prisma wave
#

Only one way to find out

oak raft
#

anyone here have experience with blender?

cinder flare
#

yeah ive made a few banana smoothies what do ya need

onyx loom
#

๐ŸŒš

oak raft
#

banana smoothies haha

#

I was curious as to where you learned blender

#

oh wait

cinder flare
#

well, i went to costco, and purchased one

#

then it was pretty self explanatory

oak raft
#

I see lmao

#

I completely missed the joke

half harness
#

lol

cinder flare
#

great addition dkim

#

really contributed to the conversation

half harness
#

๐Ÿ™‚

cinder flare
#

okay that's actually kinda cool ngl

onyx loom
#

costco is great

cinder flare
#

woah dude I got 60 upvotes on my reddit post

#

am I cool now

jovial warren
#
val messageDigest = MessageDigest.getInstance("SHA-256")
val seedBytes = ByteBuffer.allocate(Long.SIZE_BYTES).putLong(world.generationSettings.seed).array()
val hashedSeed = ByteBuffer.wrap(messageDigest.digest(seedBytes)).getLong(0)
```is it just me or is this really wasteful
half harness
#

i have no idea what any of that code does

#

besides val

jovial warren
#

all I need to do is hash a long in SHA-256 and return the long

cinder flare
#

that has strong java FactoryFactory vibes

prisma wave
onyx loom
#

absolutely

prisma wave
#

oh

cinder flare
#

omg really

prisma wave
#

I wouldn't know

onyx loom
#

my parents have a costco card

cinder flare
#

that's actually super cool

prisma wave
#

๐Ÿฅฒ

onyx loom
#

we dont go often, but when u go costco its great

jovial warren
# half harness i have no idea what any of that code does

first line declares a message digest (class for hashing, or digesting, well, messages)
second line allocates a byte buffer with the size of a long in bytes (always 8) and puts the seed in there, then gets the byte array of that
third line then converts the digested bytes to a long

prisma wave
#

I only learned the UK had Five Guys last year

onyx loom
#

u actually have fun shopping

pale shell
#

Aaaaand maven doesn't know what kotlin is smh

#

I wish i could use gradle

cinder flare
jovial warren
#

wait you never knew we had costco over here?

half harness
#

why isn't there just LongUtils.hashLong

jovial warren
#

I didn't even know it was a worldwide thing

onyx loom
#

bardy, u gotta remember hes from isle of wight ๐Ÿฅฒ

jovial warren
onyx loom
#

tiny island ๐Ÿฅฒ

jovial warren
prisma wave
#

man we only got an asda about 2 years ago

onyx loom
#

omg seriously

prisma wave
#

yes lmfao

pale shell
#

dude, bm can see all the coasts of isle of wight from his window

onyx loom
#

thats depressing

cinder flare
#

wtf is an asda

jovial warren
#

what the fuck lol

jovial warren
prisma wave
cinder flare
#

oh I see

prisma wave
#

literally owned by walmart

jovial warren
pale shell
#

walarg

cinder flare
#

you lived without a walmart for years of your life?

#

how'd you do it

onyx loom
#

asda != walmart tho

#

asda do not sell guns ๐Ÿฅฒ

pale shell
#

walmart is dope

prisma wave
#

yeah asda is actually somewhat respectable

pale shell
#

they do @onyx loom

cinder flare
jovial warren
#

you know how you guys pretty much just have walmart?

prisma wave
#

walmart is where you see insane people

cinder flare
#

oh fuck

pale shell
#

they sell nerf guns

jovial warren
#

yeah we don't allow those kinds of monopolies over here

onyx loom
#

lol

cinder flare
prisma wave
cinder flare
#

not even joking

prisma wave
#

there's a house sort of blocking it

pale shell
#

ok so serious question maven + gradle how?!

#

knock it down @prisma wave

onyx loom
#

asda, tesco, sainsburys, morrisons
never heard of a monopoly

prisma wave
jovial warren
#

we have Asda, Tesco, Sainsbury's, Morrison's, M&S, Waitrose, Aldi, Lidl, etc.

pale shell
#

bm send help

cinder flare
#

ah yeah I remember going to a multi-floor Waitrose

prisma wave
#

tory shop

onyx loom
#

last 4 arent exclusive to uk but yea

jovial warren
pale shell
#
        <dependency>
            <groupId>org.jetbrains.kotlin</groupId>
            <artifactId>kotlin-stdlib</artifactId>
            <version>${kotlin.version}</version>
        </dependency>

is this how you do kotlin in maven?

prisma wave
#

idk

#

maybe

#

probably

pale shell
#

it doesn't work doe

cinder flare
# prisma wave classic america

classic utah lol. the whole thing about mormons was polygamy until they wanted to become a state the the federal government said "1 wife per man please"

onyx loom
prisma wave
#

ahh the mormons

#

strange folk

cinder flare
#

tell me about it

#

i have to live with one

prisma wave
pale shell
jovial warren
#

make sure you got the Kotlin plugin

cinder flare
#

what's there to thonking about

#

im at uni

#

in a dorm

prisma wave
#

i didnt realise they were real

jovial warren
#
            <plugin>
                <groupId>org.jetbrains.kotlin</groupId>
                <artifactId>kotlin-maven-plugin</artifactId>
                <version>${kotlin.version}</version>
                <executions>
                    <execution>
                        <id>compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <phase>test-compile</phase>
                        <goals>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <jvmTarget>1.8</jvmTarget>
                </configuration>
            </plugin>
cinder flare
#

one of my suitemates is mormon

#

and he's quite annoying

prisma wave
#

odd

pale shell
#

where dat go at top or what

jovial warren
#

in <plugins>

#

which is in <build>

cinder flare
#

though I don't know if those things are directly related

pale shell
#

oh god i found it

#

this. is. HORRIBLE.

cinder flare
#

because i have another suitemate who's mormon but he's really cool

prisma wave
#

wait do they still do the polygamy stuff

pale shell
#

it's pure arrow code too

cinder flare
#

not the primary mormon church

prisma wave
cinder flare
#

there's the offshoots like FLDS that do do polygamy

onyx loom
#

xml*

half harness
prisma wave
#

weird

cinder flare
#

they hang out at walmart all the time

jovial warren
pale shell
#

i hate it

#

get me out of here

onyx loom
#

man i sure do love me multiple wives ๐Ÿ˜Š

pale shell
#

now

jovial warren
#

well then why are you using it

pale shell
#

i'm forced to

#

the person paying me will only use maven

cinder flare
pale shell
#

I tried showing gradle and it doesn't work :/

jovial warren
prisma wave
#

classic Helpchat

#

Polygamy and maven

cinder flare
#

another day, another discussion about our wives and our shitty build tools

pale shell
#

i hate this so much

#

i wanna go to gradle

#

i might force them to go to gradle

jovial warren
#

ffs why can't Kotlin's compiler implicitly convert a primitive array into varargs

#

the spread operator always copies the array

clear junco
#

@potent fractal

#

hey dude

jovial warren
#

there's gotta be a better way than the spread operator

clear junco
#

do u still need a marketer?

onyx loom
#

agreed bardy

cinder flare
#

why can't every compiler auto convert everything

#

if I just checked if (Item instanceof Weapon) please just let me use it as a weapon

lunar cypress
#

java 16 fingerguns

half harness
#

||tbh i dont like that feature||

cinder flare
#

wdym

lunar cypress
#

๐Ÿคจ

cinder flare
#

what's not to like

half harness
#

like

#

what if i dont want to autocast

jovial warren
#

why wouldn't you want to smart cast

lunar cypress
#

and why wouldn't you want that

cinder flare
#

when would you not want it to smart cast

half harness
#

plus sometimes i forget it exists

#

and then its like bLaH cNaNot bE aPlpLiEd tO balH

#

and so i have to do obj as Obj

lunar cypress
#

wot

cinder flare
#

just because you lack the minimum number of braincells to use a programming language doesn't mean one of its best features is bad lmao

half harness
#

basically

#

;-;

half harness
lunar cypress
#

to be fair, you really need a high IQ to understand Kotlin

jovial warren
#

dkim be like: ```kotlin
override fun onCommand(sender: CommandSender, cmd: Command, label: String, args: Array<String>) {
if (sender is Player) {
val player = sender as Player
}
}

half harness
#

uh

half harness
#

also, arrow code sad_fingerguns

jovial warren
#

yeah ik

ocean quartz
jovial warren
#

but it's you, so it's not that far fetched fingerguns

jovial warren
half harness
jovial warren
#

still would rather it just smart cast, instead of creating a new variable

#

I mean, ik Kotlin is creating a new variable internally, but I'd rather not have to see that

cinder flare
half harness