#dev-general

1 messages · Page 346 of 1

paper kite
#

It's a thread that keeps updating after a quantity of time

jovial warren
#

not bad

paper kite
#

I'm not sure if It's efficient

jovial warren
#

player_list though breaks conventions btw

paper kite
#

oh, thanks! :)

#

It does?

jovial warren
#

yeah, variables should be camelCase

#

e.g. playerList

paper kite
#

ah, I see

#

thanks, I'll remember that

jovial warren
#

and just wanna get you out of bad habits now if I can, naming variables things like p and loc doesn't look very nice imo, and isn't always the best for readability

paper kite
#

oh, ok!

#

also! The plugin is working! :D

stuck harbor
#

good good

paper kite
#

however, I guess It's a bit unfair for a challenge, since the column gets destroyed instantly, haha

#

I'll try to do a timer, so the blocks can dissapear one at a time, at a fast pace

#

do you guys know if java has a function like "sleep()"

#

that is, It stops the thread for a couple miliseconds and then continue?

errant geyser
#

Thread.sleep, though it is blocking obviously

paper kite
#

oh, It makes sense

#

so, if my thread is supposed to execute every 5 seconds

#

but the thread itself takes 8 seconds to execute

#

it wont work as I intended, right?

old wyvern
#

mhm

#

Check the differences in time

paper kite
#

yeah, yeah, no prob

half harness
#

also make sure you're running that async

#

or else or gonna crash ur mc server 👀

paper kite
#

wait

#

idk what you mean

#

do I call the thread in async?

#
BukkitTask taskPrincipal = new BlockMisser(this).runTaskTimer(this, 0L, 10L);
#

mine is currently like this

half harness
#

wot

#

I'm talking about Thread.sleep()

paper kite
#

oooh

half harness
#

you don't want to sleep the main thread (use BukkitScheduler)

paper kite
#

all right, thanks

stuck harbor
#

yeah never sleep the main thread

oblique heath
#

^

stuck harbor
#

cause spigot is shite

#

and runs most stuff in 1 thread

half harness
stuck harbor
#

for some bloody rasin

#

mmm lambda

oblique heath
#

a lot of games run their logic on one thread

stuck harbor
#

games

oblique heath
#

yes

stuck harbor
#

just use goroutines

#

ffs

errant geyser
#

goroutines I can't comprende but they are seggc

stuck harbor
#

they are beyond mere human comprehension

limpid lynx
#

Good evening does anyone mind just helping me out quickly about litebans material?

stuck harbor
limpid lynx
#

Noted

#

Im currently getting an error on line 430 for the argument foreach() just wondering if there was a fix for this?

hot hull
#

Is this a development question or?

limpid lynx
#

not currently but was going to bring up after my appoligies!

hot hull
#

@ocean quartz I found why it wasn't granting the format properly, you forgot a . in the permission, it's triumphchat.chatformatdefault

jovial warren
hot hull
#

That #4 :moan:

jovial warren
#

lol

#

the command scope has 8 threads backing it

#

it seems to pick them in order

static zealot
dawn hinge
#

Omg

jovial warren
ocean quartz
dawn hinge
#

I should have listened

jovial warren
#

oh btw, is +1ing another post allowed in that channel?

#

because someone did it

static zealot
#

nah. asked for removal

#

waiting for someone that actually has access to do it

jovial warren
#

you can't yeet messages?

#

wow

static zealot
#

I'm not a moderator

#

according to FunnyCube only Trusted roles are moderators

jovial warren
#

also, tell them to delete the other request whilst they're at it KEKW

#

that latest abomination lol

static zealot
#

other request?

#

oh you mean the latest service offer?

jovial warren
#

yeah

#

I don't wanna spoil it for those who haven't already lost faith in humanity from this server xD

surreal quarry
#

lmao

forest pecan
#

i feel like the terrible plugin is at the point where it has so much stuff that isn't even worth calling terrible because its impressive how its not just shitty

#

but how much it breaks the server

#

lmao

onyx loom
#

🙂

static zealot
#

yeah I guess we made it do terrible things but not with terrible code

forest pecan
#

we're literally using reflection to get the server

#

i dont think a beginner even knows how to do that

#

xD

jovial warren
#

oh btw, are event priorities a good idea to add?

static zealot
#

we should have just made it in Sk**** xD

forest pecan
forest pecan
jovial warren
#

formatting?

static zealot
#

also I keep saying we but all I did is tell people that they moved when they move xD

jovial warren
#

actually, wouldn't priorities compromise the extensibility of the event manager? since it would know about its listeners

hot hull
jovial warren
#

still trying to figure out how to write a file to META-INF in Gradle

#

actually hold on a minute

#

okay yeah I'm officially stupid

hot hull
#

Took you long enough to figure that out smh

jovial warren
#

took me long enough to figure out that I just had to make a folder in src/main/resources called META-INF and put the file in there yeah

#

oh btw, logging to files is now a thing

#

oh also, would anyone know why it still seems to create the data folder in the root directory rather than in the plugins folder when I use File(pluginsFolder, description.name) (where pluginsFolder is File(ROOT_FOLDER, "plugins") and ROOT_FOLDER is Path.of("").toAbsolutePath().toFile())

forest pecan
#

Path.of("").toAbsolutePath().toFile()

#

😢

jovial warren
#

it's really weird, since it's able to create that directory and walk it just fine, but it still seems to create the folder relative to the root rather than the plugins folder

jovial warren
forest pecan
#

looks so wrong idk lol

jovial warren
#

I mean, yes, it's a bit messy, but it works lol

fierce jewel
#

anyone have plugin for open door with right click ?

jovial warren
#

what?

#

I swear right click to open door is a vanilla feature lol

fierce jewel
#

iron door*

hot hull
#

That's how you make an motd :kek:

jovial warren
distant sun
#

ok ..

jovial warren
#

unicode characters

#

nah I'm messing lol

#

it looks good

hot hull
#

second line is what matters

stuck harbor
#

lol i love unicode

#

69/666

jovial warren
hot hull
#

actual player count

stuck harbor
#

man good

#

i despise fake player counts

hot hull
#

I mean can't you just use the ping event for that?

stuck harbor
#

just lying

#

ffs

jovial warren
forest pecan
jovial warren
stuck harbor
jovial warren
heady birch
#

I think event priorities are pretty important

jovial warren
#

yeah they are, not sure how I would do them though

#

update with command dispatching has just been rolled out btw

jovial warren
#

probably gonna add those now

#

@prisma wave you know a way of doing event priorities with my current reactive setup? or are they pretty much impossible because I have no record of the listeners

tropic cypress
#

Is that channel true for asking an error about building a server software?

jovial warren
#

what?

tropic cypress
#

what what

#

Let me explain

jovial warren
#

please do 🙂

tropic cypress
#

I downloaded a GitHub repo or something else, I don't know what are you calling that

#

than it says "download maven and git" in that page

#

I did

#

than it said "use ./sportpaper build" to build that server software

#

so I did

#

and I got an error

jovial warren
#

what is the error?

tropic cypress
#

that's

jovial warren
#

liking the Linux 👌

tropic cypress
#

what

jovial warren
#

okay, so it's looking for things that don't exist

tropic cypress
#

hmm

prisma wave
tropic cypress
#

yes I decided that too

jovial warren
old wyvern
#

Bukkit priorities be like: Oh? You're supposed to be of high priority? Go to the back of the queue, PEASANT!

dawn hinge
#

Lmao

jovial warren
#

Bukkit team be like:

tropic cypress
#

so what should I do 😄

jovial warren
tropic cypress
#

I just did 😐

jovial warren
#

oh btw, anyone got any idea how I should do cancellable events?

#

since atm, isCancelled is mutable (it's @Volatile)

#

should I store the event and then check if it's been cancelled after I call it?

#

though that could cause race conditions, since multiple plugins could receive the event from the flow at the same time and write different values

lunar cypress
#

yeah no with that model there is no way to await plugins' responses to events

prisma wave
#

Volatile avoids race conditions

#

afaik

lunar cypress
#

volatile does not avoid race conditions at all

prisma wave
#

Oh nvm I forgot what a race condition is lol

stuck harbor
#

uhhh

lunar cypress
#

it prevents threads from interleaving and ensures a before and after relation on a field

stuck harbor
#

vroom vroom

lunar cypress
#

The race condition here is in the design

#

you'll have to find a different way to handle this

prisma wave
#

Yeah

lunar cypress
#

the problem is that there is no coordination anymore

#

and to coordinate you have to take time into account

#

Take some time to think this through

#

What does it mean to receive an event in a minecraft server and what does it mean to cancel it?

#

Well, what you have, in essence, is actually two different, separate actions

#
  1. the server receives the event
  2. the server sends a response in some way to realise the effects
#

now, if everything is asynchronous and we use Flow, we can't just put the plugin inbetween and have it be responsible for both ends

#

You somehow need to make an extra, synchronous hook, maybe separate

paper kite
#

yo, I'm trying to get the entity that was damaged, using the event "entity damaged by entity"

#

I know how to get the damager

#

how can I get the damaged?

old wyvern
#

getEntity afaik

paper kite
#

oh, nice

ruby craterBOT
regal gale
#

d;spigot EntityDamageByEntityEvent#getEntity

ruby craterBOT
regal gale
#

There

#

EntityDamageByEntityEvent extends EntityEvent, so that method can be used

paper kite
#

I see

#

thank you, I'll try using It

#

all right, It works!

oblique heath
#

hello humans

forest pecan
#

hello homo sapien

oblique heath
#

any nginx gurus out there to tell me what i'm doing wrong here?
the goal is to display an image when someone visits https://example.com

server {
        listen 443 ssl;
        server_name ~^example.com;

        ssl_certificate          /etc/nginx/ssl/example.com.cert;
        ssl_certificate_key      /etc/nginx/ssl/example.com.key;

        location / {
            try_files /data/test.jpg =404;
        }
     }
#

the /data/test.jpg exists in that location, and ssl works

stuck harbor
oblique heath
#

i own the site that i am actually trying to display the image on

stuck harbor
#

just use an index.html and have a body that is just an image tag

#

that would be much easier

oblique heath
#

;-;

stuck harbor
#

really

#

much easier, and much more sensible

oblique heath
#

well i suppose that's what i'll end up doing

#

but is there not a way to have it straight up display the image, without an html file

stuck harbor
#

I'm sure that is

#

but to be frank

#

that would be odd

#

u can just do a normal nginx config

#

and in the default pages list thingy

#

but the image b4 the others

#

so it prioritises that

#

I cant tell ya how specifically

#

I forgot lol

oblique heath
#

xd all good, i'll look into default pages

#

thank you 😄

#

(and i'll probably still end up using the index.html)

stuck harbor
#

lol yeah

#

but the standard index.html implementation

#

u can adapt that

oblique heath
#

i.. set the image as the index.html

 root /data/;
 index test.jpg;

victory is mine!!1

paper kite
#

yo

#

I'm trying to create a task, like this:

#
BukkitTask taskPrincipal = new coolDownHealWeapon(this).runTaskTimer(this, 0L, 10L);
#

however, I'm not on the main class

forest pecan
#

coolDownHealWeapon

#

naming conventions

paper kite
#

Isn't it right?

forest pecan
#

CoolDownHealWeapon

#

upper camel case for variables

#

for class names its different

#

all words are capitlized

paper kite
#

oh, makes sense

#

but, for my problem, how should I pass the parameter for the construction? I assume that, because I passed "this", I'm passing a variable which is an object of my class

#

However, It's giving me an error, on "this", that says: "Required type: Plugin, Provided: Protetor"

#

Protetor is my class name

#

I don't really understand why It requires "Plugin", since on my constructor, I have a Protetor

ocean quartz
#

You'll need your plugin's instance, so you'll need to use dependency injection to get it

forest pecan
#

^

#

when you use this, you are referring to a current instance of the current class

#

it doesn't point to the actual Plugin instance you need

#

therefore

#

?di

compact perchBOT
paper kite
#

oh

forest pecan
#

use the variable for the constructor

paper kite
#

so, instead of this particular object, I need to pass a Plugin instance, that is, an instance of my main class?

forest pecan
#

yes

ocean quartz
#

Yes an instance of the main class

paper kite
#

oh, I see. In my last plugin, I also used this, but on my main class, so It worked

#

now that makes sense

forest pecan
#

Yeah

paper kite
#

thanks!

forest pecan
#

cause your main class extends JavaPlugin

paper kite
#

ooooh

forest pecan
#

and that has Plugin as parent

#

so you can refer this

#

in that case

paper kite
#

I see

#

I'll try to apply it, thanks again you two

ocean quartz
paper kite
#

wait... oh

#

I have been using the wrong one

#

well then, sorry

ocean quartz
#

It's alright ;p

jovial warren
#

think I finally figured out what's up with the plugins folder whack

#

for some reason, it seems to be null when load is called (called inside of a forEach inside of the apply block)

#

okay yeah, maybe rule #1 of using apply is to not use the field from a function that's called within the apply block

obtuse gale
half harness
#

fefo

#

help me

#

plz

obtuse gale
#

I can't help if you don't tell me what you need help with

half harness
#

so like instead of it being bob fefo /kill it's ```
fefo
/kill

obtuse gale
#

Yes

half harness
#

oooooooooooooo

#

how?

obtuse gale
#

If I'm not mistaken there is even a tab complete event

half harness
#

what about like this:

obtuse gale
#

d;methods spigot TabCompleteEvent

ruby craterBOT
#
Methods:
org.bukkit.event.server.TabCompleteEvent#getBuffer
org.bukkit.event.server.TabCompleteEvent#getSender
org.bukkit.event.server.TabCompleteEvent#getHandlerList
org.bukkit.event.server.TabCompleteEvent#setCompletions
org.bukkit.event.server.TabCompleteEvent#setCancelled
org.bukkit.event.server.TabCompleteEvent#getHandlers
org.bukkit.event.server.TabCompleteEvent#TabCompleteEvent
org.bukkit.event.server.TabCompleteEvent#isCancelled
org.bukkit.event.server.TabCompleteEvent#getCompletions```
half harness
#
 kill
 killl
 killll
/kil
```into ```
 kill
 killl
/kil
#

all the events only support the argument tab completers

obtuse gale
#

I don't think those (command names) are in the tab complete event, but you can listen to PlayerCommandSendEvent if you want to change which commands clients can see (doesn't mean they won't be able to run the command, if they have perms it will work)

static zealot
#

Soon™️ community is expanding every day

obtuse gale
#

If I have a plugin as a jar that i made that i loss the source code, can I convert that back into kotlin source code?

#

Or do I somehow have to manage to edit the decompiuled kotlinj cod

quiet depot
#

you could try inputting the decompiled java into intellij

oblique heath
#

i think i have officially broken discord image embeds

half harness
#

uh

#

wot

oblique heath
#

click on that

half harness
oblique heath
#

zoom in on it

half harness
#

how

oblique heath
#

lmao

#

try visiting that link too

half harness
#

.jfif?

oblique heath
#

jfif is just a jpg

hot heron
hot hull
#

Aj had the same thing happen to me on the old pc, took 14 hours to remake it but was worth it in the end

obtuse gale
#

Do anyone here know how to make something like #showcase?

#

Pirate one

#

What it use?

prisma wave
#

What the hell

old wyvern
#

lmao

lunar cypress
#

The last two are just pure evil

#

Btw i've tried benchmarking the persistent collections and I've found out that it doesn't make much sense when my CPU reaches its limit in any benchmark lol

#

I need someone with a more potent cpu to execute these

old wyvern
#

I can try

#

send what you want benchmarked

lunar cypress
#

so far it's just two very small benchmarks, but I just wanna see if you'd get other results

#

clone & ./gradlew jmh

old wyvern
#

Alrighty, one min

quiet depot
#

i'll give it a run too

#

get some variation going on

lunar cypress
#

might take a while, haven't configured much (it's probably not representative of the actual performance right now)

quiet depot
#

should I be closing other stuff before running this?

lunar cypress
#

maybe

#

depends on how much your machine can handle

quiet depot
#

I assume it'll be fine

lunar cypress
#

I hope it will be fine for you lol

#

if not I definitely need to adjust some settings

quiet depot
#

only things I've got open that'd be using cpu is discord & chrome (quite a few tabs, but only one is doing anything, youtube is playing a vid)

lunar cypress
#

thanks for helping me out, appreciate it

#

I'll be gone for an hour or two now

quiet depot
#

aight

#

how long does this take on your machine?

#

its been running for about 4 mins now

lunar cypress
#

18 mins

quiet depot
#

oh okie

lunar cypress
#

5 forks, each 5 iterations (+ warmup) with probably millions of method calls each

quiet depot
#

wonder if it would go faster if I was using oracle jdk

lunar cypress
#

you should be able to see the current progress in build/jmh/results.txt

prisma wave
#

Oh wow that's a big benchmark lol

lunar cypress
#

yeah lol it's the default settings

quiet depot
#

it's on fork 3

lunar cypress
#

I will adjust this more because it's probably not the right fit for this

prisma wave
#

You gonna add the kotlin impl too?

quiet depot
#

johnny before you go, just wait for this to finish, should be done in a few mins

prisma wave
#

clojure might actually be faster here no?

quiet depot
#

bm I think he's using kotlin and clojure

#

I saw both being downloaded by gradle when I ran it

#

haven't actually looked at any of the code tho

oak coyote
#

And it’s gone.

prisma wave
#

the kotlin might just be for the buildscript or something

#

The source is just clojure + java

lunar cypress
#

So far I only have clojure vs default java collections

quiet depot
#

the variation in these iterations is huge

prisma wave
#

Oh no you're depending on kotlin, just not using it

#

Right

lunar cypress
#

And only list/vec and only adding

prisma wave
#

yeah

old wyvern
#

Ok I was wondering why ij was showing every class as not found

lunar cypress
#

This was just the initial test to see if it even runs

old wyvern
#

for somereason ti thought this used the haskell sdk xD

prisma wave
#

lmao

obtuse gale
#

Is Javascripts easy?

quiet depot
#

yes

oak coyote
#

Yep

obtuse gale
#

I learn Javascripts from Mimo apps

quiet depot
#

oh for fuck sakes

#

I thought it was done

#

turns out that was only one benchmark

obtuse gale
#

Why?

quiet depot
#

not talking to you lyzen

obtuse gale
#

Ouhh okey

oak coyote
#

They are doing benchmarks

#

For fun

lunar cypress
obtuse gale
prisma wave
oak coyote
#

Doesn’t matter how you learn

#

As long as you learn what you need

obtuse gale
#

Still new actually

oak coyote
#

Some are better or worse

prisma wave
#

My personal opinion is that JS and Python are the 2 easiest "mainstream" languages

oak coyote
#

Any language with “var” is naturally an easier language

prisma wave
#

Most people would probably agree

old wyvern
#

mhm

oak coyote
#

I’d agree with that

old wyvern
#

Not as easy to learn as Elara tho

#

dw

lunar cypress
quiet depot
#

it's also worth noting that the two easiest mainstream languages, are also arguably the worst languages ever design wise (except perhaps php)

oak coyote
#

But do you ever use it 😂😂

prisma wave
#

yeah you mean dynamically typed languages

lunar cypress
#

Yeah actually

prisma wave
obtuse gale
#

Thanks for the info

quiet depot
#

bm do u understand monads

obtuse gale
#

My target is to be awesome Javascripter

prisma wave
#

B

quiet depot
#

thanks to you lot i've been getting fp vids in my recommended

prisma wave
#

I have a vague idea of what they are

old wyvern
obtuse gale
#

Javascripts can make a games?

old wyvern
#

Join the gang!

quiet depot
#

no

#

and yes lyzen

old wyvern
#

Ditch Java

obtuse gale
#

Damn

quiet depot
#

java best lang

old wyvern
#

Ditch impurity

obtuse gale
#

Imma do hack gui

old wyvern
#

Embrace the pureness

obtuse gale
#

Jk jk

old wyvern
#

(lets ignore liftIO for now :))

quiet depot
#

lyzen when I said yes I meant little web games

oak coyote
#

Some hacked clients are coded in JS

obtuse gale
prisma wave
#

APL is among the easiest programming languages to learn

oak coyote
#

Most are C++ or C#

quiet depot
#

are you talking about minecraft jerry?

prisma wave
#

Normalise functional game frameworks

obtuse gale
#

To make games use C++?

quiet depot
#

or other games

oak coyote
#

And then the rest are typically Java

prisma wave
quiet depot
#

yeah desktop games are usually c++ lyzen

obtuse gale
#

Thanks

prisma wave
#

9 times out of 10 it's c++

quiet depot
#

or c#

oak coyote
#

Ehh kinda just hacked clients as a whole

obtuse gale
#

You guys are aweome

old wyvern
#

CPU utilization jumping around

#

lmao

quiet depot
#

jerry minecraft hacked clients are pretty much all java

oak coyote
#

Not the ^ ghost ones

#

They are typically not java to hide them better

#

As of course most developers know java

quiet depot
#

sounds rather counter intuitive

old wyvern
#

piggy

quiet depot
#

I mean for hiding sure

old wyvern
#

Did it end?

quiet depot
#

but why are you hiding it?

#

no

#

still going

oak coyote
#

Ghost clients...

old wyvern
#

lmao

obtuse gale
#

So... After I learned about Javascripts.. Is it same to use it for Scripts or Denizen plugin?

prisma wave
quiet depot
#

did yours finish?

old wyvern
#

Nope

#

I just started like a minute ago

quiet depot
#

what's the purpose of a ghost client? Is it for client side anti cheats?

oak coyote
#

I might have source to some around

quiet depot
#

I didn't think anyone actually played on servers that used those

prisma wave
#

screensharing I think

prisma wave
#

idk it's dumb

quiet depot
#

wtf

quiet depot
#

what hacked client doesn't have a keybind that disables it

#

literally every hacked client ever has that

oak coyote
#

You realise screensharing is a thing in those places

old wyvern
#

Basically gives you a slight unnoticable advantage and make the UI look like a vanilla client so people dont easily understand

old wyvern
oak coyote
quiet depot
#

wym?

oak coyote
#

Strings from process hacker can be used to detect its residue

obtuse gale
quiet depot
#

what does that sentence mean

#

what is a process hacker

oak coyote
#

An SS tool

#

Well not really meant for it

#

But good for it

prisma wave
#

god people need to get a life

old wyvern
#

you will still have Strings What?

oak coyote
#

Basically yeah

obtuse gale
quiet depot
#

ok

#

still not sure what a process hacker is

#

it's an ss tool, what does it do?

oak coyote
#

It’s just a tool

quiet depot
#

oh hey my thing finished

old wyvern
oak coyote
#

Not necessarily for SSing

#

It’s purpose of creation was different

quiet depot
#

uhh

oak coyote
#

But it’s good at it

old wyvern
#

Eh

quiet depot
#

this would only detect your ghost clients

#

it's impossible for something like this to detect a proper java client, because they're literally part of the game

old wyvern
#

Is that not the exact same info you would get from the task manager 🙂

quiet depot
#

whereas a ghost client is a separate executable

oak coyote
#

You also have lastactivityviewer

prisma wave
#

Yeah this doesn't make sense

oak coyote
#

And a few other methods

old wyvern
#

Bruh

oak coyote
#

It’s a crazy community

old wyvern
#

Ghost client bad, Ghost processor good

oak coyote
#

I’ll tell you that

quiet depot
#

god it's like script kiddies developed the perfect formula for catching a hacker, by mixing together a bunch of shit they've got no understanding of

oak coyote
#

Yeah it’s odd

prisma wave
#

these people need to go outside

quiet depot
#

and make a career change

#

obviously IT isn't their forte

oak coyote
#

They have started to create dedicated SS tools if you really want to say that

old wyvern
#

I open my pc and connect a circuit board that MaKes be SuPeR KeTonE InduCed AdredaLinE DestrCtin Bridge with 250K CPS in a block game

#

🙂

oak coyote
#

It’s odd

quiet depot
#

aight

#

yugi how do I view these results

oak coyote
prisma wave
#

We use STRONGLY typed immutable JAVAScript frameworks to ensure your ULTRA KB hacks are 100% UNDETECTABLE

quiet depot
#

i bet the people doing the ss shit are the kind of people that use a vpn to improve ping

prisma wave
#

Lmao

oak coyote
#

They do use vpns typically

#

It’s an odd community

old wyvern
quiet depot
#

like the results.txt file had easy to understand stuff

#

then when the task finished it got converted to some bytecode I don't understand

prisma wave
#

huh

old wyvern
#

I run the server now

quiet depot
old wyvern
#

😎

prisma wave
#

surely the server would just disconnect you if you sent that much data

old wyvern
#

Java good? 😮

prisma wave
#

🥲

old wyvern
#

By 4k ns??

#

NO!!!

prisma wave
#

Pretty impressive for clojure considering

#

I wonder how java linkedlist would compare

old wyvern
#

Didnt the test include the kotlin persistent collections implementation??

prisma wave
#

Don't think so

old wyvern
#

ah

quiet depot
#

I think my results got corrupted

#

gonna try running it again

old wyvern
#

wdym?

quiet depot
#

well

#

there aren't any results

old wyvern
#

Where were the results btw?

#

oh?

quiet depot
#

build/results/jmh

old wyvern
#

ah alrighty

quiet depot
#

there's a results.txt file but it's just bytecode

old wyvern
#

weird

#

Also, did IJ start to just casually consume more RAM in newer versions?

#

Seems it takes like 1.5 to 2gb on idle for me rn

quiet depot
#

1.5 - 2gb sounds about right

#

do you have the memory indicator turned on in ij?

old wyvern
#

Nope

#

What is that?

quiet depot
#

it indicates memory usage

old wyvern
#

ah

quiet depot
#

wot de fuck

old wyvern
#

oh the benchmark ended

quiet depot
#

my ij license expired

old wyvern
#

welp, I mean reappling should take less than a day to be accepted with them so

prisma wave
#

Yeah you have to renew it every year iirc

old wyvern
#

@lunar cypress ```
Benchmark Mode Cnt Score Error Units
ClojureCollections.benchmarkVec avgt 18 138092.658 ± 111312.453 ns/op
JavaCollections.benchmarkArrayList avgt 25 27507.548 ± 17950.582 ns/op

😮
#

😮

prisma wave
#

oh wow

old wyvern
#

tf

#

xD

quiet depot
#

ez flex

old wyvern
#

What is that?

quiet depot
#

report for a subject I do at school

old wyvern
#

Ah

quiet depot
#

rank is out of a cohort of 27

#

only been at school for like 7 weeks so doesn't really mean anything

old wyvern
#

gj man

#

You're in year 12 right?

quiet depot
#

somewhere around there

old wyvern
#

mm

quiet depot
#

@old wyvern memory indicator

obtuse gale
#

Where to view my Server?

#

If it Lag or not?

hot hull
#

what version

obtuse gale
#

Me?

hot hull
#

Yes

old wyvern
#

So I assume task manager is showing the allocated memory and ij is showing whats actually being used of that?

obtuse gale
#

1.16.5@hot hull

hot hull
#

then it lag

old wyvern
obtuse gale
#

Why is it so?

#

What the best? Paper? Yatopia? Purpur?

hot hull
#

Paper, never used purpur, so no clue what it fixes/adds

obtuse gale
#

Ouhh

#

I used paper and people always said Yatopia is guud

hot hull
#

Forget Yatopia exists btw, complete abomination

obtuse gale
#

I used Paper since 2018

dawn hinge
#

I heard purpur offers more performance but it's not as stable as paper

prisma wave
#

🥲

old wyvern
#

Yea I reember glare saying purpur is nice

obtuse gale
#

For me Paper is the best Software for the Server

old wyvern
#

Altho when I first saw it my impression was just "The dude make a fork for just entity mounts?!"

#

Tuinity is great btw

obtuse gale
#

Really?

old wyvern
#

Yea

obtuse gale
#

Okey

old wyvern
#

100k ns

prisma wave
#

lmao

obtuse gale
#

Do you mind if we are friend? @old wyvern, @prisma wave, @hot hull &@quiet depot?

prisma wave
#

uh

#

Sure but why lol

hot hull
#

I do mind, who u

obtuse gale
#

Cool fingerguns

obtuse gale
hot hull
#

ew

old wyvern
#

Sure man

obtuse gale
#

I am not a bad people btw

#

I am 17

jovial warren
#

All you'll get from Frosty is shit lol

obtuse gale
#

There

prisma wave
#

Elm > javascript

jovial warren
#

Surprised that "jump off a cliff" hasn't come out yet lol

obtuse gale
#

Lol

jovial warren
dawn hinge
#

Yeah 😄 👍

old wyvern
#

Haskell > JS 🙂

hot hull
#

Bardy

#

go cliff jumping

obtuse gale
#

@dawn hinge Do you mind?

jovial warren
#

Make me Frosty

dawn hinge
#

Not at all

obtuse gale
#

Aw

old wyvern
obtuse gale
#

Wait.. wtf

jovial warren
#

Oml

hot hull
obtuse gale
jovial warren
#

I'm messing lol

hot hull
#

oh wow

#

but nah seriously, I wanna go skydiving at some point

lunar cypress
quiet depot
#

i ran it again, not at my pc rn tho, will check soon to see if the new results are scuffed

lunar cypress
#

I got similar proportions to BM, so his machine probably bottlenecked it as well

quiet depot
#

wait are those results that I uploaded usable for you?

#

How did you read them?

old wyvern
#

Mine were weirder john

#
Benchmark                           Mode  Cnt       Score        Error  Units
ClojureCollections.benchmarkVec     avgt   18  138092.658 ± 111312.453  ns/op
JavaCollections.benchmarkArrayList  avgt   25   27507.548 ±  17950.582  ns/op

💀

lunar cypress
#

well "usable" in this scope, yeah

quiet depot
#

they’re corrupted right?

lunar cypress
#

how so?

quiet depot
#

it’s bytecode

#

and most of it is zeros

lunar cypress
#

oh, idk what the zeros are, but the data at the top is the result

prisma wave
lunar cypress
#

RAM limitations?

old wyvern
#

wdym?

#

I had ij open if that affects this ig

#

RAM wasnt full

#

CPU was at 100% for some time tho

#

the process was using like 6gb ram I think

jovial warren
#

Wait what's this?

old wyvern
#

a benchmark of persistent collections

prisma wave
#

running on my vps atm

lunar cypress
old wyvern
#

Yea same

lunar cypress
#

although it's weird that cnt is only 18

#

should be 25

old wyvern
#

Then again, it reported an error of 100K+ so maybe* a certain operation or something just spiked for a small amount of time which affected the final results

#

Whats cnt?

lunar cypress
#

sample count

#

in this case it uses everything

#

so 5 forks * 5 iterations

old wyvern
#

ah

lunar cypress
#

Ok great, I think I'll write a proper benchmark perhaps even using bfs as the test

#

with a kotlin, clojure and java implementation

jovial warren
#

Ooh

#

Can I run it when I get home?

#

I wanna see how it benchmarks on my Ryzen 7 3700X 32 GB RAM semi monster machine lol

prisma wave
#

Subtle flex

jovial warren
#

Big flex now

#

xD

#

Oh also, thinking about performance, you know there's actually a legitimate reason why running a Minecraft server on Windows is bad

old wyvern
#

Yes, its not written in Haskell

prisma wave
#

Too much mutablility

jovial warren
#

Windows doesn't have native IO, unlike Linux, Mac and FreeBSD

old wyvern
prisma wave
#

classic windows

jovial warren
#

So you use NIO on Windows

old wyvern
#

What windows needs is IO String s!

jovial warren
#

Especially with Kryptin as well, since Krypton supports KQueue (Mac/FreeBSD), Epoll (Linux) and IO Uring (Linux 5.2+)

#

Vanilla supports Epoll, so it's still better to use Linux

#

But with Krypton, it'll run much faster on Linux, then faster on Mac/FreeBSD, then (comparatively) slow on Windows

prisma wave
jovial warren
#

Lol

prisma wave
#

edge :: Microsoft Chrome

jovial warren
#

What if Windows was a monad

#

😮

prisma wave
#

Maybe it is

old wyvern
#

Maybe you are

jovial warren
#

Maybe

old wyvern
jovial warren
#

Oh btw, does Elara have monads?

old wyvern
#

Maybe

jovial warren
old wyvern
#

xd

old wyvern
#

Maybe

jovial warren
#

Lol

prisma wave
old wyvern
#

You live in the matrix that is Haskell

jovial warren
#

Lol

jovial warren
jovial warren
#

What's the 5800X like? Because I think the 3700X is already stupid enough

winter iron
#

ark at max settings is using about 17%

#

cpu

quiet depot
#

because ark is the pinnacle of optimized software

winter iron
#

yes

lunar cypress
#

graphics settings don't really impact cpu usage all that much

winter iron
#

thats just the game i am on rn

#

other than that

#

watch dogs legion runs smooth as fuck

quiet depot
#

run it through docdex, see how long it takes to index

#

d;info

ruby craterBOT
#
DocDex | Info

Website | Github | Invite

DocDex (Documentation Index) is a bot developed using JDA and Java 11, which can display information on javadoc objects, from a fuzzy query.

Servers

20 (37,447 Users)

Javadocs

93 (Default: jdk)

quiet depot
#

93 javadocs

winter iron
#

how do i do

quiet depot
#

lots of effort

#

probably not worth it

#

it'll use 100% on all cores though

winter iron
#

sounds good to me

jovial warren
#

93 Javadocs + 1 KDoc soon™️

winter iron
#

93 docs 🥱

lunar cypress
#

with a 5800X there is no useful information that you can get from games anymore

#

a 3600 can handle almost any game already

#

the rest is up to the gpu

winter iron
#

im running a 3080 with it too, i bought an entirely new pc cause i had a amd fx 8350 and 1070

#

and it just wasnt enough

#

to do anything

quiet depot
#

a 1070 is still a decent gpu

winter iron
#

shit kept freezing tryna build jars

#

ye

#

its the cpu

#

so outdated

lunar cypress
#

3080

#

jesus

winter iron
#

but to get a new cpu i need a new motherboard ram etc

quiet depot
#

ye

winter iron
#

so i just went all out with new build

lunar cypress
#

do you at least play in 4k

winter iron
#

no

#

i dont got a 4k monitor

#

LOLLLLLL

lunar cypress
#

wasted lmao

quiet depot
#

lol i have a 2080ti and I don't play in 4k either

#

1920x1080 monitor

jovial warren
#

What does DocDex use to index Javadocs btw?

quiet depot
#

only 60 hz

winter iron
#

same

lunar cypress
#

you all are wasting your money holy shit

winter iron
#

nah

quiet depot
#

flex is worth it

winter iron
#

i wanna get a 1440p 144hz

quiet depot
#

@jovial warren jsoup

winter iron
#

but im not too bothered

lunar cypress
winter iron
#

ye

jovial warren
#

Would you accept a PR that added support for KDocs and Krypton soon™️?

winter iron
#

or a 4k 120hz

#

🙂

quiet depot
#

yes bardy

winter iron
#

but im running my os on a hard disk anywyas

quiet depot
#

docdex doesn't just have to be for java

old wyvern
#

Time to add hackage suppourt

#

😌

quiet depot
#

although it'd probably need a bit of a redesign

#

nothing major

jovial warren
#

Yeah idm abstracting it a bit more to support more than just Javadocs

quiet depot
#

it's beta so idc if the api gets fucked over

jovial warren
#

Haha fair enough lol

#

Might have to implement the hackery I did last time for Punishments to get Jenkins to copy KDocs over

#

I had a sed script to replace the reference paths so the CSS and stuff would resolve

#

Or I could just use GitHub Actions to upload to GitHub pages, which won't require any hackery

#

Or something else

half harness
jovial warren
#

god damn it

#

would anyone have any idea about the best way to deal with cancellable events?

#

in my current reactive flow setup

#

I mean, mutability in a highly asynchronous environment, idk what I expected tbh

old wyvern
#

Suspend the event result execution till all listeners result?

jovial warren
#

how do I do that?

#

remember that call just emits a value to a flow, and that we have absolutely no clue how many listeners (if any) there are

old wyvern
#

I assume with async and await from ktx.coroutines

#

Not sure how much flows suppourt coroutines

jovial warren
#

I mean, they come from kotlinx.coroutines, so I'd assume decently well

old wyvern
#

Oh you werent using rx*?

jovial warren
#

rx?

old wyvern
#

Lemme have a look at what the coroutine flows are

#

one sec

jovial warren
#

oh btw, fun fact: you can absolutely use coroutines from Java from what I've seen in the code

#

a Continuation is just a glorified callback, and they're not that hard to generate

old wyvern
jovial warren
#

yeah

old wyvern
jovial warren
#

I'm saying you can

old wyvern
jovial warren
#

you can technically use coroutines from Java

#

but it's kinda pointless

old wyvern
#

You are not using "coroutines" in the normal sense tho then

#

Its literally back to callback hell

#

bard

#

What terminal* operation are you using rn?

jovial warren
#

listen just uses filter, there's no terminal operation there

#

and call uses tryEmit, which gives me nothing

#

maybe @prisma wave can help with this too 🙂

old wyvern
#

The docs mention that they are lazy

#

The listeners shouldnt run without a terminal operation I assume

#

Are they working rn?

#

@jovial warren

jovial warren
#

yeah the listeners work

old wyvern
#

Thats weir

jovial warren
#

they can use collect

old wyvern
#

As in the user?

jovial warren
#

the event currently uses collect, which is terminal

#

but what I'm saying is that how can I know when collect has been called?

old wyvern
#

collect is a suspend function

jovial warren
#

yeah

#

hold on, lemme try and explain my confusion

old wyvern
#

So it should continue only after every listener had made its change?

old wyvern
jovial warren
#

when I emit an event to the shared flow, I have no idea how many (if any) listeners there may be

#

and emit will not suspend and wait for every collector to finish

#

because that's not how flows work

#

they, well, flow

#

oh also, thinking about it, the reason might be because plugins are ran under their own scope

#

well, initialize is, which is the suspending function

old wyvern
#

is tryEmit an extension?

jovial warren
#

nope

#

why?

old wyvern
#

Reading, 1 sec

#

oh right, I think I got its usage wrong

jovial warren
#

oh actually, I'm really dumb

#

okay I've just seen the comment I should've seen all along

old wyvern
#

Which is?

jovial warren
#

that's literally exactly what I need

old wyvern
#

Didnt you say emit wasnt suspending?

#

oh is it just blocking?

jovial warren
#

I said tryEmit isn't suspending

#

I wasn't aware emit suspended for that reason

#

I know it suspends if there is no buffer space available under a regular buffer config

old wyvern
#

I see

jovial warren
#

right, let's see if this works now

#

and I need to read even better apparently

jovial warren
#

ffs why doesn't this work

#

emit suspends until all its subscribers receive it, but that doesn't mean when they collect it I guess?

onyx loom
#

grrr

jovial warren
#

¯_(ツ)_/¯

#

@prisma wave would you have any ideas?

prisma wave
#

Huh?

jovial warren
#

I need to suspend until every subscriber has collected and processed the emitted event

#

basically, I need cancellable events

prisma wave
#

why

#

ew

#

do cancellation synchronously

jovial warren
#

wdym?

prisma wave
#

all on the same thread, sequentially

#

That way you can actually have priorities, no race conditions, etc

#

Probably the best way

jovial warren
#
val event = PreLoginEvent(session.profile.name, session.profile.uuid, session.channel.remoteAddress() as InetSocketAddress)
runBlocking { server.eventManager.call(event) }
if (event.isCancelled) {
    session.sendPacket(PacketOutDisconnect(translatable { key("multiplayer.disconnect.kicked") }))
    session.disconnect()
    return
}
```current code for calling pre-login
#

where call calls emit

#

what do I need to change?

hot hull
#

ew

jovial warren
#

idk what else I can really do there

#

idk how I would implement synchronous event stuff into this current event bus

#

you suggesting I just forgo the reactive event bus entirely and just use a regular old event bus?

#

I mean, I can't really think of another way

hot hull
#

no clue what a reactive event bus is

jovial warren
#

it's reactive

#

so when an event comes in, you get it

#

there's no registration BS

#

it all just flows

#

BM

#

help

#

🙂

#

oh also, putting in synchronous events means I'll probably want to step up my current concurrency model a bit

hot hull
#

how about you keep both options

jovial warren
#

idk yet

#

idek how BM thinks I should do synchronous events

#

also, non-cancellable events will still be dispatched async btw, that won't go away

#

for example, HandshakeEvent will be thrown onto a separate coroutine, since there's no reason why that should be cancellable

#

and anyone who may think that there will be an EncryptionResponseEvent:

dawn hinge
#

Ok

forest pecan
old wyvern
#

You really love that gif dont you

jovial warren
#

yeah lol

#

I was thinking of using the Simon Cowell no, but I wasn't even gonna bother looking for the right one

old wyvern
#

idk, that gif just annoys the hell out of me for some reason 🙃

jovial warren
#

¯_(ツ)_/¯

#

still trying to figure out how I should do these synchronous events BM spoke of

#

could mean the death of the reactive event manager

#

BM

#

Elara bad

old wyvern
#

🙂

jovial warren
#

yet

old wyvern
#

Hes up

jovial warren
#

maybe just ignoring me because it's glaringly obvious and he wants me to figure it out for myself

#

seems legit

old wyvern
#

Or maybe hes busy on someother server?

#

Or just fell asleep with discord on idk

jovial warren
old wyvern
#

oh

#

xD

jovial warren
#

lol

#

BM pls help 🙂

#

how should I do this

#

I need a way to implement synchronous events

#

I suppose I could scrap the reactive event manager entirely and just go with a standard event bus

#

that would work

#

whether it would be nice or not though is another story

old wyvern
#

If you want to continue with this design maybe you can convert mutation into a request format?

#

Like you have events post "Requests" into a channel that you keep receiving and handling

#

That should mean only 1 thread would actually be doing any modifications

jovial warren
#

yeah

#

I also need to think about preventing Krypton from becoming yet another vanilla

old wyvern
#

Minestom

#

lol

jovial warren
#

yeah I've seen that

#

is Minestom heavily single-threaded?

#

I mean, it implements Sponge, so I wouldn't be surprised if it is

#

not sure what Sponge is like for multithreaded implementation support though, but I would imagine that it's not all that great, considering it is intended to be used by implementations that both build on to vanilla

old wyvern
#

Atleast thats what mode told me when we spoke

jovial warren
#

yeah

old wyvern
#

You can look through if you want to check I guess

ocean quartz
#

Don't think sponge has too much multithreading since it also uses vanilla server iirc

jovial warren
#

yeah

old wyvern
#

Dont think it does

#

Yup it doesnt

jovial warren
#

oh does it not?

#

I swear I saw Sponge in there somewhere

#

maybe just me

old wyvern
#

They were in talks on something about mixins from sponge or something

jovial warren
#

one of the reasons I didn't go with Sponge, along with it being a complete API (not what I need atm for this project), is that it is one of the worst projects for Kotlin friendliness I have seen

old wyvern
#

But im pretty sure they arent a implementation of sponge

#

MineStom itself is just a plain API that abstracts away netty

jovial warren
#

ah right

old wyvern
#

It comes with no features of itself

#

They do have a vanila "reimplementation" tho

#

They do seem to have a few service meta files about sponge tho

#

Dont see anything else from sponge in there tho

jovial warren
#

yeah

runic flume
#

Does anyone know a good GitHub Packages alternative. Packages on github are really annoying to work with.
I know jitpack is a thing, although their private repo subscribtions aren't really the cheapest :/