#dev-general

1 messages · Page 60 of 1

brazen ether
#

in which case, basically no program is "correct"

steel heart
#

thats very true and good point

brazen ether
#

but using the more colloquial meaning of "good", "objected oriented" is good for some types of programs but not all, and is at times clearly antithetical to your goal (performance for example)

steel heart
#

u can kinda prove partly correctness (ofc depending on how u define it) w unit testing, integration testing etc i suppose

brazen ether
#

no you cant

#

testing is by definition, not a proof of correctness

steel heart
#

depending on how u define it

brazen ether
#

unless you cover all possible branches, which no one does

#

if such is even possible

brazen ether
#

but anyway imo the answer to the question is "it depends"

steel heart
#

sometimes, knowing that a program isnt behaving incorrectly can be useful in whatever domain u care about

brazen ether
#

OOP is a strategy to achieve a goal

steel heart
#

yea

brazen ether
#

that's what I'm saying

#

no non trivial program can be proven correct with a reasonable # of tests

steel heart
#

yea no, u can say that ur program is behaving correct to some degree/partly, depending on what terms n definitions of ur domain u work w

brazen ether
steel heart
brazen ether
steel heart
#

thats fair, prove might be the wrong linguistical term in that sentence

brazen ether
#

but we use paradigms as shortcuts to good programs

#

so just choose your shortcuts depending on your domain

#

OOP just happens to be very easy to mess up, just like everything

steel heart
brazen ether
#

that's exactly what I said

#

well

#

given that everyone had the same requirements and everything

steel heart
#

there could be multiple, even if we had access to such resources

brazen ether
#

what I mean to say is that if everyone was very smart and optimal, we would all just think of our programs from first principles rather than trying to apply patterns to it

#

all our reasons for why a program is written the way it is would come from objective metrics like readability (objective because the population of readers is assumed to be specified) and performance

#

there would be no such thing as "this is good/bad because it does/doesn't align with X paradigm"

#

but that's much too difficult/impossible to do because we have things like deadlines and mistakes

#

the concept of OOP to write a good program is in of itself a lossy abstraction over the path to writing a good program

#

assuming that you're given some objective metrics for what a good program is

#

which you could do by studying developer performance and program performance

#

its kind of the same way that we often rely on moral platitudes to guide our behavior, but these are often lossy and break down in certain contexts ("murder is bad")

steel heart
#

ig yea, i mean i think there is a slight difference between design pattern contrary to the paradigm itself (even if a set of design patterns usually go hand in hand with some paradigms), i would more see moral platitudes as those design patterns

steel heart
cinder flare
crude cloud
#

man thats a lotta messages i aint reading

#

but i disagree wholeheartedly

sweet cipher
#

Skript is the only correct language, that should answer your question

steel heart
#

D:

potent nest
#

I don’t even have enough context to know which paradigm is magically "correct" apparently

wind patio
#

I would say this doesn't really apply for modern OOP

#

and obviously you can write "incorrect" functional code as well

brazen ether
#

so he means it in a mathematically rigorous way

#

but I don't agree with it either way

potent nest
#

Why would he say something that stupid

brazen ether
#

honestly I'm not sure

#

it just sounds inflammatory

#

there's more nuance to it than that

potent nest
#

There are oop programs proven to be correct and there are buggy functional programs

steel heart
# wind patio I would say this doesn't really apply for modern OOP

What does modern OOP mean to you contrary to just OOP or whatever OOP “used to be”? and yea don’t think he was necessarily talking about FP as an alternative although that was probably a strong reference point (could be wrong), for example we have logical programming

wind patio
#

it’s hard to compare directly since I wasn’t around when OOP became "a thing", but paradigms evolve, so, even if the criticism was valid at the time, it may not fully apply today

philosophically, I would say "classic" OOP treated programs more as a society of message-passing objects, "modern" OOP, imo, tends to emphasize explicit data and transformations, with objects used mainly to guard boundaries

steel heart
#

Yea completely fair, I mean I don’t think there exist many modern programs today that explicitly only use OOP to solve problems and deliver solutions so I’m with you

ocean quartz
#

People think too much about which paradigm is correct and which one isn't, we just want to make cool shit, doesn't matter the language or the paradigm
There is no right and wrong

crude cloud
#

my favourite paradigm is "just sit down and write code that works" programming

ocean quartz
#

Based

pastel imp
ocean quartz
#

Same would have happened if the code wasn't OOP

pastel imp
#

fair point

wind patio
#

I saw code in my new workplace and I went through 10 stages of depression

#

few of the apps that "we" maintain is just public static

#

no DI, no SRP, no nothing

ocean quartz
#

They were just trying to skip the O in OOP

wind patio
#

I would say that my code that I wrote back in uni wasn't even that bad

#

and yet those apps are used in production, for a bank

#
    /*
     *
     */
    @SuppressWarnings("unchecked")
    @RequestMapping(path = "/countall", produces = "application/json", method = RequestMethod.GET)
    public ResponseEntity<Map<String,CaseFolderCount>> CountAllCases() {
        return new ResponseEntity<>((Map<String,CaseFolderCount>)handler.TaskSynchronizer(null,3),HttpStatus.OK);
    }
---
    /**
     * Synchronizing the calls so that only 1 can be run at a time
     * 
     * @param input
     *            optional input
     * @param index
     *            what method to call
     * @return response depending on method
     */
    @SuppressWarnings("unchecked")
    public synchronized Object TaskSynchronizer(Object input, int index) {
        switch (index) {
        case 0:
            return RemoveCases();
        case 1:
            return Query();
        case 2:
            return QueryIDs((Map<String,IDQueryInput>) input);
        case 3:
            return CountAll();
        case 4:
            return testEndpoints();
        default:
            return null;
        }
    }

amazing

#

or, another one

#
public class SolutionSetting {

    String _solutionName = "";
    String _folderName = "";
    String _sql = "";
    String _additionalParams = "";
    String _dateParam="";
    @JsonIgnore
    String customSQL="";
    int _caseAgelimit = 0;
    @JsonIgnore
    String objectStoreName = "";
    @JsonIgnore
    String connectionPointName="";

    public SolutionSetting(String... o) {
        switch (o.length) {
        case 7:
            _additionalParams = o[6];            
        case 6:
            _dateParam = o[5];            
        case 5:
            _caseAgelimit = Integer.parseInt(o[4]);
        case 4:
            connectionPointName = o[3];
        case 3:
            objectStoreName = o[2];
        case 2:
            _folderName = o[1];
        case 1:
            _solutionName = o[0];
            break;
        default:
            _folderName = "Folder";
            objectStoreName = "TOS";
            _caseAgelimit = 365;
        }

        // _solutionName=(o.length>0)? o[0]:"";
        // _folderName=(o.length>1)? o[1]:"Folder";
        // objectStoreName=(o.length>2)? o[2]:"TOS";
        // _caseAgelimit=(o.length>3)?Integer.parseInt( o[3]):365;
        // _aditionalParams=(o.length>4)? o[4]:"";

        _sql = "SELECT TOP 5000 [this], * FROM [" + _folderName + "] WHERE ["+_dateParam+"] <" + " Now() - TimeSpan("
                + _caseAgelimit + ", 'days') AND [CmAcmCaseState] = 3 " + _additionalParams;
        customSQL = "SELECT TOP 5000 [this], * FROM [" + _folderName + "] WHERE ";
    }

   // ...
}
#

and that above is being created like this:


    public void setSettingsMap(String settingsMap) {
        this.settingsMap = (Map<String, SolutionSetting>) Arrays.asList
                (settingsMap.split(",")).stream().map(s -> s.split(":")).collect(
                        HashMap<String, SolutionSetting>::new, 
                        (m, c) -> m.put(c[0],new SolutionSetting(c)),
                        (m, u) -> {}
                        );
    }
#

||sorry for big spam btw||

crude cloud
prisma wave
#

we can prevent this being necessary by using safer languages

#

it's only like that because refactoring in impure languages is very fragile

prisma wave
pastel imp
#

Isn't OOP/Java technically already safe?

#

What other language would be considered safer?

prisma wave
#

arguably any language with runtime errors is unsafe

pastel imp
#

Fair point

crude cloud
#

define "runtime errors"

pastel imp
#

So what are the alternatives?

prisma wave
#

idk

#

i dont think there is a perfect language

crude cloud
#

there is it's called Esperanto

pastel imp
prisma wave
#

but i think languages like Dafny are quite appealing in the finance industry because you're able to formally verify the correctness of everything within the language

wind patio
#

I change this single part and the whole app falls apart

prisma wave
#

wonderful

crude cloud
#

idk just ask chatgpt

brazen ether
#

most developers don't think that much

prisma wave
#

yes, the age old issue

lavish notch
#

A lot of the finance use third party vendors for software. 😄

prisma wave
#

that has the same issue

potent nest
#

we should only write code in lean

prisma wave
brazen ether
#

I'm gonna be honest I have no idea what's going on

#

like not even a little

#

I know basic lean syntax but I am still beyond confused

prisma wave
#

me neither

#

i just know it's not very good

potent nest
#

incredible how even an extremely small core is hard to maintain

wind patio
prisma wave
#

i have no idea

#

but it's proving that false = true

#

which is obviously bad

#

i.e. it's a bug in lean

#

lean is a proof assistant that aims to mathematically prove correctness of programs

wind patio
#

ah yes

crude cloud
#

you cannot trust lean for anything then it's so broken

prisma wave
#

true

brazen ether
#

not exactly sure what's happening in this specific example but it's a reference to something else where some platform function was being trusted when it shouldn't have been

#

Lean is extremely popular and has had many many hours of work put into it and is used by many mathematicians

prisma wave
#

let me ask grok

brazen ether
#

obviously it's not completely broken

prisma wave
#

bro fell for the ragebait trollface

brazen ether
#

I'm too autistic for this

crude cloud
#

idk man that just shows it's broken

#

rather not trust it

#

the geminis says it's true

brazen ether
#

I hate you guys

crude cloud
#

i hate you toooo 🥺

nocturne apex
#

guys that's so cute

brazen ether
#

hilarious message

vast basin
#

yo whats up guys, does anyone have any idea why phantoms might not be attacking anybody on my server? gamerule doinsomnia is set to true and all, they're just not targetting players for some reason

tiny portal
#

i still wanna do this :>

tiny portal
brazen ether
brazen ether
#

its a paradigm for how to write code

tiny portal
brazen ether
#

almost all java code ever

#

OOP is about having objects perform actions

#

as in, you treat objects as actors who can do things to themselves or to other objects

#

if you ever want to do programming as a career, it's probably something you need to learn (whether you agree with it or not)

#

a lot of OOP principles that you find online aren't unique to OOP

#

like polymorphism

#

private mutable state is also an important part of OOP

#

its really just about trying to model your program as a bunch of objects that do things to each other

#

rather than having a clear separation between logic and data

tiny portal
brazen ether
#

its a lower precision double

#

doubles have 64 bits to store numbers

#

floats have 32

#

so doubles can store 2^32 more numbers, giving them much higher precision

#

you should probably take a programming course to learn these basics

brazen ether
#

double = double precision floating point number

#

other superior language (zig ahem) use things like f32 or f64 which tells you immediately how many bits that floating number is

tiny portal
brazen ether
#

floating point numbers are always signed

brazen ether
#

the bits are all the same

#

its just how the program interprets them

#

the same bits could be interpreted as an unsigned or a signed integer, and you would get different values

#

java unfortunately doesn't let you have unsigned integers supported at the compiler level

tiny portal
brazen ether
#

I haven't used c# in years

#

so I don't know

#

but most of the time, learning the language is not the hard part

#

java and c# are definitely quite similar

prisma wave
#

truth nuke

#

but yeah they are pretty similar

brazen ether
#

unless you're going from like

prisma wave
#

c# just has more fancy features which could be confusing coming from java

brazen ether
#

c -> haskell

#

or lisp

#

or any like paradigmy language like that

prisma wave
#

but they dont use twos compliment so it's not really "signed" per-se

brazen ether
#

there is no way he knows what twos complement is

prisma wave
brazen ether
#

if you don't know pointers they might be confusing

#

but if you're like, a good java dev, then you already know pointers

prisma wave
#

yeah

brazen ether
#

manual memory management vs gc'd is a bigger jump

#

but also like, not as hard as people make it out to be

tiny portal
prisma wave
#

ye

#

but dw about it

brazen ether
prisma wave
#

it's not really super important to know as a dev

brazen ether
#

but you don't ever need to worry about it unless you're doing something extremely low level

prisma wave
brazen ether
#

mmm i think depends what youre including in there

prisma wave
#

programming paradigm i suppose

tiny portal
brazen ether
#

hard to say that memory management strategy is orthogonal to java

#

you can do manual memory management in java

#

just like you can eat wood

prisma wave
#

but if i made a language identical to java but with manual memory management (i.e. C with some syntax sugar) then you'd be able to pick it up easily, apart from learning the memory management part

brazen ether
#

yeah i was wondering if that's what you meant

#

that's true

prisma wave
#

compared to say learning a completely different paradigm which is an entirely different way of thinking

tiny portal
#

are enums important or can i skip it?

prisma wave
#

they are

brazen ether
#

they're extremely important

prisma wave
#

you probably shouldnt skip anything

brazen ether
#

^

tiny portal
#

any way to get better at java? Like making forks of things or creating things?

brazen ether
#

write your own projects

#

make things happen

#

don't worry about other people's code too much

prisma wave
brazen ether
#

write your own things and note down what you struggle with, what issues you come across, and figure out how to solve them

pastel imp
#

what's the talk here

brazen ether
#

learning java

pastel imp
#

uh maybe I read it after my game

brazen ether
#

you're never gonna get very good at anything if you depend on others for those sorts of things

tiny portal
#

thanks for the info

prisma wave
brazen ether
#

@prisma wave by the way i've come around on the DI thing

prisma wave
#

DI?

brazen ether
#

it absolutely is so valuable when working on larger projects

prisma wave
#

as in dependency injection?

brazen ether
#

dependency injection

#

yes

prisma wave
#

i didnt realise u were against it haha

#

but yeah it's goated

brazen ether
#

i wasn't

#

i just didn't think it was necessary

#

and that doing it even when not strictly necessary is useless

prisma wave
#

nah it's sooo good

brazen ether
#

but you don't realize you need it until you do

prisma wave
#

in big projects

#

i love not having to worry about instantiating

brazen ether
#

yeah i've been just implementing more testing and battle stuff and it completely invalidates my earlier notions that the static stuff i had was gonna work

#

it's definitely something that should be the default

prisma wave
#

i really like guice as a DI framework

#

would recommend trying it out if you get the chance

prisma wave
brazen ether
#

i almost certainly will

#

i think i have like

#

the perfect usecase for it

wind patio
pastel imp
#

I have heard of guice a lot

#

but never used it

wind patio
#

you're missing out

pastel imp
#

think I only used Dagger? like once

#

idk if it's worth adapting projects like Runway to it.

#

I don't think Runway really relies a lot on DI for it to be a noticeable change

wind patio
#

I have things like@Command , @Listener, @Config , I pick them up via Reflections and then just guice em up, then I can just use any Service/Repo or other guice managed classes whenever/wherever I need

prisma wave
#

dagger is basically guice but compile time

#

theyre quite similar

pastel imp
#

is guice not compile time?

prisma wave
#

nope

#

runtime

#

with classgen

wind patio
#

you certainly won't get any compilation errors if you do things like circular dependencies

pastel imp
#

eh

#

I personally feel like compile time like dagger is better no?

#

xD

prisma wave
#

it's pros and cons

#

guice is much more flexible

wind patio
#

it's always pros and cons

prisma wave
#

and doesnt need as much hand holding

pastel imp
#

tbf I am a bit lost as I have no point of reference to what we are talking btw

#

I have no clue how I'd implement guice/dagger in Runway for ex.

wind patio
#

does dagger have dynamic bindings? @prisma wave

prisma wave
#

i dont know ive not used it much

#

i assume no

prisma wave
wind patio
#

well, in terms of flexibility, dynamic bindings is one thing that guice has (and IIRC dagger doesn't), for ex.:

@Provides
EconomyService provideEconomy(Plugin plugin) {
    if (Bukkit.getPluginManager().isPluginEnabled("Vault")) {
        return new VaultEconomy();
    }
    return new DummyEconomy();
}
prisma wave
#

oh i think that's fine?

#

idk though

pastel imp
wind patio
#

so for ex. if your plugin behaviour needs to change based on the config, I don't think you can really achieve that using dagger (I might be wrong though)

#

because everything happens compile-time

prisma wave
pastel imp
#

yeah that's what I was thinking

#

xD

prisma wave
pastel imp
#

on another note

#

I really need to figure out better naming/folder organization

#

feel like the current one kinda sucks

#

lol

wind patio
wind patio
pastel imp
wind patio
#

buh wuddahelly is this

#

unacceptable

prisma wave
#

skull emoji

#

easiest way to force a good structure is try and unit test everything

#

it'll expose lots of flaws

#

because it'll be extremely hard to test some parts

wind patio
#

unit tests? in this economy?

prisma wave
#

real ones still do it

wind patio
#

I just let the end users test it

#

saves a lot of time

#

a bug MAY or MAY NOT exist, if I write a test and it does not exist then I'm just wasting my time 😎

prisma wave
#

die!

pastel imp
pastel imp
#

kotest and kover setup

#

xD

#

together with mockbukkit

#

problem is some stuff is really hard to unit test due to MC limitations

#

for instance, almost impossible to test if a packet was modified correctly since mockbukkit doesn't support nms

wind patio
prisma wave
#

yeah thats not really possible without an abstraction layer over the packet data

brazen ether
#

"we don't do pull requests, we push directly"

#

"revert first, ask questions later" 😭

prisma wave
#

crazy

pastel imp
#

there is only a way to test sending packets

#

but no way to check if they are modified

#

ACTUALLY, maybe....

#

I just can't unit test the listener classes themselves

ocean quartz
pastel imp
pastel imp
ocean quartz
pastel imp
#

nowcrew should hire me

#

I will write unit tests for it all

#

trust

pastel imp
prisma wave
#

you defo could

#

with mocks and stuff

ocean quartz
abstract osprey
#

suffering from success

#

@prisma wave i think you'd really benefit from DI (as you mentioned) and maybe some sort of service lifecycle system :) in runway, that is

prisma wave
#

me?

abstract osprey
#

fuck

#

was it afonso

prisma wave
#

im already DI-pilled broski

abstract osprey
#

apologies brister

prisma wave
#

all g

#

i am interested in the convo

abstract osprey
#

much better than guice DI imo etc

prisma wave
#

yeah i need to learn about the service stuff

#

ive never really touched it but heard good things

#

is there a java equivalent

abstract osprey
#

uh

#

i can open source my java port if you want

prisma wave
#

that'd be cool

abstract osprey
#

Sure, it's all local rn but I'll push it in the morning (almost midnight and I'm on mobile kek)
want me to give you a ping when it's done?

wind patio
#

😎

abstract osprey
wind patio
#

isnt that just springboot 1o1?

prisma wave
abstract osprey
#

in the library i linked it just does a class path scan to look for classes appended with @Service and calls a certain method

#

the underlying principle is identical to spring yes

prisma wave
#

hmm

wind patio
prisma wave
#

i think i will stick with guice for now sorry

wind patio
#

😵

cerulean ibex
#

i was trying to make a programmatic mc client to solve this issue

prisma wave
cerulean ibex
#

so u could run tests as the player rather than the server

prisma wave
#

i would die for that

#

especially if it could run headlessly

cerulean ibex
#

it was from scratch but you could also modify the client to run headlessly

#

i think there was a thing for that actually

prisma wave
#

so cool

pastel imp
pastel imp
#

cc @prisma wave

#

but seems to be only for CI

#

idk if you can use it programatically

abstract osprey
#

DI doesn't seem useful for your case

#

but a service pattern would be

pastel imp
#

bruh

#

I mean, I do use DI

abstract osprey
#

if you combined a service pattern with classpath scanning you get a very sexy looking main class

pastel imp
#

tbf main class WIP rn

#

lol

#

gonna split it up into methods for unit testing, etc.

abstract osprey
#
@Service
object VisibilityService {

    @Configure
    private fun configure() {
        Events.subscribe<PlayerReadyEvent>()
            .handler {
                val player = it.player
                player().playerListName(player.tabName)
                player().playerListOrder = player.weight
                BootstrappedData.visibilityProvider.updateVisibility(player)
            }

        Packets.subscribe<PacketPlaySendEvent>(PacketType.Play.Server.TAB_COMPLETE)
            .handler { event ->
                val recipient = PlayerService.getOrNull(event.user.uuid) ?: return@handler
                val packet = WrapperPlayServerTabComplete(event)
                packet.commandMatches.removeIf { match ->
                    val text = match.text
                    if (text.isNullOrBlank()) {
                        return@removeIf false
                    }
                    val player = PlayerService
                        .local()
                        .filter { it.status != PlayerStatus.HIDDEN && it.status != PlayerStatus.OFFLINE }
                        .firstOrNull { it.displayName.startsWith(text, true) } ?: return@removeIf false
                    !recipient.canSee(player)
                }
            }

        // etc but it's too long
    }

this is the combination of a service pattern + class path scanning + a nice wrapper for packet listening :D

pastel imp
#

it does look cool indeed

#

but I like independent classes in this case xD

#

I think I am fine with it

#

the one key issue is rlly just testing

#

if I can fully automate that then pog

cerulean ibex
#

if this is supposed to be the service locator pattern then icl im not seeing it 😭

cinder flare
#

yeah they're talking more about IoC stuff, though that code block is basically not an example of that at all lol

#

that's just two listeners that are registered with static functions rather than how Bukkit normally does it lol

quiet depot
#

if you were to keep the bukkit style implements Listener there's no reason you couldn't scan for classes that implement that, then using ur di library automatically register them as listeners with bukkit

wind patio
quiet depot
#

ye

#

it's the way to go

#

big rabbit hole

#

starts with listeners and commands

#

then just keeps going further

#

I made this cool thing with guice/gson/snakeyaml where u could annotate a record with @File("config.yml") and it'd automatically add an instance of that object to my guice injector it'd reflect the hard file

#

but like u get to the point where ur just remaking spring

#

especially when u start tryna do it for databases

compact perchBOT
quiet depot
#

'future pain delivery system'
the files is ok until ur making a million different serializers for different types to be able to perfectly represent the file as an object, mysql orm is just fucked tho

wind patio
quiet depot
#

@compact perch clanker

compact perchBOT
wind patio
#

I finished the setup for Listeners and Command, then did all my MySQL/SQLite repositories, then did the same for all my "Manager/Service" classes, then for Placeholder class, then added DI for all the plugin APIs I use

quiet depot
#

I was just trying to have an object that'd automatically update for every data type, mysql, yaml, json etc

#

what do u do for the scanning

wind patio
quiet depot
#

ah

#

big

#

best scanning library ever made

wind patio
# quiet depot I was just trying to have an object that'd automatically update for every data t...

so it is something like this, where

you have a domain, which is basically a "projection" of a state, not mutated directly

record Buh(int val) {}

then you have a reactive state layer

interface State<T> {
    T get();
    void set(T value);
    void subscribe(Consumer<T> listener);
}

storage adapter (yaml/mysql/whatever)

interface DataBackend<T> {
    T load();
    void save(T value);
    void watch(Consumer<T> onChange);
}

the backed state

class BackedState<T> implements State<T> {
    private T value;
    private final DataBackend<T> backend;
    private final List<Consumer<T>> listeners = new ArrayList<>();

    BackedState(DataBackend<T> backend) {
        this.backend = backend;
        this.value = backend.load();

        backend.watch(newValue -> {
            this.value = newValue;
            listeners.forEach(l -> l.accept(newValue));
        });
    }

    public T get() {
        return value;
    }

    public void set(T value) {
        this.value = value;
        backend.save(value);
        listeners.forEach(l -> l.accept(value));
    }

    public void subscribe(Consumer<T> listener) {
        listeners.add(listener);
    }
}

and in terms of guice/reflection

@BackedBy(type = YAML, path = "config.yml")
record Buh(int val) {}

then at startup you scan the annotations, pick a backend, create the state and bind it to guice

DataBackend<Buh> backend =
    new SomeBackendYamlMaybe<>(path, Buh.class);

State<PlayerConfig> state =
    new BackedState<>(backend);

bind(new TypeLiteral<State<Buh>>() {})
    .toInstance(state);

and then you can inject it anywhere?

@Inject State<Buh> config;
wind patio
wind patio
#

mutable 😵

#

not on my watch

quiet depot
#

well

#

it depended on the project

quiet depot
quiet depot
wind patio
#

buh 😳

cinder flare
#

@wind patio that mod looks so cool dude wtf

#

any chance you want to implement an NBT editor that's not straight dogshit

wind patio
cinder flare
#

holy shit i think i need it

#

the chat windows and the nbt stuff are so sick

wind patio
#

it's still quite ass though

cinder flare
#

does the groovy scripts run like... serverside code?

wind patio
#

not really possible

#

(afaik)

cinder flare
#

yeah that's what i was thinking

#

but clients can run like world.addParticle or whatever?

wind patio
#

yeah

#

I mean, you can place blocks too, but only client-side

cinder flare
#

i have not done fabric clientside mods lol so idk

#

seems sick though, thoughts on kts instead of groovy? lol

wind patio
#

someday ™

cinder flare
#

should be like, not that hard i'd think

#

idk maybe i gotta whip out the source code and get to work

wind patio
#

shouldn't be too difficult to reuse the editor

#

just choose which lang to run based on the ext

prisma wave
prisma wave
#

It’s a little unusual but I like it

#

Supports a lot more things but ive forgotten to document

#

It uses a file watcher to automatically reload whenever the config is edited

#

And while I’ve not done it yet I think I can use this to outperform gson and snakeyaml

cinder flare
wind patio
cinder flare
#

ah okay lol, super cool stuff though! i've been wanting a mod like that for more developer stuff but there's not a large market apparently

wind patio
#

I remember using it back in the day lol

cinder flare
#

seems very cool, i've really been loving WoW macros, and this seems quite similar

distant sun
#

Cool mod @wind patio tt_clapCat_OwO

crude cloud
#

mfw classpath scanning when service loading is a thing

potent nest
#

that's like searching for google on google

abstract osprey
vocal trout
#

My brain hurts reading that

dapper pawn
#

@sudden tundra dms sir.

torpid bluff
#

I want learn minecraft plugin development, anyone can suggest me how I can?

prisma wave
#

?learn-java

compact perchBOT
#
FAQ Answer:

Online Courses:
Online courses are also great for learning java. Some websites that offer them are:

  • Coursera - Free unless you want a certificate
  • PluralSight - Great courses from what I've seen. Mostly Paid
  • Udemy - Never used them myself but they seem to all or at least most be paid.
    My first ever course was one from Coursera. - I can say it was pretty good at introducing me to the programming world as a whole not just java.

Oracle Docs:
Oracle docs can help a lot at learning and understanding java:

  • Start with this,
  • Breeze through this (skipping stuff that doesn't seem relevant like bitwise operators),
  • Hit this.
    They're the first three from this larger thing which you should definitely go through overall. But those three should be enough for slightly better understanding of what is happening here without feeling like a huge time sink.
    That one is a small part of this larger site wherein "Essential Java Classes" and "Collections" also have good useful stuff

Other services:
Some other cool services that will help you learn java are:

As you can see there are plenty of good ways to learn as long as you're willing to invest the time. Have fun learning!

torpid bluff
#

Java is the minor problem, to learn minecraft plugin development it's better do with your hand other plugins like: decentholograms, essentialx, citizens. Or in another way?(sorry if english is bad I'm not good)

brazen ether
#

and don't worry about making your code similar to other people's code

#

a lot of very popular plugins have very bad code

#

you have to learn it yourself

fresh glade
fresh glade
abstract osprey
#

if you find tutorials help, watch someone like kody Simpson and then screw around on your own with what you learn

#

uninstall intellij's ai plugin as well tbh xD

#

and hell, anything you do doesn't have to be original

torpid bluff
brazen ether
#

I don't recommend using AI while learning how to code

torpid bluff
#

(A question, if there are mistakes in my senteces plese correct me)

brazen ether
#

learning requires struggling with things that will eventually be easy for you, but if you use AI for them them then you will never learn how to solve problems that are too hard for AI

torpid bluff
#

A question for plugin development. How I can make the effect when in chat with your mouse pointer stay on a text and show text like a item tooltip

fresh glade
torpid bluff
#

thank you

wind patio
crude cloud
#

mfw debug stick

wind patio
#

I just found it annoying how I always have to carry it around

#

and it's only usable when held

crude cloud
#

i guess

cinder flare
#

oh shit, block editor is crazy

crude cloud
#

not that i would know, i don't play the game and when i did i was a terrible builder kekmask

wind patio
# cinder flare oh shit, block editor is crazy

also had to redo the whole nbt editor system, cuz it was really scuffed and wasn't properly working on all items lmao
so I basically just cloned nbt editors code (MIT 🙏 ) and making changes from there

#

@cinder flare what is your biggest gripe about NBT Editor itself btw?

cinder flare
#

just the UI being real weird tbh, you have to like click on each button to see the property and stuff

#

and that it's not updated to 1.21.8 lol

#

ideally in my mind, you'd be able to press a key, open a fullscreen window that shows you all the nbt properties at a glance, and allows you to easily edit them/add more/delete

wind patio
#

oh im doing 1.21.4 rn lmao, not sure why tbh, I could have went with 1.21.8

cinder flare
#

get with the times! the server i work on finally updated at the beginning of this month from 1.21.1 to 1.21.8 lol

wind patio
#

yeah I'll update it at some point ™

wind patio
pastel imp
torpid bluff
wind patio
#

and that is in-game Groovy/Kotlin scripting

cinder flare
wind patio
cinder flare
#

okay now make a well-optimized kts script runner for scripting dungeons so that i can iterate instead of restaring the entire server to update a plugin jar

cinder flare
#

and also teach me how to make a Bookshelf with custom books in it in the world, because I could not get that working for the life of me lol

#

i think it's like BlockMeta something? but it just never happened when I did it? and i got sick of waiting 5 minutes between debug attempts

wind patio
cinder flare
#

i don't get how it can be so hard lol, surely structures and stuff do that? or maybe they do it like, serialized as structures with loot tables

wind patio
#

you are talking about the "new" bookshelf you can place enchanted books in, right?

pastel imp
#

isn't hot reloading plugins a thing?

cinder flare
#

yea and normal books

pastel imp
#

or whatever it is called

cinder flare
#

though it still kinda sucks, you can only change the body of methods, you can't add or delete methods, or change classes or anything

pastel imp
#

eh still fine for most cases

#

debugging

#

I should probably set that up ngl

wind patio
#

surely its one of these you need cursed_fingerguns

Interface ChiseledBookshelf
All Superinterfaces:
BlockInventoryHolder, BlockState, InventoryHolder, Metadatable, PersistentDataHolder, PersistentDataViewHolder, TileState, TileStateInventoryHolder

cinder flare
pastel imp
#

but rn I am suffering installing fedora kde on my laptop

cinder flare
#

installing Fedora is suffering? isn't that shit like the easiest distro to install lol

wind patio
cinder flare
#

omg what

wind patio
#

didnt you know you can attach debugger to a remote jvm

pastel imp
cinder flare
#

im ngl no i did not

pastel imp
#

no issues until now though

cinder flare
#

i have been doing shit locally this entire time

pastel imp
#

but I haven't gone through the customizing it rabbit hole xD

cinder flare
#

including at my work, i've been running jcmd to get profiles to then copy paste to my machine to open in IntelliJ's profiler view lol

wind patio
#

you just need to enable it on the remote jvm

java -jar -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 remote-debug.jar
pastel imp
#

I mean, bit useless in my case

#

but I can see the use

cinder flare
#

hmm but i gotta like firewall that bitch pretty hard to not be a massive security vulnerability right?

#

or can you do like a password or something?

wind patio
cinder flare
#

ah hmm okay

#

i definitely need to set that up ASAP for my dev server lol

wind patio
#

yeah its pretty nice ngl, just need to set things up

#

I also remember having to profile a java app running on OpenShift via VisualVM, feels like magic

cinder flare
#

i've gotten a lot of mileage out of just the IntelliJ integrated async-profiler stuff

wind patio
#

I havent really used the integrated one, not sure why lol

#

but I remember trying it out

cinder flare
#

it's really nice, good UI, good keybinds, and you can click on the code to take you directly to where it is, and it shows you in the gutter longer stuff

wind patio
#

dont have the same/similar environment (as in plugins), or?

cinder flare
wind patio
#

makes sense

#

I just use test env databases locally and I work pretty much alone so, no problems on that front

wind patio
#

I would guess IJ has ability to remotely profile aswell

#

its called JMX or whatever

cinder flare
#

oh yeah i wanted to use that, but the security concerns prohibited me :/

wind patio
wind patio
#

depends how much access you have

cinder flare
#

oh shit!

#

does it have certificate/key auth? or just like user/pass?

wind patio
cinder flare
#

yeah same at work, but this was for prod performance regressions mostly lol

wind patio
#

ah, trickier

wind patio
#

generally its just user/pass with or without ssl

cinder flare
#

ah that's probably fine then i'd think

#

SSL in my brain just connected to HTTP certs and SSH for some reason lol

pastel imp
#

Sooooo.... I accidentally deleted the taskbar of my laptop

#

love kde xD

wind patio
#

skill issue

pastel imp
#

indeed

#

I have no clue tf I am doing lol

brazen ether
#

I don't use them at all

#

I don't know why people do

cinder flare
#

i just like knowing what's open yk

#

and seeing the date/time

brazen ether
#

separate spaces/desktops are a much better form of organization

cinder flare
#

i don't really think they're comparable

#

you can use one without the other, either way lol

brazen ether
# cinder flare and seeing the date/time

you can have a really thin bar with information like that on top or bottom, task bars are much more clunky and it's even worse when people actually use them to navigate

brazen ether
#

since you just have your apps on different spaces

cinder flare
#

i mean i barely use my task bar and don't use workspaces at all

#

i just alt tab mostly

brazen ether
#

you can use something like spotlight if you get lost or something

brazen ether
#

no....

cinder flare
#

and yeah i mostly just press windows key and start typing to open things

brazen ether
#

workspaces are so much better than alt tab

#

you can utilize more apps much more efficiently

cinder flare
#

i mean i have three monitors, so i only want to ever change one at a time

#

doing the windows virtual desktop thing moves all of them at once, it's really annoying

brazen ether
#

windows issue

cinder flare
#

and i usually want to see multiple things at once, and i want to switch which one is on which monitor

#

so workspaces are probably pretty great for single monitor setups lol

fresh glade
#

ok, so im making a plugin, and i have a issue.

i cant decide whenever use TriumphCMD or bukkit / spigot default methods for commands.

cinder flare
#

but having three monitors, i have a lot more specifics of where i want stuff yk

wind patio
#

never used workspaces, I use three monitors as well, they pretty much have the same things on them all the time

wind patio
#

and when I need I just alt tab or use powertoys search

brazen ether
#

I don't have multiple screens so I can't comment much

cinder flare
#

yeah i probably should start using powertoys search

#

idk i just like the simplicity of pressing the windows button and typing

brazen ether
brazen ether
#

so imo probably stick to the defaults

cinder flare
#

if you have experience already, then feel free, but also probably look into more options tbh

#

i love Matt and literally contribute to Triumph stuff, but Cloud has been so excellent to work with

wind patio
cinder flare
#

yeah i knew what you meant lol

#

but yeah i have a lot more micromanagement needs for windows across all three of my monitors, so switching entire workspaces is really not good lol

#

at work, i usually have my IDE in middle, dev site on left, and tickets/docs on right

pastel imp
wind patio
#

crazy stuff

pastel imp
cinder flare
#

yeah i can't believe they had separate version of IJ and PyCharm for so long

#

so nice that they're just one

wind patio
#

so nice they added Spring support'ish for the free version

cinder flare
pastel imp
#

raycast better than the powertows spotlight btw

#

sadly no raycast on linux

#

only thing close to it is vicinae

cinder flare
#

Windows in beta and AI integration? ehhh

#

and it costs money? yeah yikes

pastel imp
#

money only for the AI limits

#

etc

cinder flare
#

what makes it better?

pastel imp
#

you can use it for free easily

pastel imp
wind patio
cinder flare
#

any specific things?

#

seems like it does a lot more stuff, like clipboard history, window management apparently, notes, translating?

#

powertoys is all open source iirc, so that definitely has an appeal

pastel imp
# cinder flare any specific things?

I found that search works better, flow is much easier and the AI chat shortcut rlly does help for small stuff. With extensions I can control spotify, directly search youtube, steam, among others like linear issues, github, etc.

pastel imp
cinder flare
#

but it does look cool

pastel imp
#

later tmr or so I will try vicinae

cinder flare
pastel imp
#

which is an open source linux alternative to raycast

pastel imp
cinder flare
pastel imp
#

eh I never needed that so

cinder flare
wind patio
#

I mean, I am using Free Beta right now, it works really well

pastel imp
#

yeah never needed that

#

nor do I see a reason to need it tbh

wind patio
#

honestly I didn't even see it has pricing

pastel imp
#

what's the use case for this?

#

using clipboard history in my pc and laptop?

cinder flare
#

i just want a nice open source robust upgrade to stuff i already use yk

#

so raycast and all its paid ai shit, and this with its closed source and paid licensing in the future, just rubs me the wrong way

pastel imp
#

fair enough

#

I mean, I am fine with the free tier for now so yeah

#

but I do follow your approach on my (now) linux laptop

#

all open source if possible

#

(I did hope that raycast had a linux version, sadly not)

cinder flare
#

i mean it's kinda funny, cause i'm on Windows for everything lol, so i'm already kinda fucked

brazen ether
#

i'm in the unixporn discord and people just write their own raycast-like shit all the time

cinder flare
#

but like, PowerToys does so much nice stuff that it makes me not even want most of this stuff anyways

#

like, Vicinae has an Emoji Picker, Calculator, Clipboard History, and all that is already in PowerToys all open source

cinder flare
#

from Windows?

pastel imp
#

or dual boot if the problem is games

cinder flare
#

like every single game I play, and my work gives us Windows computers lol

pastel imp
#

then just dual boot

cinder flare
#

i gain essentially no benefits from switching, i gain lots of annoyances, so it's not really worth it lol

#

i have a dual boot linux distro setup, but i rarely use it

wind patio
#

I've been meaning to migrate to fully Linux at some point, but I use PowerToys Mouse Without Borders for my work so I can use the same keyboard and mouse and there are no Linux alternatives (that works Linux -> Windows iirc, and that I can install on my work laptop)

#

and hardware switch is annoying

cinder flare
#

god powertoys is so nice dude

pastel imp
wind patio
#

99% chance I wouldn't be able to install them on my work laptop

#

due to security reasons

pastel imp
#

eh yeah that sucks

wind patio
#

I remember asking my IT if I could install an open-source software (that is similar to PT MWB I think), it stated that it has false-positives in VirusTotal and, well, obviously, they told me "VirusTotal blah blah blah, no"

pastel imp
#

it's funny though

#

I previously saw so many people saying to migrate to linux and now I see people saying that they don't want to or dont see the benefit xD

#

not specifically about this convo, just in general

wind patio
#

(imo) vendor lock in, similarly with apple products and their ecosystem

pastel imp
#

which is even funnier since I may see that happen, but stats say that linux is at an all time high adoption rate.

cinder flare
#

yeah i mean when i didn't have a job on Windows everything, the idea was quite intriguing

#

but now that I just use Windows for my work, and Microsoft RDP is so fucking excellent, and every game is moving to Kernel anti cheat that requires Windows, it's just not worth not having

pastel imp
#

Maybe with proton we will reach a point where games will no longer be the limitation for not switching to linux

cinder flare
#

and like, Discord streaming gets fucked up, small things just annoy me, there's just not really much benefit

#

i doubt it

pastel imp
#

I don't.

cinder flare
#

games that have kernel level anticheat will never work with Proton

#

and every game that doesn't basically already does

wind patio
pastel imp
#

Steam is getting big af, at with their work on SteamOS and specially everything running on it, its in their interest to make games work.

wind patio
#

😆

cinder flare
#

Steam is and always has been "big af" lol

pastel imp
#

yes but have you seen stats lately?

cinder flare
#

there's no way all these anticheat developers are ever going to let Linux happen, it's just too free and open

wind patio
#

steam support goated (btw)

pastel imp
#

in the past year(s) they have had a VERY big bump in their "significance"

cinder flare
#

i have no clue what quantifiable stats you're referencing, but Steam has always been literally massive

pastel imp
wind patio
# wind patio steam support goated (btw)

my wifes steam got hacked and I think I maybe sent a single email and they literally didn't ask anything and fixed the issue in less than 2 hours or something lol

cinder flare
#

and either way, nothing's going to change in terms of anticheat development, it's not a Steam related problem at all

pastel imp
#

I remember Linus saying he didn't care about gaming regarding that topic

pastel imp
#

god...

wind patio
#

lol

pastel imp
#

I legit am still waiting for an update from their support

#

my old apple account got hacked, changed password, changed phone number, security questions, enabled 2fa, I got an email saying that, which had a link where I could reset the password and disable 2fa but guess what

#

when I tried logging in, I couldn't log in due to security questions which the hacker changed

#

what's the logic? idk lol

cinder flare
#

omg what if they have Raycast extensions, this would be crazy

pastel imp
cinder flare
#

they have "Extensions"

pastel imp
#

yes but not the raycast ones

cinder flare
#

i suppose it's only a matter of time until they port all the good Raycast ones

pastel imp
#

and from what I recall, their extensions were pretty limited

#

but it's still very nice if you dont want raycast

cinder flare
#

what are the banger extensions? maybe there are some nice equivalents for powertoys

pastel imp
#

I pretty much mentioned some I could remember

#

not on pc rn

cinder flare
cinder flare
#

maybe i'm just not the kind of person for this kind of thing lol

wind patio
#

I'm still on v0.94.0 lol

#

wait Powertoys Run and Command Pallete are different things

#

or I guess Pallette superseded Run

cinder flare
#

yeah that's what they're trying to do from my understanding

#

and i must admit, it is actually quite nice to go into the little submenus

#

maybe i just need to get used to it, though my keybind doesn't seem to be working? i want it on Win+Space

#

is that like an already taken keybind or something?

#

oh yeah i needed "Lower Level Hook" apparently lol

pastel imp
#

using linux on my laptop is kinda me forcing myself to stop using my mouse

#

and learn the shortcuts

#

xD

cinder flare
#

idk im a big shortcuts guy in general

pastel imp
#

(specially now since I no longer have my taskbar lmao)

cinder flare
#

love snipping tool on Win+Shift+S, love color picker on Win+Shift+C, love emoji selector on Win+.

#

obviously I use Vim keybinds in my IDE every single day lol

pastel imp
#

I still don't have the talent of using IJ only with keyboard

cinder flare
#

sadly you kinda can't do most things outside of actual text editing with vim bindings

#

maybe someday we'll get a full IJ mod that runs a virtual NeoVim to control everything like you can do with VSC lol

pastel imp
#

I never got used to VIM

#

nor have used it a lot tbh

#

there's this

#

xD

cinder flare
#

no yeah trust, IdeaVIM is awesome, and an excellent emulation of vim in IJ

#

but you can't really do much outside of just edit text, all the window management and capabilities that you get in NeoVim like navigating between other parts of the app doesn't really work, and you can't really map vim keybinds to it

brazen ether
#

its open source tho so I could probably add it

#

beauty of open source

wind patio
#

damn you can just directly type (some?) commands now

cinder flare
#

yeah they made it so that the . completion menu lets you do code actions too

#

it's interesting in theory, but i have yet to be actually pleased by it lol, it's only been annoying so far

brazen ether
#

like a big part of vim is throwing away clunky modifiers for easier to type multi-key bindings

#

which can also be initialisms for what you're doing to make them easier to remember

wind patio
#

I mean I know my keyboard shorcuts, but seems like a nice feature for those who don't

brazen ether
#

those people should just learn them ngl

wind patio
#

well, (imo) it also helps to learn, since, well, it shows the keybind as well

cinder flare
#

yeah i mean for rarely used code actions, it is quite nice to just be able to .. and start typing what you want to do, ain't no way i'm remembering keybinds for all these random things

#

i think i'm just a little too used to it returning nothing when it runs out of stuff, so it showing more options that aren't completions threw me for a loop lol

wind patio
#

I mostly just use .var and .field

cinder flare
#

my brain just autopilots to fixing it with vim keybinds lol, i can't even like manually stop it and tell it to be smarter

wind patio
#

on another topic, I might finally be able to publish the mod's source code tomorrow

#

if I dont decide to rewrite it for the 4th time

#

also, any feature recommendations? fingerguns

wind patio
#

though I never really tried it, used vim maybe like two or three times, but for quick edits I just prefer nano

brazen ether
wind patio
#

better than?

brazen ether
#

all existing methods

brazen ether
brazen ether
#

but like

wind patio
#

I mean I can't really compare, but I don't find it difficult to use IJ, VSC, whatever

brazen ether
#

i do strongly believe modal editors are objectively better than non-modal, once you get used to them (which only takes a few days really)

brazen ether
wind patio
#

maybe, yeah

brazen ether
#

using nvim is also like

#

it can do the work of python/bash scripts at times

#

with some plugins

#

like doing something massive and reptitive to many files

#

though ai can help with that

#

so it's not as big of a benefit

#

it's also just very nice for refactoring

#

the way macros are handled in vim is so incredibly smooth and non-intrusive

#

but it also takes a long time to learn all of its features well

wind patio
#

I have seen some people use vim/neovim and yeah, it is quite powerful

brazen ether
#

like you can learn the basics in a few days but it's probably gonna be a while until you're using macros effortlessly

wind patio
brazen ether
#

it's also just fun

#

that's one of the biggest reasons

#

alongside less hand pain, being able to write things effectively with no mouse

distant sun
#

I'm not really up to date with these editors, what are you talking about?

crude cloud
#

huh, people use the mouse on intellij?

#

i sure don't lol

brazen ether
#

don't have to stay up to date for that one 😂

distant sun
#

I dont care about VIM, I thought you were talking about something else 🙂 star mentioned the .. shortcut for IJ

pastel imp
#

regarding remote hotswap

pastel imp
dapper pawn
#

@queen bone dms

pastel imp
#

What's the stance on comments on code? What's good practice? Is documenting/giving a javadocs comment to every method the ideal?

prisma wave
#

i'd say so

#

getters and setters maybe being an exception

wind patio
pastel imp
#

W

#

Suggest it to the paper folks

#

maybe they add it in kami chan

wind patio
potent nest
#

kami chan is mainly about performance

pastel imp
#

but there is kami chan extras plus

pastel imp
wind patio
#

nor the plus variant

crude cloud
#

Kami Chan Optimized is purely a performance-oriented modpack, an unopinionated one to that

#

Kami Chan Optimized Plus used to also have non-performance-oriented mods, more about QoL features like minimap and whatever else idk, but now is abandoned and archived

pastel imp
#

didnt know it was abandoned

crude cloud
#

yeah there's a bold red banner on the modpack modrinth page lol

torpid bluff
#

It's more difficult develop a minecraft mod or develop a minecraft plugin?

ocean quartz
#

Depends on what the mod or plugin does, mod can be more complicated due to needing to handle both server and client for certain things

wind patio
#

probably a mod

half harness
prisma wave
#

mod programming is probably harder but plugins have more constraints that you have to workaround

#

imo

#

so it depends what ur doing

pastel imp
prisma wave
#

@nocturne apex looks cool but what would you actually use this for?

prisma wave
#

Ya

nocturne apex
# prisma wave Ya

well it is mainly bcs of centralization of some cache. I do have registries of Action types, Economies, Conditions, etc. etc.
Tho am also still trying to make those API accessible, so anyone can still inject their own types.

This is mainly for overall management of the cache without having to use the concurrent hash map, which could cause a kind of overhead in some cases

#

am just using atomic reference for the registry graph snapshot

#

which is way lighter

#

it should b literal ns

prisma wave
#

I see I see

nocturne apex
#

graph contains literal frozen registries, so they cannot be mutable, but you can unfreeze them, which creates a new snapshot of the map

#

and Registry object is just a holder of RegistryGraph, which is also frozen and creates a snapshot when unfrozen

#

it may make some stuff bit harder to achieve due to using extra methods, tho its just an extra safety and still looks quite clean especially while it is a centralized system

#

and then Ive also made Typed registries using which you can make Class bound registries

#
@Suppress("UNCHECKED_CAST")
inline fun <reified T : Any> MutableRegistry<Class<*>, FrozenRegistry<String, Action<*>>>.registerAction(
    id: String,
    action: Action<T>
) {
    register<String, Action<*>, Action<T>>(id, action)
}

@Suppress("UNCHECKED_CAST")
inline fun <reified T : Any> MutableRegistry<Class<*>, FrozenRegistry<String, Action<*>>>.registerActions(
    map: Map<String, Action<T>>
) {
    register<String, Action<*>, Action<T>>(map)
}

@Suppress("UNCHECKED_CAST")
inline fun <reified T : Any> TypedRegistry<String, Action<*>>.getActions(): Map<String, Action<T>> {
    return this[T::class.java]?.getAll() as? Map<String, Action<T>> ?: emptyMap()
}

@Suppress("UNCHECKED_CAST")
fun <T : Any> TypedRegistry<String, Action<*>>.getHierarchical(id: String): Action<T>? {
    return this.getHierarchical<String, Action<*>, Action<T>>(id)
}

@Suppress("UNCHECKED_CAST")
fun <T : Any> TypedRegistry<String, Action<*>>.getAllHierarchical(): Map<String, Action<T>> {
    return this.getAllHierarchical<String, Action<*>, Action<T>>()
}

#

Ive made extra extensions for my Action & Condition registries

#

Ive got actions that support different binders, so you can make literal actions for different classes like Player, Entity, etc. etc. can be any class ofc

#

and using getHierarchical am getting all possible actions that support the Player binder and use the "command" ID

#

"Hierarchical" is kinda self explanatory

#

Those are just systems that am using for a few months already in my customer's systems, but never made docs for them, etc. So Ive just separated them from the systems and made them open srced

#

Thus I always wanted to make some nice and clean Kotlin libs

#

I also wanna make a lib for generic messages system with MC implementation & translations

prisma wave
#

Yeah I think the design is cool and immutability focus is based

#

I just wasn’t really sure what it’d be used for

pastel imp
#

yeah, same

#

I don't need any case I personally would use it

nocturne apex
pastel imp
crude cloud
#

I personally would use it

Think

pastel imp
#

Bruh

tribal plinth
#

quick question devs,
where do you store:

  1. images
  2. gifs
    cause I've seen a lot of y'all storing the data in database instead of CDN (cloudflare r2 for example)
lavish notch
#

Additionally, are you asking about manually created images or some sort of automated process?

#

For me, when I'm manually handling a few images for use in a plugin page, I just Imgur it.

tribal plinth
#

not mc related

#

this is dev general xd

#

but well it could also help out others, and it's for people to pretty much upload them

#

like:
user X uploads a gif/image
store it in XYZ place or just store the data in sql

crude cloud
#

I've never done anything like that so take this with a grain if salt, just my 2¢, if you really wanna DIY it i wouldn't store it in the db itself, I would store it in a file somewhere, then the path to the file and whatever metadata relevant to the file in a db, then anything that uses that file reference the primary key on the other table etc

#

i know SQL Server allows you to transparently "store" files in it and access them, but it keeps them separate still, all configurable etc, it just makes it transparent, idk about other db engines because I've never had to do anything like that elsewhere

#

I wouldn't be surprised if pgsql had the same mechanism

#

in that case it's quite convenient

quaint blaze
#

If its for user uploaded files, I just store it in some sort of s3 like r2 with an id as its name and then store that id in the database.

crude cloud
#

yeah that's why I said "if you really wanna diy it", otherwise the answer is "you don't, use b2 r2 or s3"

#

they make fun projects anyway

agile galleon
#

Depending on how you deploy it just saving it to local FS isn't a bad idea either

cinder flare
#

most web frameworks will have stuff for storing files nicely iirc

#

Django has a whole Media files system that automatically keeps track of it with the database/filesystem/s3 stuff, which is super nice

#

would not recommend storing any more than a few kBs of plaintext in the database, that just makes everything rougher

#

and if you want local s3, minIO is pretty nice tbh

wind patio
#

I just store them in FS, give them a new random name, store their real name, new random name, path, etc. in the database

#

Also a worse idea would be to store base64 strings

#

or blobs

frigid badge
#

store files in blob storage and put the path in a database.

pastel imp
agile galleon
prisma wave
#

testing i guess

#

or cheaper if you have a big vps

agile galleon
#

I mean instead of local FS

#

I use S3 for backups as well but that's on a remote server and S3 is a well supported "protocol". If the application is serverless or horizontally scaling then it'd make sense to have a central place for S3 idk

prisma wave
tribal plinth
#

that's what I was thinking, but maintaining s3 (security) or paying off to cloudflare gave me a big ff especially that some people enjoy finding a way to give me a huge bill; and storing to db is just out of the way, I did it once, I still see some websites do it, and I'm not thinking of redoing it as it slows down your whole website, application or anything else, so I was thinking of having 3 different storage providers (appwrite, cloudflare, firebase) to handle it out instead

#

but idk, I might get questioned as weirdo trying to abuse free tier while my whole point for this is that I'm paranoid that people would abuse and get me suspended for not paying a huge bill
and hosting a minio instance rn isn't that good of an idea especially if for example the project is on a smaller scale

tribal plinth
#

like I know for a fact that we stick with minio for example for almost everything but this is a personal project and there isn't a lot of funds or guarantee it's going to end up working out which is also why I'm taking some precautions

prisma wave
#

Backblaze is quite affordable for s3 tbf

ionic gust
#

convince me to keep supporting spigot

#

how are there 2 bukkit servers ???

ionic gust
desert horizon
#

Also, mine is even less spigot

ionic gust
#

global stats:

desert horizon
#

Yeah, tho I really need a dark theme

#

It hurts my eyes

abstract osprey
#

the name is misleading

woeful flame
#

universepaper

#

lol

abstract osprey
#

doesn't sound as good

woeful flame
ionic gust
#

obviously doesnt look as great but it used to look a lot worse with the old bstats theme

ionic gust
#

could be a fork of forge for all we know 🤣

abstract osprey
#

i could've sworn it did

#

guys it's a hybrid fork!!!/s

ionic gust
#

💀

ionic gust
#

oh well

#

kind of crazy to pay $70 for a product that only gives you an extremely basic faq 🙃

abstract osprey
#

i'm a client, i can forward any feedback you have if you want

potent nest
prisma wave
#

i love how their "feature list" is just

  1. lightning fast performance
  2. feature rich
  3. active community
#

how does anyone fall for this

agile galleon
#

So many servers fall for that stuff and honestly it seems to have worked out for some

prisma wave
#

if they provided literally any details i might be a bit less skeptical

abstract osprey
#

i'd assume the amount of people coming from the website is very low

pastel imp
#

To my knowledge it really became popular because of 1.8 support being dropped etc

#

It did some optimizations and people just liked it

#

It's a big scan yeah but welp

abstract osprey
pastel imp
abstract osprey
pastel imp
abstract osprey
pastel imp
#

we switched away from it right away lol

#

and actually saw performance improvements

pastel imp
abstract osprey
#

what client/server were you with

crude cloud
#

UniverseSpigot scammed $50,000 out of my grandma

abstract osprey
#

they're coming for your grandad next

crude cloud
#

oh don't worry

#

he is dead

abstract osprey
#

oh.

pastel imp
#

but it was decently large

#

had around 700ish players

abstract osprey
#

Side_Eye mkay

desert horizon
lavish notch
#

Anyone here know of any quick way to extract the full list of resource buyers on SpigotMC?

I've got a resource with 15,000 unique buyers which I'm looking to extract (to make a discord verification system) and I hoping to avoid manually going through all 314 pages of buyers. SCGpain

For reference, I'm not looking to automate it as such since I know SpigotMC has made that very difficult as I plan to manually add users to the extracted list going forward.

agile galleon
#

Afaik the best system is parsing PayPal emails but for extracting buyers from Spigot uhh, maybe Selenium automation so you can pass the captcha as it doesn't necessarily use a headless browser

lavish notch
brazen ether