#dev-general
1 messages ยท Page 511 of 1
then you can only do C-style interpolation
did you know ffmpeg is written in C and assembly
yes
i dont get how
almost all linux utilities are
the devs
are like
the devs are probably like their eyes prolly falling out
lmao
yeah and they do it for free
mhm
they are truly the crutches holding up the internet
Yeah lol
them and like openssl
opencv ๐
what's opencv
๐
opencv has a lot of graphical ai stuff that are useful in general
XD
C++ i see now
but in short, it can do a lot of ai stuff in graphical shit like identifying faces in a picture
its pretty cool
Yeah maybe
okay opencv may be good
but what about openGL
that bad boy powers half the gaming industry
Holy shit opengl
XD
vulkan good
I like how you know the famous APIs are like a couple tens of thousands stars right
but then there is random ass chinese programming guide
that has like 120k stars
Lol
I forgot what it was called, but I remember seeing it on my recommended on my github app
"hey siri, chijong maieoi github"
Lmao
there's a github app?!?!
news to me
glad im not alone
Found it
xD
got it
I mean the examples in the code seem okay
but i cant read the actual fucking guide itself
lol
does vulkan use GLSL
I just applied for discord partership, lets goo
what does that mean
I get free nitro and discord.gg/fredthedoggy
you have a server?
And a badge
wait free nitro forever?
Y
how big tho
Yes, 1500 strong
Plugins
you have a competitor to helpchat??
yeah link me dog
They're mostly for youtubers, 1s
so you're saying im not good enough
1.47k, sorry
why did i not know Fred was this cool
i didn't even know you made plugins
now I see FredHunt?!?!
some of the code can be improved, but that community damn
:p
Yeah lol
increase fred's street cred
Lol
๐ getting better at javafx
._.
the first 10 seconds are frozen
and the rest are like 2 fps
great
Oh actually, I got a question:
Any clue why sometimes the death listener doesn't detect the item?
(Eg. It still drops, and they are not given a new one)
that's what you told me last time ๐ฅฒ
what version is java 60, 16?
Probably
ok update im now coding on a pencil
sounds great
is cj89898 on crack
most certainly
yh
cuz in his status there is weed and then "medicated"
yes
@quick flume can u confirm ur on crack
oh my god i thought that said "can you confirm you have a butt crack"
that is a possibility
๐คจ
ayo discord leaked your google search while u searched for best car plugin 1.16
and you were watching youtube
its in german, i tried it, thats my problem
i wanted airplanes mostly so yea
imma focus on planes
horny time?
lol
Tutorial time? ๐
man, maybe I should work on some tutorials at some point, might be good to do some teaching stuff in preparation for my career path lol
you wanna become a teacher?
Oh yes
just cleaning desk first
Very important part

thats tough man :/
looking at adding more bindings to Krypton for plugins, and just trying to decide if I should allow @Named("server") val address: InetSocketAddress or @Named("players") val players: Set<Player>
tutorial for what
I mean, not sure what the point of injecting the players list is actually tbh, since it's mutable and can be changed
salads aren't cooked
salads are made
damn he got you there
you can cook the chicken or the tuna or whatever people put on their salad
you're not cooking the salad
also seen people cook lettuce before 
you're cooking components of the salad
what kind of tutorial do you think BM would make lol
how to speak with an english accent
in all seriousness, disregard any of his circlejerking shit
200 reason to learn haskell
the tutorial
the tutorial for life, the universe, and everything?
Of course
42
Also known as java
It's been 84 years...
After 9 years in development, hopefully it was worth the wait
why would you do that to yourself
why not?
self abuse isnt ok my guy
it's not self abuse
the happiness and enjoyment you get out of teaching far outweighs that of what the annoying kids can try to do to you
ngl, kids are better and easier to deal with than adults half of the time lol
adults don't treat every second of their lives like it's playtime
neither do secondary students
y7s tho
they soon grow up
kids are obnoxious until at least year 11
year 9s and 10s are the most annoying people possible
@pallid gale, dm please.
lol
lol
lol
I did coaching for American football with kids between 13-18 and it was good but I guess the main difference is they choose to be there so its ez
you know that DM sends a notification already
Yeha.
@void plover don't #9
so you don't need to mention him, he's offline anyways
please read the rules smh
Needs to change his name to Not-so-funny-Cube
lol
xD
you can DM me instead if you want ๐
^
https://wiki.bristermitten.me/contacting-funnycube @void plover
he needs a friend

havent had one of those in a while
No, thank you.
?
In regards to?
About stats in expension.
Sure, you can dm me
right, currently looking into https://github.com/KryptonMC/Krypton/issues/29 , and I'm trying to think of a way to remove the lateinit vars from KryptonPlayer without making them nullable, and the only way I can think of doing that is to have different player objects for different states of a player (e.g. one for just after login, then another one when we actually have the data)
I want to know you guys' thoughts on that idea, and I also wanna know if you have any better ones
Where exactly do you initialize world there btw?
atm, KryptonPlayer looks like this: https://github.com/KryptonMC/Krypton/blob/master/server/src/main/kotlin/org/kryptonmc/krypton/entity/entities/KryptonPlayer.kt , and the issue is with the lateinit vars, see the way that Krypton spawns players on login is by instantiating the player just after we finish the login sequence, and then applying the values afterwards when we're beginning the play state, and that works fine... until you get many players joining in very quick succession, in which we get a race condition, and if a player joining manages to be instantiated before a player who joined before them, and they're in the list of players but not fully initialized, it'll throw big errors with lateinit vars not being initialised
later on, in SessionManager#beginPlayState
Which line there?
actually, it's in PlayerDataManager, my bad
Ok either way, I suggest creating the player with the required instances rather than setting them later on
This is going to keep ending in lateinit exceptions
yeah I think that's probably the best idea
On every few changes
I probably need different player objects for different states of initialisation
Try to keep the player object to always have a valid set of properties
unless I do a Minestom and just drop Location entirely
or, drop the world part of Location
Why not initialize the player once you actually have everything ready
I assume theres not much you can do with the player would the entirety of its information anyway
the handlePlayStateBegin logic would be my only concern there
lateinits get out of hand unless you're initializing asap in the class itself
specifically, I don't want it to get skipped because the player isn't fully initialised
Are you not able to have it return the information you need to append to the player rn, and create the player itself later?
Have an object that provides the changes that you would currently do to the player (for eg: setting the location?) and then once it returns and you have everything the player needs, Initialize it with that information instead of the lateinit
Might need some huge refactors considering currently it depends on late initialization
the only reason we need this info is because we need to tell the joining player about every other player on the server
lines 173-181 of SessionManager
Anybody trhats used jetbrains exposed know how, or have an example i can look at on how I would have something like this
User has multiple Roles
Roles have multiple Permissions, and obviously multiple users
Permissions have multiple Roles obviously
just a little confused on how id do thsi
made my first website, anybody wanna check it out?
ye 1 sec
what do you think?
uh good I was looking into the code
oh don't mind the 400 div's
and idk do u want criticism?
yeah sure
xss?
yeah yeah
you could arguably lazy load the css if it becomes bigger
but yeah nice one
eyy your swedish?
yep
ayy fellow ikea brรถder
u swedish also or what ๐ฎ
yeah
also..? 
just... Set a list
yamlConfiguration.set("completed",List.of(0,1))
I just noticed that Kotlin has a new colour on GitHub
Purple
yeah
you know purple is literally Kotlin's branding right?

also, it's a lighter purple than Haskell's purples anyway
that's the old logo
shut it you
:o
NOT
Not configuration help
๐คฌ ๐คฌ ๐คฌ 
Bardy
rude smh
Kotlin did switch all its branding to haskell's color
https://kotlinlang.org/ the site is literally all purple lol
lmao
THEY STOLE PURPLE FROM US
purple does look nice tho?
that's not Haskell purple
new kotlin logo is fire
Purple is nice
TREACHERY
Haskell purple is darker and less saturated than that
DONT CARE
purples and pinks are the best colors imo
Purple is purple
๐
The old Kotlin logo was horrible lmao
k
lol
UGLY LOGO for an UGLY language
whats on the right-

Nah, Haskell's logo is actualy nice
haskell bad
Kotlin color bad
fortran good
its almost the same as kotlin?
Of course it is ๐
imagine dissing a language you still use all the time and still like (as much as you can try to deny it)
Cobol good
lisp good then?
Not true
Algol good
cough Kotlin sucks
peaches fuck off
no one asked you lol
WISE ๐ ๐ ๐
Imagine using a language that says it solves nullability and ending up with lateinit exceptions ๐
๐คฃ ๐คฃ
you know you love me though
Imagine not using Elara
Its just nullability with extra steps ๐
lateinit var
why is this everywhere
dkim smh
ouch
Elara or Haskell are the only acceptable programming languages
if you keep making blatantly false statements though then that's gonna change real soon
Anything else is SHIT
Objects.requireNonNull
this was 2 months ago
wait are you actually mad?
Holy fucking shit
dont look at line 45 - 73 tho
lmao
javaClass.classLoader
.getResource
kinda
^^^ average kotlin "safety" ๐คฃ ๐คฃ ๐คฃ
especially because ik your reasons
dont look at line 45 - 73 tho
๐ฉ
Dkim wtf are you doing
don't question my kotlin skills from 2 months ago
send something more recent then
he is just following the kotlin "best practices"!!
Dear Kotlin users,
You say kotlin is null-safe. Please explain !! lateinit and platform types
they want you to do this!
wait but how can i fix it
platform types are not Kotlin's fault, lateinit has its uses (though should have caution exercised when using it), and !! is a sin, can agree
Bad!
how dare u talk shit about my city
@prisma wave https://kapwi.ng/c/DLmPiukv
true
"It has a problem? Oh its not from this"
wromg way round
False advertising
Maybe monad ๐
๐ ๐ ๐คฃ ๐คฃ
Maybe nomad
lol
someone likes being late
how would i fix it? wouldn't the only other option would be to make it null?
and since it's only initialized once, at the beginning of the program, i think lateinit is good for it
and I'm not making the instances, so instead when the instance is created (from javafx) i just set the value
which is why i also have and need a singleton
idk why I did find it funny
no ty. bcz I've tried and they didn't want to let me drown
they're very unreliable
lol rip
student pack?
yh
welcome to the gang
can't u just renew it then
wait but ain't you still a student tho?
no
oh?
oh
Better start applying for the OS license
finished
wait how old are u?
17
o


Story of my life
I finished highschool at 19
yeah. i finished and month later I turned 19
Small dick syndrome
didn't redo anything.
๐ณ
we have 12 years of school. 4 of primary, 4 of idk what the fuck its called, 4 highschool (only 2 are required)
what age did you graduate highschool?
and we started at 7. now its 13 years of school and they start at 6
and then I want to go to uni for 3-4 years
well at least 1 to see how it is
we'll see if I Can handle 3 xD
ah I Think its called general school
I think highschool is supposed to be finished around 17/18
primary school is from ages 5-11
secondary school from 11-16
college 16-18
university 18+
for UK
Haskell GHC Java - Which programs are fastest?
oh no highschool? 
oh wait college is like some sort of highschool for u then?
You're not gonna go to university Kali?
Different names, they call it college i guess, we call it secondary
alr
when the purely functional language performs better than a VM based around mutability with 20 years worth of optimisations ๐คฃ ๐คฃ ๐คฃ
well we have, primary, secondary/general, highschool / uni
๐ ๐ ๐ ๐
and yeah most people finish highschool around 18
It's one regret i have, not having gone to uni
I Did at 18 too. turned 19 1 month after I Finished
well we have, elementary, middle, highschool ๐
was it that bad tho?
i hate education with a passion
We call it, primary, 2nd cycle, 3rd cycle, secondary
Not bad, but just wish i had done it
oh done it. For some reason I thought you said you went to it and regret going
like im just spending 10+ years of learning stuff i dont want to learn
JVM fans in tears rn
oh hi semigroup mitten
A lot of things people do that I wish i knew, and learning them on your own is a bit harder
wat
Oh nah, i was saying i wish i had went to uni
Ic. yeah
that's why I go too. I hope I'll get some good teachers for at least the things I Want to study
hey there dkim 19375
and maybe actually teach me lmao
I'm a bit too old for that now, tbh i still could but idk
i don't know why, but i just hate it when websites autocalitalize it to Dkim19375
looks ugly
Classic discord mobile
doesn't kotlin have lazy btw
dkim > Dkim
Nope
ok time to think of another username
no numbers ๐
tbh i dont like dkim19375
too many numbers, username doesn't even have anything in it recognizable or anything to remember/recognize by
Kdim
FAKE
๐ฎ
django 
ecloud 2?
No lol not yet.
rip
I'm going to make a page that displays the numbers of users for each expansion.
aw you get cool stickers D:
Thatโs cool
ah
https://i.imgur.com/pGzxDs6.png discord doesn't like me โน๏ธ
Right now we have that big "other"
And some people want to see how many people are using their expansions.
> Testing in production
๐
they removed the sticker shop
generally
Nitro users still have it right?
aw
They are going to add support for custom stickers instead
so you're still gonna see stickers in the future I'm afraid
And the old ones may or may not stay, not sure
๐
Ok they were supposed to remove all current stickers
but that hasn't happened clearly
supposed
๐
clip be having a lot of fun
Literally me
i dont get it - if they want to remove it, why don't they just make it do nothing in the api?
he's having fun on a swing
lol
lmao
I got a client boys
Nice!
Oh damn Blitz I didn't know you were a hooker
i was gonna make the same joke
now u know
https://stackoverflow.com/questions/56535473/how-to-send-and-receive-strings-through-tcp-connection-using-kotlin/56546186
are making servers... really this simple? ๐
i thought it'd be more complicated

Itโs a long process
Like if you want something like a mc server implementation
Entirely coded from scratch
Nah, you just open a socket then connect to the game
Ikr, it'd be done already smh
what does bardy use?
;-;
Reminds me of this
lmao yea
theres actually something in the kotlin standard library to make a fast, lightweight minecraft server written from scratch in 1 line
i guess bardy just didnt know that existed
Mr. Abandoned Projects is typing...
the only thing u guys were talking about was some other language and elara
If and when you do
yes
uh oh
BM actually made the entirety of SlimJar alone, but we committed with our names just so we could joke about it here
๐คจ
That's true actually
I was gonna say I'm kicking you two off the project, you're totally useless
anyone here know how to create and configure Kotlin source sets?
because I know you can configure Java ones with something like ```kotlin
sourceSets {
main {
java {
// stuff
}
}
}
but anyone got a clue how you're meant to do that for Kotlin source sets?
Isnโt it just kotlin instead of java
So it doesnโt work then?
Oh is this not what you want?
kotlin {
sourceSets {
}
}
https://i.imgur.com/A01zbpn.png that makes sense
thanks Conclure
Ah, i guess not the same thing i was thinking nvm then
I'm doing this since I wanna add a bit a' good old code generation
save that for the dkim den

Sorry, this page isn't available.
The link you followed may be broken, or the page may have been removed. Go back to Instagram.
Ima try upload
just discovered that scala has mixins
nice
m-m-m-mon-ad...????? ๐ณ
Wrong! It was monoid
monoid is the other-other one
except 1
look at it
1
a masterpiece
what do you know?
MORE THAN YOU
Oo
Minestom?
haven't used it, but I've heard a lot of good things about it
Krypton and Minestom are decently good friends lol
Yeah saw lots of static when I took a look so that kinda scarred the heck out of me
yeah there's a decent amount of static abuse I think, but it performs very well
Ah fair enough then
and when I say very well, I mean like I've seen player counts in the thousands being handled by 4 tick threads maintaining 20 TPS with no issues
https://github.com/cpw/securejarhandler/blob/master/src/main/java/cpw/mods/gross/Java9ClassLoaderUtil.java can anyone tell me if this will still work in Java 16 btw?
the hell is that
it gets all the URLs from the system class loader
Which server currently runs minestom?
joe server
thats what they all say
Theres a vanilla reimplementation provided by minestom
pdm is a dependency downloading library, therefore it doesnt have to be complete
yeah but it's nowhere near complete Yugi
with another impl iirc
Which one?
gimme a min, lemme find you the post in showcase
Alrighty
It shouldnt work
ucp is a private field
so is theUnsafe lol
That class also seems to assume that the classloader is a URLClassLoader
which apparently isnt the case on some recent version
I forget where exactly that started
might be 11 or 15
no, the app class loader isn't a URLClassLoader, but it has a URLClassPath iirc
ucp is part of the urlclassloader i believe
probably
actually it will
how so?
because sun.misc.Unsafe is one of the specially excluded classes
because of how critical it is
unsafeCoerce ๐
Isnt Unsafe already scheduled for removal?
it was going to be removed in 9, but some really big libraries like Netty and Cassandra use it iirc, so Oracle decided against removing it
Ah
also, I think that code does surprisingly actually work on J16
because the author updated it to J16
Ah yes, it seems to be using unsafe to get the value rather than directly by reflection
wanna know something funny?
you can modify fields declared as final with reflection
just like that
without any hassle
doesn't work on record components, but on regular classes
๐ Another flaw from the mutability supporting language
Wait what?
isn't final erased by the compiler?
like there's no differentiation there?
mhm
Yeah I believe some finals are erased
ah
i mean it used to be a problem before
Like local variables
lol taking hacks to another level
xD
local finals are erased, yeah
i'm talking about fields
ikr
Oh yeah then no
Haskell good, Java bad
but i literally tested it myself on Java 16 and it just works, without changing the modifiers even
weird as fuck
Pog
but i literally remember it being a problem on java 8
Unsafe is going to be removed tho soon. It didnt get removed in j16
having to flip the bit
idk when you would ever use it
Yes it will eventually get removed
that's gonna break a shit ton of libraries such as gson
Yeah it is prolly
Caffeine ๐
Well, they are just moving over to more actual like supported api
its not like gonna be all gone
theres gonna be ways to do whatever you need to do in api
eh...
JVMLS 2014 - The Secret History and Tragic Fate of sun.misc.Unsafe - Mark Reinhold
The JVM Language Summit is an open technical collaboration among language designers, compiler writers, tool builders, runtime engineers, and VM architects. In 2015, it convened at Oracle's Santa Clara, CA campus on August 10-12.
can you set it back?
its still final
oh
lol
๐ java ๐ bad ๐
why is this in the MC client code
where
why not?
if ("ยง1".equals(strings[0]))
Yup
setAccessible puts it into overrideFinal
Where override is the variable that setAccessible sets

wat
setAccessible(true)
sets override to true
Which it uses to determine if it should ignore the final modifier
Theres also an extra check
that's stupid
But cant find tis implementation
conclure #bot-commands is a thing
Brb
the JavaLangReflectAccess is a interface so dont know its implementation
yea possibly
No idea
Files needs a createIfNotExists method
K
im tried of checking that it doesnt exist
then creating it
idk if its worth to make my own util function for it tho lol
fun File.createIfNotExists() {
if (!exists()) makeNewFile()
}```
I was referring to more like Path. But im in java so sadly i dont got extension functions :(((
And apparantly, Lombok has extension functions in java XDD
Ew @forest pecan I know you are Pulse but still
@forest pecan
No smh
For u ๐
ty lmao
Good
I mean like yeah just make them yourself in a new utility class lmao
:`(
it takes you a few seconds
Wait for real?
Can someone explain to me how I can have 20 unique cloners, but only 5 unique visitors on my github repo? I haven't posted the link anywhere, how and why would people clone it without even browsing the github page first?
@old wyvern do u have an example usage of dagger like one of ur personal projects
What is that embed
LMao
๐ fr tho am I missing something? where are all those git clones coming from?
I have a android project using dagger 2
Siberia
that could be it ๐ณ
Or rather hilt, but its just a slight abstraction over dagger 2
I'm assuming if you have the link to clone you don't need to visit it therefore doesn't count
Also bots can clone without visiting as well (eg: codacy, jitpack, etc)
That looks horrible lmao, so much for reducing boilerplate xD
I use it for everything
I don't think anyone has copied the git clone url and is doing it, but bots could be the reason. Thank you!
There are a few data class instantiation tho
But ofc that isnt really supposed to be injected
You would ussually construct most dynamic data objects
Like in this case, it captures the incoming messages and creates a database entity
Blank sticker?
pc bad
Im on android
android bad
So assisted injection then?
Works for me on android
oh, another one of the blue demons
Everyone's favourite
Thats not for pojos
rather to inject pojos
For example
Oh
Injecting into pojos ๐
I have a ViewModel for a chat channel
it requires the id of the channel
so here
I need the dynamic data as a dependency
hence the assisted inject
Okay hmm I will see if I can make something which isnโt a mess ty for the wise help master yugi
Also whatโs your thought on creating interfaces for the purpose of making it unit testable easier
Go for it
Okok
Makes mocking easier
lol
Also yeah when do we not need unit testing such that I would be able to skip the extraction of an interface for the purpose of easier mocking it. Utility classes would be one instance, enums I guess also but is there something else?
data objects
Oh so pojos/records
mhm
Nothing else than that?
Hmm yeah
Utility functions also need some care
๐ฅฒ
Some Utility functions can make the class using it harder to test
pure utility functions are good
Oh so then impure ones
mhm
Basically the entire Bukkit class would be one example
For example lets say you have a utility that copys a file from A to B that you use in a class C
Yeah







