#dev-general

1 messages ยท Page 21 of 1

sly sonnet
#

nvm, did it

#

new pr ๐Ÿ‘€

distant sun
#

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?

quiet sierra
#

updateInventory() will get rid of packet-based items, as it sends a bulk packet containing the entire inventory

#

but just setItem should not interfere

distant sun
#

Should or should not?

quiet sierra
# distant sun 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

distant sun
#

Ah thats great

quiet sierra
#

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

distant sun
#

Thanks for the heads-up

burnt stream
#

Best anti cheat?

#

or are they all shit

agile galleon
#

Vulcan and Grim (free)

burnt stream
#

Does Vulcan justify its price

#

Or is it more worth it to just get grim considering itโ€™s free

agile galleon
#

Vulcan is worth it

distant sun
crude cloud
#

don't minimod smh

distant sun
#

I don't ๐Ÿ™‚

#

I'm am the mod blushudevil

crude cloud
#

i do not care

wind patio
half harness
#

Lol

static zealot
wind patio
#

cuz dont minimod

agile galleon
#

just do middlemod

static zealot
wind patio
#

dont minimod do smallmod

brittle leaf
#

ive got alot of pyramids in my code

#

im fixing this shit as i go

agile galleon
#

oh thats where my shitty Copilot suggestions come from kek

half harness
#

๐Ÿ’€ ๐Ÿ’€ ๐Ÿ’€ ๐Ÿ’€

brittle leaf
#

this project has been worked on on and off since march 2022, still got pyramids to fix

agile galleon
#

yeah that was just a stupid joke from me lol

brittle leaf
#

heh

wind patio
#

I mean

#

isnt it just ALT + ENTER, ENTER with IntelliJ

#

to invert the if

brittle leaf
#

there, pyramids gone

#

lol

distant sun
#

is it really?

brittle leaf
#

i didnt know intellij could automate the task of inverting if statements

half harness
#

IJ can do more things than you think

#

it can also automatically remove duplicated code

prisma wave
#

*only on ultimate

mental trench
distant sun
#

really? lmao

prisma wave
#

dk

mental trench
#

at least duplicated if/switch

prisma wave
#

yeah that's not the same thing

half harness
prisma wave
#

the ultimate duplication is more advanced

mental trench
half harness
#

wait then what does it have in the Refactor tab

wind patio
#

ultimate gang ๐Ÿ˜Ž

half harness
mental trench
#

2022

half harness
#

y u using 2022 ๐Ÿ’€

prisma wave
#

looks like the same?

#

it's not a refactor

#

it's like a warning

distant sun
#

I mean, that's the latest version?

half harness
distant sun
#

2022.3.2 actually, but still 2022

half harness
prisma wave
#

dont care

half harness
prisma wave
#

ofc i cant get it to trigger now

half harness
#

๐Ÿ˜”

#

hehe

wind patio
#

yeah I don't know, the IDE didn't update itself fsr

#

hence 2.3

half harness
prisma wave
#

maybe they changed it to not check on-the-fly

half harness
#

nvm it shows

prisma wave
#

nvm

half harness
#

i think

distant sun
#

anyone remember the group for paper 1.12? smiling_face_with_3_tears

half harness
#

no reason to not have jb toolbox ๐Ÿ˜Œ

wind patio
#

yeah I have it, just cba to open everytime to check for update lol

prisma wave
#

jb toolbox my beloved

prisma wave
#

helpful

half harness
#

im bringing it up

#

gimme a sec

prisma wave
#

hurry up

half harness
#

com.destroystokyo.paper

wind patio
#

seems like there are a couple of updates pending

distant sun
#

yeah that one, thanks

half harness
#
< 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"
wind patio
#

anyways, anyone used JB Fleet yet?

half harness
#

yes

#

i dont use it though

#

i prefer sublime

wind patio
#

notepad++ gang wya

prisma wave
#

jetbrains mid more like

half harness
#

7 seconds to launch fleet

distant sun
#

i've recently started to use VSC

half harness
#

for me

#

vs sublime's 1.5s

wind patio
#

notepad++ => 0

half harness
#

(first launch)

wind patio
#

insta launch

prisma wave
#

emacs

wind patio
#

might even be negative time to launch

prisma wave
#

๐Ÿ˜Œ

distant sun
#

my work colleagues use npp, it makes my cry

wind patio
#

I only use vscode for discordjs lol

prisma wave
#

fleet opens in like a second at most for me

half harness
#

ok this time fleet took 4 seconds

prisma wave
#

although oddly it doesnt open in the foreground

half harness
#

and sublime was pretty much instant

wind patio
#

ok Im downloading it right now just to open it and tell that your pc is slow

half harness
# prisma wave pc bad

i even reinstalled windows (and lost some data due to corruption ๐Ÿ’€) and it's still slow

#

โ˜น๏ธ

prisma wave
#

lmao

#

pc bad

half harness
#

no

wind patio
#

pc diff

prisma wave
#

but also fleet bad

#

no haskell highlighting

half harness
#

yes

prisma wave
#

not impressed

cinder flare
half harness
#

lol

half harness
wind patio
#
if() {
if() {
}
else if() {
}
}
else if() {
}
else {
}
prisma wave
#

16

wind patio
#

what's wrong with that

half harness
#

what os

prisma wave
#

macos

half harness
#

oh

prisma wave
#

shouldn't make that much of a difference

wind patio
#

Mac ๐Ÿคฎ s

prisma wave
#

wrong

#

unfortunately

distant sun
#

does anyone know how to change the contrast of the file explorer on VSC so it is easier to see where it starts from? smiling_face_with_3_tears

half harness
#

linux >

#

i use windows though

prisma wave
#

ironic

half harness
#

because val ๐Ÿคข rant

prisma wave
#

i will install fleet on my pc just to show that it's a skill issue dkim

half harness
#

how much ram does ur pc have

prisma wave
#

16 as wlel

#

but it's old

#

this will either be epic or embarassing

cinder flare
cinder flare
#

bro's 2 layers deep

prisma wave
#

self harm

cinder flare
#

friendly fire

prisma wave
#

๐Ÿ˜ญ

#

okay

#

development

#

maybe it is windows being bad

prisma wave
#

takes about 4 seconds cold start on my pc

#

well of course

#

but

#

that is particularly bad

half harness
#

what

prisma wave
#

?

half harness
#

4 seconds is bad?

prisma wave
#

compared to my laptop and considering its entire point is to be lightweight, sure

#

conclusion: windows and/or dkim's pc = bad

half harness
#

launch fleet ๐Ÿ˜Œ

#

on a file*

prisma wave
#

?

cinder flare
#

more like sublime if you wanna be quick

half harness
#

exactly

prisma wave
#

emacs

#

or vim

cinder flare
#

yeah doom is p fast

prisma wave
#

it is

cinder flare
#

oh my god yeah vim is instant

prisma wave
#

~2 seconds

half harness
#

doom?

prisma wave
#

doom emacs

#

seems like a lot but emacs is also a billion times more powerful than sublime mid

cinder flare
#

oh yeah

#

and it's interpreting elisp dynamically each time lol

prisma wave
#

well

#

to be fair

#

newer versions support native jitting the elisp

cinder flare
#

oh shit really that's sweet

prisma wave
#

yeah which is part of the reason why it's so fast

cinder flare
#

people who make jits are the best man

prisma wave
#

iirc u generally have to compile it urself for that though, so maybe it's not for you

cinder flare
#

like the Ruby JIT that Shopify made that's like 40% faster than the shitty normal one

#

or LuaJIT comes to mind as well

prisma wave
#

not jitted for you

cinder flare
#

oh I see lol

#

i thought you meant i wasn't good enough to compile emacs myself

prisma wave
#

lmao no

distant sun
#

what version of java can be used with paper 1.12.2? thinking3d

cinder flare
#

8 or above

distant sun
#

above means 17 as well?

frail glade
prisma wave
#

17 is bigger than 8, yes

distant sun
#

smh glare

#

smh bm

prisma wave
#

ask a silly question...

frail glade
#

I think we should go back down in numbers

distant sun
#

I know there's a limitation for the max java version that can be used or some shit, or maybe that's spigot

frail glade
#

Spigot is the limitation

half harness
#

sometimes paper has a limitation but theres a jvm flag to bypass it

crude cloud
#

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

distant sun
#

thank you emily

frail glade
#

Thank you ChatGPT.

pastel imp
#

me doing java homework be like: ๐Ÿ’ค

distant sun
#

Nice

agile galleon
#

lol

pastel imp
#

I swear this is boring

#

lmao

#

no flex

crude cloud
#

now make it bounce and flip

pastel imp
#
  • wasn't the homework
#

xD

#

and we won't even get that "advanced"

#

sadly

crude cloud
#

now make it bounce and flip

agile galleon
#

now make it bounce and flip

brittle leaf
cinder flare
#

good, good

brittle leaf
#

i couldve actually done that and left it there for people to cringe at

brittle leaf
#

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

blissful sluice
agile galleon
#

fancy text editor

#

that is like an IDEA

#

idk why somebody would want that

cinder flare
#

it's like VS Code is to Visual Studio

agile galleon
#

its both

cinder flare
#

a lighter, modular, modern editor compared to the big batteries included IDE

agile galleon
#

Fleet still has an "IDE mode"?

cinder flare
#

i mean yes and you can technically edit any Visual Studio file in VSC

#

the point is the age and batteries included

blissful sluice
#

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

cinder flare
#

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

blissful sluice
#

Maybe I'll have to give it another go some day

cinder flare
#

give it a few years lol

#

it's not in a great place rn

blissful sluice
#

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

cinder flare
#

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 ๐Ÿ˜Œ

blissful sluice
#

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

cinder flare
#

ah yeah all the server owner stuff I do is through the Pterodactyl panel built in editor lmao

blissful sluice
#

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

cinder flare
#

CLion lol

#

maybe soon we'll get JetBrains RustBucketโ„ข๏ธ lol

blissful sluice
#

Isn't CLions support also only through plugin

#

Meaning I'd get the same support in IDEA, CLion, PyCharm or anything else

cinder flare
#

everything is only through plugin

#

you can just install every plugin in IntelliJ proper and it'll work the same lol

frail glade
#

Hey Mitch! How's life?

blissful sluice
#

Meh, it's life, hbu

frail glade
#

It's definitely going

blissful sluice
#

Exactly

frail glade
#

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

cinder flare
#

man i dunno VSC just doesn't feel very comfy to me, I use WebStorm for web dev stuff

frail glade
#

I tried WebStorm for awhile but I just couldn't get into it

cinder flare
#

though VSC's remote integration is far superior

blissful sluice
#

I've really gotta sign up for the student developer pack one of these years for the free JB Ultimate

frail glade
#

Mhmm

cinder flare
#

much to my chagrin at work, i basically have to use VSC to work over ssh

frail glade
#

I do stuff with Astro lately and their lang dev support only works on VSC

cinder flare
#

IJ it's a completely different IDE that doesn't have all this stuff, plugins don't work, etc.

#

quite the pain

cinder flare
#

or do you mean proper like support support

blissful sluice
#

But GitHub doesn't like my student email cus it's in a different flat than usual smh

blissful sluice
cinder flare
#

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

frail glade
#

๐Ÿ‘€

#

That was dropped a few hours ago

cinder flare
frail glade
#

They haven't mentioned it in their discord yet

cinder flare
frail glade
#

BUT they said support for IJ would be coming soon

#

Yes

cinder flare
#

oh shit Feb 1st goddamn

#

Glare's life is boutta be a whole lot better lmao

frail glade
#

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.

cinder flare
#

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

blissful sluice
frail glade
#

Yeah but as Star said we're at least a year out from that

blissful sluice
#

Fair

frail glade
#

It has no extension system right now

blissful sluice
#

Yea ATM it's a glorified NP++

frail glade
#

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

cinder flare
blissful sluice
#

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

cinder flare
#

It's a backend web (mostly) framework for Java that uses lots of configuration and annotations

blissful sluice
#

And I kinda mean that in a bad way

cinder flare
#

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

frail glade
#

Yeah island architecture

blissful sluice
#

Ye

frail glade
#

Oh God there's so much that you can do with it

blissful sluice
#

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

frail glade
#

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

blissful sluice
#

MCBanners?

cinder flare
#

๐Ÿคจ

#

it's quite a heavy batteries-included framework, basically the opposite of what you'd want for microservices

frail glade
#

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

blissful sluice
#

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

cinder flare
#

yeah it's basically the Java enterprise framework for backends

frail glade
cinder flare
#

๐Ÿ˜Œ

frail glade
#

Mitch lol you ain't wrong

cinder flare
#

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)

blissful sluice
#

Question, does like anybody actually use Apache's dbutils thing

cinder flare
#

maybe I should look into Astro though, looks very batteries-included in a good way

blissful sluice
#

It seems like it hasn't been used or upgraded since like Java 7 at best

frail glade
#

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

cinder flare
#

haha so true

#

would recommend lots of other database/orm stuff that's not Apache-made

cinder flare
#

iirc that's how we do the ChatChat converters from all the different config files

blissful sluice
#

Dbutils isn't an ORM, I think it's more akin aikars idb project

frail glade
#

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

cinder flare
#

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

blissful sluice
frail glade
#

I start too many projects and never finish them

cinder flare
#

built in migrations that are automatically generated and don't require a paid cough flyway cough framework to use

blissful sluice
#

Other question, what exactly is the deal with postgres vs Maria/Trad mysql

cinder flare
#

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

blissful sluice
#

I don't really understand, it seems like postgres is just the java EE of the SQL world in a way

cinder flare
#

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

frail glade
#

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.

blissful sluice
#

So MySQL is eclipse, Maria is Netbeans and postgres is IDEA?

cinder flare
#

yeah kinda

frail glade
#

I like throwing stuff on Cloudflare Pages and having it just work.

cinder flare
#

Maria is at least preferable to MySQL, so maybe that analogy isn't perfect

blissful sluice
#

Fair ig

cinder flare
#

it's just constrained by having to be mostly compatible with MySQL and everything

cinder flare
frail glade
#

Got any examples you can share? ๐Ÿ‘€

cinder flare
#

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

frail glade
#

Yeah I'm still not sure how I feel about that yet

cinder flare
#

well I actually haven't finished the part I'm currently rewriting yet lol, but I do have lots of plans for future stuff

frail glade
#

Django and I have a love hate relationship

cinder flare
#

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

frail glade
#

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.

cinder flare
#

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

blissful sluice
#

You know what my biggest qualm with java is?
You can't make it a standalone binary or script for CLI projects

cinder flare
#

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

blissful sluice
cinder flare
#

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.

frail glade
#

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

cinder flare
blissful sluice
#

Yes yes yes, very interested

cinder flare
frail glade
#

Very true

#

Each situation is different

cinder flare
#

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.

frail glade
#

Yeah I'm semi moving away from the microservice setup

cinder flare
#

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.

frail glade
#

Yeah I guess it's just me not using Python a lot as well as having tough experiences with Django

cinder flare
#

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

blissful sluice
#

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

frail glade
#

Yeah I was looking to get one too

frail glade
#

Not paying those prices

#

I'm working on turning my Surface Pro into a little machine for stuff like that.

half harness
#

also pi shortages

#

interesting

cinder flare
#

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

frail glade
#

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

blissful sluice
#

Biggest problem with with the Pis is: I don't have a clue how I'd distribute the various things

cinder flare
#

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

frail glade
#

Damn they raised my machine price by like $1.50

cinder flare
#

inflation really hittin everyone hard

remote goblet
frail glade
#

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

blissful sluice
#

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

cinder flare
#

VPN-wise, you can just use WireGuard on basically anything and it'll work

frail glade
#

Yeah I was settling up Cloudflare Tunnels for that kind of stuff

blissful sluice
#

I'm planning on using like Ikev2 style VPN stuff, since most devices have native support for it without extra apps

cinder flare
#

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

frail glade
#

I do uh DataGrip and I do SQL over SSH

#

Or whatever they call it

blissful sluice
#

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

cinder flare
#

awe yeah I fucking love Docker

#

makes setting up any service as easy as pie

frail glade
#

Yeah our whole home server rack uses Docker

blissful sluice
#

I see its usefulness, but I don't understand it exactly

frail glade
#

Through unRAID

cinder flare
#

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

blissful sluice
#

Yeah I recently finally got it installed and working on this mac for a postgres server to practice with

frail glade
#

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

cinder flare
#

ah yeah smart

blissful sluice
frail glade
#

I also run DBs locally for testing

cinder flare
frail glade
#

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

cinder flare
#

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

cinder flare
frail glade
#

Interesting so you run LuckPerms standalone?

blissful sluice
#

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

frail glade
#

Oooo are you excited?

blissful sluice
#

I don't really know tbh

cinder flare
frail glade
#

I had a blast. I just graduated a little over a month ago.

cinder flare
#

i use LDAP for general purpose authentication/authorization

frail glade
#

I miss it a little bit tbh but I also haven't started my job yet

half harness
blissful sluice
# frail glade Oooo are you excited?

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

frail glade
#

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.

blissful sluice
#

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

frail glade
#

I did comp sci engg

half harness
frail glade
#

Law seems interesting

blissful sluice
#

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

blissful sluice
# frail glade Law seems interesting

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

frail glade
#

I'ma go buy wine for the girlfriend. Bbiab.

blissful sluice
#

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

cinder flare
#

not the maven repo ๐Ÿ’€

half harness
#

maven central >

cinder flare
#

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

half harness
#

what is internal git?

cinder flare
#

just a private git server i'm guessing

blissful sluice
#

like Pis are only small, even the most beefy ones, I'd end up needing to distribute everything across them all

cinder flare
#

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

blissful sluice
#

I mean a VPN that can be used without having to install extra applications

cinder flare
#

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

blissful sluice
#

IKEv2 is one of the ones that has out of the box support on android, mac, windows afaik, linux

#

Meaning no client needed

cinder flare
#

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

blissful sluice
#

eh we'll see

cinder flare
#

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

blissful sluice
#

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

cinder flare
#

well I mean that would probably be the worst lol

blissful sluice
cinder flare
#

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

blissful sluice
#

hmmm this is true

cinder flare
#

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

frail glade
#

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

blissful sluice
#

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?

frail glade
#

I have a Ubiquti router firewall / setup that I need to setup soon and then I can do that

cinder flare
#

depends on what you're doing on it

#

but yeah compiling stuff is a bit heavier than just serving web pages and shit lol

blissful sluice
#

the bastion and vpn I'm still thinking on cus I'm also thinking from a security perspective as well as performance

frail glade
#

If you did the GitHub Actions route you might be able to use a Cloudflare Tunnel to push artifacts to your maven repo

cinder flare
#

and if you plan on exposing any of that to the internet, don't forget your reverse proxy!

blissful sluice
frail glade
#

Dropping Jenkins entirely

#

I also want to migrate my Nexus instance to reposlite but it's not super easy to do so

cinder flare
#

reposilite ๐Ÿ˜

blissful sluice
#

I tried reposilite once, it had some UI bugs on Safari idk if they ever got fixed

cinder flare
#

well the problem is that you're using safari

frail glade
#

It's on v3 now and looks pretty nice

blissful sluice
#

I don't want to install chrome or firefox or anything like that tho

frail glade
#

But I would have to have people remake their accounts too

blissful sluice
#

I like using a mac for its minimalism ;-;

cinder flare
#

Safari is not very minimalist lmao

blissful sluice
#

imo it is

cinder flare
#

WebKit is heavier than Firefox's

frail glade
#

I typically use Firefox or Brave

#

On mobile DDG because of device wide ad blocking

cinder flare
#

i'm a chrome user through and through

blissful sluice
#

since i got a mac i just like safari

cinder flare
#

well I hope you're not doing a lot of web dev lol

frail glade
#

Got my wine

blissful sluice
#

not really no

frail glade
#

Time to relax

cinder flare
blissful sluice
#

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

cinder flare
#

no virtualization needed!

#

just install a linux distro and setup docker ๐Ÿ˜Œ

blissful sluice
#

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

real pagoda
#
#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)

prisma wave
#

?

real pagoda
#

if i do int(IP) instead

ruby dew
#

its not javascript or python or other scripting languages lol

real pagoda
#

oh

#

so you mean the it both correct to use (<format>)<variable> and <format>(<variable>)

ruby dew
#

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

cinder flare
#

yeah that's a C-style cast for you lol

#

int is not a function

#

doing (int) is casting it to that thing

real pagoda
#

ah ok, so basically the compiler is skipping the latter format ? cause i try both and it work .-. for some reason

cinder flare
#

the compiler isn't "skipping the latter format"

#

there's just not a function called int

real pagoda
#

ok

ruby dew
real pagoda
ruby dew
#

i guess i dont know enough

#

but this syntax is not preferred tho
and it can at times be confusing too

real pagoda
#

i guess that why my code worked .-.

cinder flare
#

oh in C++ yeah that's a whole different thing

ruby dew
cinder flare
#

C itself not so lol

real pagoda
ruby dew
distant sun
#

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.)

static zealot
#

@sly sonnet 1 more change and I'll merge :))

sly sonnet
static zealot
# sly sonnet 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 :))

agile galleon
#

what the f yall talking about

static zealot
#

insert yo mama joke here

oblique heath
#

creeper

distant sun
#

I swear, linux never works for me ๐Ÿ˜ญ I try to install ubuntu on an old pc and it doesn't want to work!!!!!!

crude cloud
#

lol

obtuse gale
#

how good oracle cpu is?

cursive jolt
#

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

humble prism
#

its pretty fine for small friend servers

distant sun
obtuse gale
#

100 players

humble prism
#

tf

#

ur not gonna get free hosting for 100 players

obtuse gale
#

i will.

#

more oracles

humble prism
#

????

oblique heath
#

the x86 are not nearly as nice

humble prism
#

uh why is this in dev general

obtuse gale
obtuse gale
#

How many players can i have with oracle 4 cores 24GB ram
Lobby
Bungeecord
Survival

pastel imp
#

overall thoughts on minestom?

prisma wave
#

pretty good

#

for what it is

pastel imp
#

thats sounds like a could be better but there are no better alternatives lol

prisma wave
#

no i mean it's good as long as you're not expecting it to be a full server

spring yew
wind patio
#

Whats so wrong with paper

pastel imp
#

good question

#

ยฏ_(ใƒ„)_/ยฏ

crude cloud
#

like bukkit is plain garbage

#

paper makes it moderately usable

distant sun
#

exactly

spring yew
#

Papers from scratch apis r 1% gay (well only rly velo cuz they havent done any others afaik)

inner umbra
#

Hope to make my api a lot better lol

spring yew
#

bukkit is like as worse as it can get

pastel imp
#

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

inner umbra
wind patio
#

arent there already existing minestom implementations

pastel imp
#

I don't need mob spawning for example.

inner umbra
inner umbra
pastel imp
#

I prefer to have a server jar that fits exactly my needs without having extra bloated code

prisma wave
#

it's not designed to copy vanilla

#

it's for things like minigames

crude cloud
#

it's quite ideal for lobbies and limbos

distant sun
#

Yup

#

But can you directly make plugins for it, or you have to write things on the server jar?

crude cloud
#

yes and yes

humble prism
#

which is very nice

crude cloud
#
void tick()
  // ...
  new Thread(this::tick).start();
}
prisma wave
#

True

inner umbra
pastel imp
obtuse gale
#

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!

sly sonnet
#

no xd

prisma wave
#

anyone know a self-hosted maven repo software that supports analytics/statistics? eg seeing the most popular downloads in the past month

agile galleon
#

Reposilite

distant sun
#

Yup

#

Actually I think it only shows the amount of overall downloads, not per artifact

prisma wave
#

yeah it doesn't seem very fine-grained

#

but it'll do

#

better than nexus at least

long dagger
#

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?

prisma wave
#

i would imagine technically it's a company as soon as you've made any money from it

crude cloud
#

that's something you should ask a lawyer really lol

long dagger
#

ok, I wasnt sure if it was a simple answer or not

brittle leaf
#

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?

prisma wave
#

youve missed a lot

#

what?

brittle leaf
#

i have no idea what to call it

prisma wave
#

whats the best way to display it for visibility of all checks?
what on earth does this mean

brittle leaf
#

in the image

brittle leaf
#

yeah

prisma wave
#

ah

#

what you've got isn't terrible ig

#

intellij autoformat will probably just change the spacing a lil

vast moat
#

how do i give mods permission to go into spectator mode using luckperms?

long dagger
#

and then just give them a permission

vast moat
#

ive tried minecraft.command.gamemode.spectator but that doesnt work

long dagger
#

do you have a plugin that allows it to be done through a permission?

#

do you have essentials?

vast moat
#

can i send u a pic in dms

long dagger
#

you could try this permission: essentials.gamemode.spectator

vast moat
#

thanks it worked!

long dagger
#

np

long dagger
#

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?

queen saffron
#

Unfortunately

#

Yes

#

I'm using material that dates as far back as 2012. I've litteraly read in a text "Use windows 8"

pastel imp
#

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)

long dagger
#

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)

long dagger
pastel imp
#

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

long dagger
#

I guess they spent their time on Java and not web development

pastel imp
#

lol

#

well

#

yesish

#

we also have webdev

long dagger
#

or at least web design

pastel imp
#

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

long dagger
#

interesting

pastel imp
#

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

#

(for context, we have an extra year here, so you have highschool till 13th grade)

long dagger
#

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)

long dagger
#

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.

pastel imp
#

they made a modified version of smt blue ide?

long dagger
#

it was BlueJ or something for the software

pastel imp
#

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)

long dagger
#

yeah, I am not even sure if I am going to take CS. I think I should grow and expand my skillsets elsewhere.

long dagger
pastel imp
#

god.

#

no

long dagger
#

yes

pastel imp
#

we use an ide here

#

lol

long dagger
#

including imports lol

pastel imp
#

thankfully

long dagger
#

you had to have literally everything memorized

#

it was so painful

pastel imp
#

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

#

๐Ÿ˜ข

long dagger
#

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.

long dagger
rotund egret
#

import *

pastel imp
#

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

long dagger
long dagger
#

they didnt like how the teacher was teaching

pastel imp
#

but far from my beloved intellij

pastel imp
long dagger
#

so each student did zero homework and answered every question the same on the tests

pastel imp
#

fk netbeans

#

xD

long dagger
pastel imp
#

Funnily enough, I also do every Exercice in dark mode

long dagger
#

if you use light mode, your insane

#

have you seen JetBrain's Fleet?

pastel imp
#

yes.

#

it's quite pog

#

although intellij with fleet's UI is pog af

long dagger
#

supposedly it will replace every other ide (for the most part) and be a all in one solution

pastel imp
#

this was the last Exercice that I did

long dagger
#

I find the idea of a lightweight editor, that in the click of a button becomes a full fledge development IDE super cool

pastel imp
#

on holidays now lol

long dagger
long dagger
#

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

pastel imp
#

yeah

#

welp, gtg sleep

#

kinda 2:30am

long dagger
#

alright, gn

pastel imp
#

although

#

I am on holidays

#

eh

#

but welp

#

should probably sleep anyways

#

I only slept 14 hours today

#

gotta sleep more

#

๐Ÿ’€

long dagger
#

lol

#

only 14 hours

pastel imp
#

yes. only.

#

I am currently on hibernation mode

long dagger
#

ha

#

I am pretty consistant

#

I get like 9-10 hours a day, everyday

pastel imp
#

valentines is coming

#

sooo

#

gotta prepare

#

๐Ÿ’€

long dagger
#

not sure exactly what that means, but gl

pastel imp
#

it means I will sleep the whole valentines day

#

lol

rotund egret
#

I don't do much sleeping during valentines personally

long dagger
long dagger
pastel imp
#

๐Ÿ‘€

rotund egret
#

Of course

pastel imp
#

gets jealous

#

cries

rotund egret
#

Partner of 6 years ๐Ÿฅฐ๐Ÿฅฐ

pastel imp
#

yooo

long dagger
#

good for you

pastel imp
#

that's actually pog

#

not that common nowadays

long dagger
#

I got me myself and I

pastel imp
#

same here

#

although I also have my dreams

#

๐Ÿ˜Ž

long dagger
#

I also like my money

pastel imp
#

๐Ÿ˜‚

#

fair point

long dagger
#

which tends to disappear rather quickly

pastel imp
#

kinda true

#

welp

#

adios and gn

long dagger
#

gn

#

good talking to ya

drifting yoke
#

I run the BukkitRunnable#wait(millis); method but the repeatable task completely stops. Any ideas?

crude cloud
#

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?

drifting yoke
#

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

crude cloud
#

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);
  }
}
drifting yoke
#

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

crude cloud
#

right

#

yeah that'll do too

drifting yoke
#

When I run an async task does it run on a new thread?

distant sun
#

Yes, that's what async means

wind patio
#

no, async stands for a synchronous yank not cool

potent nest
#

Not necessarily a new thread, but a thread that isnโ€™t the main server thread

pastel imp
#

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

drifting yoke
#

Does anyone have any threads on how to generate a void world?

half harness
#

Iirc it uses thread pool

#

So it makes threads if all are used

#

And reuses if not

prisma wave
#

yes

pastel imp
#

oh cooll ty for the info

drifting yoke
#
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?

crude cloud
#

it depends, it might have different values for each of those threads

prisma wave
#

that's not a great example since multiplication by 1 does nothing

drifting yoke
#

It's a question in my Test

prisma wave
#

as emily said it could have different values for each thread

drifting yoke
#

I don't get why I got an output of 0

prisma wave
#

ah, see that's a different question

drifting yoke
#

So, they request the variable at different times?

prisma wave
#

it could be simply that the main thread still sees the variable as 0

#

due to caching

#

cpu cache, that is

drifting yoke
#

So it never got the answer back from the Thread and just printed the line?

prisma wave
#

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

drifting yoke
#

the second thread never got the answer and proccessed 0 thus returning 0 back again until the other had the result?

prisma wave
#

mutability and multithreading are extremely complex and generally a bad idea because it gets really hard to predict the behaviour

drifting yoke
#

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

quiet depot
#

thread 1 may have just not ran yet

crude cloud
#

That's certainly one of the many possible situations that can happen

prisma wave
#

but there are also many others

drifting yoke
#

Oh, so it doesn't wait for a complete outcome

#

It doesn't care

prisma wave
#

theres at least 6 different possible execution orders

drifting yoke
#

It's telling the Thread 100 nanosecs. Take it or leave it

quiet depot
#

no it doesn't wait

#

that's the point

prisma wave
#

^

#

primitive threads dont have any safety mechanisms, they just do stuff

quiet depot
#

also brister I don't think it's possible for java threads to be cpu threads?

prisma wave
#

sorry i mean platform threads

quiet depot
#

I mean sure they're eventually ran on cpu threads, but a thread will never represent a cpu thread

prisma wave
#

os threads

drifting yoke
#

I had such a lesson in Uni a long time ago but I can't remember a thing

prisma wave
#

whatever theyre called

#

yea

#

thats not the jvms responsibility

quiet depot
#

idk how java threads relate to os threads

#

I can't remember

prisma wave
#

they're the same thing afaik

crude cloud
#

yes

prisma wave
#

until loom

drifting yoke
#

How did you calculate the 6 outcomes? Is there an equation?

prisma wave
#

3! lol

drifting yoke
#

Oh okay factorial I see

prisma wave
#

3 possible threads in any order = 6 combinations

drifting yoke
#

But is it like (n+1)!?

#

oh it's also the main thread

prisma wave
#

n is 3

#

yeah

drifting yoke
#

Great got it

quiet depot
#

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

prisma wave
#

yeah you want to be avoiding concurrent mutation as much as possible

#

it almost always ends badly

drifting yoke
#

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

quiet depot
#

the main thread doesn't mean anything

prisma wave
#

the main thread is arbitrary

#

no different to any other thread

quiet depot
#

if you wanted to you could just say fuck you to the main thread and do absolutely everything in another thread

prisma wave
#

without volatile, no variable updates are guaranteed to be seen by another thread (i think)

drifting yoke
#

By main thread I refer to the thread it already creates so as to run the main program

prisma wave
#

yeah still, it doesn't matter

#

there's nothing special about that thread

drifting yoke
#

so volatile makes sure threads have proccessed the value?

crude cloud
#

volatile is a bit complex but it makes sure every thread uses the same variable, no funny caching

prisma wave
#

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

drifting yoke
#

What do you mean by thread safety?

prisma wave
#

things "just working" across multiple threads

#

nothing breaking disastrously

drifting yoke
#

Are there 'techniques' people use to make sure multithreading is done safely?

prisma wave
#

which is not an easy task unless you make everything immutable (relieved)

quiet depot
#

for the record I don't think I've ever used the volatile keyword and I've done a fair bit of multithreading

prisma wave
#

yeah it's more for the low level stuff

#

you shouldnt need it most of the time

drifting yoke
#

I had java (OOP) class this semester in UNI

drifting yoke
#

We learnt absolutely nothing lmao

#

I mean, I wsa already familiar with the language but there was no "structure lessons" or such

prisma wave
#

so called "concurrent data structure" in the jdk with a very subtle bug in

drifting yoke
#

Is it bad I haven't been that much into the low level meaning of everything? Like mutability

prisma wave
#

uh

#

i wouldnt call mutability low level lol

#

it's one of the basics of most programming languages (unfortunately)

quiet depot
#

mutability and immutability aren't words exclusive to programming

drifting yoke
#

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)

prisma wave
#

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

drifting yoke
#

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

prisma wave
#

ah

quiet depot
#

only study the course material for your test

#

programming is full of opinions

#

our opinions might not align with whoever writes your test

prisma wave
#

yeah i didnt realise you were asking for a test

drifting yoke
#

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)

quiet depot
#

ah ok

prisma wave
#

i dread to think what the question would be

quiet depot
#

maybe "what isn't a possible outcome"

#

or hell maybe it'll even ask a question you answered, how many possible outcomes

crude cloud
#

piggy can I get #papi access back

prisma wave
#

i bet i was wrong about 6 though

quiet depot
#

yes

crude cloud
#

thanks love ya

prisma wave
#

theres definitely more in the 0.000001% of situations

quiet depot
drifting yoke
#

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

prisma wave
#

hm

#

i reckon it could somehow end up being 1

#

with sufficient level of fuckery

drifting yoke
#

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?

quiet depot
#

how could it be 1

prisma wave
#

idk

crude cloud
#

I don't think it could

drifting yoke
#

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

quiet depot
#

cosmic fucking ray?

prisma wave
#

yeah the cosmic ray

#

that'll do it

#

randomly flips a bit

drifting yoke
#

if I have String a and String b. Then a = b. a has the same reference as b in memory

crude cloud
#

yep

prisma wave
#

yes

drifting yoke
#

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

prisma wave
#

that's an odd way of putting it but yeah

drifting yoke
#

Why is a StringBuilder mutable?

prisma wave
#

the object's reference hasnt changed, just the value behind the reference

#

uh

#

for performance

crude cloud
#

Because Strings are immutable

prisma wave
#

is the short answer

crude cloud
#

StringBuilder is like the mutable version of String

drifting yoke
#

But what makes it mutable? What's the difference to a String