#dev-general
1 messages ยท Page 21 of 1
For packet inventories, if I want to use player's bottom inventory as well, would be enough to send the packet once with the items I want them to see, or if they get an item from like a /give command it will be overrided and I need to send my packet again?
Packets are incremental IIRC, so sending a SET_ITEM packet at a given slot will override whatever was last set at that slot, on the client
updateInventory() will get rid of packet-based items, as it sends a bulk packet containing the entire inventory
but just setItem should not interfere
Should or should not?
updateInventory() updates all items and removes fake items, setItem only sets the item at the given slot, overriding the previous one, but keeps the fake items
Ah thats great
seems like /give just does a setItem internally
Now, watch out for players in the creative mode
as they completely bug out packet-based guis
Thanks for the heads-up
Vulcan and Grim (free)
Does Vulcan justify its price
Or is it more worth it to just get grim considering itโs free
Vulcan is worth it
#minecraft next time @burnt stream
don't minimod smh
i do not care
dont bigmod
Lol
why not?
cuz dont minimod
just do middlemod
But I want to bigmod.
dont minimod do smallmod
oh thats where my shitty Copilot suggestions come from 
๐ ๐ ๐ ๐
this project has been worked on on and off since march 2022, still got pyramids to fix
yeah that was just a stupid joke from me lol
heh
is it really?
i didnt know intellij could automate the task of inverting if statements
IJ can do more things than you think
it can also automatically remove duplicated code
*only on ultimate
community at least detects the duplicated code iirc
really? lmao
dk
at least duplicated if/switch
yeah that's not the same thing
oh
the ultimate duplication is more advanced

wait then what does it have in the Refactor tab
ultimate gang ๐
y u using 2022 ๐
I mean, that's the latest version?
no i mean on community
2022.3.2 actually, but still 2022
for me the extract into method doesn't show up in the warning
i have to do it "manually" in the refactor tab
tru
skill issue
ofc i cant get it to trigger now
maybe they changed it to not check on-the-fly
nvm it shows
nvm
u need jetbrains toolbox
i think
anyone remember the group for paper 1.12? 
no reason to not have jb toolbox ๐
yeah I have it, just cba to open everytime to check for update lol
jb toolbox my beloved
yeah
helpful
hurry up
com.destroystokyo.paper
yeah that one, thanks
< 1.9: group = "org.github.paperspigot", artifact = "paperspigot-api"
< 1.17: group = "com.destroystokyo.paper", artifact = "paper-api"
>= 1.17: group = "io.papermc.paper", artifact = "paper-api"
anyways, anyone used JB Fleet yet?
notepad++ gang wya
jetbrains mid more like
7 seconds to launch fleet
i've recently started to use VSC
notepad++ => 0
(first launch)
insta launch
emacs
might even be negative time to launch
๐
my work colleagues use npp, it makes my cry
I only use vscode for discordjs lol
pc bad
fleet opens in like a second at most for me
ok this time fleet took 4 seconds
although oddly it doesnt open in the foreground
and sublime was pretty much instant
ok Im downloading it right now just to open it and tell that your pc is slow
i even reinstalled windows (and lost some data due to corruption ๐) and it's still slow
โน๏ธ
no
pc diff
yes
not impressed
please god use early returns and proper indentation
lol
how much ram u got
if() {
if() {
}
else if() {
}
}
else if() {
}
else {
}
16
what's wrong with that
what os
macos
oh
shouldn't make that much of a difference
Mac ๐คฎ s
does anyone know how to change the contrast of the file explorer on VSC so it is easier to see where it starts from? 
ironic
because val ๐คข rant
i will install fleet on my pc just to show that it's a skill issue dkim
how much ram does ur pc have
damn bro you installed a spyware operating system just so you could install a rootkit onto your computer?
ya
๐
bro's 2 layers deep
self harm
friendly fire
takes about 4 seconds cold start on my pc
well of course
but
that is particularly bad
what
?
4 seconds is bad?
compared to my laptop and considering its entire point is to be lightweight, sure
conclusion: windows and/or dkim's pc = bad
?
more like sublime if you wanna be quick
exactly
yeah doom is p fast
it is
oh my god yeah vim is instant
~2 seconds
doom?
doom emacs
seems like a lot but emacs is also a billion times more powerful than sublime mid
oh shit really that's sweet
yeah which is part of the reason why it's so fast
people who make jits are the best man
iirc u generally have to compile it urself for that though, so maybe it's not for you
like the Ruby JIT that Shopify made that's like 40% faster than the shitty normal one
or LuaJIT comes to mind as well
not for me? ๐คจ
not jitted for you
lmao no
what version of java can be used with paper 1.12.2? 
8 or above
above means 17 as well?

17 is bigger than 8, yes
ask a silly question...
I think we should go back down in numbers
I know there's a limitation for the max java version that can be used or some shit, or maybe that's spigot
Spigot is the limitation
sometimes paper has a limitation but theres a jvm flag to bypass it
spigot added the limitation in 1.13 because md5 was scared his ugly bytecode modification hack to make plugins work breaks on newer versions of java that the server wasn't made for
paper added a flag to bypass it
then they removed the flag and the check entirely
thank you emily
Thank you ChatGPT.
me doing java homework be like: ๐ค
Nice
lol
now make it bounce and flip
too lazy
- wasn't the homework
xD
and we won't even get that "advanced"
sadly
now make it bounce and flip
now make it bounce and flip
i was joking, im slowly converting everything to do that
good, good
i couldve actually done that and left it there for people to cringe at
is is bad that the last couple times ive worked on my plugin that ive been attempting to improve my code instead of adding new features
or fixing something thats half done
I'm personally a little confused on what exactly fleet is mean to be for tbh
it's like VS Code is to Visual Studio
its both
a lighter, modular, modern editor compared to the big batteries included IDE
Fleet still has an "IDE mode"?
i mean yes and you can technically edit any Visual Studio file in VSC
the point is the age and batteries included
The thing that confuses me is it still has things like autocomplete and refactoring but in my experience they don't work or I'm not understanding them
well it's still in beta and they don't have a ton of language support, but that stuff should still work lol
it uses the same IJ engine in the backend
Maybe I'll have to give it another go some day
The only thing I can really envision using it for atm is scripting in like python if the files are bigger than I wanna tolerate in vim
yeah i mean honestly at this point i just use scratch files in an IJ-based IDE because everything just works
i've noticed VSC sometimes has troubles resolving dependencies or validating things, especially for python and java
but if i just need to view a log file or something, I go VSC
obviously every editor I use has a vim plugin, so i get the best of both worlds ๐
It's been a few years since I've done typical server owner stuff screwing with configs and the like, if I did that I'd probably use fleet more
ah yeah all the server owner stuff I do is through the Pterodactyl panel built in editor lmao
ATM for scripting or config editing I mostly just use vim in ye old terminal
Sometimes if I'm doing a larger thing in python I'll open up pycharm, or if I'm trying something in rust I'll use... Whichever of the IDEs is meant to be it's home because that's not clear
Isn't CLions support also only through plugin
Meaning I'd get the same support in IDEA, CLion, PyCharm or anything else
everything is only through plugin
you can just install every plugin in IntelliJ proper and it'll work the same lol
Hey Mitch! How's life?
Meh, it's life, hbu
It's definitely going
Exactly
I was kinda into fleet for a bit but then it became more of a chore to have it working
I mainly use VSC for anything web related and then Kotlin / Java in IJ
I think I pull out Pycharm once in awhile or CLion
man i dunno VSC just doesn't feel very comfy to me, I use WebStorm for web dev stuff
I tried WebStorm for awhile but I just couldn't get into it
though VSC's remote integration is far superior
I've really gotta sign up for the student developer pack one of these years for the free JB Ultimate
Mhmm
much to my chagrin at work, i basically have to use VSC to work over ssh
I do stuff with Astro lately and their lang dev support only works on VSC
IJ it's a completely different IDE that doesn't have all this stuff, plugins don't work, etc.
quite the pain
https://plugins.jetbrains.com/plugin/20959-astro does this not work?
or do you mean proper like support support
But GitHub doesn't like my student email cus it's in a different flat than usual smh
Hasn't JB made huge strides in that area recently
I've been doing a lot of Svelte stuff lately and the IJ Svelte plugin has been great, dunno about newer stuff like Astro though
You see the release date on that?
๐
That was dropped a few hours ago
not sure how recently, it technically works, but it's far from great and has a lot of problems
They haven't mentioned it in their discord yet
wait seriously lol
I mean I still don't know if I want WebStorm
I feel it's kinda bloated compared to what I need
I'm happy to be proven otherwise though.
awe man I love the "bloat" of IJ IDEs
i feel like VSC is too lightweight and doesn't have all the things I'd want included
language support for python has especially disappointed me recently
Isn't that kinda what fleet is meant to be addressing
Yeah but as Star said we're at least a year out from that
Fair
It has no extension system right now
https://github.com/withastro/language-tools
Yeah Star this is what they have all in VSC
Yea ATM it's a glorified NP++
I had a freaking blast with Astro recently. When I was reverse engineering a game I played I was able to use it to create static endpoints for JSON APIs
Astro is the islands architecture one right? I haven't seen much of it, I've mostly been working on integrating Svelte into my Django website
Also, can someone explain what exactly spring is to me
I've been watching a bunch of videos on it on YT and it feels like it's just this magic tool that somehow does everything you could want it to do with little effort
It's a backend web (mostly) framework for Java that uses lots of configuration and annotations
And I kinda mean that in a bad way
yeah it's a little magicky, lots of annotations and XML files iirc, definitely not my cup of tea
If you're looking for a batteries-included web backend, I would recommend Django personally as it's in python and it has everything I want from a backend framework basically
Yeah island architecture
Spring Boot?
Ye
Oh God there's so much that you can do with it
I wasn't really looking at it to use it per se, just try to expand my knowledge of Java which as we know leaves a bit to be desired
Paper's new plugin repository is built on it. MCBanners V1 architecture is built on it
Uhhh
Yeah for sure
It's great for microservice
MCBanners?
๐คจ
it's quite a heavy batteries-included framework, basically the opposite of what you'd want for microservices
So like I have 5 or so different components in MCBanners
- MC API
- User API
- Banner API
Etc. Basically each project is scoped to its own thing but I can run them all in the same network and they talk back and forth
But honestly I'm not a good person to explain Spring. There's soooo much more you can do with it
From what I've seen, Spring looks like the type of thing you use when you want your application to be 85% dependencies and the rest actual functional code
yeah it's basically the Java enterprise framework for backends
Yeah mainly why V2 architecture is going to be TS
๐
Mitch lol you ain't wrong
honestly I've been looking into Kotlin backends recently
lotta nice stuff, actual static typing, performance benefits, etc. etc.
still haven't really gotten the hang of TypeScript, it feels very tacked on and second-thought (which I guess it is, considering basically everything is JS then they add types later)
Question, does like anybody actually use Apache's dbutils thing
maybe I should look into Astro though, looks very batteries-included in a good way
It seems like it hasn't been used or upgraded since like Java 7 at best
I used Astro lately with Typescript to automate a datamining system for a game that takes in a 40MB JSON file and it extracts and moves all the data around to typed interfaces and it displays them cleanly as needed.
It was honestly a pretty fun project to do
I don't think I've ever used Apaches DBUtils
And after Log4Shell I don't care about Apache much
haha so true
would recommend lots of other database/orm stuff that's not Apache-made
yeah it seems like TypeScript is really good for a prototypal type system like JS where you can define the structure of your data and parse it up that way
iirc that's how we do the ChatChat converters from all the different config files
Dbutils isn't an ORM, I think it's more akin aikars idb project
Yeah for the toolbox?
I need to look at that again sometime since I actually understand it more or less now.
I've been using JDBI but not properly lmao
I'm still very fresh in the web dev world, especially with React, not sure how much I'd be able to do lol
I've been looking at Ktorm / jOOQ recently for that kind of stuff
i dunno, every ORM/database thing I end up using makes me yearn for the Django ORM lol
That describes me with basically any library tbh
I start too many projects and never finish them
built in migrations that are automatically generated and don't require a paid cough flyway cough framework to use
M e
Other question, what exactly is the deal with postgres vs Maria/Trad mysql
postgres is fully open source and free and adds a ton of nice features much quicker than MySQL/Maria, also has a ton of awesome extensions for everything you'd want basically
I don't really understand, it seems like postgres is just the java EE of the SQL world in a way
huh lol
it's like the opposite
MySQL is the old closed license database that everyone knows
Postgres is the fresh up and comer that isn't constrained by an API and is fully free and open source and has lots of really nice extensions
I want to get into Svelte more. I like how it works. I just don't have a good use case for it. I think a lot of that stems from the fact that I don't do design.
So MySQL is eclipse, Maria is Netbeans and postgres is IDEA?
yeah kinda
I like throwing stuff on Cloudflare Pages and having it just work.
Maria is at least preferable to MySQL, so maybe that analogy isn't perfect
Fair ig
it's just constrained by having to be mostly compatible with MySQL and everything
It is excellent, I've been moving a lot more into web stuff and especially frontend to simplify a lot of processes and make engaging user interfaces for a bunch of my minecraft server administration stuff
Got any examples you can share? ๐
figuring out a good way to serve it from Django has been interesting and I wish it were a lot easier and/or natively supported, but it's sweet
Yeah I'm still not sure how I feel about that yet
well I actually haven't finished the part I'm currently rewriting yet lol, but I do have lots of plans for future stuff
Django and I have a love hate relationship
a big one is going to be moving a parliamentary voting system we have that's currently just by # of voices in a discord call to an interactive web based experience that will show the next thing to vote on and let you click to vote there
I'm just not sure how I feel about a robust python backend when I'm seeing what all I can move to be serverless.
which will allow for some amazing things like clarity on what is being voted for and mostly data collection, for instance showing the voting records of each person/group in parliament, that kind of stuff
You know what my biggest qualm with java is?
You can't make it a standalone binary or script for CLI projects
yeah I dunno I think I'm behind the trend with serverless stuff, I just like my little monolith that I host on my own dedicated servers and fully control everything about yk
Hello there did someone mention government and Minecraft in the same conversation??
Me very interested
and basically everything about Django is what I want from a web framework in terms of definitions, ORM, integration with a bunch of stuff, admin page, etc.
I don't even have a dedi of my own lol. I just have multiple VPS spread about
Need money coming in first before I do any upgrading
oh uh, not any real parliament lol, it's a roleplay server where we have in-character governments and parliaments and stuff lol
Yes yes yes, very interested
yeah we have dedis to host the actual Minecraft servers themselves, so it just makes sense to host things on the infrastructure we already pay for
and that also simplifies deployment and everything all at once, plus I'm still getting into this whole sysadmin thing, not sure I'm ready for all this serverless stuff lol
i've found it much easier, as a solo developer, to just have a nice monolith where i can connect things super easily, since i would get basically none of the benefits of microservices considering I still have to maintain all of them anyways lol
and with the stuff I do in Django, it's basically not constrained by how slow python is, it's basically all database queries/external API calls, etc.
Yeah I'm semi moving away from the microservice setup
the problem is, I quite like the microservice setup in theory
it's just the actual implementation has so much annoyance and setup that it's not worth it
like, every new kind of self-sustained app I want to make I'm like "oh i can make this in Go, this in Kotlin, this in Python, etc" but then it comes down to it and it is just so much easier to create a new Django app and have it basically guaranteed to work right away with all the authentication I need, the ORM I want to use, the templating system I love, etc.
Yeah I guess it's just me not using Python a lot as well as having tough experiences with Django
hmu with deets in DMs?
haha if you want lol, I don't really play it much anymore as it's gotten a bit out of hand and the people i wanted to play with stopped playing, but sure lol
i've planning on getting like my own little pi-rack style setup for home so i can do dev stuff (I rarely do anything in actual public production) but with the pi shortages and price increases, eeek
Yeah I was looking to get one too
Oracle ๐
Not paying those prices
I'm working on turning my Surface Pro into a little machine for stuff like that.
yeah i'm happy that i have multiple dedicated servers that i can basically use for all my stuff i want lol
quite a convenient thing to have
Not worth paying more when the VPS I use work fine.
Though I am stressing those machines a bit.
Which reminds me I need to pay my Hetzner bill
Biggest problem with with the Pis is: I don't have a clue how I'd distribute the various things
oh yeah no it's probably not, i just happen to have some available for me to use anyways lol
you can squeeze a lot of performance and utility out of a dedi
Damn they raised my machine price by like $1.50
inflation really hittin everyone hard

Oh more like $2.50
Bruh
Another reason I want to get more stuff serverless. I could drop a machine and save $20 a month
I have this like idea to create basically my own mini home network out of PIs, I'd even have like a remote-to-site VPN built in as well for remote stuff
I doubt it's anything too crazy in the grand scheme of things but it just seems kinda funny
VPN-wise, you can just use WireGuard on basically anything and it'll work
Yeah I was settling up Cloudflare Tunnels for that kind of stuff
I'm planning on using like Ikev2 style VPN stuff, since most devices have native support for it without extra apps
i currently use WireGuard between my PC and my dedis so I can access like databases and stuff, it's amazing, so little setup required and it just works
The one thing I don't really understand about modern sys admin stuff is like how Docker and stuff is actually used
in setups like this
if at all
Yeah our whole home server rack uses Docker
I see its usefulness, but I don't understand it exactly
Through unRAID
you basically just can spin up little processes that contain all the dependencies things need and can rely on others (like databases) super easily
you just make a single yaml file and bam
Yeah I recently finally got it installed and working on this mac for a postgres server to practice with
I use it a lot to spin up Linux images so I can test something and I can have it delete the container on exit
Basically so I don't clutter my machine with useless stuff
ah yeah smart
yeah that's exactly what I intend to use it for
I also run DBs locally for testing
oh yeah it's super nice to have multiple copies of the same database for stuff
And with MCBanners running in Docker I can just docker compute up -d and start up the entire network locally with it's 7 containers or whatever
i have my entire test setup on my local Docker Desktop and I can just click one button and bring to life an LDAP server, a LuckPerms dedicated server, a MySQL DB, a postgres DB, 2 Paper servers, a Velocity proxy, a Redis server, and my website, all in one thing
yeah hell yeah brother, that's the life
Interesting so you run LuckPerms standalone?
I was doing a bit of CTF challenge stuff for a while but I decided to postpone it until I got my Pis because the shit required for it was cluttering my PC up and I wanted to be safe and make sure I still had this computer for uni which I'm starting in the next couple weeks
Oooo are you excited?
I don't really know tbh
currently only for integration via the REST extension into my website moderation panel
I had a blast. I just graduated a little over a month ago.
i use LDAP for general purpose authentication/authorization
I miss it a little bit tbh but I also haven't started my job yet
algo ftw (supports wireguard but does most of the setup automatically)
I have been out of education for like 7 years, and I was unable to finish high school due to medical complications
that + all my other medical problems (adhd, autism and the likes), makes me nervous about my ability to actually operate in academia more than anything
Gotcha. I'm with ya on the ADHD part. I finally learned how to control it and was able to focus on my studies.
My first year in college I think I had a 2.8 GPA. I had a 3.4 almost 3.5 by the time I finished.
I'm in that weird camp where I'm pretty confident I can understand the work and everything, it's doing the actual essays/assignments and stuff that'll be difficult, particularly the writing
Long term plan is:
International Studies; Law; and, if I'm not completely sick of uni, can afford it, and haven't magically self-taught myself the equivalent of the degree by then, probably CompSci as well
I did comp sci engg
comp sci degree should also help with jobs
Law seems interesting
The funny thing is, I'm doing this and realistically the only thing in there that might give me a job (in my circumstances... it's complicated) is the compsci degree
law and international studies is my specific interest, i could sit here for hours talking at you about the British and Australian constitutions, and to a lesser extent the US one; international law, and so on
but i digress
Hell might do a degree in french just for the shits and giggles if i can
I'ma go buy wine for the girlfriend. Bbiab.
ttyl
but yeah my ideal home server stuff would be like:
a remote-to-site VPN
bastion host
probably pihole type stuff
CTF/cybersecurity environment (basically something imitating a virtual machine)
maven repo
maybe CI server
probably internal git
postgres, maria, mongo, redis dbs
MC environment (paper, velocity, etc.)
General screw around linux lab
I'm probably forgetting something
And I have no idea how I'd put all that together
not the maven repo ๐
maven central >
but yeah in terms of applications for that stuff, WireGuard for VPN, Reposilite for Maven repo, Jenkins for CI server, Gitea for internal git, and you've got quite the setup
what is internal git?
just a private git server i'm guessing
Aside from using an IKEv2 VPN (or some other mostly universally natively supported VPN) instead of WireGuard, that's pretty much what I'd be using
The problem is, I'm assuming it'd be logical to use docker in this environment my only problem is aside from the databases, MC servers and general screw around lab area, I'm not entirely sure how the rest would all go together with docker
like Pis are only small, even the most beefy ones, I'd end up needing to distribute everything across them all
I'm not really sure what you mean by (some other mostly universally natively supported VPN), as WireGuard has an adapter for basically every device you can think of and uses modern protocols and stuff to be much faster and better than basically every other VPN setup there is
very easy to setup on any computer basically lol
I mean a VPN that can be used without having to install extra applications
you're basically going to have to install a VPN client for every VPN I can think of
I would highly suggest you look into WireGuard lol, it's built in to the Linux Kernel after all
IKEv2 is one of the ones that has out of the box support on android, mac, windows afaik, linux
Meaning no client needed
but like, does that really matter that much? A one-time easy setup and you get a much better and more cryptographically secure VPN
i mean you still have a client, it's just installed for you
eh we'll see
anyways for Docker, you'd just have a different docker compose file per application is probably the smart way to go
although you get a lot less benefit out of it if you're hosting one thing per computer, as at that point you could just run that thing natively probably a bit easier lol
that's what I'm trying to work out, what the most effective distribution of things would be
Like lumping the DBs and MC servers together each on their own machine (a db machine and an MC machine), to the extent possible, makes perfect sense, they're all alike
But the rest is kinda all... standalone
well I mean that would probably be the worst lol
๐ค
you want to spread out your heaviest applications (minecraft servers)
putting all of them on one and then having 2 little databases that barely consume resources on their own is like, a bad setup lol
hmmm this is true
basically all of the rest of those things use miniscule amounts of resources on their own
you could probably put all of them on one pi
I've had pihole for the longest time but I don't have it at my new house yet
And I also can't change my DNS servers are my router ATM
I'd probably end up putting the maven repo and git together, probably pihole too
Jenkins in its nature is very hefty so would probably need its own no?
I have a Ubiquti router firewall / setup that I need to setup soon and then I can do that
depends on what you're doing on it
but yeah compiling stuff is a bit heavier than just serving web pages and shit lol
the bastion and vpn I'm still thinking on cus I'm also thinking from a security perspective as well as performance
If you did the GitHub Actions route you might be able to use a Cloudflare Tunnel to push artifacts to your maven repo
and if you plan on exposing any of that to the internet, don't forget your reverse proxy!
that's partially what the VPN is for :p
Dropping Jenkins entirely
I also want to migrate my Nexus instance to reposlite but it's not super easy to do so
reposilite ๐
I tried reposilite once, it had some UI bugs on Safari idk if they ever got fixed
well the problem is that you're using safari
It's on v3 now and looks pretty nice
I don't want to install chrome or firefox or anything like that tho
But I would have to have people remake their accounts too
I like using a mac for its minimalism ;-;
Safari is not very minimalist lmao
imo it is
WebKit is heavier than Firefox's
i'm a chrome user through and through
since i got a mac i just like safari
well I hope you're not doing a lot of web dev lol
Got my wine
not really no
Time to relax
take a few sips to pass the time? lmao
well depends on what you classify as web dev ig
but yeah i'm probably looking at like at least 5 pis ๐
Man can dream
if i ever get the motherboard on my old desktop fixed that might make a usable virtualisation PC to cover some of those things
I meant virtualisation for like different ui-based OSes
e.g. my CTF one
Would probably have parrot or kali on that
maybe have a windows VM as well, just for the shits and giggles
#include <stdio.h>
#include <conio.h>
int main(){
char IP;
printf("Enter character: "); scanf("%c", &IP);
int i = (int)IP + 32;
printf("%c", i);
getch();
I wonder why some place they wont accept int(IP)
?
what exactly do you mean
int is not a function
its not javascript or python or other scripting languages lol
oh
so you mean the it both correct to use (<format>)<variable> and <format>(<variable>)
when casting a variable only (format) variable is accepted
||int is not a function, not like Number(data) in javascript||
or even better use static_cast<format>(variable) for data safety
yeah that's a C-style cast for you lol
int is not a function
doing (int) is casting it to that thing
ah ok, so basically the compiler is skipping the latter format ? cause i try both and it work .-. for some reason
the compiler isn't "skipping the latter format"
there's just not a function called int
ok
are you using an online compiler
cuz online compilers arent really true ide
they are basically just textboxs
sometimes they dont perform syntax check when you type the code
they check syntax when you run it
im using the complier from this page https://code.visualstudio.com/docs/cpp/config-mingw
oh nvm its actually a thing
b = int (a); // functional notation
i guess i dont know enough
but this syntax is not preferred tho
and it can at times be confusing too
i guess that why my code worked .-.
oh in C++ yeah that's a whole different thing
I wonder why some place they wont accept int(IP)
as i said this syntax is confusing
so it can collide with some other brackets too
my educated guess will be it has to be in the top level of bracket in order for it to work
C itself not so lol
i think i will use this as u said
yeah i thought the same thing when i saw cpp headers lmao
Has anyone made a bulk open system for crate reloaded? If so, how?
Last time I've tried I had to handle the tags by myself (execute commands, give items, send messages etc.)
@sly sonnet 1 more change and I'll merge :))
done ๐
Approved and merged. I did notice that there's no space between the message and the list but that's something for someone else to fix another time :))
what the f yall talking about
insert yo mama joke here
aww mannn
creeper
I swear, linux never works for me ๐ญ I try to install ubuntu on an old pc and it doesn't want to work!!!!!!
lol
how good oracle cpu is?
difficult to compare against an x86 cpu, it's a different architecture
but 0.5-1x the performance of a modern desktop CPU
but around the performance of a modern xeon or epyc
its pretty fine for small friend servers
and now it is stuck on "rebooting..." after ive cancelled security updates omfg
????
the arm cpus are quite nice
the x86 are not nearly as nice
uh why is this in dev general
you're right it's my fault
How many players can i have with oracle 4 cores 24GB ram
Lobby
Bungeecord
Survival
There's no specific number
somewhere between 0 and 1e5
overall thoughts on minestom?
thats sounds like a could be better but there are no better alternatives lol
no i mean it's good as long as you're not expecting it to be a full server
Api is only 5% gay unlike spigots 90% gayness and papers 80% gayness
Whats so wrong with paper
it builds on the already existing bukkit
like bukkit is plain garbage
paper makes it moderately usable
exactly
^
Papers from scratch apis r 1% gay (well only rly velo cuz they havent done any others afaik)
Hope to make my api a lot better lol
that's not hard ๐
bukkit is like as worse as it can get
I might actually start working with minestom the question is for what now lol, unsure if I want to remake all the plugins, etc I need for my server
The issue with minestom is you won't be making just plugins. You have to make core functionality for the server as well.
Entities, blocks, basic mechanics etc...
arent there already existing minestom implementations
Yes, I am aware of that. Which makes it's quite pog to only have what you need.
I don't need mob spawning for example.
Yeah I get that. But being able to disable features would be better in my opinion.
Only a few I think. (last time I checked was months ago)
Quite disagree.
I prefer to have a server jar that fits exactly my needs without having extra bloated code
Understandable.
that's the point lol
it's not designed to copy vanilla
it's for things like minigames
it's quite ideal for lobbies and limbos
Yup
But can you directly make plugins for it, or you have to write things on the server jar?
yes and yes
its also multithreaded!
which is very nice
void tick()
// ...
new Thread(this::tick).start();
}
True
How did you get my code? Its set as private!
you can make so called extensions
Ryzen 9 5950x - 2 cores, 12GB ram, 70 plugins
1.19
can this server use the max limit, 12GB ram or this cpu with 2 cores cant!
no xd
anyone know a self-hosted maven repo software that supports analytics/statistics? eg seeing the most popular downloads in the past month
Reposilite
Yup
Actually I think it only shows the amount of overall downloads, not per artifact
I am curious about U.S. law and how it applies to minecraft servers. Does anyone know at what point it is legally required/highly recommended to make a company? Is there a profit threshold or a team size limit or something? Is a business/comapny even legally required?
i would imagine technically it's a company as soon as you've made any money from it
that's something you should ask a lawyer really lol
ok, I wasnt sure if it was a simple answer or not
guess whos back to being able to see this channel! this guy :)
when you have a multi check boolean like this, whats the best way to display it for visibility of all checks?
i have no idea what to call it
whats the best way to display it for visibility of all checks?
what on earth does this mean
in the image
i think best way to format
yeah
ah
what you've got isn't terrible ig
intellij autoformat will probably just change the spacing a lil
how do i give mods permission to go into spectator mode using luckperms?
you could use a plugin that allows it with a permission
and then just give them a permission
whats the command to add the permission because i have luckperms
ive tried minecraft.command.gamemode.spectator but that doesnt work
do you have a plugin that allows it to be done through a permission?
do you have essentials?
you could try this permission: essentials.gamemode.spectator
whhat command do i run for that?
thanks it worked!
np
I was talking to a friend who took a CS course on Java with their high school. They were taught to initialize strings using new String("str"). Is that something that is actually used? Why wouldnt they just teach them to use literal strings instead of using the String constructor? They were doing other goofy stuff like using tons of static references instead of instancing, which I thought was really weird and is not practical, since Java itself is OOP. The instructor was also using a super outdated version of Java, with the textbooks from like 2005. Is this something that is common among CS courses?
Unfortunately
Yes
I'm using material that dates as far back as 2012. I've litteraly read in a text "Use windows 8"
Luckly, the informatics sections at highschool in luxembourg are a tiny bit more advanced
I mean, you can literally check the whole school program for java in a website (although it's in french, but you will get to see images, so I guess you can get the idea)
My version: https://jlearn.pages.dev
Old version & Official: http://java.cnpi.lu
over the time span of an entire year, they never even touched maps, which I thought was ridiculous, and they hadn't even talked about lambdas (runnables, consumers, predicates)
interesting, the official version definitely screams early 2000s
wow
Yeah xD, although the things inside it are updated
the program gets updated almost every year with new stuff and adaptations
OFC, it being from the government, it's still outdated a bit
but def. more updated than in some places
I guess they spent their time on Java and not web development
or at least web design
like, sections in luxembourg are weird
but basically
GIN = General Informatics, does java as main, and some webdev
then you have a "Tecnicien" aka below general
where they do mostly webdev
and python
in other words, one does java (harder) and webdev
the others go the easy path
xD
interesting
either way, our program is so advanced apparently, that if we do the 2 years GIN, we can literally sleep the few first semesters at university
(according to my teachers)
Only realized now that download links in my version don't work
Mostly in french but if you scroll a bit down you will probably understand it since it's just java stuff, that's the last year of this section
(for context, we have an extra year here, so you have highschool till 13th grade)
Our school was really weird in their teaching, like, they didnt even teach you compilation basics. They gave you a software that compiled and ran everything for you, so you never learned how to build your project or how to use build tools. The tool also worked extremely different than modern IDEs, and was no where close to competing with software like IntelliJ, let alone Eclipse. I guess they were doing it for simplicity, but if they truly wanted to teach people how to develop, at least teach them how to do it on their own and build their own apps outside of just small things. Their teaching limited the growth of the students cause they didnt know where to go when they wanted to make something that actually did a task. They didnt even know how to make it a runnable file (cause the software provided couldnt)
nice
I do wonder how successfully uni courses are, and if learning on your own is in any way better/faster. I guess the uni courses give more in depth stuff, but I personally get way more out of teaching myself than doing courses online.
yes, was also like that for us in 11th grade (or here, in a 3GIG, AKA engineering, cause you have to do 2 years engineering to go to informatics lol)
they made a modified version of smt blue ide?
same here
it was BlueJ or something for the software
right now, I go to classes just to be there and discuss with the teacher
cause I do the excerices with my eyes closed lol
literally my goal is to have 60/60 (it's graded from 01 to 60 here) in all my tests (in java)
yeah, I am not even sure if I am going to take CS. I think I should grow and expand my skillsets elsewhere.
for the tests you had to write entire programs with a pencil
yes
including imports lol
thankfully
that's quite stupid
eh luckly here they have like a test mode in the PCs
so you can't access internet or whatever
but you have access to the ide
although we use netbeans now
๐ข
its that they didnt trust students to not just look up answers or use the technology to produce a result better than they couldve on their own, which I understand, its just their methods were terrible.
I have heard of NetBeans, but never used it, is it really that bad?
import *
apparently me complaining to my teacher, the director of my school and a responsible for the education in the government wasn't enough
gotta strike
lol
some kids in my english class did that
they didnt like how the teacher was teaching
better than eclipse
but far from my beloved intellij
oh I wanna strike cause Intellij.
so each student did zero homework and answered every question the same on the tests
intellij is amazing
Funnily enough, I also do every Exercice in dark mode
supposedly it will replace every other ide (for the most part) and be a all in one solution
this was the last Exercice that I did
I find the idea of a lightweight editor, that in the click of a button becomes a full fledge development IDE super cool
on holidays now lol
nice
eh we will see
I like the quickness of the light editor, being able to easily edit and configure things, and then when I need it can handle all my development needs
I do think it will take a while before it comes close to replacing IntelliJ or other similar ides
it doesnt even support plugins (as far as I know)
meaning things like GitHub Co-Pilot wont work, which is huge bummer
alright, gn
although
I am on holidays
eh
but welp
should probably sleep anyways
I only slept 14 hours today
gotta sleep more
๐
not sure exactly what that means, but gl
I don't do much sleeping during valentines personally
oh, lol
is there someone occupying the time?
๐
Of course
Partner of 6 years ๐ฅฐ๐ฅฐ
yooo
good for you
I got me myself and I
I also like my money
which tends to disappear rather quickly
I run the BukkitRunnable#wait(millis); method but the repeatable task completely stops. Any ideas?
no n o do not use the wait methods or Thread.sleep
the code will stand there and wait for the amount of time before proceeding, if your code runs on the main server thread, then the whole server will wait too
what are you trying to do exactly?
How will I go about this then? I'm trying to make the period of the repeating task get longer each time but writing something TIME++ doesnt work
It just takes the value the first time it runs and goes with it
yeah you can't dynamically change the period of a task, I suggest you make a separate class for the runnable, and schedule a new one with longer delay, like
// somewhere idk
new MyTask(plugin, 10).runTaskLater(plugin, 10); // initial delay, NOT a repeating task
class MyTask extends BukkitRunnable {
Plugin pl; // initialise in constructor
long delay;
public void run() {
// ... do the things
// make it schedule itself for a later time
new MyTask(this.pl, this.delay * 2).runTaskLater(this.pl, this.delay * 2);
}
}
I found another way!
My boredom led me to another solution
I felt like it was a bit painful to create a new class just to have my Runnable since everything I was running was executing methods of the specific class
So what I did instead was to create a Consumer object and then cancel it and runTaskTimer with different values
When I run an async task does it run on a new thread?
Yes, that's what async means
no, async stands for a synchronous yank not cool
Not necessarily a new thread, but a thread that isnโt the main server thread
which means that thread can also be already in use by something else?
or does it create a new if there are no "available" threads
Does anyone have any threads on how to generate a void world?
This
Iirc it uses thread pool
So it makes threads if all are used
And reuses if not
yes
oh cooll ty for the info
class A {
static int x = 0;
}
class T1 extends Thread {
public void run() {A.x = A.x + 2;}
}
class T2 extends Thread {
public void run() {A.x = A.x * 1;}
}
If I create two objects of these 2 classes and run the start method what are the possible values of x? I've come to the conclusion that its 0 or 2. Can anyone explain to me why? What happens to the threads?
it depends, it might have different values for each of those threads
that's not a great example since multiplication by 1 does nothing
It's a question in my Test
as emily said it could have different values for each thread
I don't get why I got an output of 0
ah, see that's a different question
So, they request the variable at different times?
it could be simply that the main thread still sees the variable as 0
due to caching
cpu cache, that is
So it never got the answer back from the Thread and just printed the line?
not exactly
im not an expert here, but threads all have their own caches for performance (especially if they're cpu threads), so the thread is effectively modifying a different variable until the change propagates
the second thread never got the answer and proccessed 0 thus returning 0 back again until the other had the result?
mutability and multithreading are extremely complex and generally a bad idea because it gets really hard to predict the behaviour
Is what I'm stating right?
Thread 1 got 0 and made it 2 but never sent answer back on time.
Thread 2 got 0 and multiplied it by 1 hence 0.
Thread 1 returned value of 2.
Thread 2 returned value of 0
thread 1 may have just not ran yet
That's certainly one of the many possible situations that can happen
but there are also many others
theres at least 6 different possible execution orders
It's telling the Thread 100 nanosecs. Take it or leave it
also brister I don't think it's possible for java threads to be cpu threads?
sorry i mean platform threads
I mean sure they're eventually ran on cpu threads, but a thread will never represent a cpu thread
os threads
I had such a lesson in Uni a long time ago but I can't remember a thing
they're the same thing afaik
yes
until loom
How did you calculate the 6 outcomes? Is there an equation?
3! lol
Oh okay factorial I see
3 possible threads in any order = 6 combinations
Great got it
kyriakum generally what you want to do in these situations is have a thread dedicated to holding values, any mutation on values is queued onto that thread, but calculations are done in other threads
yeah you want to be avoiding concurrent mutation as much as possible
it almost always ends badly
So in some sense I need to make sure that the main thread agrees with the specific thread I set as the one that holds the values
the main thread doesn't mean anything
if you wanted to you could just say fuck you to the main thread and do absolutely everything in another thread
without volatile, no variable updates are guaranteed to be seen by another thread (i think)
By main thread I refer to the thread it already creates so as to run the main program
so volatile makes sure threads have proccessed the value?
volatile is a bit complex but it makes sure every thread uses the same variable, no funny caching
it makes sure that other threads will see the update (at the cost of performance)
it's not thread safety though, don't get them confused
What do you mean by thread safety?
Are there 'techniques' people use to make sure multithreading is done safely?
which is not an easy task unless you make everything immutable (relieved)
for the record I don't think I've ever used the volatile keyword and I've done a fair bit of multithreading
I had java (OOP) class this semester in UNI
I gave you one before
We learnt absolutely nothing lmao
I mean, I wsa already familiar with the language but there was no "structure lessons" or such
concurrent data structures exist (although these arent perfect, hang on i know a good example), there are locks you can use to prevent concurrent modification, the best way is just to make stuff immutable though
so called "concurrent data structure" in the jdk with a very subtle bug in
Is it bad I haven't been that much into the low level meaning of everything? Like mutability
uh
i wouldnt call mutability low level lol
it's one of the basics of most programming languages (unfortunately)
mutability and immutability aren't words exclusive to programming
I mean, I have a sense of the meaning, and I'm able to recognize whether an object is immutable or not (or so I think)
then no offense but im not sure you're at a point where you should be messing with multithreading in any practical way, it requires a lot of knowledge to make something that won't explode at some point
obviously theres nothing wrong with experimenting
Oh, no, I'm not messing with multithreading, I just have those questions because I want to make sure I pass the test with a good score
ah
only study the course material for your test
programming is full of opinions
our opinions might not align with whoever writes your test
yeah i didnt realise you were asking for a test
It's mostly logical questions. Like the one I cited above. We are given simple blocks of code and we're meant to choose an answer (multiple choice)
ah ok
i dread to think what the question would be
maybe "what isn't a possible outcome"
or hell maybe it'll even ask a question you answered, how many possible outcomes
piggy can I get #papi access back
i bet i was wrong about 6 though
yes
thanks love ya
theres definitely more in the 0.000001% of situations
done
In my case, it had 4 choices and I have to circle which one is the correct outcome: a) {2} b) {0,2} c {1,2} d {0,1,2}
simple as that
I just had no idea about Threads. I skipped that class
Also, a basic question now that we discussed about mutability, if I state that String a = ...; then say a = ...; something else, the memory address changes right?
how could it be 1
idk
I don't think it could
It's b I think. I ran the program many times to make sure. But while sitting the exams I wont be able to run the code. Just figure out
cosmic fucking ray?
yes (but technically it's a reference not an address ๐ค )
yeah the cosmic ray
that'll do it
randomly flips a bit
if I have String a and String b. Then a = b. a has the same reference as b in memory
yep
yes
But for a mutable object, for example, I have its reference to the memory and if I change a field in it, it changes the 'subreference' of the field in the object
that's an odd way of putting it but yeah
Why is a StringBuilder mutable?
the object's reference hasnt changed, just the value behind the reference
uh
for performance
Because Strings are immutable
is the short answer
StringBuilder is like the mutable version of String
But what makes it mutable? What's the difference to a String

