#dev-general

1 messages ยท Page 307 of 1

half harness
#

thats publishing

#

i assume its in either mavenCentral or jcenter?

#

it doesn't error?

#

gradle?

#

what url?

#

lol

#

bAnNeD fOr aDvErtiSiNg

jovial warren
#

ain't falling for that again

#

and yes, I did already fall for that once

#

they sent me a link to some steam account that wasn't even an admin

#

welp, time to report both the Discord account and the Steam account

#

I do wonder how they get hold of me though

#

I believe this one was through the LuckPerms Discord or something

#

that's normal

#

idot

#

ban a mother fucker with the username Burikat01#5013 (not in the server anymore) for trying to scam people please

#

lemme just get you the guy's ID

#

810922922843439115

onyx loom
#

wait what

#

what do they even attempt there

#

what do u fall for

jovial warren
#

they ask you to contact someone, generally a fake Steam admin if they're actually useful scammers, and that person pretends to be said Steam admin, changes the email on your account, and asks for a $100 Steam gift card to generate a so-called "unique ID"

onyx loom
steel heart
#

yo I installed nord vpn

#

is that a regret?

jovial warren
#

eh, it's a good provider, but I personally hate them

onyx loom
#

nord vpn is good the last time i used it

#

just got the free trial for a few days lol

jovial warren
#

I can't stand NordVPN because of the way they advertise the VPN

onyx loom
#

lol

jovial warren
#

"insecure public WiFi"

onyx loom
#

theyre all over yt now

jovial warren
steel heart
#

they eat my ram

#

but ye hella nice

jovial warren
#

I personally use Windscribe

#

and Tor

#

if you truly want to stay anonymous online, I highly highly recommend Tor

onyx loom
#

i got protonvpn on my phone yesterday, bruh its literally the fastest vpn ive had, was getting like 300mbps

#

only got it because yt doesnt allow picture in picture mode unless ur in the USA kekw

steel heart
#

hmm proton

jovial warren
#

Tor bounces your connection through 3 hops and uses multiple layers of encryption to make you very, very hard to track online

steel heart
#

ima try proton as well

jovial warren
#

and if you're connecting to a hidden service, you are literally untrackable

onyx loom
#

u going on the dark web bardy? ๐Ÿคจ

jovial warren
#

I mean, it's a hell of a lot slower, but it's god damn worth it

steel heart
#

mad sus

jovial warren
#

that's not what Tor is for Kaliber

onyx loom
#

lol ik

#

but thats what the 0.000001% use it for

jovial warren
#

Tor hidden services = mostly dark web
Tor = anonymity

steel heart
#

cool dep

jovial warren
#

but some sites use single onion, meaning you only have 3 hops, but it's still technically a hidden service (not hidden because the rendezvous point knows who the server is, but still a "hidden service")

onyx loom
#

conclure proton is completely free i think, they gave me a free upgrade to one of their plans for 7 days for some reason so thats cool

steel heart
#

oh well

#

I will use nord for now but yeah gonna add it to my try-vpn-list

onyx loom
#

๐Ÿ‘

jovial warren
#

I actually personally run and maintain 4 separate Tor exit nodes

#

(exit node = the one that talks to the server)

lunar cypress
#

I'm in Germany and it works for me

onyx loom
#

u got yt premium?

lunar cypress
#

no

onyx loom
#

uh

#

i googled it yesterday and thats it said

#

weird lol

lunar cypress
#

oh android

#

yeah

onyx loom
#

oh u got iphone?

lunar cypress
#

no

#

I thought you meant web version

onyx loom
#

ah

#

it works for me on website too, barely

#

sometimes it works, sometimes it doesnt

#

that youtube premium looking spicy now that i know picture in picture is actually a thing on yt mobile now

prisma wave
#

do not get youtube vanced, purchase youtube premium ๐Ÿ™‚

#

actually i might not be allowed to say that

onyx loom
#

lmao

#

does vanced also block ads?

prisma wave
#

yup

onyx loom
#

oo

prisma wave
#

it's youtube premium just for free

#

i think it has the downloading too

onyx loom
#

yea i know some of my friends have it now that u mention it

prisma wave
#

very handy fingerguns

onyx loom
#

do not download content from youtube tho, that will be a violation of the copyright act (1733)!

#

i will not be getting youtube vanced!

prisma wave
#

of course!! i would not do that!

steel heart
#

vanced?

prisma wave
#

as a law abiding citizen i must say that breaking copyright laws is VERY BAD

steel heart
#

didnt even know that was a thing

prisma wave
#

yup

steel heart
#

but I shall forget it

prisma wave
#

but you should not use it

#

good

onyx loom
#

why the fuck is that white

#

aaaaaahhhhh my eyes

static zealot
#

lmaoo

obtuse gale
#

Thx 4 ping amazing 10/10 +rep

onyx loom
obtuse gale
#

And...?

#

I still need that screenshot

#

I can't just ban people left right and center

#

I need a screenshot of the servers in common

#

Read my message..

onyx loom
#

are u unable to check if that person was in the lp server?

obtuse gale
#

Just use gson

#

Ez

distant sun
#

@obtuse gale

#

๐Ÿ™‚

obtuse gale
#

depends on what you're using to read the json

obtuse gale
#

why couldn't you?

distant sun
#

gson to object, easy

obtuse gale
#

besides the components crap? because that wasn't really reading/writing json lol

#

json is all over the web

distant sun
#

a class to create a Gson instance with different properties & settings

#

on bungeecord, is there any way to check what domain the player used to join the server?

#

turn the given json into an object

obtuse gale
#

gives you an object of a specified type from a json file // string

distant sun
#

d;gson Gson#fromJson

ruby craterBOT
#
public <T> T fromJson(java.lang.Stringย json, java.lang.Classย classOfT)
throws JsonSyntaxException```
Description:

This method deserializes the specified Json into an object of the specified class. It is not suitable to use if the specified class is a generic type since it will not have the generic type information because of the Type Erasure feature of Java. Therefore, this method should not be used if the desired type is a generic type. Note that this method works fine if the any of the fields of the specified object are generics, just the object itself should not be a generic type. For the cases when the object is of generic type, invoke fromJson(String, Type). If you have the Json in a Reader instead of a String, use fromJson(Reader, Class) instead.

Parameters:

classOfT - the class of T
json - the string from which the object is to be deserialized

Throws:

JsonSyntaxException - if json is not a valid representation for an object of type classOfT

Returns:

an object of type T from the string. Returns null if json is null or if json is empty.

obtuse gale
#

you want to get all the player classes' names, right?

distant sun
#

could create a data object called Class(name, level) and get classes as array of Class

obtuse gale
#

aah yes, hormones development

onyx loom
#

puberty ๐ŸŒ

steel heart
#

(Person)

jovial warren
#

about to push Komponent 1.0-SNAPSHOT

ocean quartz
#

Komponent lol

obtuse gale
#

Is that your adventure-platform impl? lol

jovial warren
#

no Fefo

#

it's more than that

#

it's a chat component API from scratch

obtuse gale
#

o

jovial warren
#

if you wanna know why I'm making this, ask @prisma wave, he's the one who wanted a custom system on the backend of MineKraft lol

obtuse gale
#

the hell is a urlreader thonking

#

I mean I can guess

jovial warren
#

it... reads... URLs...?

steel heart
#

lol

#

dont

prisma wave
#

smh

jovial warren
#

imagine using Nashorn in 2021 smh

#

also, what JSON lib is that?

prisma wave
#

gson

steel heart
#

the superior json lib

#

for java

jovial warren
#

yeah I was gonna say

#

kotlinx.serialization is the superior JSON library.

steel heart
#

why urlreader?

jovial warren
#

no questions asked

#

yeah no, that's not how that works

#

you need to make a request and receive a response

steel heart
#

URLReader is probably not what you want

#

despite the name

obtuse gale
#

neither is jsonparser tbh

jovial warren
#

you have one of a few options:

  1. OkHttp
  2. OkHttp with Retrofit (my personal favourite)
  3. HttpUrlConnection (๐Ÿคฎ)
onyx loom
#
  1. custom ๐Ÿ™‚
obtuse gale
#

imagine using okhttp to get a simple json

jovial warren
#

and there's a few others, but OkHttp is definitely the best

prisma wave
#

elara/http

#

๐Ÿ™‚

jovial warren
#

well I use Retrofit with OkHttp to query Yggdrasil for MineKraft

#

and it's literally only used for one query

prisma wave
#
result >>= print
#

๐Ÿ™‚

jovial warren
#

that's literally the only request the server ever needs to make (luckily)

prisma wave
#

definitely not a token stealer

jovial warren
#

yeah no, that's not what it's called

prisma wave
#

๐Ÿ™‚ ๐Ÿ™‚

obtuse gale
#

Efe you can use Gson#fromJson(InputStream, Type), the InputStream being URL#openStream() (or whatever) and the type the JsonObject class, that will give you the response as a JsonObject (the one in here https://paste.helpch.at/magupaxita.json)

You should definitely look into how a json is actually structured
https://www.w3schools.com/js/js_json_datatypes.asp
https://www.w3schools.com/js/js_json_objects.asp objects are basically a Map<String, ?>
https://www.w3schools.com/js/js_json_arrays.asp
This is designed and oriented to use with JS so the examples are in JS, but you can surely see how they work

Look at the original json https://paste.helpch.at/magupaxita.json it's basically one huge object @obtuse gale

jovial warren
#

I might also make mojang-auth (me.bardy) whilst I'm at it

obtuse gale
#

๐Ÿคก

jovial warren
#

anything I make is gonna be under my name and my domain lol

#

actually you probably wanna fully settle on a name first

prisma wave
#

i do not like this name

#

i just dont have a better one

#

as of yet

jovial warren
#

right then, let's bring out the idea generator

#

a.k.a HelpChat dev-general

obtuse gale
#

JsonObject.class

jovial warren
#

come on peeps, start throwing out your ideas for a new name for MineKraft

obtuse gale
#

Class implements Type

#

oh right, reader

prisma wave
#

?

jovial warren
#

a type is an interface, class or enum

obtuse gale
#

new InputStreamReader(InputStream)

jovial warren
#

imagine not being able to call InputStream#reader

#

imagine

#

how? you're just creating an object that can read the input stream and feeding that into Gson

prisma wave
obtuse gale
#

from URL#openStream() you get an InputStream
Gson#fromJson(Reader, Type) takes a Reader, not an InputStream
You can use an InputStreamReader, it's a Reader whose constructor takes an InputStream (essentially you construct one with the stream the url gave you and give that reader to gson)

jovial warren
#

also, oh am I glad that the authentication mechanism for the server is only a single request

obtuse gale
#

you know I would take this to DMs but yeah :kekw:

jovial warren
obtuse gale
#

you misplaced some parentheses somewhere

jovial warren
#

probably want a scheme in there for the URL btw

#

https://

obtuse gale
#

tbh

jovial warren
#

otherwise it won't know what to use, since it could be using file or ftp or literally any schema which is supported in URLs

obtuse gale
#

SMTP :cct:

#

nothing lol just specify https:// in your url

#

that gives you a JsonObject right?

#

๐ŸŒš

#

#dev-general message
Refer back to this ๐Ÿ‘† and take a look at the methods JsonObject, JsonArray and JsonElement have

#

docdex also has gson uploaded so you can just quick search things in there

stuck harbor
#

mmm

#

nice json

obtuse gale
#

you have one huge JsonObject (the entire response)

basically a Map<String, ?>
the classes' name and level are part of an object

{
  "name": "mage",
  "level": 82,
  // ...  and no json doesn't support comments lmao

each class is an object (the one right above) inside the classes array
the classes array is inside an object inside an array named data

basically $.data[0].classes[i].name and $.data[0].classes[i].level ($ being the root object)

#

it's kind of convoluted to look at first, but what you should do is do everything by bits, try each thing you change and print every step

distant sun
#

sadly that doesn't work with gson ๐Ÿ˜ฆ

#

you have to use get().asJsonArray().get()...

ocean quartz
#

When you push your password to github kek

distant sun
#

$ is the root

#

gg matt xd

ocean quartz
#

Smort

onyx loom
distant sun
#

dont call getAsString on that efe

ocean quartz
#

Had a test database settings with the password as string and forgot about it and pushed xD

distant sun
#

unless you want a class json

#

name for example?

#

then do get("name").getAsString()

obtuse gale
#

"classes" is an array of classes, you get the class at a certain index

#

then get the "name" object as a string

#

I'll simplify it a bit

static zealot
obtuse gale
#
{  // <-- object
  "classes": [  // <-- array
    {  // <-- object
      "name": "darkwizard",  // <-- string
      "level": 739  // <-- int
    },
    {
      "name": "archer",
      "level": 618
    }
  ]
}

root object is an object (basically a Map)
classes is an array of objects
you get the class at an index
for that class, you get the name as string and the level as int

ocean quartz
distant sun
#

that's the same thing you had earlier xd

obtuse gale
#

with get(0) you are getting the object

{
  "name": "whatever",
  "level": 146545465
}
distant sun
#

^

#

now that you have a class

#

get a value

obtuse gale
#

That is a JsonObject, on that object you getAsString("name") and getAsInt("level")

#

or whatever the methods are called lol

distant sun
#

get("name").getAsString() iirc

obtuse gale
#

it wants an index if it's an array

#

classes is an array of objects

#

the object contains the name and level

distant sun
#

d;methods gson jsonobject

ruby craterBOT
#
Methods:
com.google.gson.JsonObject#getAsJsonArray
com.google.gson.JsonObject#add
com.google.gson.JsonObject#keySet
com.google.gson.JsonObject#deepCopy
com.google.gson.JsonObject#getAsJsonObject
com.google.gson.JsonObject#addProperty
com.google.gson.JsonObject#equals
com.google.gson.JsonObject#JsonObject
com.google.gson.JsonObject#get
com.google.gson.JsonObject#remove
com.google.gson.JsonObject#size
com.google.gson.JsonObject#hashCode
com.google.gson.JsonObject#getAsJsonPrimitive
com.google.gson.JsonObject#has
com.google.gson.JsonObject#entrySet```
distant sun
#

what

#

d;gson com.google.gson.JsonObject#get

ruby craterBOT
#
public JsonElement get(java.lang.Stringย memberName)```
Description:

Returns the member with the specified name.

Parameters:

memberName - name of the member that is being requested.

Returns:

the member matching the name. Null if no such member exists.

obtuse gale
#

o

distant sun
#

d;gson JsonElement#getAsString

ruby craterBOT
#
public java.lang.String getAsString()
throws IllegalStateException, ClassCastException```
Description:

convenience method to get this element as a string value.

Throws:

java.lang.IllegalStateException - if the element is of the type JsonArray but contains more than a single element.
java.lang.ClassCastException - if the element is of not a JsonPrimitive and is not a valid string value.

Returns:

get this element as a string value.

obtuse gale
#

no

distant sun
#

add get(name) after what you had before

obtuse gale
#

jsonObject.getAsJsonArray("classes").get(0).getAsJsonObject().get("name").getAsString();

distant sun
#
//       $.classes                   [0]                     .name
jsonObject.getAsJsonArray("classes").get(0).getAsJsonObject().get("name").getAsString();```
obtuse gale
#

although it's not gonna be in the root response json either :kek:

jovial warren
#

this just reminds me of how vastly superior kotlinx.serialization is lol

#

and how much easier

obtuse gale
#

it's gonna be under $.data[0].classes...

prisma wave
#

v w

obtuse gale
#

VolksWagen

#

no thanks

jovial warren
#

not with that attitude you won't

distant sun
#

stfu efe

#

and make it work

jovial warren
#

imagine having a gf in the first place

distant sun
#

pu$$y

jovial warren
#

don't think any of us needed to know that but ok

distant sun
#

fight like a man

jovial warren
#

bite me

obtuse gale
#

bUt EfE yOu ShOuLd UsE kOtLiN lOoK hOw EaSy It Is

prisma wave
#

๐ŸŽฃ

jovial warren
#

stop with the negativity

#

low self-esteem isn't a nice thing to have to live with

#

take that one from experience

obtuse gale
#

then turn off your phone and sleep

jovial warren
#

^

obtuse gale
#

it's unbelievably healthy

jovial warren
#

imagine wanting to sleep

#

imagine getting more than 6 hours of sleep on non-school days

static zealot
jovial warren
#

ikr

#

today's the second day in a row I've got out of bed at 08:45 (woke up about an hour earlier)

#

went to bed around 2 last night

#

now that's what you call a sleeping pattern

#

I find that spending too much time asleep is just wasting time you could spend doing other things

obtuse gale
jovial warren
distant sun
#

wish I could just sleep in these moments lol

jovial warren
#

show me the class you're trying to serialise efe and I'll show you what it looks like in kotlinx.serialization

distant sun
#

he wants to deserialize

jovial warren
#

from what?

distant sun
#

wynncraft api

obtuse gale
distant sun
#

teach me how to use kotlin sql thing bbg

#

expose

prisma wave
#

wtf

#

did someone delete my message

distant sun
#

Barry

prisma wave
#

or did i forget to send it

#

?

#

i dont think it was barry

#

๐Ÿ‘€

distant sun
#

idk then

prisma wave
#

are u sure

distant sun
#

more than ever

jovial warren
#
object PlayersTable : IntIdTable("players") {

    val uuid = uuid("uuid")
    val name = varchar(16)
}

class PlayerEntity(id: EntityID<Int>) : IntEntity(id) {

    var uuid by PlayersTable.uuid
    var name by PlayersTable.name

    companion object : IntEntityClass<PlayerEntity>(PlayersTable)
}
```ez player
prisma wave
#

data Person = Person {
      name :: Text
    , age  :: Int
    } deriving (Generic, Show)```
#
instance FromJSON Person where
    parseJSON = withObject "Person" $ \v -> Person
        <$> v .: "name"
        <*> v .: "age"```
#

๐Ÿ™‚

remote goblet
#

How do you get a really long name for an armor stand in spigot Sadge

jovial warren
#

database structure: ```
players(
id INTEGER NOT NULL AUTO_INCREMENT,
uuid UUID NOT NULL,
name VARCHAR(16) NOT NULL
)

distant sun
#

interesting bbg

jovial warren
#

it's very Kotlinised

jovial warren
distant sun
#

^

jovial warren
#

wtf is <$> v .:

prisma wave
jovial warren
#

$ \v ->

distant sun
#

what's up with the companion bbg?

jovial warren
#

all these strange characters

prisma wave
jovial warren
prisma wave
#

$ is a function for avoiding parentheses

#

(<$>) :: Functor f => (a->b) -> f a -> f b

distant sun
#

eq?

prisma wave
#

<$> = fmap but infix

jovial warren
#

in that find, you're executing SELECT * FROM players WHERE uuid = some_uuid

prisma wave
#

apart from johnny yugi lemmo and somewhat me

jovial warren
prisma wave
#

and a few others

jovial warren
#

where do you come up with this crap

prisma wave
jovial warren
#

honestly BM

prisma wave
#

i dont come up with it

jovial warren
#

well then who tf decided that <$> was good?

#

and .:

prisma wave
#

<$> takes a function taking an a and returning a b, and a functor that contains an a, and it returns a functor that contains a b. So <$> is the same as fmap :: (a -> b) -> f a -> f b

jovial warren
#

welcome to dev general

prisma wave
#

D:

jovial warren
#

oof BM

prisma wave
jovial warren
#

efe you just said that one of the greatest senpais to ever enter dev general can be "replaced"

distant sun
#

this might become my fav kotlin lib bbg

jovial warren
#

good

#

BM you're proper whack sometimes

prisma wave
#

how

#

i do nothing wrong

jovial warren
#

Exposed is like the best Kotlin ORM library there is

#

I swear if you say JPA better I'm taking back what I said

prisma wave
#

as far as ive seen exposed isn't an ORM in the same way as Hibernate is

#

it's just a DSL for SQL queries

distant sun
#

what is hibernate?

prisma wave
#

a java ORM

#

if you've ever used spring you've probably used it

jovial warren
#

I got so fed up with JPA when I was trying to use it in BardyBot that I just scrapped JPA and used Exposed's Spring module

#

Exposed is more Kotlinised

distant sun
#

I didnot touch spring

jovial warren
#

first Komponent commit coming up pog

#

you know what that means

#

it's time for

#

rate my code

lunar cypress
distant sun
#

pimp my code

prisma wave
#

at least

distant sun
#

what are these annotations bbg @ComponentDSL

jovial warren
#

look at what it's annotated with

#

@DslMarker marks it as a DSL

#

makes it turn that nice green colour

lunar cypress
#

Still you shouldn't put me next to yugi or even you when it comes to haskell

#

You already know more than I do

distant sun
#

ok then, what's a dsl lol

jovial warren
#

domain-specific language

prisma wave
jovial warren
#

it's a language used for specific things

prisma wave
#

i wouldve said the opposite lol

lunar cypress
#

Can't write a line of haskell without looking up the syntax

prisma wave
#

lol

#

fair enough ig

#

this is the lisp joke again

#

())()()()()()()(((((((((()

jovial warren
#

the DSL for Komponent looks like this: ```kotlin
component {
text("Hello! I am text!") {
colour = NamedColour.BLACK
formatting {
bold = true
italic = true
}
clickEvent = ClickEvent.openURL("https://example.com")
hoverEvent = HoverEvent.showText("Hello! I am hover text!")

    children {
        text("I am a child!")
    }
}

}

onyx loom
#

๐Ÿ™‚

stuck harbor
#

Syntax in regex be like:
//^/!;'usyj{jdjd}jshs/-!/

#

mmmmmhm

lunar cypress
#

Sorry but who still uses regex

stuck harbor
#

mans gotta play some video games

lunar cypress
#

Drawing state machines manually is vastly superior

distant sun
#

that doesnt answer my question bbg

jovial warren
stuck harbor
#

jeux vidรฉo in french I believe

jovial warren
steel heart
#

regex sounds cool that's why I use it

jovial warren
#

a domain-specific language

stuck harbor
#

imagine needing to match text to a specific criteria

jovial warren
#

a language used for specific things

prisma wave
steel heart
#

oui

stuck harbor
#

...oui?

prisma wave
#

ouaip

steel heart
#

baguette

stuck harbor
#

croissant

onyx loom
#

what is ouaip

stuck harbor
#

making bots say @everyone mmmm

prisma wave
#

afaik

jovial warren
#

also, can everyone rate the Komponent DSL out of 10 please

onyx loom
#

o

prisma wave
#

and "ouais" is "yeah"

#

lol

jovial warren
#

example: ```kotlin
component {
text("Hello! I am text!") {
colour = NamedColour.BLACK
formatting {
bold = true
italic = true
}
clickEvent = ClickEvent.openURL("https://example.com")
hoverEvent = HoverEvent.showText("Hello! I am hover text!")

    children {
        text("I am a child!")
    }
}

}

onyx loom
#

yeah ive saw ouais before was just confused

steel heart
#

pls give me

jovial warren
#

it's mine lol

#

it will be when it works

stuck harbor
#

I just know 'oui', 'non', 'merci', and 'je voudrais voir la tour eiffel'

steel heart
#

OO

stuck harbor
#

yeet

prisma wave
jovial warren
stuck harbor
#

French bad

jovial warren
prisma wave
#

would be nicer in scala

stuck harbor
#

Switzerland-lang good

onyx loom
#

ScalaKraft

prisma wave
stuck harbor
#

not german I refuse

distant sun
#

so it allows you do use that format or?

#

@jovial warren

jovial warren
#

yes gaby

obtuse gale
#

HELLO Gaby

prisma wave
#

it's kotlin's equivalent of the builder pattern @distant sun

jovial warren
#

you can write that exact code I sent and it'll return a Component

#

^

obtuse gale
#

Gaby I have a proposal

jovial warren
#

that's literally impossible

prisma wave
#

clickEvent = openURL("url")

jovial warren
#

unless I'm misunderstanding you

prisma wave
#

no?

lunar cypress
#

@jovial warren use AE spelling pls

jovial warren
#

ah that's what you mean

jovial warren
#

and also because British English is the one true English and American English is for dummies fingerguns

lunar cypress
#

that's what... packages are for

distant sun
#

nice

jovial warren
#

fair

distant sun
#

sup fefo

jovial warren
#

changed

stuck harbor
#

man uses american English

jovial warren
#

also, is Color.fromRGB allowed @prisma wave (for example)

stuck harbor
#

man dies of smol brain

stuck harbor
#

kiwi english is the clear victor

jovial warren
#

that should be a static method right? (a.k.a a companion object function)

lunar cypress
#

I mean personally I prefer BE too but in code consistency is more important than the feelings of the weird island people

stuck harbor
#

Americans are the weird island people

onyx loom
#

weird island people ๐Ÿ˜ญ

#

they just got a bigger island ๐Ÿฅฒ

jovial warren
onyx loom
#

absolutely not

stuck harbor
#

did america invade a quarter of the world?

onyx loom
#

never joke about me being american

prisma wave
stuck harbor
#

I thonkn't

jovial warren
#

also, if you want to keep your eyes in their sockets, don't open me.bardy.komponent.serialisers.ComponentSerialisers.kt

lunar cypress
jovial warren
#

everyone proceeds to open that file

stuck harbor
jovial warren
stuck harbor
#

altho they ain't called ciggys

jovial warren
#

depends where you're from matey

stuck harbor
#

we legitimately call cigarettes 'fags'

onyx loom
#

๐Ÿ™‚

stuck harbor
#

which is offensive apparently

#

๐Ÿคท news to me

lunar cypress
#

offensive if used in a different context

stuck harbor
#

mmmhm

distant sun
#

@obtuse gale

obtuse gale
#

@distant sun

jovial warren
#

fag could be interpreted as short for faggot

obtuse gale
#

Gaby I have a proposal

onyx loom
#

thanks for clarifying

obtuse gale
#

Would you marry me?

jovial warren
#

which is generally what the rest of the world call them lol

jovial warren
#

like Gaby's gonna get married to your ugly ass

#

xD

stuck harbor
obtuse gale
#

๐Ÿ˜ญ

stuck harbor
#

wow sadge

jovial warren
stuck harbor
obtuse gale
jovial warren
obtuse gale
jovial warren
#

I get that enough times

#

if you help out in support, people start treating you as staff and add you as a friend to DM you

#

and then they start asking if they can VC and I'm like

obtuse gale
#

nah, that's the dude that DMed you about the steam crap lol

prisma wave
#

i need help @here

obtuse gale
jovial warren
#

not true

obtuse gale
#

"I can't really explain it please join vc"

heady birch
#

Actually yeah, probably the opposite

jovial warren
#

I prefer VC over text any day, but not with some rando when I'm busy programming

obtuse gale
#

I'm like "if you can explain it in vc you can type it out"

prisma wave
#

no bro I can't explain it

jovial warren
obtuse gale
#

"nah but I'll screenshare"

prisma wave
#

Pls just join call

obtuse gale
#

Oh also Luck removed the non-patreons voice channels xD

#

because of exactly this

#

screensharing wasn't enabled anyway

prisma wave
#

lmao

jovial warren
#

lol

static zealot
#

oh damn you can host maven repositories on github

jovial warren
#

oh damn you didn't know that?

static zealot
#

oh damn no

#

xD

#

well because I never needed it

jovial warren
#

also, kotlinx.serialization gods, I call upon thee

jovial warren
#

so tempted to just serialise and deserialise by reading and writing the contents to and from raw JSON strings rn I swear

jovial warren
#

why is this such a pain ffs

#
  1. polymorphism with kotlinx.serialization adds a "type" key that you cannot remove
  2. idfk how to do this
obtuse gale
#

oOoOOh bUt EfE kOtLiNX.sEriALiZatiOn iS SooOOoOoO GOooooOoOooD

jovial warren
onyx loom
#

๐Ÿ˜‚

jovial warren
#

it is for 99% of use cases

#

just apparently not here

lunar cypress
#

what's the issue exactly

jovial warren
#

I need to turn that list of components into ```json
{
"text": "I am text",
"bold": true,
"clickEvent": {
"open_url": "https://example.com"
},
"hoverEvent": {
"show_text": "Click me! I am hover text!"
}
}

#

for example

#

a list of JSON objects, in that format

#

I just can't seem to figure out exactly how to do it

#

maybe my setup is just flawed, idk

#

wait a minute

#

omfg okay I'm stupid

#

just realised clickEvent and hoverEvent take an action and value, so I don't even need whack custom serialisers for them

obtuse gale
#

content, value is deprecated

prisma wave
#

consider using a more dynamic language like clojure

jovial warren
jovial warren
obtuse gale
jovial warren
#

maybe the wiki is just outdated

obtuse gale
#

huh, clickEvent takes value and hoverEvent contents

jovial warren
#

ah yes, it is contents, you're right

obtuse gale
#

thought it was contents for both lol

prisma wave
#

being not helpful is an addiction of mine

#

๐Ÿ™‚

#

but so is being helpful

#

sometimes

jovial warren
#

well it's for your project, so I'd be helpful if I were you

lunar cypress
#

"Helpful" role KEKW

jovial warren
#

helpful my ass

ocean quartz
#

@jovial warren You're implementing the entire thing instead of making a platform for adventure?

prisma wave
#

lol

#

lol

jovial warren
#

tbh, still don't understand why MineKraft couldn't have just used adventure and be done with it, but ya know

#

thanks a lot BM

prisma wave
#

why use entire framework when the only chat component stuff could literally be hardcoded

onyx loom
#

whats the issue?

jovial warren
#

we are not hard coding thingys

#

final

prisma wave
#

speak for yourself

ocean quartz
#

Because it would make your life easier, i mean that's similar to what velocity has

jovial warren
#

yeah we should've just made a platform impl in hind sight, but I've made this now and it's going to work

prisma wave
#
sendChatPacket("""{"text": "$message"}""")
``` problem solved ๐Ÿ™‚
jovial warren
#

until we get a bit more complex

prisma wave
#

that won't happen on the implementation layer

#

afaik the only other time components are even used is in the MOTD

#

which again, would be handled by a plugin

lunar cypress
#

True 10xers can handle complex

prisma wave
#

true 10xers would be using rust or go or haskell

jovial warren
#
session.sendPacket(PacketOutChat("""
    {"text": "$message", "bold": true, "italic": true, "clickEvent": {"action": "open_url", "https://example.com"}}
"""))
prisma wave
#

but sadly those languages are "too confusing" for the "average" developer

jovial warren
#

and then it just becomes a mess

lunar cypress
#

have you considered rewriting MineKraft in rust?

prisma wave
jovial warren
onyx loom
jovial warren
#

not on my watch

prisma wave
#

im only half joking here

#

there's not really any reason to make a full framework

#

or even a library

jovial warren
#

well I've started now and I ain't just gonna leave it half finished

ocean quartz
prisma wave
#

noo

onyx loom
#

half finished projects are the best projects ๐Ÿ™‚

prisma wave
#

finally

jovial warren
#

we

#

are

#

not

#

rewriting

#

MineKraft

#

simples

prisma wave
#

i think it would be better in rust

jovial warren
#

no

prisma wave
#

did you know rust is up to 30x faster than kotlin?

lunar cypress
#

PepeLaugh TeaTime

jovial warren
prisma wave
#
let server = &mut Server {
  players: []
};

server.handlePackets();
#

this would be much better than the current design

jovial warren
prisma wave
#

actually i unironically want to do that now

#

or haskell

#

kotlin boring

jovial warren
#

no

onyx loom
#

rust ๐Ÿ™‚

lunar cypress
#

you're gonna die

jovial warren
#

how many times

prisma wave
#

it seems like a good opportunity to actually learn rust

jovial warren
#

if you wanna rewrite MineKraft, I'm transferring it over to me

prisma wave
#

cant circlejerk over a language you've barely used

ocean quartz
#

Bardy, take a joke lol

prisma wave
#

half-joke*

jovial warren
#

lol

lunar cypress
#

honestly though if you want to learn pick something simpler

jovial warren
#

it's hard to not believe this mother fucker sometimes Matt

lunar cypress
#

you're really gonna hate rust if you dive straight in the complicated stuff

prisma wave
#

i mean i know the basics

#

I used it for an advent of code problem and a few other things

ocean quartz
#

Rewrite it in Gojure

prisma wave
#

๐Ÿ‘

lunar cypress
#

yeah well, depends on the other things but what we take as basics is probably not enough

jovial warren
#

Minelara will be a thing soon

prisma wave
#

didnt you know using complex frameworks with little-to-no knowledge of the language is actually the best way to learn?

onyx loom
#

this is true

jovial warren
#

when BM pulls the finger out that is

prisma wave
#

๐Ÿค”

onyx loom
#

experts say ^

prisma wave
#

many experts

onyx loom
#

sources: trust me bro

jovial warren
prisma wave
#

now

#

let me just say

#

rust's module system is possibly the most painful thing ive ever used

#

it took me a solid 3 hours trying to figure out how to import a single file in the same directory

lunar cypress
#

huh?

prisma wave
#

possibly slight hyperbole

#

maybe in another directory

#

but still

jovial warren
#

also, three reasons why MineKraft isn't getting rewritten:

  1. I primarily use and know Kotlin
  2. Kotlin is a great language, and not a lot of other server implementations seem to use it
  3. The conversion would take too much work and not really be worth all that much
prisma wave
#

im guessing i did something very wrong here

jovial warren
lunar cypress
prisma wave
lunar cypress
#

"rewrite it in rust" is a meme

jovial warren
#

yeah idk why I'm taking BM seriously lol

prisma wave
#

minerust

#

rustcraft

jovial warren
#

just defending Kotlin

prisma wave
#

im sure there is a pun

lunar cypress
#

minecrust

jovial warren
prisma wave
#

iron oxide

#

rust

#

lol

#

iron ore

#

haha

#

oxide would be a cool name

jovial warren
#

it would indeed

onyx loom
prisma wave
#

most pragmatic and modern server implementation ever made

lunar cypress
#

definitely already 3 hipster libraries out there named that

prisma wave
#

my bad ๐Ÿ˜…

onyx loom
#

๐Ÿ˜ 

prisma wave
jovial warren
#

right, enough circlejerking about rewriting MineKraft in Rust, thinking about naming, we need to settle on a name

prisma wave
#

oxideKotlin

#

oxideRust

#

oxideGo

#

oxideHaskell

#

oxideLisp

#

oxideElara

#

etc

jovial warren
#

I think MineKraft is a good name, but I am pretty much the only person who has that opinion

lunar cypress
onyx loom
#

i like oxide ๐Ÿ‘

prisma wave
#

and a certain intellectual property

jovial warren
#

ah yeah, those are the points kashike brought up the other day when I mentioned it in the Kyori Discord

#

Mein Kampf and Kraft lol

prisma wave
#

And just... Minecraft

lunar cypress
#

on a somewhat related note here's an article I read today explaining something that has confused me for a while now in Rust
https://www.ncameron.org/blog/dyn-trait-and-impl-trait-in-rust/

prisma wave
#

It's literally pronounced exactly the same

jovial warren
#

also, if we're going with the oxide theme, I'm naming the auth library oxygen

prisma wave
#

I mean the oxide pun only works for rust ๐Ÿ™ƒ

jovial warren
#

it's actually not a bad name though

#

forget the pun

onyx loom
#

rust or no oxide

jovial warren
onyx loom
#

no ๐Ÿ™‚

jovial warren
#

all in favour of the name oxide

#

everyone downvotes

#

or maybe no one votes at all

#

even better

#

maybe we should come up with more names

#

we need more people good at names in here

lunar cypress
prisma wave
#

All in favour of rust

prisma wave
lunar cypress
#

I mean what's described in the article

prisma wave
#

Yeah I didn't read the whole thing lol

lunar cypress
#

how traits can be used as types

prisma wave
#

A separate thread for each 256x256 blocks seems pretty extreme

jovial warren
#

we're getting distracted

prisma wave
#

every "modern" language got the scary type system

jovial warren
#

wdym? how is this confusing?

#

I've never wrote in the language and this looks ez

lunar cypress
#

It's just something weird that traits aren't types themselves, at least when you're coming from the jvm

prisma wave
#

Lmao

#

Scroll down

lunar cypress
#

and polymorphism is pretty different in rust

prisma wave
#

What paradigm is rust?

#

From the code I've seen it seems to be pretty unique

lunar cypress
#

multi paradigm like every hip language nowadays

prisma wave
#

Ah ofc

#

Oh yeah I forgot classes exist

lunar cypress
#

they don't if I'm not mistaken?

jovial warren
#

right, so you got the good language paradigims and the bad ones

#

imperative good declarative bad

#

never actually knew what a paradigim was until I just looked it up on Wikipedia

lunar cypress
#

rust is definitely not object oriented

prisma wave
#

But arent structs + methods pretty much the same thing?

jovial warren
#

imperative good declarative bad

#

change my mind

prisma wave
#

factually untrue

jovial warren
#

Elara superior incoming

prisma wave
#

Average imperative fan has 300 for loops just to print 1 to 10

#

Average declarative fan has a clean 1 liner

jovial warren
#

lol

prisma wave
#

If you've ever used List.filter that's declarative

jovial warren
#
for (i in 1..10) println(i)
prisma wave
#

that's imperative

jovial warren
#

that's imperative

#

not having that is bad

prisma wave
#

how

jovial warren
#

maybe declarative not so bad, but you need both

prisma wave
#

Declarative languages have ways of doing the exact same thing

jovial warren
#

I like Kotlin because it's a good mix of multiple paradigims

#

namely OOP and functional

prisma wave
#

"functional" yeah

lunar cypress
prisma wave
#

Yeah

jovial warren
#

Kotlin is functional

prisma wave
#

barely

onyx loom
#

1..10.forEach { println(it) } kek

jovial warren
#

also, not really a paradigim, but reactive programming is really nice

obtuse gale
#

with vb are you meant to prefix each variable with the type?

prisma wave
onyx loom
#

yea but barely in this case i guess

#

using an actual for loop would be more suited

obtuse gale
#

ie:
StrName
IntAge
etc

prisma wave
jovial warren
#

his name's Google

obtuse gale
#

bruh

onyx loom
obtuse gale
#

yes

onyx loom
#

oh god

#

๐Ÿ˜…

obtuse gale
#

i didnt pick it ยฏ_(ใƒ„)_/ยฏ

lunar cypress
onyx loom
#

bless ur poor soul

prisma wave
#

yeah you're right

onyx loom
#

wdym anyway aj?

lunar cypress
#

although there is of course some influence, arguably the fact that the first parameter can be treated specially at all etc

prisma wave
#

so I suppose rust is imperative + functional (?) + A few other more specific paradigms

#

Yeah but having "methods" doesn't mean it's OOP as you said

lunar cypress
#

yeah, I wouldn't say you can really do OOP in Rust

#

you can try of course, you'll get it to work in some form or another

#

the same way you can try to do OOP in C

#

although Rust limits you a lot more of course

#

mfw no vtable pointer

onyx loom
obtuse gale
#

nah ik how to do that, its just naming the variable, cos sometimes my teacher names it
like
StrName or IntAge where he prefixes it with an abbreviation of the type

#

Dim StrName As String

onyx loom
#

uh i dont think so

obtuse gale
#

Ill ask him ig

jovial warren
lunar cypress
jovial warren
onyx loom
#

bardys just built different

jovial warren
#

lol

#

I'm reworking Komponent from scratch to make serialisation work lol

#

or at least, the way components work has been rewritten

#

Component is now an abstract class and the components are data classes

lunar cypress
#

why do you want kotlinx.serialization

unreal vigil
#

Im tring to make a server off of a folder how do I get an IP for it?

surreal quarry
#

jk lmao, just start a server, the IP is the public IP address of the computer its running on

unreal vigil
#

yeah because it defaults to localhost or 0.0.0.0 but if I want to connect to bungee, I need an actual IP

surreal quarry
distant sun
#

is there any way I can host a mysql database on iij or something like that?

unreal vigil
#

I use this

surreal quarry
#

at least in mine your lobby would be set to localhost:25566

compact perchBOT
#
๐Ÿ“‹ Your paste, Colsy98
https://paste.helpch.at/egikumeweb

A member of staff has requested I move your message to a paste,
Most likely beacause it contains a config/error/code snippet.

surreal quarry
distant sun
#

so that's a no, welp

unreal vigil
#

But will others be able to connect to it?

#

because this is gonna be a public server

surreal quarry
#

yes

distant sun
#

nvm I forgot I got xampp server installed

unreal vigil
#

How do I send imgs

compact perchBOT
#
FAQ Answer:

You won't be able to upload images here directly to avoid spam, so please use https://imgur.com/ to upload images/screenshots.
You can also use a screenshot service like gyazo or jinx and post those links here.

unreal vigil
surreal quarry
#

port probably isn't open

ocean quartz
unreal vigil
half harness
#

port forward

ocean quartz
#

Wrong channel for that, also you'll likely need to port forward

surreal quarry
#

you just need to portforward or fix your firewall

unreal vigil
#

Don't I need a router for that?

half harness
#

._.

#

no

#

you don't need to port forward if you don't have a router thonking

surreal quarry
#

are you hosting yourself or on a dedi

#

/vps

unreal vigil
#

Myself because once I have everything ready I will move to vps

half harness
#

im assuming themself bc they said that 0.0.0.0 worked

#

ye

#

so

#

how do you get internet

#

without the router

distant sun
#

like, it works but eh

half harness
#

or are you using a cord from your modem ๐Ÿ‘€

ocean quartz
#

It's just opening and it works xD

unreal vigil
#

Ok if I do have a vps what do I do

unreal vigil
half harness
#

Any words list from with around like 50k lines?

#

the lowest I could find (that isn't like 1k) is about 70k lines

#

but it has words like aa

obtuse gale
#

for what thonking

half harness
#

don't ask

obtuse gale
#

too late, I already did

half harness
#

:c

#

jeez

obtuse gale
#

lol

half harness
#

chill with the caps xD

unreal vigil
#

How do I port foward with VPS????

half harness
#

i just copied and pasted into intellij and its lagging

obtuse gale
#

lmao

ocean quartz
unreal vigil
#

I mean if you have a server from a jar file it will be like 0.0.0.0 what if instead of the 0s I want actual number

#

s

half harness
#

get the IP of the VPS...

half harness
ocean quartz
half harness
#

ok

obtuse gale
#

Can I make it so that VS generates some comments at the top of the file when it generates a .vb file?

obtuse gale
#

how come i have the import for
com.intellij.ide.util.projectWizard.ModuleBuilder
and many other com.intellij.ide.util.projectWizard imports, but nto
com.intellij.ide.util.projectWizard.JavaModuleBuilder

#
plugins {
    id 'java'
    id 'org.jetbrains.intellij' version '0.6.5'
    id 'org.jetbrains.kotlin.jvm' version '1.4.30'
}

group 'org.aj3douglas'
version '1.0-SNAPSHOT'

repositories {
    mavenCentral()
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib"
    testCompile group: 'junit', name: 'junit', version: '4.12'
}
hot hull
#

huh

ripe sandal
#

hello there.. ^^
can any1 help me wt something?

  • i'm having problems installing the maven.. '-
hot hull
#

Elaborate

ripe sandal
#

well.. i did all was needed.. setup the enveriomental variables.. all worksets..
but my prompt still don't recognize the "mvn" commands as internal cmd

#
  • and already restarted my pc kinda of 4 times and nothing.. '-
hot hull
#

Have you tried googling and seeing what other peoples solution was?

ripe sandal
#

yes.. but all the results was the same thing i did.. and nothing..

#

already tried setup as %M2_HOME%.. %MAVEN_HOME%.. %M2_MAVEN%...
all possibilities based in the updates, and the other devs solutions.

hot hull
#

?

#
obtuse gale
#

how can I like

#

make gradle kill itself for the project and then bring itself back

#

Like the gradle alternative of invalidate caches/restart

ripe sandal
#

already tried to test if was the type of slashes.. \ and /..

jovial warren
#

Just install MariaDB

#

ez

jovial warren
jovial warren
#

Also, Gradle good Maven bad

#

You need to install Maven to use it

#

Then add mvn.exe to PATH to have it resolve on the command line

trim niche
#

Does anyone have any recommendations for a color scheme plugin for Intellij?

obtuse gale
#

I need to change my theme as well, its too dark and its making me tired lol

hot hull
obtuse gale
hot hull
#

ew

obtuse gale
#

not ew

quiet depot
#

@distant sun wamp/xampp r bad

#

apache, php, and mysql/mariadb all work fine on windows

#

no need for fancy wrappers

distant sun
#

Probably, I got it for an uni class

#

What do I install for mysql?

quiet depot
#

mysql lol

#

both mysql and mariadb have official windows installers

#

make sure you also have a desktop client, I recommend heidisql

old wyvern
#

Does the command line tool not come with them?

quiet depot
#

mysql ships a client called mysql workbench but it's trash

old wyvern
#

I meant the cmd line

quiet depot
#

i mean yeah but most people prefer a graphical client

old wyvern
#

๐Ÿคท

frigid badge
#

use docker

#

smh

old wyvern
#

xD

#

Hotel? Docker

frigid badge
#

exactly

#

lmao

distant sun
#

Nice ty p1g

trim niche
#

Thanks

winter iron
#

Bukkit().getPlayer or just use DI to pass plugin through and just plugin.server.getPlayer

prisma wave
#

You might as well use Bukkit

#

Since it's available

#

Technically injecting the Server would be better

#

But nobody does that

winter iron
#

thats what i was thinking

#

ok Bukkit

#

you get used

quiet depot
# prisma wave Technically injecting the Server would be *better*

a key distinction, using it won't affect the quality of your code, in fact preferring dependency injection over a singleton when a singleton is available, can decrease readability. This also applies to JavaPlugin#getProvidingPlugin. The point is you just shouldn't be implementing singletons in your own code, if there's singletons in the apis you use, consider using a different api or just embrace it.

winter iron
#

my goodness

quiet depot
#

is the my goodness for how many edits I had to make for that to be correct

#

lol

prisma wave
#

Yeah I guess if something is badly designed then you should at least use that bad design

quiet depot
#

I mean when I'm looking for third party apis, if something is badly designed, I'll just find another api or make my own

#

but we don't really have that luxury with spigot

hot hull
#

Is the a, are you even allowed to be using that Sensei

prisma wave
#

The only problem with bukkit.get is the implicit tight coupling it creates, but I doubt that's a real issue

winter iron
#

dont think so frosty

obtuse gale
winter iron
#

but thats just the way it goes

#

im gonna have Discord mods at my door

hot hull
#

Reporting you cause I got too much time

quiet depot
#

lol bm you should see the way the spigot team get around that problem for unit testing

winter iron
#

๐Ÿ˜ฆ

quiet depot
#

it's questionable to say the least

hot hull
#

Dw it's effort, cba

winter iron
#

Please dont, i have 69 in my discord tag

#

i dont wanna lose it

quiet depot
#

some mad reflection stuff

#

2 secs

prisma wave
#

I'm guessing mock the server and use reflection to set Bukkit.getServer

quiet depot
#

nope

#

well

#

yeah sorta

#

it's ugly

#

this is why you don't implement singletons yourself btw

#

because otherwise you have to do shit like that

regal gale
#

Oh jesus ๐Ÿ‘€

prisma wave
#

Oh jesus

#

Why are they even using a dynamic proxy?

#

Can't they just implement Server?

quiet depot
#

no clue

#

idk what half of this shit does

#

it's probably because bukkit forces some constraints on a few apis

#

e.g. javaplugin has to be loaded by a javaplugin class loader

#

ig it's the same sorta thing for server

prisma wave
#

Makes sense

#

That's dumb