#dev-general

1 messages Β· Page 333 of 1

static zealot
#

can't seem to find any emergency console

#

or anything

stuck harbor
#

well uh

#

when's ur latest working backup?

static zealot
#

ugh I've never made a backup

stuck harbor
#

welp

static zealot
stuck harbor
#

boot into rescue mode may work

#

may

static zealot
#

fucking hell

#

please kill me

#

thanks

stuck harbor
#

when u get into rescue mode, enable password ssh then get the heck outta there

#

using that too much is not reccomended

#

so be careful with ur ssh keys now

static zealot
#

oh I guess

#

Ubuntu

#

how do I activate the password?

prisma wave
#

if there's anything about VNC you could try that too

stuck harbor
#

the VNC recovery console is what I recommended at first

static zealot
#

there isn't anything about that

stuck harbor
#

also, get to the sshd_config

static zealot
stuck harbor
#

somehow

static zealot
#

ssh: connect to host --- port 22: Connection timed out

#

HELL yeah 😒

stuck harbor
#

can u access the sshd_config?

static zealot
#

where's that suppose to be?

stuck harbor
#

well

#

depends

#

ur in a rescue image so idk how u would get into the main drive

static zealot
#

well I can't get in rescue image

stuck harbor
#

ah

static zealot
#

it times out

#

😦

stuck harbor
#

well how bad would it be to factory reset?

static zealot
#

ugh

#

yeah

#

that's the problem

#

is the dedi with my running server on it

stuck harbor
#

and u haven't done any backups?

static zealot
#

it times me out now even if I don't boot in rescue mode

stuck harbor
#

sadge

static zealot
#

oh the server might not even be on

stuck harbor
#

m8

#

u fuckin

static zealot
#

that's why it might time out

stuck harbor
#

yes

#

yes it would

static zealot
#

I think it might just not want to boot in rescue mode

#

because I booted it normally and it did

stuck harbor
#

sadge

static zealot
#

oh I'm in rescue mode

#

fuck

#

how do I enable password now

stuck harbor
#

uhh

#

search ur system for sshd_config

static zealot
#

I did sudo ssh sshd_config and now it requires password for ubuntu. Is that it?

stuck harbor
#

do a find / -type f -iname "sshd_config*" iirc

#

or that yeah

static zealot
#

sudo bcz someone said I need to go in as root

#

ah couldn't find it

#

will try find

stuck harbor
#

since everything in linux is under /, if the file is on a mounted drive, u can find it

static zealot
#

/etc/ssh/sshd_config

#

is that it?

#

well it found multiple

#
/etc/ssh/sshd_config
/lib/live/mount/rootfs/img.current.squashfs/etc/ssh/sshd_config
/lib/live/mount/rootfs/img.current.squashfs/usr/share/openssh/sshd_config
/usr/share/openssh/sshd_config
stuck harbor
#

the etc one is right iirc

half harness
#

Is it possible to somehow "sync" two machines?
Basically I'm trying to run a minecraft server on two machines, but they're both updated if one of them changes (basically if one of the machines change a file, it updates on machine #2)
One of the reasons I want this is because of a horrible uptime

prisma wave
#

git

static zealot
#

yeah but how do I get there? Its not cd like in cmd

stuck harbor
#

waterfall dkim

static zealot
#

I use git bash

#

btw

half harness
static zealot
#

but idk if that changes it

half harness
#

thats a proxy

stuck harbor
#

what the

prisma wave
#

They're files

#

And you can use cd?

half harness
stuck harbor
#

sudo nano /etc/ssh/sshd_config

prisma wave
#

sudo vim

stuck harbor
#

man doesnt know cd, cant use vim bm

half harness
#

how do I do it?

static zealot
#

oh yeah

#

it opened the file

half harness
static zealot
#

do I disable #PubkeyAutentification ?

prisma wave
#

as long as they don't need to update in real time just commit and push on machine1, then pull on the other

stuck harbor
#

no blitz

half harness
stuck harbor
#

that's already commented out lol

half harness
#

like, if I made a batch file, what would I put in there? (i dont know any cli cmds)

prisma wave
#

huh?

#

To do what

half harness
#

push

#

and pull

#

wait

#

does batch even support git

#

cmd prompt*

static zealot
#

the only thing that's not commented out is ListenAddres 0.0.0.0

prisma wave
#

if you have git installed yes

#

I think

static zealot
#

oh nvm

#

its more to this file

prisma wave
#

Just use a shell script tho

#

For git bash

half harness
#

i have git bash

stuck harbor
#

blitz CTRL+W and type Password and press enter

half harness
#

but i just want it like this:
double click = push
double click = pull

prisma wave
#

Although in retrospect this might not be the best idea

stuck harbor
#

git bash eww just use linux

prisma wave
#

Not really what git is designed for

stuck harbor
#

torvalds does not approve

half harness
prisma wave
#

Any reason you can't just host the server / files somewhere else?

static zealot
#

this is not commented UsePAM yes and this is commented ```

To disable tunneled clear text passwords, change to no here!

#PasswordAuthentication yes
#PermitEmptyPasswords no

prisma wave
#

Like on a VPS or something

stuck harbor
#

uncomment PasswordAuthentication yes

static zealot
#

and I just save and exit?

stuck harbor
#

but it should already permit password access if it is commented out

#

and yeah blitz

half harness
ocean quartz
#

God, it's so hard to not repeat code when working with different platforms >.<

static zealot
#

my authorized_keys was empty... I must have pressed a wrong button to save

#

lmao

prisma wave
#

Why do you need to sync them in the first place?

#

What's the context

stuck harbor
#

oh shit blitz

#

ur in recovery iso right?

static zealot
#

yeah

stuck harbor
#

u might be changing the recovery drive's ssh config instead derp

#

hold on

half harness
#

i can host files on my rpi, but wouldn't I still have to push/pull?

#

bmmmm

#

are you there

#

😒

static zealot
#

that makes a lot of sense iwanio xD

prisma wave
#

Ofc

stuck harbor
#

try sudo nano /lib/live/mount/rootfs/img.current.squashfs/etc/ssh/sshd_config

half harness
#

or how to do it with git

prisma wave
#

Need the full context

half harness
#

but

prisma wave
#

I don't think git is the right way of doing this

half harness
#

i've said everything

static zealot
#
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
#

its commented

stuck harbor
#

huuh

#

thats

#

odd

prisma wave
#

You have a mc server and you want the files synced, why not just host the server in somewhere 3rd party so you don't need to sync at all?

stuck harbor
#

well uncomment it then blitz

#

and boot back into normal

half harness
#

its private server

prisma wave
#

ik

static zealot
#

can't iwan ```
[ Error writing /lib/live/mount/rootfs/img.current.squashfs/etc/ssh/sshd_config: Read-only file system ]

prisma wave
#

so is there any reason you can't just host on the pi?

half harness
#

i dont want to pay for a vps/minecraft server just for this

half harness
#

i think

#

i forgot what model it is though

#

B something

prisma wave
#

Hmmm

stuck harbor
#

this is the limit of my sysadmin knowledge

#

normally i would just be able to vnc in and change the password

#

blitz i would really recommend switching hosts to one with that functionality

#

digital ocean, linode, and hostus (the ?best-vps-deal one) all have vnc/emergency ssh access in my experience

static zealot
#

ye this is a dedi not a vps

stuck harbor
#

welp

#

oofs to oof

#

stonks

#

im using the ?best-vps-deal and its pretty good

prisma wave
#

Dkim I would recommend you just use the pi as file storage, make a little script to SFTP in and copy the files, then run the server, and once you're done upload the new files

half harness
#

thanks! πŸ™‚

#

but why not use git?

prisma wave
#

well the main drawback of git is that you need a commit message for each change

half harness
#

oh lol

prisma wave
#

And the entire model of git doesn't really make sense here

#

You don't need to merge commits, you probably won't need to revert, and most of the files will be binaries so diffs and things don't even make sense

half harness
#

true

#

alr

#

πŸ™‚

#

bm 😍

prisma wave
static zealot
#

yo @stuck harbor do you know how to generate pub key from private key?

stuck harbor
#

wh

static zealot
#

wait actually I can just google that ...

stuck harbor
#

man

#

i may be good at basic sysadmin, but i dont really understand diffie hellmann

#

well i kinda do

#

but i forgot

static zealot
#

I'll try and contact the providers see if they might be able to help. I've literally tried everything.

#

I mean the good thing is I can backup everything from ptero. Just those databases that I made with ptero idk if I actually can

#

oh nvm now I can't even start my bungee. all my backends work tho xD

half harness
#

do you say "kott-lin" or "kote-lin"?

#

πŸ˜‚

static zealot
#

ah :25565 failed: port is already allocated

half harness
#

oooooooooof

prisma wave
half harness
#

what

#

what is the latter

#

oh

obtuse gale
#

latter = the last one

half harness
#

lol

#

uh

#

πŸ’€

obtuse gale
#

isn't English your first language..?

half harness
#

yes

#

xD

stuck harbor
#

jesus

#

ovh

#

why do you do this to yourself

static zealot
#

I don't even know how you should pronounce any of those: Kott-lin or kote-lin I just pronounce it how I think it should be without ever hearing anyone pronounce it.

stuck harbor
#

if ya want a dedi, build it urself

#

man i would do that 100%

#

high setup cost, low maintenance cost if u build an efficient one

#

so noctua fans and shit

static zealot
#

and it will probably be easy to upgrade

stuck harbor
#

mhm

#

and and

#

u get low ping

static zealot
#

xD

#

everyone gets high ping tho

stuck harbor
#

meh

static zealot
#

if your internet connection is bad

stuck harbor
#

well yes

#

so get good internet

#

u could rent out rack space somewhere else and keep ur server there

#

but that has a fair few problems

static zealot
#

I mean when you put in the price for good internet/mo, electricty/mo and some other shit you gotta maintain idk if its like a lot lot better

stuck harbor
#

meh i like having full control

static zealot
#

it will probably take quite a while for it to become profitable because of the first big payment

stuck harbor
#

yeah, it would be an investment

static zealot
#

ye my brother wanted to buy and make a dedi as well but he was going to keep it in my room ... xD

stuck harbor
#

lol

#

fuck no to that

#

servers are not regular pc

#

industrial fans are pieces of shit

static zealot
#

I was like if you pay me rent for another apartment then yah

stuck harbor
#

just build ur own server room

ocean quartz
#

@obtuse gale Uh what formatted rainbow components do you need?

obtuse gale
#

any, idk

#

something that looks nice

#

just throw me the json lol

ocean quartz
#

Does it accept adventure component?

obtuse gale
#

Not quite, but I can just serialize to json and then transform to an IChatBaseComponent

ocean quartz
#

Aight let me get you a phat json

obtuse gale
#

I was just about to send this :joystroke:

ocean quartz
#

Or if you want to do it yourself xD

val component = AdventureMessage.create().parse("<r:.75>*Rainbow **component** __on__ command ~~suggestion~~!*")
val json = GsonComponentSerializer.gson().serialize(component)
obtuse gale
#

amazing

oak raft
obtuse gale
#

because your mum likes it like that

oak raft
#

don't hurt my feelings like that ☹️

#

that was too far 😒

dawn hinge
#

Yeah, too far

sweet cipher
#

I don't know if this is what you mean, but if you have classes for each object, you can just store the name/level (if they have it) of each object, then on events, get the object, get the player stats, and apply them. Also, if you ever change your classes in the future and you serialize with bytes, you won't be able to deserialize it, which could cause problems.

ocean quartz
#

@obtuse gale You might need to show me an example of that, i'll add that to my command framework ;p

distant sun
#

item.durability.takeIf { it > 0 }.run { section["data"] = this }
Is this a bit too extra? xD

if (item.durability > 0) {
    section["data"] = item.durability
}```
prisma wave
#

don't you need ?.run?

#

that's gonna do something different otherwise

reef maple
#

Hm. At the moment, on hits / shoots etc, My plugin check if the player main item have the nbtdata "feItemID", like this I know it can be used by my plugin, instead of storing it in list.

distant sun
#

true bm

reef maple
#

At least, my system works for now (I posted some videos of it), but maybe i'll improve it in the future with the best ways in mind. I take note of what you guys told me OxO

obtuse gale
#

@ocean quartz @desert horizon There are two ways to my knowledge:

One with ProtocolLib (probably easiest... to some extent, you still need to do some reflection), the TAB_COMPLETE packet has this (brigadier) Suggestions field, each Suggestion has a text (what's being suggested) and a (brigadier) Message tooltip; now IChatBaseComponent extends Message so if you get your hands on an NMS component you can replace the Suggestion Message tooltip with it and the packet will send it as tooltip, otherwise as the contents of a regular text component (un-formatted, white) (if it's null it won't suggest anything)

If you're on paper 1.16+ there's this "mojangapi".. api that exposes some nice things about command suggestions sent to the client (e.g. like how LP shows fancy colored commands while you're typing but in a safe manner) and you can change the Suggestions in a AsyncPlayerSendSuggestionsEvent (it has a get/setSuggestions method) so you can modify those directly quite easily

You still need to get an IChatBaseComponent (IChatBaseComponent.ChatSerializer#jsonToComponent(String)) but that's the easy part

I reckon the "hardest" or at least most complex part is some sort of system/map to store what's being suggested to a certain player, what the suggested text is and what the tooltip should be

This sounds a bit convoluted (definitely doesn't sound friendly) but it's actually quite easy in both cases

#

I can probably pull off a basic example for both cases

#

Also the fact that I use brigadier as my preferred command framework kinda has its advantage because it already generates this Suggestions, so I can just use that and set those instead, no "sort of system/map to store what's being suggested to a certain player, what the suggested text is and what the tooltip should be" xD

forest pecan
#

yo

#

can you write my essay for me

#

much apreciated πŸ˜„

obtuse gale
#

well you see

#

I can

#

but will I?

forest pecan
#

||Free blowjob||

obtuse gale
#

AHAHAH

ocean quartz
#

Interesting, that'll be fun

forest pecan
#

what will be fun

lavish notch
#

Ignore the whole theme situation but does anyone know why these errors come up after a couple of minutes on phpmyadmin?

#

^ restarting the database fixes it, but then the same issues occurs after a few minutes

static zealot
#

idk I've said this before but I really feel like #816184744797929522 is getting some nice-ish offers. I know they're still not what a good developer would get but they're slowly improving. maybe in few more months it will actually be a nice place xD

ocean quartz
#

crypto currency casino
Ain't getting involved with that one, sounds like very complicated shit

oak coyote
#

I’ve met some great clients/people from this server it’s a nice place

static zealot
#

man docker is a whole thing.

forest pecan
#

people actually write google documents

#

about their request

oak coyote
#

It’s sexy

#

NGL

forest pecan
#

ikr

oak coyote
#

My development community everyone is overloaded with requests rn

#

It’s mental

forest pecan
#

let me guess what the next message is going to be

obtuse gale
#

guess

#

there, ruined your guess :kekw:

forest pecan
#

fu

#

lmao

obtuse gale
#

oh Lord

ocean quartz
#

I must kill all of them
And thank you ;p

oak raft
hot hull
jovial warren
#

πŸ‘€

hot hull
#

yes

jovial warren
#

maybe it's time to report that

#

unless Spotify's bug reporting system is closed to specific users

jovial warren
#

It's funny, but I don't get it

unkempt tangle
#

Users bypass all intended routines

jovial warren
#

ah yeah I get it now haha

hot hull
#

So I'm making a bedwars ploogin (latest version ofc), and I legit can't figure out where the best place to start would be, anyone got suggestions

half harness
half harness
#

and you can also make like a "Game" class or smth

#

that is also serializable

#

πŸ™‚

#

and you can put like the bed locations, the gens, etc

hot hull
#

.toml for configs or yml

steel heart
#

yml

hot hull
#

fair enough

#

I wanted to play around with having dynamic maps

#

As in you specify components and it randomly selects them, as in island designs, etc

half harness
#

thonking interesting

hot hull
#

ikr, not sure how well it would work, but cool idea non the less

half harness
#

the thing with bedwars maps

#

is that it doesn't really have "components"

#

you can count the mid and stuff, but... it'd look kinda weird if mid was a forest and the islands were deserts

hot hull
#

No I mean as in different iterations of the style

#

Since size is also a factor so it has to be the same for all

jovial warren
#

Krypton TOML config update now released pog

#

a.k.a Krypton 0.9

errant geyser
#

Krypton 1.0 wen

half harness
#

soonℒ️

jovial warren
#

1.0 is quite far away atm

half harness
#

mc 1.17 should just be mc 2.0 since its so different

obtuse gale
#

Will the Krypton API support hoverable cmd suggestions? πŸ‘€

errant geyser
#

Will the Krypton API not suck

obtuse gale
#

I mean it's part of the protocol so that's a yes

jovial warren
#

and when I say everything, I mean literally everything

#

it'll use Adventure for chat stuff and Brigadier for commands

obtuse gale
#

Brigadier Kotlin DSL tho

jovial warren
#

you know I made one right?

obtuse gale
#

Cuz that shit's the most Java builder pattern ever lol

old wyvern
#

Can we change dig speed per block without having to delve into too much?

jovial warren
obtuse gale
#

Amazing

jovial warren
#

named after lucko's commodore

jovial warren
#

suggest it and sure

old wyvern
#

There you go, suggested πŸ‘

jovial warren
#

lol

forest pecan
#

why did i get two pings from here

jovial warren
#

Β―_(ツ)_/Β―

forest pecan
half harness
forest pecan
#

ik lol

#

someone ghost pinged

jovial warren
#

also, if you want to help make the API good, feel free to contribute to it when I start on it's development

forest pecan
#

I'm going to make my tests kotlin and my main code java cause it is easier to write test cases reversed_fingerguns

jovial warren
#

yeah testing in Kotlin is 100x better because of backticks

half harness
#

what are unit tests for

jovial warren
half harness
#

but cant u just run the program

#

to test

forest pecan
#

smh

steel heart
#

bruh

forest pecan
#

you dont understand

#

lmao

jovial warren
#

yes, but unit tests are a way to automate testing

forest pecan
#

you realize when you got a giant ass library

half harness
#

how do u test plugins

forest pecan
#

you dont test the whole thing

steel heart
#

mockbukkit

forest pecan
#

my library is also operating system specific

steel heart
#

Β¨:]

jovial warren
#

they allow you to just run a bunch of tests all at once without having to worry about manually testing every time

half harness
#

how do tests work?

prisma wave
forest pecan
#

well gradle and maven has this testing phase

#

where it just runs tests

jovial warren
#

no such thing as a stupid question I guess, just a stupid idiot asking the question

forest pecan
#

dkim lol

steel heart
prisma wave
#

static bad

forest pecan
#

wHy NoT jUsT rUn tHe PlUgIn

jovial warren
#

DI >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> singleton

prisma wave
#

you know what's really easy to unit test?

obtuse gale
prisma wave
#

A pure function

steel heart
#

how predictable

old wyvern
#

πŸ™‚

prisma wave
#

God

prisma wave
#

Android API is awful

half harness
#

how do i make my plugin plugman compatible

forest pecan
#

just dont

#

lmao

old wyvern
#

It has cornered me to a singleton mutable state

jovial warren
half harness
#

...

jovial warren
#

no

forest pecan
#

no

jovial warren
half harness
#

there's a reason-

forest pecan
#

theres never a reason

#

why do you work for shitty server owners

#

lmao

jovial warren
#

plugman is a hack that shouldn't exist

old wyvern
#

behold!

object XMPPConnectionRepository {
    var connection: ProxiedXMPPConnection? = null
        private set
    var chatManager: ChatManager? = null
        private set

    suspend fun prepareConnection(context: Context) {
        connection?.disconnect()
        val credentials = context.fetchCredentials()
        connection = context.createXMPPConnection(credentials)
    }
}
obtuse gale
steel heart
#

plugman is awesome

obtuse gale
#

They suck but eh

prisma wave
steel heart
#

its like hotswap

old wyvern
#

sadly

obtuse gale
#

Tru

old wyvern
#

That objects lifecycle is managed by smack

#

nothing much I can do other than this

old wyvern
#

Tried other way and it was a complete disaster

jovial warren
#

just leave

#

you are no longer welcome here

forest pecan
#

expelled

steel heart
#

i dont make da fax

obtuse gale
#

I've had issues with static instances in Android tho

old wyvern
old wyvern
obtuse gale
#

Like they just straight up become null

#

Out of the blue

old wyvern
#

But it should be fine for me, I can always just reconnect

jovial warren
#

what's Flutter like for design?

old wyvern
#

Google like to torture people

#

And other companies make it worse by making the battery manager even strict

jovial warren
#

wait Android just kills apps with no warning?

old wyvern
#

On OnePlus it seems to kill even sticky services

old wyvern
#

BeCaUsE RaM

jovial warren
#

like there's no "here's a method that we'll call to let you know we're shutting you down"

old wyvern
#

But

#

nothing much you can do

#

Unless you're only working with pure data

#

which you can save and restore

jovial warren
#

pure data?

old wyvern
#

as in just data

jovial warren
#

ah

old wyvern
#

not connections and stuff

half harness
#

intellij debug feature doesn't work most of the times

obtuse gale
#

Not even in the background, like while using it, static objects in other activity classes just get GCed with no rhyme or reason

jovial warren
#

I mean, most pools and stuff seem to auto-close when the program is shut down

#

I think Hikari closes all of its connections when it's shut down

#

and I would imagine ExecutorService and its derivatives do as well

old wyvern
#

That hasnt happened to me yet

jovial warren
#

oh btw, anyone wanna test out Krypton 0.9 for me?

old wyvern
#

But considering the diff brands just do whatever they want, might be local to some device

jovial warren
#

just want some feedback on how it runs in different environments

old wyvern
#

I had a hard time in the last project making it work across all devices

obtuse gale
#

Well in all fairness it was when I designed everything in a shitty manner bc I didn't know any better lmao but still

#

It drove me nuts

jovial warren
#

also, did I mention I added support for IO Uring btw?

#

so on Linux 5.1+ iirc, it'll now run even faster

old wyvern
obtuse gale
#

One of those "but how do I share objects between classes..." and static is there waiting for you xD

old wyvern
#

πŸ₯²

surreal quarry
#

AntiStatic jetbrains plugin when

obtuse gale
#

Ah yes

old wyvern
#

Kotlin has an amazing plugin for viewbinding

jovial warren
#

Linux 5.12, my bad

old wyvern
#

Trims like 10-20 lines of fetching views

jovial warren
#

actually no, it is Linux 5.1

half harness
#

when used correctly

old wyvern
#

Add this, sit back, and relax

prisma wave
half harness
#

what is FP?

#

oh

jovial warren
#

functional programming

#

lol

surreal quarry
#

functional programming

#

lol

jovial warren
#

depends

prisma wave
#

y

jovial warren
#

OOP is good for data imo

surreal quarry
#

dkim has offended bm

prisma wave
surreal quarry
#

lmao he deleted his message so fast

half harness
#

how do you create Locations in FP?

jovial warren
#

like better for holding and representing data in memory

prisma wave
#

why is it better?

prisma wave
#

Depends on the language?

jovial warren
#

and FP is better for fast and easy functional tasks

half harness
#

but u can't create instances in FP... right?

#

im confused

prisma wave
#

you don't have objects

half harness
#

ye

#

so

jovial warren
#

functional programming generally doesn't have the concept of objects

prisma wave
#

But you have structs, records or similar things usually

jovial warren
#

these can hold data quite well

old wyvern
prisma wave
#

^

jovial warren
#

yeah true

prisma wave
#

They both do it in pretty much the same way

half harness
#

i still prefer oop and instances and objects

jovial warren
#

I think both paradigims have their uses tbh

surreal quarry
#

dkim you've never used functional you can't really say that

prisma wave
jovial warren
surreal quarry
#

you can say you like OOP

#

but you can't make any claim about FP

jovial warren
#

also, the only OOP you know is Java

prisma wave
surreal quarry
#

true

prisma wave
#

Because it's usually based on wrong information

steel heart
#

mutability

#

:D

old wyvern
#

ErLang!!!!

steel heart
#

no thread safety is pog

prisma wave
#

Erlang is the COBOL of FP

old wyvern
#

xD

half harness
#

how do i make thread-safe lists in kotlin?

old wyvern
#

Actually its not that bad bm

steel heart
#

immutablelistOf

#

ot rmsnt

old wyvern
#

It still works for what its for

half harness
#

a mutable list*

prisma wave
old wyvern
#

It might not be useful in general use tho

half harness
#

i need a mutable list

steel heart
#

Collections.synchronizedList

prisma wave
steel heart
#

or CopyOnWriteArrayList

half harness
#

d;Collections#synchronizedList

ruby craterBOT
#
public static <T> List<T> synchronizedList(ListΒ list)```
Description:

Returns a synchronized (thread-safe) list backed by the specified list. In order to guarantee serial access, it is critical that all access to the backing list is accomplished through the returned list.

It is imperative that the user manually synchronize on the returned list when traversing it via Iterator, Spliterator or Stream:
Failure to follow this advice may result in non-deterministic behavior.

The returned list will be serializable if the specified list is serializable.

Parameters:

list - the list to be "wrapped" in a synchronized list.

Returns:

a synchronized view of the specified list.

jovial warren
#

mutableListOf

#

ez?

old wyvern
half harness
#

ooooo

old wyvern
#

one sec\

prisma wave
old wyvern
#

lemme find the link xD

half harness
old wyvern
jovial warren
#

lol

prisma wave
steel heart
#

2 weeks

half harness
prisma wave
half harness
#

why does :rolling go to 🀣

static zealot
#

πŸ™„

surreal quarry
#

rolling on the floor laughing

half harness
#

oh

old wyvern
#

btw ErLangs pattern matching is kinda cool

#

= is not assignment or declaration

prisma wave
#

pattern matching

old wyvern
#

its pattern matching

surreal quarry
#

what

old wyvern
#
a = b

fails if a is not b, if a is unbound, a becomes b, if succeeds returns the resultant value

#

This can be extended to more useful things with tuples

#

like

{:ok, Message} = Packet

captures the other element of the tuple into Message if the first element is the ok atom

surreal quarry
#

im confused but that seems cool

#

lol

prisma wave
#

Is that because names have to start with a capital letter?

old wyvern
#

Well, in the simplest way, it tries to fill in the missing info on the left from infering the data on the right

prisma wave
#

iirc I read that somewhere

surreal quarry
#

oh ok yugi

old wyvern
#

like enums

#

oh wait yes

#

I think you did mean that

prisma wave
#

that's kinda what I meant lol

old wyvern
#

oh alright xD

#

I read that wrong initially

prisma wave
#

yea lol

#

I kinda wish f# had haskells pattern matching

#

like with functions destructuring lists and things

#

It would be hot

old wyvern
#

oh it doesnt?

#

What doesi t replace it with?

prisma wave
#

well I mean like matching in the function definition

#

In f# I think you'd use like ```fs
let func a b = match (a, b) with
| blah

jovial warren
#

pattern matching is the best

steel heart
#

I mean Jesus the amount of verbosity fp langs cut down is crazy

prisma wave
#

Mhm

#

Very concise

steel heart
prisma wave
#

😟

old wyvern
hot hull
#

How would one have a final type, but allow the type to be reassigned, as in I have an object but I want to reassign it on reload

obtuse gale
#

just... don't make it final?

#

lol

jovial warren
#

lol

#

oh also, thinking about weird OOP problems, is there any possible way I can have a class that can have it's inheritance restricted to internal but it can also be instantiated publicly?

oak raft
#

Make it public πŸ™‚

quiet depot
#

its inheritance, as in its implementations?

jovial warren
#

it is public rn, I was just wondering if there's a way to have its inheritance restricted but it be instantiated

jovial warren
#

well, it's a class that has subclasses

jovial warren
quiet depot
#

but you only want the parent class accessible publicly?

oak raft
#

Nah I shoulda clarified srry lol

jovial warren
#

let me show you my example

#

ignore PacketOutEntityPosition being open btw

#

PacketOutEntityMovement is the class that I want restricted inheritance but public instantiation on

quiet depot
#

so you don't want people to extend PacketOutEntityMovement, but you want it to be instantiable

#

use a factory for instantiation (return playpacket) and hide it from the public via a module

jovial warren
#

yeah I guess

#

I mean, all this would be internal if it wasn't that I want this all to be easily usable by outsiders

#

I want people to be able to depend on the server if the API doesn't provide exactly what they need (since the API will be more generalised, and they may want to implement something specific for better performance) with ease

#

I will provide as many different methods as I can think of in the API, but ya know, they will need to be generalised of course, since it's a general API

#
val session = SessionStorage.sessions.single { it.player == somePlayer }
session.sendPacket(PacketOutChat(text { content("Hello World!") }, ChatPosition.CHAT_BOX, SERVER_UUID))
hot hull
obtuse gale
#

nothing then

dusky drum
#

i have big question, which backend framework do you guys recommend for website with tons and tons of image collections?

hot hull
#

I'll figure something else out then

dusky drum
#

like spring boot, laravel..

jovial warren
#

Spring is great for things that require it's stupidly high performance, incredible speed and very good reliability

#

but Spring is not small

#

and it's not lightweight either

dusky drum
#

so which one do you recommend ( i currently have everything in php......)

paper kite
#

yo guys! I did my Bukkit Scheduler and It's working perfectly

#

however, I want it to stop using a command, like "/stop_plugin"

#

how can I make my runnable cancel, using a command?

#
if (command.getName().equals("iniciar")) {
            if (sender instanceof Player) {
                BukkitTask coolTask = new speed_task(this).runTaskTimer(this, 1200L, 1200L);
            }
        }
#

this starts my runnable

#

(dont worry about the command name, It's just "begin" in my native language)

#

Can I like, put "BukkitTask coolTask" on a variable, as a class attribute and then start It with "iniciar" and then make a closing method that cancels the runnable from coolTask?

#

sorry If this sounds confusing, I can explain if I wasn't clear

ocean quartz
hot hull
#

Will I be forgiven if I make my plugin variable static?

#

I legit can not be asked to pass it around everywhere

half harness
#

lol

hot hull
#

Goddamn it

half harness
#

🀣

stuck harbor
#

man

#

this.plugin

hot hull
#

Ah yes I best put everything in a single class

#

You right

stuck harbor
#

put the plugin variable in each classes' constructor

#

no?

#

man I'm not good at memory

hot hull
#

It becomes a clusterfuck when you have to pass in shit for every constructor

stuck harbor
#

does it

#

like

#
commandManager.register(new ListCmnd(this));
``` no?
ocean quartz
hot hull
#

guice might be worth looking into yea, lot to learn tho

stuck harbor
#

or just dont have classes at all ;)

ocean quartz
#

Insert generic clojure plug here

stuck harbor
#

lol

old wyvern
hot hull
#

How kek does this look

#

If it even works

ocean quartz
#

Much better than normal yaml, but i don't think that'll work, i think it'd need to be like json "identifier": "bewars-lobby",

hot hull
#

Yea it's cursed json

#

A lot better than yml tho

#

Will eventually switch to toml I think

ocean quartz
#

😭

hot hull
#

renew it

old wyvern
#

Why hasnt mine expired yet, isnt it supposed to be a year at a time?

hot hull
#

around a year yea

old wyvern
#

weird

ocean quartz
#

Doesn't have an option to renew on the website, i wonder if i have to apply again

old wyvern
#

What happens when you click renew?

ocean quartz
#

Just takes me to the website

old wyvern
#

Ah

hot hull
#

You logged in?

old wyvern
#

Dont you have OS license?

ocean quartz
#

And yeah OS license

old wyvern
ocean quartz
#

The thing is that here is no renew option

#

There is an option to apply for license where i can put the license id, i guess that's where to renew it

old wyvern
#

I guess so

hot hull
#

holy shit are the worlds weather settings dumb

somber tulip
#

Does anyone recommend a better wiki service than gitbook?

stuck harbor
#

github

#

u can put a wiki on ur git repo

hot hull
#

Someone suggested a forums alternative the other day, was it you @frigid badge?

ocean quartz
#

Damn, they keep track of when was the last time you used the ide with the license

somber tulip
ocean quartz
#

If you want selfhosted you can try making one with vuepress

somber tulip
ocean quartz
onyx loom
#

licensed to: Matt Framework

#

is that ur name matt? omg

ocean quartz
#

Yes!

onyx loom
#

pog!

static zealot
old wyvern
static zealot
#

I know like 10 docker commands btw. I have the power of gods now

#

I can create and end life on earth

stuck harbor
#

lol docker

static zealot
#

yes I was bullied into using it

#

well learning it first

#

by Lemmo and BM xD

stuck harbor
#

btw for all linux users

#

sudo is bloat

#

use doas

#

;)

static zealot
stuck harbor
#

nah

#

it's just true

static zealot
#

even tho I know how to use 10 commands I have no idea how to run the bot on docker lmao

spring canyon
#

I heard that you should prefer doas but I don't get the point

stuck harbor
#

less bloat

spring canyon
#

Sure, sudo is too big, but it doesn't really matter to me

stuck harbor
#

we linux users tho

#

all bloat must be removed

spring canyon
#

Apparently I'm no longer a Linux user

#

πŸ‘€

static zealot
#

well I guess its time for another 6 hours of trying to recover my dedi

stuck harbor
#

just factory reset

static zealot
#

no thanks

#

I would rather spend 100 hours recovering it then resetting it

static zealot
#

for role settings

frigid badge
static zealot
#

suggest?

#

you manipulated and threatened my family just so I use docker. that's not a suggestion

hot hull
#

Someone else then, truly can't remember who

static zealot
#

ugh Gian

#

suggested

#

ghost

#

or something

#

instead of forums just a news website or something like that

#

and use discord for the other stuff

static zealot
#

if you have a discord server and go to the roles settings

#

it looks different

#

better

#

it even shows you how many people have the role

#

which I don't remember it doing before

hot hull
#

oh it was Gian

static zealot
#

yes it was gian

karmic fjord
#

does anybody knows a good npc util api?

#

for last version

jovial warren
#

Citizens

karmic fjord
#

oh, yeah i forgot that

static zealot
stuck harbor
#

very nice

#

how did u do it?

hot hull
#

me likey

static zealot
#

I had mount the partitions

stuck harbor
#

stonks

static zealot
#

and then go there and edit the autentification thing

#

allow passwords

#

or whetever

#

it was

stuck harbor
#

yeah

#

the sshd_config

#

also

static zealot
#

yeah that one

stuck harbor
#

guess who is trying to learn wordpress dev?

static zealot
#

you?

stuck harbor
#

πŸ‘€

#

perhaps

static zealot
#

now time to find out what the password is

#

lmaooo

#

I guess I should've changed the password as well lmao

stuck harbor
#

oh no they need the impossible

error-free PHP

static zealot
#

well I have no idea what my user's password is

#

fuck

#

time to go back

#

into recovery mode

stuck harbor
#

thats an oof

onyx loom
#

bro just store ur passwords in a txt

#

ez

forest pecan
#

imma hax u

#

and get that text file

jovial warren
hot hull
#

What's this shitty formatting

jovial warren
#

stringified NBT

hot hull
#

I mean it's just cursed json

old wyvern
#

Just looks like JavaScript

#

not JSON

hot hull
#

how does that look like js

old wyvern
#

the notation with the key not being string is from js objects

#

That and functions are what differentiates js objects and json, I believe. There may be more reasons tho, but these are what I've heard of

prisma wave
#

Looks like Korm yeah

#

I was gonna say lol

static zealot
old wyvern
#

oh lol

static zealot
#

yeah

#

xD

#

ah

#

he just made the textures normally and used a tool called pixator or something

#

to convert it to ascii chars

#

well still

#

very nice

old wyvern
#

lol

jovial warren
#

SNBT is also basically cursed JSON lol

forest pecan
#

oh god

#

the memories

#

i was using hypixel api before

#

and i got that

#

and i had to use a library to parse the data

jovial warren
#

also, I may or may not have fixed the issue with Krypton only working in certain worlds

#

just gonna test a few more worlds

#

god damn you Barry

#

IT WORKS

#

YESSS

#

I mean, it won't load chunks across regions yet, but it'll load chunks around you in an arbitrary radius

hot hull
#

well no that's just json

forest pecan
#

a very cursed one

hot hull
#

toml is the future old man!

forest pecan
#

whos old man

hot hull
#

You

forest pecan
#

πŸ§“

old wyvern
half harness
forest pecan
#

fuck you lmao

hot hull
#

How does one use reflection to register listeners :uwu:

prisma wave
#

Everyone sleeping on ELON tho

old wyvern
old wyvern
#

There was something with HandlerLists

hot hull
#

elaborate

old wyvern
#

Let me find it

hot hull
#

I just don't want to register each listener myself, Piggy has some loopty loop shit

old wyvern
#

Oh you'll still need to scan for the listeners like piggy does

jovial warren
#

oh hey @hot hull guess what

#

I got more settings for you

hot hull
#

I'm a retard?

hot hull
#

oh

#

How does one scan for them Yugi

jovial warren
#

I mean, most of those should be familiar to you anyway

hot hull
#

Working on something else rn Bardy

jovial warren
#

yeah just letting you know

old wyvern
hot hull
#

Oh god

old wyvern
#

xD

hot hull
#

I mean atleast I don't need to initialize 15 classes myself

frail glade
#

I use that class from Piggy in a couple of my projects and it works wonders.

hot hull
#

Why does GH not want to link the Disabled class ;C

forest pecan
#

thats a lot of streams

frail glade
#

For the scanner class?

forest pecan
#

yea

frail glade
#

Ahh yeah but it's okay. Doesn't really affect anything. I use it to register ~90 commands in < 10ms

old wyvern
#

declarative 😌

forest pecan
#

oh lol i use the commandMap normal way

#

to unregister

#

xD

static zealot
#

youtube really likes recommending shitty videos after you've accidentally clicked on a similar shitty video

forest pecan
#

what happens if you click on a video about shit

#

will you get similar shitty shit videos that are very shitty and shit

onyx loom
#

i wonder if deleting the video makes a difference from ur recommended or not, if i watch a shit vid i usually delete it, dont actually know if it makes a difference tho

forest pecan
#

baby's first words

#

πŸ‘Ά

half harness
#

lmao

forest pecan
#

OMEGALUL

onyx loom
#

essentials chat πŸ‘Ά

half harness
#

my first messages

#

are horrible

static zealot
hot hull
#

@frail glade Got a link to one of the projects you use it in

frail glade
#

Uh Guilds is probably the only public one

hot hull
#

Am I blind or where is the repo

frail glade
#

Check my pinned repos

hot hull
old wyvern
#

Whats the issue frost?

hot hull
#

Life

old wyvern
#

no like with that class?

#

Do you just want an example?

frail glade
#

I DMed him one

half harness
#

copy and pasted

hot hull
#

Smh discord

onyx loom
#

waduhek thonking

#

yugi support? 😳

hot hull
#

It takes the other persons color

onyx loom
#

the frick

#

ive never saw that

#

ok just ur phone

hot hull
#

Nah multiple people said this happened a swell

frail glade
#

That was fixed in the latest dev build.

half harness
#

lol

quaint isle
#

Hey smart people, we are a 4 developers at our company and our lead dev decided to make the switch from bitbucket to github. He moved all our repos over and invited us to contribute to each repo individually. As far as I can tell from the pricing page, we could just create an organization, right? Or does that require everyone to have a Pro account? Am I overseeing some features that one would need to pay for if we created an organization?

ocean quartz
#

You can just create an org, iirc it should be free

lunar cypress
#

depends on whether you want private repos I think

forest pecan
#

can someone please add ?main to the faq

half harness
#

lol

forest pecan
#

im about to explode

#

lmao

#

even copying and pasting a spigot forum link

#

is too much work

half harness
#

Matt has left the chat

forest pecan
#

lmao

half harness
#

whenever u talk about it the staff leave

#

🀷

onyx loom
#

or just dont copy and paste it

forest pecan
#

but then they will hate theirselves

#

lmao

half harness
#

is there a way to recover deleted files in intellij?

#

i just noticed that i just deleted a bunch of files

#

(but deleted a while ago)

obtuse gale
#

lol rip

ocean quartz
#

Local history

half harness
#

that only shows the current file tho

lunar cypress
#

what does "a while ago" mean

half harness
#

nvm

ocean quartz
#

It shows all the files

half harness
#

thanks matt πŸ™‚

half harness
ocean quartz
#

You're not doing it right fingerguns

half harness
#

i just recreated the files, then opened up local history

#

then it worked

half harness
#

i just did File -> local history

ocean quartz
#

Click on the project root folder then click on file -> local history

half harness
#

o

#

ok

#

thanks! πŸ™‚

#

it scared me πŸ‘€

forest pecan
#

or be smart

#

and use git

half harness
#

i was about the commit

forest pecan
#

Oh

#

OOf

half harness
#

after i moved and deleted a bunch of files

#

lol

forest pecan
#

Rip

half harness
#

bc there was no point in committing when im moving a billion files anyways

#

🀷

forest pecan
#

Yea

forest pecan
static zealot
#

how do you make a list in json? As in making it directly in a file. is it json "list": { "something": something, "something-else": something-else } ?

obtuse gale
#

wat

#

that's not a list, that'd be the equivalent of a map

static zealot
#

well that's why I'm asking. I got no idea xD

obtuse gale
#
{
  "list": [
    "value",
    "value",
    "value"
  ],
  "map": {
    "key1": "value",
    "key2": "value"
  }
}
static zealot
#

oh thanks

onyx loom
#

mog ejtbranis bad cxompany!!!111!!

errant geyser
#

If you guys wrote a downloadable program but didn't reaaaally want the source code being accessed by anyone, how would you achieve that? Just obfuscation?

frail glade
#

What would you be writing it in?

errant geyser
#

Kotlin

winter iron
#

obfuscate i guess

prisma wave
#

ew

errant geyser
#

BM shut

prisma wave
#

obfuscation is for the small minded

old wyvern
#

Why?

prisma wave
#

^

errant geyser
#

Nvm thought you were going to go off on one about clojure

prisma wave
#

no