#dev-general

1 messages ยท Page 104 of 1

topaz bay
#

HARD PASS

hallow crane
#

wow you guys are so happy

errant geyser
#

Sx exposed

errant geyser
#

You guys fight like an old married couple ๐Ÿ˜„

topaz bay
#

Thank you.

errant geyser
#

Again

#

Really

#

Wait

#

Zod didn't reply

rotund egret
#

You're welcome.

errant geyser
#

Oh come on

topaz bay
#

Do you expect anything less?

#

This person has a bird on their shoulder.

errant geyser
#

You have paint??? Smeared across your face, you cant talk

#

I'd prefer the parrot ngl

rotund egret
#

Lily is a good bird

topaz bay
#

PAINT?!?!?!

#

Its a charcoal mask

#

You swine

errant geyser
#

Ok not literal paint

#

I didn't know how to describe it

#

How am I still awake

rotund egret
#

Ah yeah, that's what I use my insta-pot for

topaz bay
#

Is there any other use????

errant geyser
#

Hey Sx u wanna see the dog again

topaz bay
#

Absolutely not.

rotund egret
errant geyser
#

Ugh

#

Uh

#

K

rotund egret
#

Me

topaz bay
#

Spare me

#

Please

errant geyser
#

Explain to me how that is 20 mins long

#

To say "I'm bad at everything so I gave up"

rotund egret
#

They're bad at keeping it short

errant geyser
#

Bad at it? So 8 words takes 20 mins to say

#

Hey sx

#

Have an actual cat

#

A "kat" if you will

topaz bay
#

What the hell?!??

#

Why is this cat's face so expressive

errant geyser
#

Hey you want more

#

My phone has lots of weird stuff on it

rotund egret
#

Show me a picture of my cat

errant geyser
#

Here

#

He's so cuuuuuuute

topaz bay
#

You're welcome.

rotund egret
#

Thank you.

errant geyser
#

Oh for gods sake

rotund egret
#

Is it possible for readLine() to actually return null ever?

errant geyser
#

In my dreams, yes

#

Idk about actually. I'd assume so if nothing was read

rotund egret
#

Then it'd just be an empty string

#

""

errant geyser
#

Why not just make it null tho

#

Ez

rotund egret
#

I'm asking if it can be null

errant geyser
#

look at the code for it if you can even see that far into java ยฏ\_(ใƒ„)_/ยฏ

onyx loom
#

it can be null yea

#

i think

topaz bay
#

Just look at the docs for it?

rotund egret
#

I wish to be lazy

#

I'm looking at the code rn though

#

Okay, only if input stream is redirected to a file & EOF has been reached

#

So for my use-case, no

topaz bay
#

That's too bad

rotund egret
#

?

topaz bay
#

Nothing would make me happier than for it to pose an issue

#

๐Ÿ˜ˆ

rotund egret
#

Oh, I mean it'd be a pretty easy fix

#

if (stringInput.isNullOrEmpty())

topaz bay
#

Rude

obtuse gale
#

I changed my mind about korm lol

#

im goin back to json

#

:)(:

#

ehh

#

actually i cant decide lol

#

actually maybe i will

trim hare
#

kormson

heady birch
#

Is it possible for readLine() to actually return null ever?
@rotund egret Yes

obtuse gale
#

tag me pls

obtuse gale
#

Is there a kotlin to java convertor anywhere?

prisma wave
#

not that I know of

#

because not every kotlin concept has a Java equivalent

#

without making structural adjustments

obtuse gale
#

oof ok

prisma wave
#

why do you even need one lol

heady birch
#

you became the very thing you swore to destroy

obtuse gale
#

Because my teacher wants to see what I can do and they dont know kotlin ://////////////////

versed ridge
#

tell them to learn it

distant sun
#

:)))

#

rip

prisma wave
#

I mean

distant sun
#

start to rewrite the code

prisma wave
#

If you know Java you can pretty much figure it out

obtuse gale
#

is this possible in java lol? In kotlin with this class Matt sent me I can just do config[Settings.WHATEVER]

#

where Settings is an object that has @JvmField properties

#

using configme

heady birch
#

yes

distant sun
#

config.get()

obtuse gale
#

config.get() is for nerds tho

#

can i just do config[Settings.WHATEVER] or will that be a kotlin only thing

distant sun
#

it's just a ConfigMe class

#

nothing fancy

heady birch
#

You can still do that

#

[] is just get in java

distant sun
#

ye but does it have that?

#

isn't that used for array index?

obtuse gale
#

what the hell is an operator method in java?

distant sun
#

what's operator @prisma wave

#

:))

prisma wave
#

for operator Overloading

obtuse gale
#

whats that in java lol

prisma wave
#

you can override things like + [], etc

distant sun
#

o

obtuse gale
#

can you do that in java

prisma wave
#

no you can't

#

you can't overload operators

old wyvern
#

^

obtuse gale
#

So can i not do this ?

prisma wave
#

your closest equivalent in that example would be to call get()

obtuse gale
#

oof

prisma wave
#

you can't use the kotlin get syntax for that

#

But you can still call the function

obtuse gale
#

while im going back to java i should just switch back to eclipse

old wyvern
#

dont

distant sun
#

bruh dude

obtuse gale
#

what does that class even do lol

#

matt just sent it to me ages ago

prisma wave
#

@distant sun overloading the get operator lets you do stuff like

playerMap[player]```
and the `set` operator can do ```kotlin
playerMap[player] = value``` which is cool
#

what class

distant sun
#

looks nice

#

that's how you access the config on ConfigMe

obtuse gale
#

class Config {

    private val settingsManager = SettingsManagerBuilder.withYamlFile(File("config", "config.yml"))
        .configurationData(Setting.javaClass).useDefaultMigrationService().create()
    /**
     * Gets the config property
     */
    operator fun <T> get(property: Property<T>): T {
        return settingsManager.getProperty(property)
    }

    /**
     * Gets the config property
     */
    operator fun <T> set(property: Property<T>, value: T) {
        settingsManager.setProperty(property, value)
        settingsManager.save()
    }

}```
#

that one

old wyvern
prisma wave
#

just read the docs

#

@obtuse gale looks like it just wraps access to the SettingsManager

#

not strictly necessary

obtuse gale
#

alright

prisma wave
#

hold on what's Setting

#

an object?

distant sun
#

ye

prisma wave
#

hmmmmmmmmmmmmmmmmmmm

obtuse gale
#

well it is in kotlin

distant sun
prisma wave
#

that Setting.javaClass looks wrong

obtuse gale
#

idk what the fuck to make it in java

distant sun
#

dude

obtuse gale
#

it works perfectly in kotlin

distant sun
#

??

#

you just convert 2 methods from kt to java

#

not rewrite the entire windows

prisma wave
#

it's literally 3 lines lol

distant sun
#

YES

#

it's 90% the same thing

obtuse gale
#

lol

prisma wave
#

you don't even technically need that class

#

it just wraps access

distant sun
#

I believe you do

obtuse gale
#

holy fuck these semicolons are pissing me off lol

prisma wave
#

you can just call getProperty manually

#

or rewrite the class

#

ez pz

obtuse gale
#
    
    public Object get(Property<Object> property){
        return settingsManager.getProperty(property);
    }```
#

is that what the get Thing would look like lol?

#

IDK wtf to replace T with

#

i dont think Object is right is it?

distant sun
#

T represents any object

prisma wave
#

bruh

#

Java has generics too

distant sun
#

if you pass a Property<String> it will return a string

obtuse gale
#

I tried T and it didnt do shit

distant sun
#

generic

#

that

steel heart
#

T should represent Type

obtuse gale
#

i put T and intellij was yelling

prisma wave
#

probably because you didn't define the genetic

#

generic*

steel heart
#

public <T> T getProperty(Property<T> prop> {}

prisma wave
#
public <T> T getProperty(Property<T> property)```
#

^

obtuse gale
#

oh ok thanks lol

steel heart
#

Imagine if kotlin didnโ€™t have generics :0

obtuse gale
#

question

#

Why is the <T> necessary?

#

is it just the way java works?

distant sun
#

I guess you tell it it's a generic and not an object called T

prisma wave
#

^

#

It's the same in kotlin lol

#

you have to define the generic

#

With optional bounds

steel heart
#

Is it true HashTables have O(1) ?

prisma wave
#

Yes

#

For lookup anyway

steel heart
#

Thought that was just in best case scenario

prisma wave
#

I'm pretty sure it's always constant

#

because it's essentially array lookup

steel heart
#

Hmm okay ๐Ÿ‘Œ

prisma wave
distant sun
#

why is there not tool for getting data from javadocs sites ๐Ÿ˜ญ

hot hull
#

@old wyvern thonking
Username 'TheYugi' tried to join with an invalid session

errant geyser
#

It happens all the time

errant geyser
#

Ok guys I need u to vote on which one would win. The winner is my Steam pfp #off-topic message

rotund egret
#

(1)

steel heart
#

@prisma wave thatโ€™s awesome though

prisma wave
#

It's pretty cool yeah

jovial warren
#

futures @steel heart ?

steel heart
#

CompletableHistory

#

Or wym

jovial warren
#

lol

old wyvern
#

@Yugi :thonking: Yea I accidentally used direct join, forgot I had your server ip typed in earlier @hot hull

hot hull
#

oof

steel heart
#

Wait, is this

String a = โ€œaโ€;
String b = โ€œbโ€;
b += a;``` This would be โ€œbaโ€ right?
#

@hot hull

#

Pro

hot hull
#

I don't think you can use += on strings

#

Could be wrong tho

steel heart
#

Frick

hot hull
#

?tryandsee

compact perchBOT
jovial warren
#

someone explain to me what List<T>#fold(initial: R, operation: (acc: R, T) -> R) does

obtuse gale
#

Someone explain to me what the words/letters T fold initial R operation R T -> does

jovial warren
#

T is a generic type, R is a generic return value, -> is a lambda

#

everything else is easy to figure out

obtuse gale
#

๐Ÿค”

jovial warren
#
public inline fun <T, R> Iterable<T>.fold(initial: R, operation: (acc: R, T) -> R): R {
    var accumulator = initial
    for (element in this) accumulator = operation(accumulator, element)
    return accumulator
}

that's the method

steel heart
#

BomBardy thatโ€™s a Function<T, R>

#

itโ€™s a functional interface?

#

Takes T and pass it with methods then returns the result with R iirc

old wyvern
#

someone explain to me what List<T>#fold(initial: R, operation: (acc: R, T) -> R) does
It iterates through the list while collecting the results on each iteration to be used in the next iterator and finally gives you the total collected result

#

Similar to reduce except here the collected result can be of a diff type than the element type

#

@jovial warren

#

The initial value should most likely be the identity element to your function

jovial warren
#

okay

#

I still don't follow sorry

#

give me an example

#

@old wyvern

barren cloud
#

@hot hull Are you a villager? ._.

hot hull
#

Yes

barren cloud
#

I like your nose

old wyvern
#
I still don't follow sorry
give me an example
@Yugi```Oh sorry I went outside for a bit. Gimme a sec
hot hull
#

outside
What's that?

old wyvern
#

@hot hull try with a npc?

#

xD

hot hull
#

Why an NPC?

old wyvern
#

To make it look like the real player

hot hull
#

Nah this is good, it indicates that a user is in roam

barren cloud
#

But villager looks minecraft-ish -_-

hot hull
#

Also using an npc would probs give other complications when you try and kill that player

old wyvern
jovial warren
#

cheers

obtuse gale
#

:)))))

#

@topaz bay Love you too ๐Ÿ˜˜

topaz bay
#

...

obtuse gale
#

hehe

#

24 hours

#

my first one got declined btw

#

hi

#

are 19.98 tps okay when cpu usage is 10%?

#

im using i9 4 gb ram

#

for the moment server uses 1.1 gb

hot hull
#

Depends on what's going on on the server, also check timings

topaz bay
#

oh the joys of first start

#

Yo, I heard you like quotes

#

So I put quotes in quotes

prisma wave
#

i never said i like quotes

#

this is fake news

#

don't associate me with that monstrosity

onyx loom
#

๐Ÿคข

topaz bay
#

Why that face?

#

Its just a raw string

#

xD

prisma wave
#

imagine not using kotlin buildString { append('"') append("Hello") append('"') }

#

MUCH cleaner

topaz bay
#

Is that a joke

prisma wave
#

you think I joke about important things like this?

#

no sir

topaz bay
#

Yes

prisma wave
#

nope

#

some might say ```kotlin
'"' + "Hello" + '"'

#

but they're wrong

#

(yes i'm joking)

#

it's a well known fact that StringBuilder is over 8x faster than string concatenation, and probably faster than raw strings

#

"compiler optimizations" you say? never heard of them

topaz bay
#

hot

prisma wave
#

are they actual tests though

topaz bay
#

Some of them are

prisma wave
#

last time I looked they were just making sure nothing threw an exception

#

๐Ÿ‘

topaz bay
#

Exactly

#

If they dont throw exceptions, they are working fine

prisma wave
#

sounds about right

topaz bay
#

And now we wait.

#

Beautiful

rotund egret
#

"\"Hello\"" ๐Ÿ˜Ž

topaz bay
#

ugly

onyx loom
rotund egret
#

"\"ugly\""
That works too Sx

topaz bay
#

Thank you.

rotund egret
#

even better

val string = "Hello"

print("\"$string\"")

#

Technically we can toss even more symbols in there if we wanted I guess

#
const val string = "Hello"

print("\"${string}\"")
onyx loom
#

make it const thonk

rotund egret
#

Ah you right

obtuse gale
#
val coolList = mutableListOf<String>()
coolList.add("\"")
coolList.add("Hello")
coolList.add("\"")
println(coolList.joinToString(""))```
onyx loom
topaz bay
#
val string = (listOf("\"") + listOf("Hello") + listOf("\"")).joinToString("")
obtuse gale
#

not enough lines nerd

topaz bay
#

Not enough nerds line

#

Ugh, this is why I like monospaced fonts

#

Those two messages should line up

#

mega dumb

old wyvern
#

can lists be added together with + operator by default in kotlin or did you use operator overloading?

topaz bay
#

The stdlib has overloaded operators for a lot of things

old wyvern
#

Ah I see

rotund egret
#
val quote1 = "\""
val quote2 = "\""
val letterH = "H"
val letterE = "e"
val letterL1 = "l"
val letterL2 = "l"
val letterO = "o"

val list = mutableListOf<String>()

fun doThing () {
    list.add(quote1)    
    list.add(letterH)
    list.add(letterE)
    list.add(letterL1)
    list.add(letterL2)
    list.add(letterO)
    list.add(quote2)

    println(list.joinToString { "" })
}```
#

There you go

#

Ohno I messed up

topaz bay
#

yeah

#

more than messed up

rotund egret
#

fixed

obtuse gale
#

weak

#
class CoolClass69(val x:String){
val quote = x.toString()
}```
```kotlin
class CoolClass420(val x:String){
val quote2 = x.toString()
}```
```kotlin
class Class2(){
val coolThing = "\""
}
class Main(){
val backslash = Class2()
val classOne = CoolClass69(backslash.coolThing)
val classTwo = CoolClass420(backslash.coolThing)
val sb = StringBuilder()
sb.append(backslash)
sb.append("Hello")
sb.append(backslash)
println(sb.toString())
}```
topaz bay
#

thats not gonna work

rotund egret
#

Oh man

#

you got me

ocean quartz
#

Do the character ascii code, save it on an int then get it as a character

topaz bay
#

the function in joinToString is a transformer

#

your output string would just be empty

hot hull
#

Autobots assemble

onyx loom
#

roll out

rotund egret
#

That's not necessarily true

#

It's actually a bunch of commas.

obtuse gale
#

Next update to my code: Class2 wont hold the quotation mark for the front one and the back

#

A seperate class for both is nesecary

hot hull
obtuse gale
#

iS thAt 1.8

#

ShAkinG mY fUckIng HeaD

topaz bay
#

What is the point of playing with those key markers?

prisma wave
#

looks cool

#

(except it doesn't imo)

obtuse gale
hot hull
#

Aj I don't pvp, I had that set a couple years ago, and it kept the profile

obtuse gale
#

sure

hot hull
#

Does the PlayerQuitEvent not get called when the server stops and the user is kicked?

patent spoke
#

PlayerKickEvent

hot hull
#

I'm aware yes.. shouldn't the quit event be triggered as well tho?

steel heart
#

I donโ€™t think

hot hull
#

I know you don't ๐Ÿ˜

prisma wave
#

lmao

old wyvern
#

xD

#

this is ridiculous

hot hull
#

Technically this year is 2012 so..

old wyvern
#

in julian calender

hot hull
#

@onyx loom Still waiting for you to drop those nukes

old wyvern
#

but there have been many other predictions, 2012 is just one of them

#

xD

onyx loom
#

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

#

still waiting for papi 3

hot hull
#

A friend said it's gonna be in 2037, so we gucci

onyx loom
#

hmm still a long way away

hot hull
onyx loom
#

waduhek

hot hull
#

Indeed

steel heart
errant geyser
steel heart
#

To what?

errant geyser
#

by yourself

#

or on your own

prisma wave
#

I would say "you could add it yourself"

#

seems the most natural

hot hull
prisma wave
#

might as well use kotlin

hot hull
#

Nah

onyx loom
#

why not

prisma wave
#

your loss

onyx loom
#

๐Ÿ˜›

topaz bay
#

@obtuse gale update korm

heady birch
#

wait till I make NiallOrm

topaz bay
#

Gross

onyx loom
#

what happened to funding KaLib niall?

#

๐Ÿ™

heady birch
#

๐Ÿ˜

#

Uh I spent them all on deluze menus configs

onyx loom
#

๐Ÿ™

steel heart
heady birch
#

ok

prisma wave
#

this is outrageous

onyx loom
#

what is

#

elucidate

prisma wave
#

my hard earned taxes AREN'T being spent on good libraries?!?!

onyx loom
#

this ^

#

@heady birch fix up

prisma wave
#

this is a scandal

#

I'll see you locked up for this

hot hull
#

How do I get only the outter coords of a square?

steel heart
#

Frosty get two diagonal corners and check what corner type they are then do the math

hot hull
#

Wait, if I get the corners, then I can just connect them

steel heart
prisma wave
#

@steel heart what language

#

or what's the book even

hot hull
#

Bat language

prisma wave
#

๐Ÿค”

#

sounds spooky

steel heart
#

Kotlin

#

:/

#

My friend did in fact persuade me

prisma wave
#

you don't really need a book

#

just read through the docs

#

or convert some java code that you're comfortable with

hot hull
#

Just convert some code, then contemplate your life decisions

prisma wave
#

precisely

steel heart
#

Yeah think like this, if I have a book that Iโ€™m reading in social areas I look pro?

prisma wave
#

lmao

#

i guess that's true

#

"yeah i've read every edition of effective java, i'm kind of a big deal"

steel heart
#

Exactly now I havenโ€™t personally red any effective java book but I mean who doesnโ€™t want to be pog reading kotlin books

prisma wave
#

fair point

#

just print out the docs if you really want

#

saves you ยฃ23

steel heart
#

Isnโ€™t those like a bible times eternity?

prisma wave
#

no bigger than the java documentation

#

well maybe a bit

#

617 pages ๐Ÿ˜ณ

hot hull
#

If you wanna flex even more, print both, then stack em one page kotlin, one page java

prisma wave
#

genius

hot hull
#

big brain

steel heart
#

Yeah thatโ€™s smart

prisma wave
steel heart
#

Lol

prisma wave
#

when are you ever gonna need a 45 parameter function

hot hull
#

Watch me

steel heart
#

I mean I do have a 21 param function

hot hull
#

Instead of passing player, you pass every player method

prisma wave
#

what

#

๐Ÿ˜ฌ

#

that is evil

steel heart
#

Yeah itโ€™s optionals of optional and then I have some other stuff like a callback

prisma wave
#

refactor it

#

now

#

If you have anything with more than 6 parameters you're doing something wrong

hot hull
#

I don't, does that mean I'm doing something right?

prisma wave
#

maybe

#

maybe not

hot hull
#

My head is hurting due to trying to make this particle border

steel heart
#

Its not my fault TriConsumers is kinda useful

prisma wave
#

imagine not having kotlin (A, B, C) -> Unit

steel heart
#

You bobo

prisma wave
#

first class functions good

#

functional interfaces bad

steel heart
#

I like functional interfaces though

prisma wave
#

why

old wyvern
#

first class function?

steel heart
#

Because itโ€™s like life plus more life

prisma wave
#

yes

#

functions are types in kotlin

#
val printHello: () -> Unit = {
  println("Hello")
}```
#

much more versatile than Consumer and things

old wyvern
#

how would one call the function?

prisma wave
#

printHello()

old wyvern
#

How about when passed as a function argument?

prisma wave
#

uh

hot hull
#

We got em

#

Mission successful

steel heart
old wyvern
#

No Im seriously just asking coz im not too familiar with kotlin

prisma wave
#

something like kotlin fun <T> filter(predicate: (T) -> Boolean) : List<T> { for(element in this) { if(!predicate(element)) { remove(element) } } return this }

steel heart
#

Ewww the nesting though

prisma wave
#

a messy but simple filter that won't even compile

#

yeah ik

#

it was an example

hot hull
#

Disguisting

old wyvern
#

oh so you would use the name specified for the argument to call the function. Seems nice

steel heart
#

I like the no semi colons though

prisma wave
#

Disguisting
better than how java does it

#

yeah

#

you can get lovely things like ```kotlin
() -> (A, B) -> () -> Unit

steel heart
#

Wth

prisma wave
#

which is roughly equivalent to ```java
Supplier<BiFunction<A, B, Runnable>>

steel heart
#

Does BiFunction take 3 ?

old wyvern
#

That looks kinda confusing tbh

prisma wave
#

you wouldn't actually use that though

old wyvern
#

oh wait nvm I was looking at it wrong

prisma wave
#

there's no reason to have it

old wyvern
#

wdym?

prisma wave
#

@steel heart yes, the 2 parameters and return type

steel heart
#

Oh yh

prisma wave
#

using something like that in an actual codebase would be an incredibly bad idea

#

because it is confusing

old wyvern
#

ah

steel heart
#

I like it though

#

Confusing == looks good

prisma wave
#

lol

#

fair enough

heady birch
#

Niall lib binding

steel heart
#

Thatโ€™s a thing now

prisma wave
heady birch
#

-> () ->

#

what is this

prisma wave
#

first class functions

#

functions are types

heady birch
#

๐Ÿคฎ

#

Javascript ass beat

prisma wave
#

??

#

js is nothing like that

heady birch
#

like in javascript anything can be anything

steel heart
#

Js is very nice

prisma wave
#

that's... not what first class functions are

#

it means that functions are objects just like everything else

#

() -> Unit is equivalent to Runnable, () -> Int is equivalent toSupplier<Integer>, (Int) -> Int is equivalent to Function<Integer, Integer>

steel heart
#

Second class functions

prisma wave
#

that's what they are in java

#

I believe

#

possibly third class

steel heart
#

Hmm yeah

#

I mean kotlin got some benefits canโ€™t deny that but I mean Java thatโ€™s good old stuff

prisma wave
#

i guess

steel heart
#

JavaScript though

#

itโ€™s like heaven

prisma wave
#

JS is ok

#

sometimes

steel heart
#

I mean itโ€™s ok as long as you donโ€™t nest callbacks

#

Then use async await or promises

prisma wave
#

which is fairly easy to avoid

#

yeah

heady birch
#

I dont like it

old wyvern
#

itโ€™s like heavenWhat are you on?

steel heart
#

And now when Deno is arriving

#

Itโ€™s gonna be lit af

old wyvern
#

this man is high

hot hull
prisma wave
steel heart
#

Yugi well I have to tell the truth

old wyvern
#

@prisma wave That has no difference from normally defining and using a function?

prisma wave
#

it can do

#

you can pass printHello around for example

old wyvern
#

yes but then again you just use a Consumer to do the same xD

steel heart
#

I mean eventually you can do that

old wyvern
#

it would just be larger

steel heart
#

Method method = KoltinMitten.class.getMethod()

prisma wave
old wyvern
#

Actually not even a consumer I guess since it doesnt return anything

prisma wave
#

it would be a Runnable

#

but java's functional interfaces are far less versatile

#

and more ugly

steel heart
#

I mean, itโ€™s not a bad effort

hot hull
#

That allman tho ๐Ÿ˜

prisma wave
#

ofc ofc

old wyvern
#
Runnable printHello = System.out::println;
int i = 10;
while (i-->0) {
  printHello.run();
}```?
hot hull
prisma wave
#

like I said

#

it's possible in java

#

but it's much less versatile

old wyvern
#

mhm

prisma wave
#

but also, you don't need an individual interface for every function type

steel heart
#

Why do you have { on seperate

prisma wave
#

if you wanted a QuadFunction<A, B, C, D, R> you don't need an interface, just define it as kotlin (A, B, C, D) -> R

steel heart
#

Thatโ€™s not nice

prisma wave
#

it's a code style

#

it has some benefits

steel heart
#

Yes and no

#

Specify benefits

steel heart
#

Nah

prisma wave
#

that's one reason it's better imo

#

another is with nested braces

#

the blocks are separated more cleanly

old wyvern
#

why are the parameters split across lines?

steel heart
#

Uh fair enough

hot hull
#

Cause Yugi

#

Easier readability

prisma wave
#

why are the parameters split across lines?
otherwise the method signature would be really long

#

^

steel heart
#

True

#

It still gets long though

prisma wave
#

at the end of the day it's personal preference

old wyvern
#

Oh so long functions should have that done to the params?

prisma wave
#

but i find it more readable

#

probably yes

old wyvern
#

Feels weird to me kinda

prisma wave
#

most style guides will say that lines shouldn't be more than 100 characters long

#

so yeah you should probably split it

old wyvern
#

ah alrighty

steel heart
#

TriConsumer<BiPredicate<Supplier<T>, Supplier<U>>, Runnable, Function<T, R>>

#

Okay idk

#

But like

#

That

hot hull
#

And then you see me with my 1k one liners :kek:

old wyvern
#

๐Ÿ˜‚

prisma wave
#

ew

#
((() -> T, () -> U) -> Boolean, () -> Unit, (T) -> R) -> Unit```
#

much better

steel heart
#

They should add varargs to generics ๐Ÿคก

prisma wave
#

(they're both horrible)

#

how would that work

steel heart
#

Well said

old wyvern
#

That would not be possible with how generics work atm afaik, the generic classes are turned to Objects on compilation and the compiler adds a cast to the type you are referencing where necessary.

prisma wave
#

indeed

steel heart
#

Yeah which is sad

prisma wave
#

type erasure

old wyvern
#

I mean you could Kinda "hack" it with a Wrapper using something like array of MyWrapper<?> as the argument parameter but then you will have to deal with Object-s anyway

hot hull
#

Someone convert this into a sphere, ktnx

    public void spawnParticleBorder(final int offset) {
        int borderXR = location.getBlockX() - offset;
        int borderZR = location.getBlockZ() - offset;
        int borderXL = location.getBlockX() + offset;
        int borderZL = location.getBlockZ() + offset;

        for (int y = 255; y > 0; y -= 16) {
            for (int x = borderXR + (offset * 2); x > borderXR; x--) {
                player.playEffect(new Location(location.getWorld(), x, y, borderZR), Effect.HEART, 1);
            }
            for (int z = borderZR + (offset * 2); z > borderZR; z--) {
                player.playEffect(new Location(location.getWorld(), borderXR, y, z), Effect.HEART, 1);
            }
            for (int x = borderXL - (offset * 2); x < borderXL; x++) {
                player.playEffect(new Location(location.getWorld(), x, y, borderZL), Effect.HEART, 1);
            }
            for (int z = borderZL - (offset * 2); z < borderZL; z++) {
                player.playEffect(new Location(location.getWorld(), borderXL, y, z), Effect.HEART, 1);
            }
        }
    }
old wyvern
#

can you explain what the borders signify? @hot hull

#

Shouldnt you be finding the radius for a sphere's case?

patent spoke
#

Use the math formula of a sphere

#

Learn to do it by yourself

steel heart
old wyvern
#

@hot hull I dont fully understand what the borders should do but heres what you would do for if you have the radius

#

Thats the parametric form of a sphere

#

So you can represent x,y,z w.r.t Theta and phi

#

Imagine 2 circles

#

on 2 separate axis

#

You will have to rotate one circle a bit, and then get points for all rotations of the other circle for that angle of the initial circle

#

Rotating as in incrementing or decrementing the value of theta and phi

#

Imagine you need 40 points per section, you will be rotating each circle in jumps of 2PI / 40 (2 * PI radians = 360 degrees)
As in the formula would be 2
PI/Density

#

So we have something like

int pointDensity = 40; // pointDensity being how many points you want to draw per section. 
int incr = 2 * Math.PI / pointDensity; 
int radius = 1; // your radius here
for (double phi = 0; phi < 2 * Math.PI; phi += incr) {
    double z = r * Math.sin(phi);
    for (double theta = 0; theta < 2 * Math.PI; theta += incr) {
        double y = r * Math.cos(phi) * Math.sin(theta);
        double x = r * Math.cos(phi) * Math.cos(theta);
        //spawn the particle for the sphere with the x,y and z you have
    }
}```
hot hull
#

Yea I'll play around with it tommorrow

steel heart
#

Is it true that hypixel runs with more than 20 tps?

onyx loom
#

yes

hot hull
#

@steel heart 100 constant tps

rotund egret
#

It's theoretically possible

#

It would break a lot of logic

remote goblet
#

hypixel are crazy fuckers

#

so of course they do

topaz bay
#

Not really actually

#

Ive modified a server to run at higher tps's the only real downside is that things happen faster

#

Which could easily be fixed by adjusting equations

obtuse gale
#

Hello dear friends,

Currently i am looking for a nice and clean way to save messages into mongodb and also get them easily from mongodb to use on my network.
Also i want to make it so that i can easily add messages with different projects but from our core api. Anyone know some nice way?

distant sun
#

define "easily"

#

you just need a value to look after (eg username, server name etc) and then get the message(s)

old wyvern
#

@ocean quartz Can you link me to your discord commands lib please?

ocean quartz
#

There is no documentations for it yet but the repo is
implementation "me.mattstudios.utils:matt-framework-jda:1.1.9-BETA"
Anything you need help with just let me know ;p

old wyvern
#

Lit thanks man. Can you give me an example for a basic ping command so I know what to use?

distant sun
#
// Add '@Prefix("prefix here")' if you are not using a gloabal prefix
@Command("ping")
public class PingCommand extends CommandBase {

    @Default
    public void onCommand() {
        getMessage().getChannel().sendMessage("Pong!").queue();
    }
}```
ocean quartz
#

Oh yeah i guess that works xD
Though Gaby is using the global prefix

old wyvern
#

Alrighty, Thanks man!

distant sun
#

๐Ÿ™‚

topaz bay
#

How does the requirement work?

#

@ocean quartz

ocean quartz
#

It's a functional interface that returns a boolean you can do any requirements you want, then just put the id

topaz bay
#

Ah

true bane
#

@here be warned about user @open creek , he has charged back on all the plugins that i coded for him that were delivered!

frail glade
#

You're welcome to open a report about it. Just DM @compact perch

steel heart
#

@true bane thanks for telling

true bane
#

no problem, currently fighting the chargeback

steel heart
#

Iโ€™d recommend you to make a plugin with a backdoor if he would chargeback. Once enough time has passed for no chargebacks to be allowed just give him the one with out

true bane
#

not a bad idea, its a bit shady tho

steel heart
#

Well itโ€™s better than getting scammed?

true bane
#

true

steel heart
#

Howโ€™s the plugin looking?

frail glade
#

Doesn't sound like the brightest idea.

steel heart
#

Eventually no but I mean do you have a better way of handling it ?

true bane
#

im fighting the chargeback so i should be fine

#

just hate kids like that

prisma wave
#

Does having type coersion make a language weakly typed?

topaz bay
#

No

#

Everything can still have strict types

#

Java is strongly typed, and has numeric type coercion

prisma wave
#

Hm yeah good point

topaz bay
#

@prisma wave what should I add to odin next?

onyx loom
#

a delete button

topaz bay
#

Youre a hater

prisma wave
#

Add some FP utilities to the standard lib or whatever

topaz bay
#

There is no stdlib

prisma wave
#

or alternatively some sort of multithreading support

#

Oh

#

That's unfortunate

topaz bay
#

WHAT

#

ooooooo

onyx loom
#

Youre a hater
@topaz bay โ™ฅ๏ธ

topaz bay
#

I'm gonna add coroutines

#

Actually no, nvm, fuck that

prisma wave
#

๐Ÿค”

onyx loom
#

u should make it understand humans like speech

#

if i were to type make program

#

it make program

prisma wave
#

wow

onyx loom
#

pls add this

prisma wave
#

I guess you could always make an intellij plugin for it

#

To add proper autocomplete and things

topaz bay
#

fuuuucccckkkk that

onyx loom
#

make program that does stuff
makes a program that does stuff

#

๐Ÿ™ƒ

prisma wave
#

make a webserver in it

topaz bay
#

this aint skript you nerd

prisma wave
#

ruby on rails 2

#

Odin on rails

onyx loom
#

๐Ÿ™

topaz bay
#

Odin on the Bifrost

prisma wave
#

genius

#

see

#

I'm a good influence

topaz bay
#

Absolutely not

#

I'm not making that shit

#

It would be like 90% java interop

#

I'm more looking for actual language features

#

I love it when IntelliJ does this

#

๐Ÿ™ƒ

#

Don't you just love Tuples

#

They really are great

#

They should have kept them in Kotlin

prisma wave
#

Wait were tuples originally a thing?

topaz bay
#

Yes

#

They removed them

#

In the betas

#

.....

#

WHAT

#

what do you MEAN

prisma wave
#

Why would you remove them

#

odin bad

topaz bay
#

BRUH

#

What in god's name is going on here

prisma wave
#

smh

#

kinda embarrassing

#

Imagine not having a working language

topaz bay
#

Especially considering the entire equality of types is based 100% of the name

#

Its literally string equality, and its bugging out

prisma wave
#

ew

topaz bay
#

oh fuck

#

wait

#

Look at that if statement

#

Im returning false if they match

#

I'm an idiot

#

How fucking long has this been like this

#

what the hell

#

there we go

#

Same result, but 100% using tuples

prisma wave
#

hooray

#

I got my parser working at last earlier

#

So now I can actually make frigga work

topaz bay
#

Finally

#

Some real competition

prisma wave
#

you'd best be prepared

#

I'm gonna wipe the floor with Odin

#

eventually

#

just gimme a few months

topaz bay
#

Ah

#

Slow

topaz bay
#

That is utter bullshit

#

I've never once made that association

prisma wave
#

I'm not black but likewise

#

It's ridiculous

#

master / copy

#

on an unrelated note if I wanted to implement different size number types, what would be the best way of doing it? Bit arrays? (Eg UInt8, Int16, etc)

topaz bay
#

Probably not

#

At really high levels, they make absolutely no sense

#

In Java world, you're going to be stuck with implementing them with the number types available, or constraining the larger types

obtuse gale
#

could anyone do a simple python school assignment for me lmao

worthy minnow
#

I asked first Tsunami!

regal gale
#

@obtuse gale we don't spoonfeed here

heady birch
#

Well no, but yes

obtuse gale
#

jesus

#

150 ๐Ÿ˜ฎ

heady birch
#

[HELP] Hibernate with spigot

#

Hey, I think OP is referring to a Sleep function.

quiet depot
#

lol yeah i replied

heady birch
#

Ive never used hibernate without spring

quiet depot
#

i heard hibernate doesn't work too well on spigot

heady birch
#

Probably just no Repository classes and alot of Session

distant sun
#

what's hibernate?

quiet depot
#

mysql addon for rpf but worse

heady birch
#

Slow in my experience

quiet depot
#

it's an orm @distant sun

distant sun
#

orm to you too

quiet depot
#

it converts ur serialized data into ur deserialized objects

#

and vice versa

#

but I believe it has integrations for loads of database softwares aswell

#

which is probably where it's popularity stems from

heady birch
#

I expect so

#

Were you gonna make EnterpriseClearChat?

quiet depot
#

so much effort tho

heady birch
#

Yeah

#

I started make one ages ago and couldn't even get the server registered as a Bean

quiet depot
#

I'd love to work with you on it, opportunity for me to start learning spring

obtuse gale
#

isnt the enterprice clear chat on the slides?

heady birch
#

Uh.. thats top secret?

obtuse gale
#

oshit my bad

quiet depot
#

slides?

heady birch
#

๐Ÿ˜ฌ

obtuse gale
#

ill send it one sec

#

dont tell anyone about thios

pallid gale
#

good slides

obtuse gale
#

TOP SECRET

quiet depot
#

ok

obtuse gale
heady birch
#

He cant see it anyway

#

Slide 25 is covered up

obtuse gale
#

oh yeah true

#

WOAH

#

HOLY SHIT

heady birch
quiet depot
heady birch
#

In the conference room and you show your boss this slide

obtuse gale
#

piggy wtf

#

you removed the top secret warning

heady birch
quiet depot
#

"yo we should add a command to clear the chat"

pallid gale
#

"Hahah, good joke John, no one would want that"

#

*John proceeds to fire Greg

obtuse gale
#

"we can make it enterprise tho"

heady birch
#

"Were loosing customers"

#

Oh no

obtuse gale
#

"lets rent a car and drive away"

heady birch
#

You saw "rent-a-car"

pallid gale
#

Right Guy "I'm off to honolulu, screw you guys"

heady birch
#

Whats honolulu

quiet depot
#

"and the enterprise clear chat money is coming with me!"

pallid gale
heady birch
#

Ah

quiet depot
#

man you've got no idea how much funny talks about honolulu

#

you'd think he lived there

heady birch
pallid gale
#

*People in the back talk shit about Brad

#

*Brad smiles

obtuse gale
#

Do you guys reckon we should get Gsuite?

#

So the slides can be better

quiet depot
pallid gale
quiet depot
#

that's staff chat alone

pallid gale
quiet depot
pallid gale
#

I'm the ceo of admin abuse

#

So you need to refrain from interfering with my communications

quiet depot
#

o

pallid gale
#

Also this is horribly off topic

steel heart
#

Is this staff chat?

quiet depot
#

yes

steel heart
#

Iโ€™m finally in the right place

compact perchBOT
#
Seems things are getting a bit off topic here.

Please either stick to the topic or move over to #off-topic

steel heart
quiet depot
#

damn spigot be dying a fuck ton lately

heady birch
#

If our CEO can allocate the funds yes

quiet depot
old wyvern
obtuse gale
#

I think its moreso

heady birch
#

Lol

obtuse gale
#

I can go up to 30, but if you want less thats ok lol

old wyvern
#

0 to 30+ litrally means anything or nothing xD

steel heart
#

0+

pallid gale
#

You people read into it too much

old wyvern
#

0-

heady birch
#

"I want a full prison core, customizable messages and database support, oh and with worldguard support, custom economy system and cells. Should be easy (I guess) 0-5$"

pallid gale
heady birch
#

"ThotPatrol anti cheat"

distant sun
#

question, varargs compile to array?

steel heart
#

Yes I think

somber tulip
steel heart
#

VSD

regal gale
#

I prefer the 1st one

somber tulip
#

:/ I personally perfer rider dark or darcula - not really interested in the VSD. I really like rider dark but I'm used to darcula for the intellij

old wyvern
#

try xcode dark theme

heady birch
#

Poor

#

Darcula is the bset

#

Even then most the time I use the default white theme

somber tulip
#

You use white theme....?

#

rip your eyes?

old wyvern
heady birch
#

yeah when I got sun shining onto the screen

somber tulip
#

I think I'm going to start with Rider Dark and maybe try out Xcode dark's once I've done the setup stages for it

heady birch
#

Classic Light

hot hull
#

Disguisting

heady birch
#

if
{

}
else

#

Thats disgusting

hot hull
#

@prisma wave Change this mans mind, ktnx

heady birch
#

Even bm doesnt use that

steel heart
#

Frosty wth r u high

obtuse gale
#

Lets hold a vote

#

Allman or K&R

#

I cant react ehre

prisma wave
#

@heady birch I'm afraid I do

#

@topaz bay so there's not really any point? Surely an unsigned type for example would need the next biggest size?

heady birch
#

๐Ÿ˜ฆ

prisma wave
#

Allman good

heady birch
#

Not all men

topaz bay
#

I hate you

prisma wave
#

lmao

topaz bay
#

No, theres not really a point

prisma wave
#

Hm i guess you're right

#

Frigga isn't exactly low level

#

but hypothetically how would one implement that? Or would you need something lower level

topaz bay
#

I mean, if you want to go super simple

#

You could just only have your numbers actually be the larger number types

#

And have your language constrain them based on the in language type

prisma wave
#

but then you don't save any memory right?

topaz bay
#

Nope

#

In odin, Int is Long, and Dec is Double

#

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

prisma wave
#

May as well do that too

#

who cares about memory anyway

obtuse gale
#
coolGenerator69: {
  item: {
    type: "STONE"
    meta: {
      name: "coolBlock69"
      glowing: true
    }
  }
  // How many Items should spawn per minute in each tier, in order of ascending tier
  speedTiers: [5,10,15,20]
  // How long until it should tier up from beginning of game
  timeToTiers: [5,10,15,20]

  locations: [
    "420,69,420",
    "410,69,420",
    "400,69,420",
  ]
}```
#

This valid korm?

distant sun
#

you have an extra comma on locations

obtuse gale
#

oh yeah

#

intellij doesnt know how to indent it right and its pissing me off

#
class GeneratorData(val item: Item, val speedTiers:List<Int>, val timeToTiers:List<Int>, locations:List<String>) {

    class Item(val type: String, val meta: Meta) {

        class Meta(val name: String, val glowing: Boolean)


    }

}```
#

Would it then also equal that

topaz bay
#

korm supports trailing commas

#

on lists and hashes

#

You should technically be able to be a comma like... anywhere

#

lol

obtuse gale
#

ive always wanted to be a comma anywhere

topaz bay
#

Yeah, that seems about right

hot hull
#

eee my gpa dropped an entire grade due to a single subject :eeee:

obtuse gale
#

whats GPA?

hot hull
#

Grade per average

obtuse gale
#

is that kinda like australias ATAR

#

Like a number you get at the end of school

#

how old even are you frcsty

hot hull
#

18

obtuse gale
#

oo

hot hull
#

It's just an average of all the subjects final grade

obtuse gale
#

ah

#

im gonna fail my media subject

#

just cos i cant be fucked to do frontend web

distant sun
#

eee my gpa dropped an entire grade due to a single subject :eeee:
@hot hull what's the final gpa?

obtuse gale
#

next year im doing Php as well

hot hull
#

3,8

obtuse gale
distant sun
#

are you in hs?

hot hull
#

When it would've been 4.3 ;c

distant sun
#

out of 5?

hot hull
#

Yea

distant sun
#

eh

#

I got 8.50

hot hull
#

I lost .5 due to a single subject cause the proffessor a hoe

topaz bay
#

You sure its not cause you're a hoe

distant sun
#

^

#

Sxtanna knows what he's talking about because he's also a ho3

#

:)

#

next year im doing Php as well
@obtuse gale are you in highschool?

hot hull
#

I'm sure Sx, before the rona my average at that subject was 4.0, so eee

obtuse gale
#

na im in primary school obviously

#

year 11 next year

distant sun
#

๐Ÿคฆ

#

bruh

obtuse gale
#

its an elective

distant sun
#

I want to do programming at school ๐Ÿ˜ข

obtuse gale
#

yes

#

but

#

php

distant sun
#

idc

#

better than what we do

hot hull
#

Same Gaby, but not attending the right school for that :eee:

obtuse gale
#

Do they not even have electives like that where you are?

distant sun
#

same frosty ๐Ÿ˜ญ

obtuse gale
#

Our school doesnt offer it, I have to take a period off every time I have it, and do it via distance education

distant sun
#

we don't have any optional classes / courses

#

๐Ÿ˜ก

hot hull
#

Gaby, what kinda school you attending?

obtuse gale
#

wait all your subjects are compulsory?

distant sun
#

Tourism and Alimentation - the dumbest shit ever

#

ye aj

obtuse gale
#

jeez

#

thats fucked even more than school just in general lol

distant sun
#

maybe some schools have elective classes but we do not