#dev-general
1 messages ยท Page 307 of 1
i assume its in either mavenCentral or jcenter?

it doesn't error?
gradle?
what url?
lol
bAnNeD fOr aDvErtiSiNg

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
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"

eh, it's a good provider, but I personally hate them
I can't stand NordVPN because of the way they advertise the VPN
lol
"insecure public WiFi"
theyre all over yt now
I personally use Windscribe
and Tor
if you truly want to stay anonymous online, I highly highly recommend Tor
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 
hmm proton
Tor bounces your connection through 3 hops and uses multiple layers of encryption to make you very, very hard to track online
ima try proton as well
and if you're connecting to a hidden service, you are literally untrackable
u going on the dark web bardy? ๐คจ
I mean, it's a hell of a lot slower, but it's god damn worth it
mad sus
that's not what Tor is for Kaliber
Tor hidden services = mostly dark web
Tor = anonymity
cool dep
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")
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
๐
I actually personally run and maintain 4 separate Tor exit nodes
(exit node = the one that talks to the server)
huh?
I'm in Germany and it works for me
u got yt premium?
no
uh
i googled it yesterday and thats it said
Picture-in-picture (PiP) allows you to watch YouTube videos while using other apps on your mobile device.
Watch YouTube while using other apps
weird lol
oh u got iphone?
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
do not get youtube vanced, purchase youtube premium ๐
actually i might not be allowed to say that
yup
oo
yea i know some of my friends have it now that u mention it
very handy 
do not download content from youtube tho, that will be a violation of the copyright act (1733)!
i will not be getting youtube vanced!
of course!! i would not do that!
vanced?
as a law abiding citizen i must say that breaking copyright laws is VERY BAD
didnt even know that was a thing
yup
but I shall forget it
lmaoo
If that dude has the LP discord in common with you all I need is a screenshot (of the common servers) and he gets a nice message when trying to join the server ๐
Thx 4 ping amazing 10/10 +rep
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..
are u unable to check if that person was in the lp server?
The most beautiful and customizable JSON/JSONP highlighter that your eyes have ever seen. Open source at https://goo.gl/fmphc7
@obtuse gale
๐
depends on what you're using to read the json
gson to object, easy
besides the components crap? because that wasn't really reading/writing json lol
json is all over the web
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
gives you an object of a specified type from a json file // string
d;gson Gson#fromJson
public <T> T fromJson(java.lang.Stringย json, java.lang.Classย classOfT)
throws JsonSyntaxException```
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.
classOfT - the class of T
json - the string from which the object is to be deserialized
JsonSyntaxException - if json is not a valid representation for an object of type classOfT
an object of type T from the string. Returns null if json is null or if json is empty.
you want to get all the player classes' names, right?
could create a data object called Class(name, level) and get classes as array of Class
aah yes, hormones development
puberty ๐
about to push Komponent 1.0-SNAPSHOT
Komponent lol
Is that your adventure-platform impl? lol
o
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
it... reads... URLs...?
smh
gson
why urlreader?
no questions asked
yeah no, that's not how that works
you need to make a request and receive a response
neither is jsonparser tbh
you have one of a few options:
- OkHttp
- OkHttp with Retrofit (my personal favourite)
HttpUrlConnection(๐คฎ)
- custom ๐
imagine using okhttp to get a simple json
and there's a few others, but OkHttp is definitely the best
well I use Retrofit with OkHttp to query Yggdrasil for MineKraft
and it's literally only used for one query
yeah no, that's not what it's called
๐ ๐
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
I might also make mojang-auth (me.bardy) whilst I'm at it
๐คก
anything I make is gonna be under my name and my domain lol
also, https://minekraft.org when
actually you probably wanna fully settle on a name first
JsonObject.class
come on peeps, start throwing out your ideas for a new name for MineKraft
?
a type is an interface, class or enum
new InputStreamReader(InputStream)
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
using javadoc syntax when referring to kotlin functions ๐ฅถ
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)

also, oh am I glad that the authentication mechanism for the server is only a single request
you know I would take this to DMs but yeah :kekw:
the client has to make a request to https://authserver.mojang.com/authenticate to receive their authentication details, then a request to https://authserver.mojang.com/validate to validate their access and client token, then one to https://sessionserver.mojang.com/session/minecraft/join
you misplaced some parentheses somewhere
tbh
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
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
https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonObject.html
https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonArray.html
https://www.javadoc.io/doc/com.google.code.gson/gson/latest/com.google.gson/com/google/gson/JsonElement.html
for reference
docdex also has gson uploaded so you can just quick search things in there
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
When you push your password to github kek
Smort
how u manage that ๐คจ
dont call getAsString on that efe
Had a test database settings with the password as string and forgot about it and pushed xD
"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
damn. I pushed like 3 webhooks for my discord servers and my bot's token xD fortunately discord warned me about the bot token and I remembered about the others as well
{ // <-- 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
Unfortunately no one will warn you if it's a password xD
Was there for over 10h
Hard reset now though
that's the same thing you had earlier xd
with get(0) you are getting the object
{
"name": "whatever",
"level": 146545465
}
That is a JsonObject, on that object you getAsString("name") and getAsInt("level")
or whatever the methods are called lol
get("name").getAsString() iirc

it wants an index if it's an array
classes is an array of objects
the object contains the name and level
d;methods gson jsonobject
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```
public JsonElement get(java.lang.Stringย memberName)```
Returns the member with the specified name.
memberName - name of the member that is being requested.
the member matching the name. Null if no such member exists.
o
d;gson JsonElement#getAsString
public java.lang.String getAsString()
throws IllegalStateException, ClassCastException```
convenience method to get this element as a string value.
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.
get this element as a string value.
no
add get(name) after what you had before
jsonObject.getAsJsonArray("classes").get(0).getAsJsonObject().get("name").getAsString();
// $.classes [0] .name
jsonObject.getAsJsonArray("classes").get(0).getAsJsonObject().get("name").getAsString();```
although it's not gonna be in the root response json either :kek:
this just reminds me of how vastly superior kotlinx.serialization is lol
and how much easier
it's gonna be under $.data[0].classes...
v w
not with that attitude you won't
imagine having a gf in the first place
pu$$y
fight like a man
bite me
bUt EfE yOu ShOuLd UsE kOtLiN lOoK hOw EaSy It Is
๐ฃ
stop with the negativity
low self-esteem isn't a nice thing to have to live with
take that one from experience
^
it's unbelievably healthy
imagine wanting to sleep
imagine getting more than 6 hours of sleep on non-school days
6 hours? damn that's a lot
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
^ but other than that yea

like doing nothing
wish I could just sleep in these moments lol
show me the class you're trying to serialise efe and I'll show you what it looks like in kotlinx.serialization
he wants to deserialize
from what?
wynncraft api
Barry
idk then
are u sure
more than ever
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
data Person = Person {
name :: Text
, age :: Int
} deriving (Generic, Show)```
instance FromJSON Person where
parseJSON = withObject "Person" $ \v -> Person
<$> v .: "name"
<*> v .: "age"```
๐
How do you get a really long name for an armor stand in spigot 
database structure: ```
players(
id INTEGER NOT NULL AUTO_INCREMENT,
uuid UUID NOT NULL,
name VARCHAR(16) NOT NULL
)
interesting bbg
it's very Kotlinised
okay that is actually disgusting
^
wtf is <$> v .:

$ \v ->
what's up with the companion bbg?
all these strange characters
\v -> is a lambda
allows you to call methods such as PlayerEntity.find { PlayersTable.uuid eq uuid }
eq?
<$> = fmap but infix
in that find, you're executing SELECT * FROM players WHERE uuid = some_uuid
apart from johnny yugi lemmo and somewhat me
that is proper whack
and a few others
where do you come up with this crap

honestly BM
i dont come up with it
<$> 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
welcome to dev general
D:
idk
oof BM
that seems to be a custom operator specific to that library
efe you just said that one of the greatest senpais to ever enter dev general can be "replaced"
this might become my fav kotlin lib bbg
Exposed is like the best Kotlin ORM library there is
I swear if you say JPA better I'm taking back what I said
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
what is hibernate?
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
I didnot touch spring
first Komponent commit coming up pog
you know what that means
it's time for
rate my code
Overstatement
pimp my code
what are these annotations bbg @ComponentDSL
look at what it's annotated with
@DslMarker marks it as a DSL
makes it turn that nice green colour
Still you shouldn't put me next to yugi or even you when it comes to haskell
You already know more than I do
ok then, what's a dsl lol
domain-specific language
are you sure?
it's a language used for specific things
i wouldve said the opposite lol
Can't write a line of haskell without looking up the syntax
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!")
}
}
}
๐
Sorry but who still uses regex
mans gotta play some video games
Drawing state machines manually is vastly superior
that doesnt answer my question bbg
sorry but who doesn't still use regex
jeux vidรฉo in french I believe
agreed
I answered your question
regex sounds cool that's why I use it
a domain-specific language
imagine needing to match text to a specific criteria
a language used for specific things
ouaip c'est correcte
oui
...oui?
ouaip
baguette
croissant
what is ouaip
making bots say @everyone mmmm
also, can everyone rate the Komponent DSL out of 10 please
o
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!")
}
}
}
yeah ive saw ouais before was just confused
thats a thing?
pls give me
I just know 'oui', 'non', 'merci', and 'je voudrais voir la tour eiffel'
OO
yeet
i have made my views clear
French bad
anything wrong with it?
would be nicer in scala
Switzerland-lang good
ScalaKraft
top level functions for the events pls
not german I refuse
yes gaby
HELLO Gaby
it's kotlin's equivalent of the builder pattern @distant sun
Gaby I have a proposal
wdym?
that's literally impossible
clickEvent = openURL("url")
unless I'm misunderstanding you
no?
@jovial warren use AE spelling pls
ah that's what you mean
I used BE spelling as to not conflict with existing Color classes
and also because British English is the one true English and American English is for dummies 
that's what... packages are for
nice
fair
sup fefo
changed
man uses american English
also, is Color.fromRGB allowed @prisma wave (for example)
man dies of smol brain
kiwi english is the clear victor
that should be a static method right? (a.k.a a companion object function)
I mean personally I prefer BE too but in code consistency is more important than the feelings of the weird island people
Americans are the weird island people
yeah because you're American aren't you lol
absolutely not
did america invade a quarter of the world?
never joke about me being american
haha yeah islands bad haha
I thonkn't
i guess
also, if you want to keep your eyes in their sockets, don't open me.bardy.komponent.serialisers.ComponentSerialisers.kt
my gh line count plugin is going wild for that repo
everyone proceeds to open that file
altho they ain't called ciggys
depends where you're from matey
we legitimately call cigarettes 'fags'
๐
offensive if used in a different context
mmmhm
@obtuse gale
@distant sun
fag could be interpreted as short for faggot
Gaby I have a proposal
thanks for clarifying
Would you marry me?
which is generally what the rest of the world call them lol

like Gaby's gonna get married to your ugly ass
xD
that is certainly a proposal
๐ญ
wow sadge



oh bom look at this :kek: #308232296753004556 message
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
nah, that's the dude that DMed you about the steam crap lol
i need help @here
I need help @there
not true
"I can't really explain it please join vc"
Actually yeah, probably the opposite
I prefer VC over text any day, but not with some rando when I'm busy programming
I'm like "if you can explain it in vc you can type it out"
no bro I can't explain it
fuckin' ban his ass
"nah but I'll screenshare"
Pls just join call
Oh also Luck removed the non-patreons voice channels xD
because of exactly this
screensharing wasn't enabled anyway
lmao
lol
oh damn you can host maven repositories on github
oh damn you didn't know that?
also, kotlinx.serialization gods, I call upon thee
so tempted to just serialise and deserialise by reading and writing the contents to and from raw JSON strings rn I swear
why is this such a pain ffs
- polymorphism with kotlinx.serialization adds a "type" key that you cannot remove
- idfk how to do this
oOoOOh bUt EfE kOtLiNX.sEriALiZatiOn iS SooOOoOoO GOooooOoOooD

๐
what's the issue exactly
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
content, value is deprecated
consider using a more dynamic language like clojure
you sure about that? https://wiki.vg/Chat#Schema
okay that is not helpful, please can you not ๐
pretty darn sure https://minecraft.gamepedia.com/Raw_JSON_text_format
maybe the wiki is just outdated
huh, clickEvent takes value and hoverEvent contents
ah yes, it is contents, you're right
thought it was contents for both lol
no can do
being not helpful is an addiction of mine
๐
but so is being helpful
sometimes
well it's for your project, so I'd be helpful if I were you
"Helpful" role KEKW
helpful my ass
@jovial warren You're implementing the entire thing instead of making a platform for adventure?
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
why use entire framework when the only chat component stuff could literally be hardcoded
whats the issue?
speak for yourself
Because it would make your life easier, i mean that's similar to what velocity has
yeah we should've just made a platform impl in hind sight, but I've made this now and it's going to work
sendChatPacket("""{"text": "$message"}""")
``` problem solved ๐
until we get a bit more complex
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
True 10xers can handle complex
true 10xers would be using rust or go or haskell
session.sendPacket(PacketOutChat("""
{"text": "$message", "bold": true, "italic": true, "clickEvent": {"action": "open_url", "https://example.com"}}
"""))
but sadly those languages are "too confusing" for the "average" developer
and then it just becomes a mess
have you considered rewriting MineKraft in rust?
the server won't be doing that
not happening
not on my watch
im only half joking here
there's not really any reason to make a full framework
or even a library
well I've started now and I ain't just gonna leave it half finished
noo
half finished projects are the best projects ๐
finally
i think it would be better in rust
no
did you know rust is up to 30x faster than kotlin?
PepeLaugh TeaTime
let server = &mut Server {
players: []
};
server.handlePackets();
this would be much better than the current design
no
rust ๐
you're gonna die
how many times
it seems like a good opportunity to actually learn rust
if you wanna rewrite MineKraft, I'm transferring it over to me
cant circlejerk over a language you've barely used
Bardy, take a joke lol
half-joke*
lol
honestly though if you want to learn pick something simpler
it's hard to not believe this mother fucker sometimes Matt
you're really gonna hate rust if you dive straight in the complicated stuff
i mean i know the basics
I used it for an advent of code problem and a few other things
Rewrite it in Gojure
๐
yeah well, depends on the other things but what we take as basics is probably not enough
Minelara will be a thing soon
didnt you know using complex frameworks with little-to-no knowledge of the language is actually the best way to learn?
this is true
when BM pulls the finger out that is
๐ค
experts say ^
many experts
sources: trust me bro
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
possibly slight hyperbole
maybe in another directory
but still
also, three reasons why MineKraft isn't getting rewritten:
- I primarily use and know Kotlin
- Kotlin is a great language, and not a lot of other server implementations seem to use it
- The conversion would take too much work and not really be worth all that much
im guessing i did something very wrong here
yeah, existed
please do not take this seriously
reasons why rust >
- it's more modern (i dont see mozilla supporting kotlin)
- it's faster
- memory safe and fast startup times (eww JIT)
- pragmatic
- it's more modern
"rewrite it in rust" is a meme
yeah idk why I'm taking BM seriously lol
just defending Kotlin
im sure there is a pun
minecrust
it would indeed
its more modern
its more modern
๐ฅฒ
most pragmatic and modern server implementation ever made
definitely already 3 hipster libraries out there named that
oops i forgot "it's more modern"
my bad ๐
๐
now it will be 4
right, enough circlejerking about rewriting MineKraft in Rust, thinking about naming, we need to settle on a name
I think MineKraft is a good name, but I am pretty much the only person who has that opinion
what is this nonsense
i like oxide ๐
it sounds way too similar to a certain book
and a certain intellectual property
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
And just... Minecraft
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/
One of the more subtle aspects of Rust is how traits can be used as types. In this blog post I will attempt a bit of a deep dive into how to use traits as types and how to choose between the different forms. Preliminary: traits are not typesA type
It's literally pronounced exactly the same
also, if we're going with the oxide theme, I'm naming the auth library oxygen
I mean the oxide pun only works for rust ๐
rust or no oxide

no ๐
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
just leaving this here @prisma wave https://github.com/MCHPR/MCHPRS
All in favour of rust
Traits don't seem that complicated, or do you mean something else?
O that looks cool
I mean what's described in the article
Yeah I didn't read the whole thing lol
how traits can be used as types
A separate thread for each 256x256 blocks seems pretty extreme
we're getting distracted
Yeah that does look confusing
every "modern" language got the scary type system
It's just something weird that traits aren't types themselves, at least when you're coming from the jvm
and polymorphism is pretty different in rust
multi paradigm like every hip language nowadays
they don't if I'm not mistaken?
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
rust is definitely not object oriented
I forgot classes don't exist* ๐
But arent structs + methods pretty much the same thing?
factually untrue
Elara superior incoming
Average imperative fan has 300 for loops just to print 1 to 10
Average declarative fan has a clean 1 liner
lol
If you've ever used List.filter that's declarative
for (i in 1..10) println(i)
that's imperative
how
maybe declarative not so bad, but you need both
Declarative languages have ways of doing the exact same thing
I like Kotlin because it's a good mix of multiple paradigims
namely OOP and functional
"functional" yeah
no, not really, unless you're suggesting that everything that has data and functions is object oriented if functions can take a "receiver" argument
Yeah
Kotlin is functional
barely
1..10.forEach { println(it) } 
that would be declarative
also, not really a paradigim, but reactive programming is really nice
with vb are you meant to prefix each variable with the type?
Yeah good point, I guess they lack encapsulation and inheritance and things, but I mean you can roughly replicate an object with that. Although I'm probably not qualified to really talk about this
ie:
StrName
IntAge
etc
replicateM 10 putStrLn ๐
I know someone who can answer that
his name's Google
bruh
did i hear... visual basic...? ๐ณ
yes
i didnt pick it ยฏ_(ใ)_/ยฏ
well again, you could say that about pretty much anything then, which I would reject. OOP is a lot more to me
bless ur poor soul
yeah you're right
wdym anyway aj?
although there is of course some influence, arguably the fact that the first parameter can be treated specially at all etc
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
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
like how to declare a variable?
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
uh i dont think so
Ill ask him ig
https://i.imgur.com/HfEJSwG.png so this is why no one uses arrays as properties of data classes eh?
just saw this now, but here's a direct quote from the article
Is that clear? Honestly it is not completely clear to me, so I may have made a mistake here.

bardys just built different
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
why do you want kotlinx.serialization
Im tring to make a server off of a folder how do I get an IP for it?
@prisma wave wrote a great guide about this
https://wiki.bristermitten.me/how-to-make-a-server-from-a-folder
jk lmao, just start a server, the IP is the public IP address of the computer its running on
yeah because it defaults to localhost or 0.0.0.0 but if I want to connect to bungee, I need an actual IP
That's an amazing guide!
the bungee host can be 0.0.0.0 iirc
is there any way I can host a mysql database on iij or something like that?
I use this
at least in mine your lobby would be set to localhost:25566
A member of staff has requested I move your message to a paste,
Most likely beacause it contains a config/error/code snippet.
IJ should have a way to connect to a DB that you are running locally
so that's a no, welp
yes
nvm I forgot I got xampp server installed
How do I send imgs
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.
port probably isn't open
wamp > xampp
So what do I change port to?
port forward
Wrong channel for that, also you'll likely need to port forward
you just need to portforward or fix your firewall
Don't I need a router for that?
Myself because once I have everything ready I will move to vps
im assuming themself bc they said that 0.0.0.0 worked
ye
so
how do you get internet
without the router
or are you using a cord from your modem ๐
It's just opening and it works xD
Ok if I do have a vps what do I do
Ok if I have vps what do I do
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
for what 
don't ask
too late, I already did
lol
chill with the caps xD
How do I port foward with VPS????
im trying to use my new javafx skills to make a word unscrambler ๐ค
i just copied and pasted into intellij and its lagging
lmao
Portforward with a VPS? Your VPS should have all ports open already if you got it from a decent host
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
get the IP of the VPS...
?
#minecraft btw
ok
Can I make it so that VS generates some comments at the top of the file when it generates a .vb file?
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'
}
huh
hello there.. ^^
can any1 help me wt something?
- i'm having problems installing the maven.. '-
Elaborate
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.. '-
Have you tried googling and seeing what other peoples solution was?
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.
?
Did you try that? https://stackoverflow.com/questions/19090928/mvn-command-is-not-recognized-as-an-internal-or-external-command#:~:text=Restart your machine%2C after setting,bin%3B%25PATH%25 ).&text=If%20there%20isn't%20one,the%20correct%20path%20to%20Maven.
how can I like
make gradle kill itself for the project and then bring itself back
Like the gradle alternative of invalidate caches/restart
yes.
i did all of this..
but nothing.. :\
already tried to test if was the type of slashes.. \ and /..
Depends on the OS. You can either use iptables (common amongst Linux distros), ufw (generally used on Ubuntu/Debian), or firewalld (common amongst RHEL/CentOS)
Do you have Maven installed?
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
Does anyone have any recommendations for a color scheme plugin for Intellij?
I need to change my theme as well, its too dark and its making me tired lol
Absolutely beautiful
nah
ew
not ew
@distant sun wamp/xampp r bad
apache, php, and mysql/mariadb all work fine on windows
no need for fancy wrappers
mysql lol
both mysql and mariadb have official windows installers
make sure you also have a desktop client, I recommend heidisql
Does the command line tool not come with them?
mysql ships a client called mysql workbench but it's trash
I meant the cmd line
i mean yeah but most people prefer a graphical client
๐คท
Nice ty p1g
Atom One Dark
Thanks
Bukkit().getPlayer or just use DI to pass plugin through and just plugin.server.getPlayer
You might as well use Bukkit
Since it's available
Technically injecting the Server would be better
But nobody does that
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.
Yeah I guess if something is badly designed then you should at least use that bad design
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
Is the a, are you even allowed to be using that Sensei
The only problem with bukkit.get is the implicit tight coupling it creates, but I doubt that's a real issue
dont think so frosty
How come I can import literally everything else from that same package except this
Reporting you cause I got too much time
lol bm you should see the way the spigot team get around that problem for unit testing
๐ฆ
it's questionable to say the least
Dw it's effort, cba
What do they do?
I'm guessing mock the server and use reflection to set Bukkit.getServer
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
Oh jesus ๐
Oh jesus
Why are they even using a dynamic proxy?
Can't they just implement Server?




