#dev-general
1 messages · Page 390 of 1
@quiet depot https://youtu.be/VeaJ0hHBRPQ?t=32 bloo
no bardy
no
no bardy
how do web sockets differ from standard connections?
i skipped to the exact time for you
ignore that
afaik websockets are just web requests, except it doesn't close the connection
it's because it maintains the connection
instead of pinging the server directly
it sends messages to discord
then discord sends it along to you
yeah but it has to make an initial connection
bm, do you have an airport on your small island
yeah it's called initializing your bot
whereas an mc server requires clients to open a connection to you
yes
and receiving data back from Discord would require an open port
no
you do?!
ah right
no it doesn't
what?!
receiving html doesn't require port 80 to be open
so because the client makes the request, the firewall makes an exception for that outbound request and creates a sort of path through
same principle with websockets
bardy do you have any idea what a connection is
like, you know how you connect to discord?
bm do websockets stay open? I thought they were basically identical to http lel
it's literally the exact same thing
just a diff name
yeah, you send an HTTP request with identify iirc
found it
yeah i think they do
What is websocket :S
yeah web sockets stay open
that's a tiny airport lol
it's like how uPnP works
it's not commercial
I think I'm just misunderstanding how firewalls work
just for like amateurs usually
the ATC room is someones shed
if you send out traffic it assigns a port to it on your PC, if it receives stuff back on that same port, it knows it's because you requested it and it allows it through
firewalls are only to protect incoming traffic from getting to you right?
like when something just randomly sends a request to you
firewalls can go both ways
but if you wanted to fly somewhere you gotta come over to mainland?
yeah ik
but most firewalls allow all outbound traffic
or at least, most home firewalls
but yes, unless you forward a port, its function is to stop uninitiated requests
ah right
so established connections are mostly always allowed?
u get used to it
ever thought of just coming to main land?
they are always allowed, unless explicitly forbidden
that's a genuine question btw
would make sense, since I've seen IPTables always be set up to allow ESTABLISHED connections inbound
i probably will for uni
no point atm
every single thing you do on a computer via networking involves making a connection and allowing a response through your router
oooh what country you thinkin
yeah ik how a connection works lol
yet you didn't know how firewalls did? lmao
mainland uk, usa or possibly france
I wasn't 100% sure, since I've never investigated firewalls
wtf usa?
wait mainland UK
I just setup a firewall and it just works
are you not in Uk now?
i am
the UK has these small, mostly irrelevant islands around it
he's in the middle of the sea
called the channel islands
oh like Jersey?
oh shit
the middle of the sea
i know a guy from jersey
dont associate me with jersey (🤢)
correct
bm lives in jersey?
absolutely not
what's up with jersey?
doesn't the Isle of Wight technically count as a channel island?
damn how much networking knowledge do you have? and it's all self-taught?
I do Linux system administration
wtf that's sick
dont think so
I mean so do I
I don't get paid for it, but I do it
but like, very nice to find a fellow boi
wait did you say USA 😮
perhaps
I'm not one of these companies that provides "pro sysadmins" or whatever for some stupidly overpriced amount
what uni???
no idea
considering how easy it is to do system administration
none at all?
the only one in america i know is MIT and harvard
bm wanna be my roommate next semester
isle of wight still classes as mainland afaik
we got cheap tuition
Perhaps
That is true
imagine having roommates
Working in america sounds more fun
no its not
it kinda slaps
trust me
usa bad tho
and with your accent, imagine the praise!
That is true
bm, the only reason I wanna live in usa is for the heat
and for escaping brexit?
i ignore brexit now
I swear when i was in america i heard 🔫 in the middle of the night
florida 
yep
not that far fetched tbh Odin
that'd do it
I just told myself it's just fireworks :/
never been there, but all I've heard about that place is shit
usa 3 mass shooting in the past 2 weeks 🥲
don't take Florida as the example
I loved florida (of which I've seen)
florida crazy people
bro that's like comparing the amount of mass shootings in the entirety of Europe
California seems alright
like germany ain't the same as finland
what
Probably 0
Utah ain't the same as Florida
yeah if you don't see a crazy Florida man doing something ridiculous on the front cover of the daily newspaper Odin, something is wrong lol
Im saying states are basically different countries
if only you guys knew the crazy side of me
we just happen to have a federal government we can't leave @brexit
fr??
from what I've seen
yes that's very true
only in Florida™️
I just go to https://floridaman.com/
Florida has very permissive laws regarding sharing of arrest information
keeps up with what he's doing
brexit means brexit get rid of the brown people /s
😁
as long as you stay away from the bottom row of states, not a concern ;)
why do i feel like bm is a florida man
guess what's currently up and running btw Star
uhhh
may or may not be raining at night time but whatever lol
hooo I love rain
test.kryptonmc.org isn't a website?
this is perfect
?? I thought the south was supposed to be friendly to all races with a very open minded history
🥲
oooh yeah sorry had it backwards
Minecraft server silly
oh
boot up 1.16.5
do you uh... know what Krypton is? lmao
I'm on 1.16.4
Oh god here we go
should still work with 1.16.4
He's gonna say the line
.4 works i think
i think i joined with that version ladt time
ye
no permissions
im just making sure ❤️
yeah you gotta have krypton.command.stop for that
obv not
do u? 🙃
unless you made me an admin 😌
oh not even a shoddy built in one?
lmao
but it just defaults to allow instead of deny?
yeah bro can you strike a deal with your best friend Lucko and integrate LP automatically
cause every server needs a permissions plugin
might as well make it default eh?
But it might make me waste like 100mb of my dedicated wam and like rreeeee
lol
you know I was the one who made LuckPerms work on Krypton right?
lucko had nothing to do with it
I presumed so, but you'd need his permission to make it default, no?
How do you add the kotlin folder into your project if it's not there at first?
it's just the only permissions plugin that works on the platform
just... create the folder? lol
kinda asked for that ngl
yeah I was suggesting integration

ffs
fixed the issue with permissions
private fun dispatchPermissionCheck(sender: Sender, permission: String?): PermissionCheckResult {
val event = PermissionCheckEvent(sender, permission, true) // last param is if the sender has the permission
server.eventBus.call(event)
return event.result
}
```very nice that
I am the literal definition of stupid
awe nice
well, 0.16.2 is gonna be a small update
also fixed fastutil exclusions in this update (reducing JAR size from ~18 MB to ~15)
wots fastutil
It's fastutil
wow tysm
anytime
fastutil is, as the name suggests, a fast utilities library
it's one of the fastest extensions to the Java collections framework there is
added it to make StateIndexHolder work properly lol
and because it's rapid
doesn't come close to Haskell list performance though
and we'll likely need it in the future for stuff
haskell slow?
it is required to be shaded
then wtf does exclusiosn mean
as of like 8.0.4 or something, it's finally split into modules
all of the stuff combined is over 23 MB
that's how massive this is
but core is only 5 MB now
and I can shrink that down by excluding some of the packages from being shaded
yeah
what's the advantage of that?
no (un)boxing either
that sounds like a disadvantage
it removes the overhead of converting between primitives and boxed types
I think haskell's performance is roughly in between java and c
no more having integer maps that use Integer that you use as int, requiring it to be unboxed at runtime
Primitives fast objects slow
^
if nothing else there'd be a noticeable memory difference with large collections
well yeah you gotta create all the boilerplate for those objects
not sure yet whether I should expose fastutil to the API or not
why not?
well, two reasons
let your plugin makers have a fast boi
- only used on the backend
- my exclusions could mean that plugins could use say
Double2ObjectMapand it not appear at runtime, since it's excluded by shadowJar
oh shit I see
don't
implementation detail
yeah that's what I was thinking
also, the API is designed in a way that works for any server
e.g. you could make a vanilla implementation of the API
and the comments suggest nothing about the implementation either, just what you should expect from the implementation
lol
I mean, the API has its core dependencies of course, like stdlib, coroutines, serialization, Adventure, Brigadier and the Log4J API
lol
🤌
shithole
Portsmouth isn't that bad
idk ive never been i dont think
you there bm?
time to meet bm
?
no i mean from where i'm at
ye
you live in portsmouth kaliber?
no lol
ok good
i wish
the whole gang lives in portsmouth wdym
🥲
on a serious note now
not alabama
what's the odds of someone here living in my city
yeah england I presume
is there a member count thing
england is my city
🤨
city is my england
🧐
.
i ain't self doxing
england
almost everyone knows it
kotlin and maven lol
nobody here is gonna dox you
i've been doxed from here before
are u sure
xXMinecraftLPXx doxed you just based on the city you live in
😂
😳
That's unfortunate
they sent a pic of my house
Yikes
I hear they only need to know your country now!
no comment
In the United Kingdom, access by the general public to firearms is subject to some of the strictest control measures in the world. Fulfilment of the criteria and requirements as laid out by the laws however results in the vast majority of firearm licence applications being approved. Laws differ and are generally less restrictive in Northern Irel...
you never know what people will do
Bro if you're for real you should probably get that person removed from this server
well it happened a while ago so idk if they still here
and they change there name every 2 weeks almost
and that kids is why you never join a random server
so uh
I mean user id
?
it's taking ages to go through
Hmm lives in england... changes their name every week.... hmm
Bm I'm afraid youre a suspect
they should just let it go through and take it down
would u like to explain urself
No I would not
this song just came up at the right moment https://open.spotify.com/track/1lzr43nnXAijIGYnCT8M8H?si=csL3XvP-Q76JV_huQOBEuQ
legit out of shuffle
classic
public record Person(String name, int age) {} okay I never knew records looked like that
that's literally a direct rip from Kotlin lol
isnt that a good thing?
yeah it is
also, when your C native code finally works properly because you followed a guide and generated the .h file using javac . -h MyClass.java like you were meant to lol
all they need to do now is make that constructor syntax an option for regular classes lol
Records better
hi
I mean, requiring {} is still kinda annoying
but the future for Java looks promising
Consistency
u say better, but is there any difference between records and a data class
Records totally immutable
no var
I don't think there's any other real difference
o
also, is it just me or does final var just feel wrong
extremely wrong
like the name var implies it is variable
cursed
but then final makes it non-variable, or immutable
its just because ur used to kotlin tho ig
nah, just in general
let mutable 🥴
var means variable
and the name variable itself implies mutability
you know what I mean?
ye
meh
I mean, sure, it's better than nothing
but it just kinda makes limited sense imo
also, Java scoped keywords when xD
context-based keywords
whatever you want to call them lol
hm?
e.g. data in Kotlin will only be interpreted as a keyword if it's applied as a modifier of a class
val data = 3
that'll compile
really not that big a deal
but if you do final String volatile = "Callum"; for example, that won't
or any other keyword
javac is so primitive lol
This has nothing to do with javac
how
didn't you hear? Java bad kotlin good!
it's javac that interprets volatile there as a keyword
javac is the compiler implementation, it's implemented according to the java language specification
And personally I don't think this is a bad thing
I think it's a bit stupid how some very underused keywords still apply everywhere
but I regularly name my variables volatile!
that was just an example BM
making everything context based convolutes and increases the complexity of the grammar of a language
what about using the name default for the name of your default parameter
e.g. ```java
public String getString(String path, String default)
i name my variables urMumGaeButAlsoThisIsStonksBalList
lemme list a few underused keywords that really should be context-based
thats obv a hashmap of UUID and Integers
How many lexers have you implemented bardy
true
I challenge you to implement one for kotlin and one for java
see what you enjoy more
kotlin is a very syntaxy language
sin-tax
sine tax
cosine tax
String def 🥲
also, why does const exist in Java
just in case
The thing is those features are nice for you as an end user, but they're very complex and make it even more difficult than it already is to specify a formal grammar
that's actually a keyword according to the specification, but it's not used lol
and goto
So didn't want people using it in their variable names
I guess that would be for jumps?
like you can do in assembly
e.g. jmp subroutine
goto 🥴
yeah I was gonna say, C has goto
it's real weird though and makes for some annoying to fix bugs
also, is it just me or are Java's access modifiers seriously fucked up
you don't like public, protected, and private?
like what does protected even mean these days, since I've seen it being used in classes with no implementations before
goto considered harmful 🥲
protected means package access only
no it doesn't
wot
protected is meant to mean only subclasses can access it
that's default visibility
ohhhh
Man I remember having 3 day long argument with Calin about why goto was almost always terrible design
package private means private to the current package
He just wouldn't get it
protected is package and subtypes
yeah no I definitely used protected for variables and subclasses before
just didn't know about classes
I've never used anything besides public class and class
protected is a messed up visibility
I might just be fucking stupid though
also, internal is such a nice access modifier
internal sucks too in its own ways
obligatory internal modifier mention here
internal means restricted to the current module iirc
not sure what Kotlin defines as a module though
but a Gradle module seems to count
kotlin is objectively better in every possible way than java idot
kotlin has no flaws
neither are true
🤐 👍
Java reflection is in a separate league to Kotlin reflection
Kotlin reflection sucks ass
can't you just use Java reflection tho
yes
ah okay so it's not too bad then
also, bit shifting 🥲
oh yeah it doesn't autopromote to integers lmao
infix precedence being completely different to operator precedence is a bitch
there is no promotion or demotion of primitives
there is in Java
since there are no primitives in Kotlin
Vouch
yeah that's like... what I said
well you know who else is a nice guy? you! 
mainly because of the no promotions, but they also don't have bitwise operators, or a way to declare them in literals
Oop 😳
okay, so how hard would it be for my boys at JetBrains to add autopromotion?
they could have had bitwise operators though
haKjell good Kotli bad btw
yeah ik
It was intentional afaik
fucklin what
why would it be intentional if they don't provide any substitute
the substitute is just being explicit
I remember souza making an argument about how bitwise operators aren't important because they're not used very often
that's like, the whole reason kotlin exists: to make a less explicit java
the #1 thing I show to people considering Kotlin is how much smaller a typical class is compared to java
which is BS, since they are used literally everywhere when it comes to networking and arrays and other low level stuff
like bit shifting is that much of a joke in Kotlin that I've considered writing it all in C and using JNI
or just writing it in Java and extending it in Kotlin
bruh
like it's that bad
but then its not a minecraft server implementation written in Kotlin!
just RIIR idiot
noooooooo
write in haskell then implement 🧠
shifts are meant to take precedence over & and |, but they often don't lol
what?
Rewrite It In Rust
bardy I want you to call up my boys at JetBrains and put in a formal complaint
imagine not being able to define custom operators and their precedence and associativity
D:
D:
Strongly agree
rust is more modern than kotlin could ever be
idk man
way overused
dude you just started it LMAO
its pretty funny to me
If your language doesn't have let somewhere in its syntax sit down
hello
HI
hello sir
Good to see you up so early Mr trump
I could write some native stuff in a native language and call it from Kotlin code lol
bro just rewrite your humor in Clojure, it'll be fine
Good to see you type Brister of Mitten
I've considered writing it all in C
just kinda fed up with the "rewrite it in" jokes now
the duality of man
like anything that uses arrays and bitwise operations could likely be done 100x better in C
lol
fair enough
are we all just gonna ignore my Clojure line 😭
yes
Nobody wants a fun fact?
i do
no it's not
damn thats crazy
nope
Yeah it's crazy i know
based trump
- Don't post any sort of NSFW content.
👀
sry
you have been smitten
Also, stay remotely on topic
whats the topic today mr funnycube
Mr trump what do you think of clojure
bullying bardy for his shortcomings
Yes
wrong
hasn't come through to his ivory tower yet
clojure on jvm = bad
Cava
yeah wait what are my boy simon peyton-jones' thoughts on Java and the JVM? maybe even Kotlin?
Didn't he say lisp is right at the top?
he spits on these corporate languages
lambdas 🥲
BiConsumerCurryingService
lol what do i know I haven't watched the video
🤨
(DonaldTrump dt) => Donalod Trump
so true!
That might have been someone else actually idk
AbstractDonaldTrumpFactoryBuilderHelper
(Monad m) => McDonald
You are very strong mr trump
does he still play Fortnite?
nice
he's offline now
where does he even live now
Please either stick to the topic or move over to #off-topic
dude who even cares
Dw guys I got this
good cover bm
@mellow valley @serene cave
@Joe Biden
🥲
me when I enter #dev-general
Lmao Johnny
Me when I enter #developer-chat
lmfao
where's #developer-chat huh
#role-request And then you might get access to cool kids chat
you're not missing much
i wanna be part of the cool kids 😢
Or you might get neglected and ignored
I already did!
"cool kids chat"
developer chat is incredibly dead
Almost as dead as my will to live
maybe it wouldn't be if I were there tho
I am quite the conversation starter
So they never ask for help there
yeah
well yeah but you can talk about your accomplishments!
imagine if Bardy showed off in a chat other than this one
the world would be a different place
god I wish I were considered a smart person
oh yeah I have a whole list for them
back to the drawing board
Accomplishments:
*
what
?
:what:
??
someone tell me what I should do next in Krypton pls lol
thinking that block placing/breaking is a good idea
I'm surprised you went to support add-ons before actually finishing it and making it work
yeah my priorities for this were upside down
Why is #developer-chat blue for you? 
Luckperms more important than block placing
efe you're not even in the chat
Matt, he has the channel ID
So it shows up blue
if I can't make my pixel art, that's a problem
it's blue on mobile
soon™️
will start working on placing/breaking now
gonna look at how vanilla handles breaking lol
i cannot express how annoying this fucking lil yachty sound pack is
actually, I have to add a few things before I add placement
Oi don't talk shit on it, it's great
oh nice
-1 🥲
at least 1 new message since 1969
maybe more
mmm unix epoch
69, nice
a few months after the mun landing
Mum landing
bro KSP slaps
I'll go play A Short Hike instead
no Developer role in my hand
PHP developers curse the most understandable
java is too verbose
mmmmmm
ok use F# + emacs then
yeah one second im going to switch to matlab
ive taught you well
vim lmao
/s
any tips for an emacs newbie iwan
switch
use vim
memorise the chords
use vim
no ❤️
all of them
my friend was talking to me about class registration and he was like "if I take this engineering coding class in matlab, will you help me?" and I was like "Ill have to help myself if we're talking matlab mate"
y e s
Sunday is cleansing day
I must cleanse myself of OOP impurities
by doing some clojure
I've memorised most of the navigation commands, but it is quite a lot to remember lol
What's even the point of emacs
to be good
Like surely a dedicated web browser would be better
Etc
Seems like it violates the Unix philosophy
but vanilla doom is good enough in my experience
https://paste.helpch.at/memaqagoyo.java wonder how I should deal with this in Krypton 🤔
also, just admire that class name lol
according to Mojang, a gamemode is responsible for holding data about the block that's currently being destroyed lol
what we know as a "gamemode" is actually GameType in the code, but all the field names with type GameType I've come across so far have been called gameMode
Consistency 100
💯
gotta think of how I'm gonna do it in Krypton though lol
tempted to use a fixed size array for the player's inventory
or something else with a fixed size
might wanna use a custom class though, since I want to be able to differentiate between special slots and regular inventory slots
whats krypton?
haha
Minecraft server from scratch
sinful pleb
oh wait u made it
yeah
Change your name idiot
and that yeah
the one called ?
yes
lol
there
hehehe inventory
since I kinda have to for block placing/breaking
trying to think how I should design inventories
and creation of them
squares
either data classes or an InventoryManager lol
like this bardy
array of item
iwanio I swear
why do they have dirt in slot 1
ultimate positioning
that is not pro minecraft gaming
well its a dia pick
slot 1 is sword, 2 is pickaxe, 3 is axe, 4 is shovel
well you need blocks
no
oh ok
sometimes i replace food with pots
sh
hotbar[0]
lol
if(i==1) {
i = 1;
}
mm
right, thinking about inventories, should the functionality to append items to the first free slot in the inventory use plus or plusAssign?
just trying to think of which is more logical
(inventory + item vs inventory += item)
does anyone know what version of deluxechat is for 1.8.8 compatibility?
I think it would be better to do so
so you can use inventory[index] = item, inventory[index], inventory += item, etc.
1.8.8
1.12.2
1.13.2
1.14.4
1.15.2
1.16.1
v1.16.0 - Latest
v1.16.0 - Latest
v1.16.0 - Latest
v1.16.0 - Latest
v1.16.0 - Latest
v1.16.0 - Latest
trying to think if this should be backed by an array or a collection
idk, I'm not a big fan of overloading mathematical operators where they don't have a mathematical meaning
I'd like to be able to use indexing and property access syntax on these if I can
but ig you'd be consistent with the std lib doing it on collections
yeah
well, an array would be wasted space for whatever slots are empty
but it would also be quick and convenient
so I'm not sure
might actually scrap adding items and just allow getting and setting
lmao
that would be the easiest for working with arrays
but that's where I'm torn
since I basically need a fixed size collection lol
or a collection that can only grow to X size
so... an array
possibly make a method that just puts them in whatever the first slot is numerical-wise?
yeah I was thinking that
and then you can work with each of the items nicely and slot stuff in when you don't care
I was just about to make a point about iterating over all the elements being slow, but inventories don't get bigger than like 56 slots anyway so that'll likely never be an issue
yeah especially in an array lol
what is an english
trying to think if I should throw an ArrayIndexOutOfBoundsException if the array is full for plusAssign
you shouldn't
yeah what
I think spigot or nms can make it out of bound
you should return null or something
the user didn't access any index, so don't make them handle this
if there's no slot for a full inventory, return null as the slot assigned to the item
then it's an easy-peasy null check
or return the item
fair
well I presume he'd return the slot it was placed in...
I'll just return without doing anything then I guess
that would be more useful than the item they already have lmao
Are you really gonna make a out-of bound row top inventory though...?
right, now should the inventory implementations be data classes in the API or in the server 🤔
I want an inventory API that doesn't suck lol
Bukkit.createInventory ain't gonna cut it
btw are you gonna write a totally custom API ontop of your server, or just have the internal server use the API?
the API I'm writing rn is from scratch
somewhat based off of Bukkit but with absolutely 0 singleton access
I'm basically asking if you're gonna use an NMS type thing internally, or have it all through the API
I'm going to expose everything I deem necessary to the API, and if you want to optimise for specific use cases, I'll document the server and release that as a dependency, so you can just do what you do with NMS and depend on the server
kotlin
cool
and the server end won't be really really terribly deobfuscated Minecraft server code either, since all of it is open-source lol
god I love open source
the day clip OS's all of his plugins is the day of our salvation
i wanna make so many things but then i realize that its already made
just make it, but better than the others!
should I allow contains checking with ItemType as well as with ItemStack or just with ItemStack?
actually this extends Iterable<ItemStack>, so you can use filter for that
look at you solving your own problems!
lol
right, time for an InventoryType enum lol
should I add a DOUBLE_CHEST entry? 🤔
while(player.isPlaying) {
player.scare()
}
no this will be the best horror game ever made
scarier than roblox?
https://paste.helpch.at/ecodisadaf.makefile I feel like this is going to be useful
no more inventory BS that spawns projects like MF-GUI to fix the issues lol
you can create inventories of arbitrary size within the API 😎
how would that owrk
you create the object and show the inventory to the player
so if u made one of size 5 for example then what would happen
e.g. ```kotlin
val player = // some player
val inventory = CustomInventory(16, player, InventoryType.CHEST)
player.openInventory(inventory)
something like that
what happens if the size isnt a multiple of 9
gonna actually check if the client and/or the protocol require that or not
might create a way for you to change the slots per row or something
u could do something like fill the rest of the slots with unmovable black glass panes or something if thats required
I mean, doesn't the game itself support inventories with less than 9 slots?