#dev-general

1 messages · Page 420 of 1

quiet depot
#

best way to learn is to dive in

#

which is exactly what I did with docdex

cinder flare
#

oh so it's kinda like when IJ indexes stuff

#

makes it zoom

quiet depot
#

I’d never used mongo or even looked at it properly prior to docdex

cinder flare
#

okay now to come up with a cool idea that uses mongo

oblique heath
#

i believe mongo is used whenever you have to store a lot of data

cinder flare
#

I mean, same as RDBs

oblique heath
#

not quite

#

rdbs are relational

#

mongo is not

hot hull
#

Make a replay system, serialize the server every tick fingerguns

cinder flare
#

yeah so they store lots of interconnected data

hot hull
#

There's your data

cinder flare
#

mongo just stores a ton of unrelated data

#

lmao Frosty

oblique heath
#

ye

#

so if you don't need relations

#

and need a boost in speed

cinder flare
#

ah Isee

quiet depot
#

although you don’t have to

cinder flare
#

yeah I presumed so

oblique heath
#

isn't the selling point of mongo it's flexibility

cinder flare
#

though surely Mongo is very good at serializing/deserializing objects quite easily right?

#

since it's JSON and all that

oblique heath
#

it's great for json

cinder flare
#

cause mapping an object to a SQL database is kinda funky

oblique heath
#

it also has a great capacity to search through string values

#

so if you want to pattern match or look for keywords

#

it's nice for that, i think

quiet depot
#

I mean since it’s json it’s naturally going to be easier to convert to ur objects

#

mongo has a java lib for it

cinder flare
#

awe yeah I knew it

quiet depot
#

there’s like 2 mongo livs

#

libs

#

one is a full on orm iirc and the other is a bit more manual

#

I went the more manual route

cinder flare
#

is there an advantage to that?

quiet depot
#

dunno

oblique heath
#

true developers use documents instead of classes everywhere in their app, so that they never have to mess around with converting them when inserting to mongodb 😎

quiet depot
#

I went the manual route because i wanted to create my own orm

#

wait no that was for the mysql bit not mongo

#

idk why I went manual, can’t remember

cinder flare
#

lol

oblique heath
#

i feel like it'd be more exciting to use docker than to use mongo in a project

#

if you're just making a project for the sake of using one of those

quiet depot
#

u can use both

#

mongo in the app itself

#

docker in devops

cinder flare
#

yeah exactly

#

any other tech I should throw in the mix?

oblique heath
#

well if you're using docker

quiet depot
#

redis

oblique heath
#

go all the way and use k8s

cinder flare
#

yeah I wanted to use redis

#

what's the difference

oblique heath
#

k8s orchestrates

cinder flare
#

I don't really know much about kubernetes or docker

quiet depot
#

you can use redis to have communication between different instances of the app for communication I think

#

redis is also a cache so you can try use that functionality

oblique heath
#

k8s gives you easy access to actually deploy and manipulate launched docker containers

#

docker alone can't exactly do much programatically

cinder flare
#

oh I see they're a combo

oblique heath
#

ye

quiet depot
#

btw if you’re getting into docker

#

would like to introduce you to lemmotresto, our chief docker expert

oblique heath
#

😮

cinder flare
#

oooh!

oblique heath
#

as far as other tech goes

#

you're gonna be working in java right?

cinder flare
#

I presume so. It's the language I am most comfortable with by far

#

Though I strive everyday to get better at Kotlin lol

oblique heath
#

you can try making artifacts and pushing them to a maven repo

#

not that it's much to do with the actual project but

cinder flare
#

oh dang that would actually be very good to learn

#

maybe jenkins too

oblique heath
#

yeah

#

all that ci stuff

cinder flare
#

wow why do I know nothing lol

quiet depot
#

jenkins is old fashioned

#

you might be better off learning github actions

oblique heath
#

github actions yucky

cinder flare
#

but that's not self-hosted :(

oblique heath
#

^

quiet depot
#

well that's not strictly true

cinder flare
#

well there's no reason to self host runners

#

you can just use the provided ones at that point

quiet depot
#

it's actually dangerous to do so iirc

#

security issues on public repos I think

cinder flare
#

dangerous to host your own?

quiet depot
#

yeah

cinder flare
#

ah makes sense

quiet depot
#

it's because people can execute code in your runner via pull requests on public repos

cinder flare
#

it runs your runner on other people's forks?

oblique heath
#

are there settings to prevent pull requests being run?

quiet depot
#

no but if you have a workflow that checks prs, when they pr back to your main repo, the workflow will execute using your runner

#

yes ivan you can simply not have a workflow for prs

oblique heath
#

ah

quiet depot
#

do you have a vps capable of running a repo and jenkins star?

hot hull
#

This can be a record class right?

quiet depot
#

yes

#

probably

cinder flare
#

i mean I have free credits lol

oblique heath
#

🖐️

#

how similar is jenkins to github actions

cinder flare
oblique heath
#

because i have never used either but also feel that i should start on that soon

cinder flare
#

well they're both CI, so presumably they're quite similar

quiet depot
#

don't think they're similar at all

#

use wise

#

sure they can produce the same results but to get to that stage, the process is completely different

hot hull
#

wait records are java 16 or 15?

quiet depot
#

15

hot hull
#

Why does it not exist then

quiet depot
#

try 16

cinder flare
#

lmao

quiet depot
#

records are actually 14

#

have you set your language level?

hot hull
#

bruh what, yea I have it set to 15

quiet depot
#

you might have to enable preview features or something

hot hull
#

ah it's 16 language level

#

sheesh just found out why the initial perlin method didn't work

#

forgot a /2

cinder flare
#

aw Frosty no!

#

you've fallen victim to one of the classic blunders!

hot hull
#

@old wyvern See this would be nice for the renderer

#

3D ofc tho

obtuse gale
#

That's quite an awesome way of putting everything

#

No

hot hull
#

It's 9am

obtuse gale
#

It's almost 4 am and I'm going nowhere

#

Maybe

#

Probably

#

But I don't care enough about my health anyway

quiet depot
#

sleep is for the weak

#

@obtuse gale they're missing the only jep that matters

#

the only jep that ever mattered

#

enhanced class redefinition

obtuse gale
#

oh what's that one about

#

Yo that seems v cool

#

Too bad it says

Status Closed / Withdrawn

lol

quiet depot
#

yeah 😦

unkempt tangle
cinder flare
#

is that not what you had before

unkempt tangle
#

Noñ

#

?

cinder flare
#

oh it seems very similar

#

from my cursory glance lol

#

did you guys know Oracle makes restaurant POS and KDS systems?

echo nexus
#

how should i store player data

#

locally

cinder flare
#

What kind of player data?

old wyvern
#

No, the second part are the return types

hot hull
cinder flare
#

now that's pretty good Frosty!

echo nexus
hot hull
#

made them all y 1 cause I need my fps lmao

cinder flare
#

or do you mean persistent?

echo nexus
hot hull
#

efe, what area of coding you looking at, as in what kind of things are you willing to code

cinder flare
#

Oh I mean, SQL if you know how to use it works nicely

#

I guess MongoDB maybe?

#

There's a lot of storage solutions lol

#

If you're desperate, you could use a yaml config

#

but thats 😬

hot hull
#

pathfinding?

cinder flare
#

ooh A* is really cool!

hot hull
#

If so, make an AI and give it to a zombie, then watch it dominate the world

#

mmorpg?

cinder flare
#

pve gamemodes? hmm

#

yeah ig like hypixel skyblock but efe edition?

#

oh?

hot hull
#

forget hypixel exists, thank you

cinder flare
#

but the dev blogs are so cool!

#

oh my god

#

that's almost as many hours as I have in Garry's Mod

#

I think you're an addict efe

hot hull
#

I still don't get why this fucks the fps so much

cinder flare
#

i mean i skip class to sleep sometimes

#

though im in uni and attendance is not mandatory

echo nexus
cinder flare
#

follow any JDBC tutorials?

hot hull
#

If you don't need persistency, why use a db

cinder flare
#

well no they do

#

that's why they're flatfiling it lol

cinder flare
#

i mean, it's versus other players

#

though 99% of gamemodes are

#

that's uh, kinda what tends to make multiplayer games fun lol

#

then only support 1.16

#

problem solved

#

then cps doesn't matter? lmao

#

well you're not gonna get far by avoiding the biggest part of this game lol

#

hypixel players?

hot hull
#

I was gonna "cache" values for this renderer, but I don't think that'll fix any of my fps issues, anyone got any recommendations for a java 3d rendering lib

cinder flare
#

oh I didn't even realize there was other data besides the yellow haha

hot hull
#

second highest being hypixel china?

cinder flare
hot hull
#

Star, my lack of brain cells might get in the way of that

cinder flare
#

I kinda did it with my poing

#

though in 2 dimensions to be fair

dawn hinge
cinder flare
#

SFML kinda cute tho

dawn hinge
#

Wrong reply

cinder flare
#

wrong reply lol

dawn hinge
#

Smh

ruby craterBOT
#
@Deprecated
void sendBlockChange(@NotNull Location loc, @NotNull Material material, byte data)```
Deprecation Message:

Magic value

Description:

Send a block change. This fakes a block change packet for a user at a certain location. This will not actually change the world in any way.

Parameters:

loc - The location of the changed block
material - The new block
data - The block data

hot hull
#

wanna link code Star

cinder flare
#

my poing?

hot hull
#

Yes Star

cinder flare
#

poing!

#

void sendBlockChange(Location loc, BlockData block)

#

that's not deprecated

#

the args you have is

cinder flare
#

it's a block

ruby craterBOT
#
public enum Material
extends Enum<Material>
implements Keyed```
Material has 1 extensions, 1 implementations, 28 methods, 5 all implementations, and  1542 fields.
Description:

An enum of all material IDs accepted by the official server and client

cinder flare
#

no not maerial

#

and no it extends an Enum

#

of itself as the type

#

generics go brrr

#

it means it gets to override the Enum class methods?

#

as far as I can tell

#

awe nice level 34

#

cause it's a generic

#

you gotta specify what type

#

make bedwars

#

the gauntlet of every true hypixel player

#

make a better one than dkim

#

that'll prove you're a good coder

#

wtf ew

#

skywars sucks

#

bedwars is where it's at

#

yikes

hot hull
#

Why would you need nms

cinder flare
#

to uh

#

net the minecraft server or whatever

#

that's uh, kinda static abuse?

#

just do DI

#

uih

#

for what

old wyvern
#

No

cinder flare
#

yeah probably

old wyvern
#

What does it actually include?

cinder flare
#

considering constructors are things you put in classes to make instances of them lol

old wyvern
#

core seems more like a module bame

#

What part do you consider that?

#

GameObjects?

#

Events?

#

Then decide that first

cinder flare
#

oof

#

Yugi really telling you to map out your whole plugin shcema

#

oh yikes

#

you'll need some multiworld shit going on

quiet depot
#

dis is not static abuse

old wyvern
#

If it contains the main game entry points, a good package name would just be game

quiet depot
#

ur not abusing static by doing that

cinder flare
#

well DI is better, certainly?

quiet depot
#

doesn't really make a difference for your javaplugin instance imo

cinder flare
#

correction: efe vaguely throwing out ideas for an actual good plugin

quiet depot
#

star generally yes, di is better

#

but in this very specific case there's not much reason to use di over a static instance getter

#

especially when using a static getter is so much easier

cinder flare
#

saves you a line in every class

steel heart
quiet depot
#

most people don't write unit tests

#

bukkit is hard to write unit tests for

steel heart
#

Yeah that’s true I guess

#

Yep

cinder flare
#

uh

#

I mean are you actually gonna check the status?

#

usually you just log if it fails

steel heart
#

I’d wrap the if statement with curly braces efe but else I guess nice

cinder flare
#

and nothing if it succeeds

#

yeah what he said

quiet depot
#

u should flip those conditions around

#

have the -1 first

cinder flare
#

is the -1 even necessary?

#

surely the size of a collection can never be negative 1

steel heart
#

Oh so in principle that variable may be -1 or 1?

#

If that’s the case maybe a boolean is better suited

cinder flare
#

ok

#

so what about boolean

#

yeahj

#

efe you literally read a boolean from your config

#

why would you not assign it to a boolean

quiet depot
#

lel

distant sun
#

Collections size cant be lower than 0

cinder flare
#

also turns out it's a boolean lol

steel heart
#

Idk if any other dev does this but I use enums with 2 elements/constants instead of boolean many times.

cinder flare
#

that uh, sounds like a waste unless you plan on adding more options down the road?

steel heart
#

Its more cause of readability

cinder flare
#

is your boolean name not readable?

steel heart
#

Lol

#

Do I sound like the victim now?

cinder flare
#

lol

#
boolean isVictim = true;

enum victimStatus {
  IS_VICTIM,
  NOT_VICTIM
};
distant sun
#

:))

steel heart
quiet depot
#

Not that specifically, but I do often make enums with only 2 constants because adding stuff in the future

#

then I go and use a switch on it

#

and ij has a little rant at me saying I should use an if

distant sun
#

So if I have an arena for an event (50x100 blocks or smth) with 40+ players there, is there any way to lower the impact to the client and/or server that many players in a single area will have?

quiet depot
#

what kind of event is it?

distant sun
#

Was thinking about making them semi transparent

quiet depot
#

can't see that changing anything

#

do all players need to see each other?

#

you could just make it so they can only see a limited amount of people

#

don't think 40 players is going to stress the client much though?

cinder flare
#

yeah honestly

#

40 players will stress the network connection more than anything

distant sun
cinder flare
#

i mean, LOS detection sounds like the easiest one

#

obviously packet editing is required

distant sun
#

Los?

cinder flare
#

line of sight

#

though to render only a certain number of players will require a reason for hiding them

#

so if you only want like the 5 nearest players, might be worth it to give them like blindness or something

steel heart
cinder flare
#

it still sends packets, which would still stress connections

steel heart
#

Minecraft /teams command maybe

cinder flare
#

does that allow you to hide players?

#

I thought it just did names

steel heart
#

Or would that also send packets even tho you’d essentially hide players

#

Hmm yeah I don’t remember tbf

cinder flare
#

hmmm yeah seems like you're gonna need to get some packet stuff to stop packets from being sent

distant sun
#

Wont LOS require a constant check?

cinder flare
#

i mean, you can do like every few ticks

#

and it's just some maths

#

i dunno, it's what video game renderers do lol

#

I don't see why you would have a single server mode boolean when you could just set max-games to 1

distant sun
#

gameLimit = boolean ? 1 : max-games;

cinder flare
#

yeah?

#

so if you want single server mode, just set max games to 1

quiet depot
#

I thought about LOS but the problem is people can turn their heads very fast

cinder flare
#

very true, the minecraft server tick system was probably not intended for this kind of stuff

#

maybe just radius then?

#

i dunno

quiet depot
#

that's why I just recommended hiding random players

cinder flare
#

random players lmao

#

what if it's a guy right behind you

quiet depot
#

well he can't see you either

#

make sure it's synchronised

cinder flare
#

that would be so weird

quiet depot
#

you wouldn't know

cinder flare
#

i guess not, but then it's like you're not even in the same server as them

#

you'd see people getting attacked by nothing lol

quiet depot
#

no you wouldn't

#

it's all synced

#

you'd have groups of players that could see each other

cinder flare
#

well doesn't that defeat the purpose of having a big deathmatch?

quiet depot
#

didn't realise it was a deathmatch

distant sun
#

It doesnt

cinder flare
#

i presumed it was im not sure

quiet depot
#

gaby can you give a quick summary of the event

#

don't want to watch a vid

distant sun
#

So I can split the players in groups of ten and hide each group from the others?

cinder flare
#

oh yeah that would be an excellent idea if you can do it without messing the game up

old wyvern
#

Or you could setup a party system

#

People in the same party can see each other

#

You cant see epeople from other partys

cinder flare
#

well that would work if you're not supposed to like fight random people

old wyvern
#

Oh it's pvp?

quiet depot
#

we don't know

cinder flare
#

nobody knows except Gaby

old wyvern
#

Oh

cinder flare
#

and he's writing a 5 paragraph essay right now

old wyvern
#

xD

quiet depot
#

5 paragraphs

distant sun
#

It consist of an arena with two regions, one for O (true) and one for X (false). Players get asked a question and have like 10 seconds to go the the area for X or for O and those who choosed the wrong answer get removed from the event.

quiet depot
#

this man is writing a novel

#

a 2 sentence novel

old wyvern
#

Party

cinder flare
#

yeah that took a lot longer than the amount of content I presumed there'd be lol

distant sun
#

Im on phone su

cinder flare
#

that's like block party on uh

#

hive?

distant sun
#

Negative

cinder flare
#

i mean similar concept

#

you go to a series of blocks

#

instead of giving you a color, it asks you a question lol

distant sun
#

I guess

old wyvern
#

Thi is trivia I think

cinder flare
#

well yeah then you could totally do the party thing

quiet depot
#

yeah in that case gaby, my idea would work or parties

#

but 10 is low

#

I don't think 40 would even lag your client

distant sun
#

I work on a clan system but is not done, will implement this when it is

cinder flare
#

yeah honestly, 40 isn't bad at all

#

plus then you get to see people flock to a side

distant sun
#

Will see how it goes without hiding them

quiet depot
#

do a test with lambdaattack

#

see if 40 players lags

cinder flare
#

is uhhhh... is this open source?

old wyvern
#

No its for the dutch server I think

cinder flare
#

oh very sad

distant sun
#

dutch?

quiet depot
#

gaby is very dutch

#

yes

old wyvern
#

Uh

#

Portugeese?

#

I forgot

distant sun
#

Yugi ..

quiet depot
#

look at the flag

old wyvern
#

Soz

#

😂

#

Spanish?

quiet depot
#

look at the flag

#

copy it

#

paste it into google

old wyvern
#

Idk what that flag is

cinder flare
#

Romania?

old wyvern
#

😫

#

Ohh

cinder flare
#

it just shows as RO to me

old wyvern
#

Yea

#

That

quiet depot
#

basically dutch

distant sun
#

Ye the flag works only on mobile

old wyvern
#

😂

cinder flare
#

is this for royalsaga.net?

old wyvern
#

Yes

cinder flare
#

ah very cool

quiet depot
#

||woah im gonna hack ur server kid||

distant sun
#

Im mostly worried about the server itself @quiet depot last night we had the weekly giveall event and well .. 75 players got us down to 8tps :))

old wyvern
#

💀

quiet depot
#

this sounds like an oof

cinder flare
#

oh my god how

old wyvern
#

Switch to kronos

distant sun
#

@quiet depot fix the timezone smh

old wyvern
#

🥲

quiet depot
#

you fix it

#

what's even wrong with it

old wyvern
#

Btw piggy

cinder flare
#

i think the problem is ubuntu here

distant sun
#

One hour behins :((

old wyvern
#

Linux and windows times seem to conflict

distant sun
#

Behind

quiet depot
#

gaby it's set t your timezone

cinder flare
quiet depot
#

what's your timezone

distant sun
#

The console shows the wrong time

old wyvern
#

Fixing on neither sides work

quiet depot
#

lol

old wyvern
#

🥲

cinder flare
#

you need to set one of them to use the others time

distant sun
#

But anything related to time form the panel works

cinder flare
#

are you using arch yugi?

old wyvern
#

Manjaro

cinder flare
#

ah perfect

distant sun
quiet depot
#

we use real operating systems

cinder flare
#

ubuntu big dumb

quiet depot
#

pf

old wyvern
#

😂

quiet depot
#

no

#

you be hating on ubuntu but canonical is basically solely responsible for linux's popularity these days

distant sun
#

8tps doesnt feel like 8tps but still xd

cinder flare
#

bruh

#

canonical bad company

#

same with red hat

#

the only purity in this world is Debian and Arch

quiet depot
#

no

cinder flare
#

scroll down to the windows thing

#

and it'll coordinate

quiet depot
#

gaby I'm pretty sure your timezone issue stems from the fact that your servers are all in docker containers

#

and they might be using their own timezones

#

and god that just sounds like so much effort to fix

hot hull
cinder flare
#

i am liking the look of that!

#

though make sure you do your meshes so you don't render like all bazillion of those unused sides

hot hull
#

meh

distant sun
#

nice frosty

hot hull
cinder flare
#

oh lol

#

maybe performance could be better? 👀

hot hull
#

will have to be, but certainly not if it's written in java

cinder flare
#

oof my poor java boi

distant sun
#

fps = 60;

jovial warren
jovial warren
#

it's over 9000

distant sun
#

while (true) fps += fps;

cinder flare
#

damn exponential fps

hot hull
#

it generates the entire thing every time you move, hence why it's so inefficient

#

need to probably cache already generated stuff

distant sun
#

you mean double negation?

cinder flare
#

you know when you minus a negative and its positive

#

it's inverting an inversion

hot hull
#

Don't think I'm able to check if the block is visible with this tho to not draw it

cinder flare
#

well you can just check if it has air on a side

#

and add that side to the mesh

#

and only draw those ones

jovial warren
hot hull
#

Not how this works Star kek

cinder flare
#

wot

#

just check if it has a block on that side

#

and if it does, don't draw it

old wyvern
steel heart
#

No

#

Pls

#

Why

jovial warren
#

lol

distant sun
prisma wave
#

Hmm do I apply for support role

#

On the one hand I would be able to see when dkim deletes his messages

cinder flare
#

lmao

prisma wave
#

On the other hand I wouldn't be able to shitpost in showcase anymore

hot hull
#

I improved performance a ton, however

hot hull
steel heart
#

Super duper quality

hot hull
#

oh wow sharex doesn't actually recognize the image stutter kek

#

It's blinking rapidly

prisma wave
#

That looks cool

steel heart
#

But nice thing

#

Very satisfying

prisma wave
#

Would be much faster in rust

hot hull
#

It would be much faster in any other language

steel heart
#

Haskell KEKW

hot hull
#

however I sm0ll brain so

cinder flare
#

yeah why'd I have to get so used to java

#

it's ruining my game dev prospects

steel heart
#

Java game dev tho

cinder flare
#

minecraft?

prisma wave
cinder flare
#

what other games are written in java lol

steel heart
#

Uh

prisma wave
#

I guess papi would count

hot hull
#

MC's rendering engine is written in what?

prisma wave
#

LWJGL

hot hull
#

my brain borked

prisma wave
#

or OpenGL

cinder flare
#

yeah definitely LWJGL

prisma wave
#

Yeah

hot hull
#

OpenGL would probably be the way to go no?

prisma wave
#

Which is just an OpenGL wrapper

steel heart
#

Isn’t that like natively implemented (with C++ or smtng)

prisma wave
hot hull
#

renderer

prisma wave
#

hmm maybe

onyx loom
#

we need the shitpost for best of helpchat

prisma wave
hot hull
#

cause as soon as I start adding more terrain variation, and actually scale it up it'll shit itself with this

cinder flare
#

oooh you get a lot with LWJGL

prisma wave
cinder flare
#

OpenGL, OpenCL, OpenAL, GLFW, Vulkan

steel heart
#

It’s quite nice the way mojang actually abstracts it if you’ve worked with modding

hot hull
#

I've not

#

Gonna try LWJGL and see how it goes

steel heart
#

Pog

hot hull
#

I'll be back in a bit when I need help, kbye

prisma wave
#

it's quite interesting

cinder flare
#

have fun!

#

wear your helmet!

prisma wave
#

you're pretty much writing C code in java

steel heart
#

Bbcode

jovial warren
#

idk why but I thought I would apply for support lol

hot hull
#

I mean I'm support and I support noone :dab:

jovial warren
#

gonna press a big fat X there and doubt I'm getting in but ya know, worth a go

jovial warren
cinder flare
#

Blitz can only help so many people

steel heart
#

Lol

jovial warren
steel heart
#

He’s da man in the plugin help channels

onyx loom
#

bardy have fun with the random people dming and pinging u 💀

jovial warren
#

did Blitz rename himself btw?

hot hull
#

I've had a lot more brain cells since I stopped helping people in there

cinder flare
#

turn off dm's 🧠

steel heart
#

turn off computer ASbigBrain

onyx loom
#

lmao frosty same

prisma wave
#

Plugin help channels are horrendous

onyx loom
#

general plugins is pain only

prisma wave
#

Terrifying places

cinder flare
#

someone's gotta toil through the pain

cinder flare
#

some people just need it explained to them what placeholders are, ya know?

prisma wave
#

Are u fucking with me or ?

jovial warren
#

oh btw, BM, I got something for you

steel heart
jovial warren
#

recently went through and documented the server-side of Krypton, I want you to make sure that I've done the author tags correctly

pallid gale
jovial warren
#

wait what is that?

#

look

#

👀

#

okay that is actually fucking cool

jovial warren
onyx loom
#

yes new embed

jovial warren
#

146 files changed in 8 commits

#

🥲

prisma wave
#

Looks fine

#

Idrc about specific files

jovial warren
#

I tried to base it off of the really accurately named Git Blame

steel heart
#

Ngl I tried spring and it’s not that bad

jovial warren
#

and I say really accurately named because it tells you who to blame something on if it goes wrong lol

jovial warren
onyx loom
#

just blame it all on bm

jovial warren
onyx loom
#

it was his project

jovial warren
#

oh actually, wanna see what BM said in Krypton when I talked about the good old days when server only did a few things

onyx loom
hot hull
#

I'm a professional already

onyx loom
#

pog frosty

prisma wave
#

amazing

onyx loom
#

thats epic

onyx loom
#

i heard google are hiring frosty

prisma wave
hot hull
#

google is too low level for me

jovial warren
prisma wave
#

Rust OpenGL

onyx loom
#

u might wanna take the chance with those skills

jovial warren
#

thinking of adding a GUI to Krypton at some point

hot hull
#

ngl this actually looks hella nice

jovial warren
#

optional ofc, and disabled by default I think

#

no annoying java -jar Krypton.jar nogui

prisma wave
onyx loom
#

what 😂

prisma wave
#

*you're

onyx loom
#

ok buddy

jovial warren
#

java -jar Krypton.jar --idiot-mode enables the GUI 😎

steel heart
#

👍👍👍

onyx loom
#

not worth the time bardy

prisma wave
#

*you're

onyx loom
#

i heard 0% use the gui on spigot

cinder flare
jovial warren
jovial warren
cinder flare
#

a web control panel would be very cute

jovial warren
#

could make a Pterodactyl egg

cinder flare
#

maybe you can make the next pterodactyl

#

oh yeah lol

prisma wave
#

Recreating the wheel is a traditionally good idea clojuremoon

steel heart
#

Such pioneering

cinder flare
#

i bet pterodactyl isn't written in kotlin

jovial warren
prisma wave
#

The Daemon is in Go though 🤤

jovial warren
#

used to be in JS

stuck harbor
#

so they went from JS to PHP?

#

good

#

thats the correct move

cinder flare
#

oh dang I keep hearing things about GO

#

should i try it

stuck harbor
#

go is good

steel heart
#

Pokémon Go

stuck harbor
#

ive been considering making a restful api

#

in go

prisma wave
#

"if you want to use an imperative languages, don't. If you have to use an imperative language, use Go or Rust"

  • Mother Mary
steel heart
#

It’s a quote so it’s objectively true

#

I shall trash java

cinder flare
#

dude working with JavaScript and Google's APIs made me want to go back to Java so much

old wyvern
#

Elm

#

😌

jovial warren
old wyvern
#

Rambda

#

😌

old wyvern
cinder flare
#

not knowing what types things are and not knowing what methods you can do to things until runtime is infuriating

old wyvern
#

Star, give elm a try, its very easy

prisma wave
#

typescript

cinder flare
#

and even if I used elm, the API is in javascript

#

I did use typescript

hot hull
#

sheesh

old wyvern
#

The compiler is much better than haskell at telling you what to do

prisma wave
#

except everything is const 🙂

hot hull
#

we got vsync in this bish

cinder flare
#

but it doesn't give me types

steel heart
#

Lol

old wyvern
#

Did you rewrite the rendered frost?

cinder flare
#

like the way you interact with this API is by defining 5 functions

old wyvern
#

Which API is it star?

steel heart
cinder flare
#

Google Data Studio Connector

#

look at this shit

steel heart
#

Holy shit

#

Never seen so long switches

cinder flare
#

well you need a case per column

#

and there happened to be 65 columns

steel heart
#

Lmao

hot hull
#

doing it rn Yugi

old wyvern
#

What in the

cinder flare
#

yup

#

that's how you gotta do it

#

gotta define the schema, then gotta define the data

#

also they use plain Objects as maps, and fields are accessed using bracket notation

old wyvern
#

A lot of it seems to be repeated

cinder flare
#

it's unique, I assure you

#

one of those thiccy switches is for defining the schema

#

and the other is for actually retrieving the data

old wyvern
#

Why not just define an object with properties for each case in a separate file

#

then import it

cinder flare
#

becuase

old wyvern
#

and insteadof switching

#

fetch the right one

cinder flare
#

you can't in Google Apps Script

old wyvern
#

wdym?

cinder flare
#

this is just a fancy way of writing Google Apps Script code

#

see the instructions?

old wyvern
#

Lemme check

cinder flare
#

it uses clasp to upload it and then it reformats it back down to shitty javascript

#

also this is what the like 3 tutorials I read said to do

#

so I just did it

old wyvern
#

That switch just feels like a complete mess

cinder flare
#

I mean I completely agree

old wyvern
#

Why wouldnt the object approach work btw?

cinder flare
#

you can't import things in Google Apps Script

steel heart
#

Damn

cinder flare
#

also I don't really see the point

#

making a new object for each type is no different than having a switch

old wyvern
#

You wouldnt need to create a new object

cinder flare
#

I'd still need something to map the strings I'm given to objects

#

that's what you just said, no?

old wyvern
#

You would only need to write the "builder" logic once

old wyvern
#

I meant keeping a singel instance of an object like a configuration

#

Even a json files does well

#

Would you be able to import json files in it?

cinder flare
#

not that I know of

#

I mean I need to specify types and methods for each thing

#

That doesn't really store well in JSON

old wyvern
#

hmm

cinder flare
#

I see what you're trying to go for in combining the switches into one

#

but they do separate things that can't really be combined

#

plus it's already done and I already got clout from it

#

it might be the reason I get a development internship this summer 😉

steel heart
#

So I mean nice

cinder flare
#

exact;y

#

who cares about google apps script code anymore

old wyvern
#

They seem to just differ in Id and names

cinder flare
#

they differ in functionality

steel heart
#

Yeah well let me copy ur nicely written readme thank you

cinder flare
#

yeah my dad typed it up in google docs and I formatted it into Markdown lol

steel heart
cinder flare
#

see he does marketing and I do development

#

we're a perfect team!

steel heart
#

Man my dad does like uh well tbf Idk

#

Java issues

#

Tbf just anonymously instantiate efe lol

cinder flare
#

what if the whole world is just anonymously instantiated

steel heart
old wyvern
# cinder flare they differ in functionality

for example lets take a small segment

        case 'LogonTrackerVersion':
            fields
                .newDimension()
                .setId('LogonTrackerVersion')
                .setName('LogonTracker Version')
                .setType(dsTypes.NUMBER);
            break;
        case 'ProcessTrackerStatus':
            fields
                .newDimension()
                .setId('ProcessTrackerStatus')
                .setName('ProcessTracker Status')
                .setType(dsTypes.TEXT);
            break;
        case 'ProcessTrackerVersion':
            fields
                .newDimension()
                .setId('ProcessTrackerVersion')
                .setName('ProcessTracker Version')
                .setType(dsTypes.NUMBER);

we can shift it to..

var configuration = {
    'LogonTrackerVersion' : {
          'id'   : 'LogonTrackerVersion',
          'name' : 'LogonTracker Version',
          'type' : dsTypes.NUMBER,
     },
    'ProcessTrackerStatus' : {
          'id'   : 'ProcessTrackerStatus',
          'name' : 'ProcessTracker Status',
          'type' : dsTypes.TEXT,
     },
    'ProcessTrackerVersion' : {
          'id'   : 'ProcessTrackerVersion',
          'name' : 'ProcessTracker Version',
          'type' : dsTypes.NUMBER,
     },
}
...
let section = configuration[fieldID]
fields
  .newDimension()
   .setId(section.id)
   .setName(section.name)
   .setType(section.type);
#

Would this not work?

cinder flare
#

you also need to know the metric vs dimension thing

#

but I mean I guess? doesn't really save too much code

old wyvern
#

The* point was to reduce the repeating part

cinder flare
#

the word case?

old wyvern
#

no the repeating builders in the cases

cinder flare
#

i mean what difference does it make

old wyvern
#

Also yea I didnt notice the metric thing

cinder flare
#

that's essentially the same thing

old wyvern
cinder flare
#

just stored in weird javascript object map instead of copied a lil

old wyvern
#

Easier to manage

cinder flare
#

i guess?

old wyvern
#

🤷

cinder flare
#

would it eliminate the absolutely massive array I have that it iterates through?

#

cause that'd be interesting

#

oh shit wait

#

could I also add the other switch statement property in there somehow

#

oh damn this is getting interesting

old wyvern
#

wdym?

cinder flare
#

you know the other switch statement that tells it how to format it

old wyvern
#

You could probably throw in a construction function for creating the metric/dimension thing

cinder flare
#

surely I could implement that into this thiccy object?

old wyvern
#

Which one star?

#

line no. plz

cinder flare
#

starting 528

#

the other switch statement

gusty fulcrum
#

is there any downsides to using NBT data on items?

old wyvern
#

oh god

#

Yea probably

hot hull
#

k so now I need to draw an image of my terrain, and then update the image to the buffer

#

How hard can that be

cinder flare
#

oh but I can only define string: string pairs eh

#

not actual like methods

old wyvern
#

wdym?

cinder flare
#

in the object thing?

old wyvern
#

You can have functions inside js objects

#

yes

cinder flare
#

i can only declare maps right?

#

i mean per map object

#

i can put functions inside of each separate one?

old wyvern
#

Yes

steel heart
cinder flare
#

woah woah

#

gimme a code sample

old wyvern
#

Of a function in a js object?

cinder flare
#

like, combine the two switch statements like you did above for just the one

old wyvern
#

Lemme see

cinder flare
#

one ultimate class that holds all relevant information

gusty fulcrum
old wyvern
#

I feel like it might still look weird

#

Maybe map it to actual functions

#

Gimme a moment

cinder flare
#

god yugi if you can save me you'd be a true hero

#

like if you can map a string key to a function

hot hull
#

Oh yea we're back at libgdx

cinder flare
#

i bet that's possible right? javascript is really janky

steel heart
old wyvern
#

This would be the one with inline function there

cinder flare
#

can I not put it inside the other one?

old wyvern
#

But id recommend writing the functions separately and just mapping there so the functions dont look horrible

old wyvern
cinder flare
#
var configuration = {
    'LogonTrackerVersion' : {
          'id'   : 'LogonTrackerVersion',
          'name' : 'LogonTracker Version',
          'type' : dsTypes.NUMBER,
     },
    'ProcessTrackerStatus' : {
          'id'   : 'ProcessTrackerStatus',
          'name' : 'ProcessTracker Status',
          'type' : dsTypes.TEXT,
     },
    'ProcessTrackerVersion' : {
          'id'   : 'ProcessTrackerVersion',
          'name' : 'ProcessTracker Version',
          'type' : dsTypes.NUMBER,
     },```
#

can I not put those functions in that

old wyvern
#

Are those fiedl id's the same?

cinder flare
#

yes

old wyvern
#

They look different

#

I cant find LogonTrackerVersion in the other switch

cinder flare
#

Line 644

old wyvern
#

on alrighty

cinder flare
#

it is literally copy pasted

old wyvern
#

Thn just add another field to it

cinder flare
#

ohhhhhhhhhhhhh

#

this might be good

#

cause 99% of these are one liners anyways

#

and I can just add squiggly brackets surely?

#
'hostName' : (entity) => {
  entity['hostname']
}
old wyvern
#

yes

#

You can have them be multiline

#

You can even use the normal function syntax

#

But I recommend just sticking with the lambda syntax

cinder flare
#

i do like lambdas

#

god damn Yugi you're the best

#

thanks so much

old wyvern
#

There might be some difference with what it captures for this tho

#

I dont remember well

#

Try that out somewhere first maybe

#

I think I read somewhere that the capture is different

old wyvern
cinder flare
#

oh shoot it doesn't take the overarching boi as this?

#

hmmm

#

best way to embed the dimension vs metric?

#

just make a boolean and call two separate methods in the builder?

#

also it uses the right this as far as I can tell

old wyvern
cinder flare
#

okay so I don't know what that is

old wyvern
#

Give a few mins

#

Having lunch

cinder flare
#

okay sick tysm

jovial warren
#

anyone know if there's an easy way to do wildcards with curl or wget? trying to make a script to download the Krypton JAR, but it's named Krypton-VERSION.jar, and there's no way for my script to be able to figure out the version without already knowing it

cinder flare
#

you can literally do wildcards in bash

jovial warren
#

I need them in curl

#

since I need to download a file from the web

cinder flare
#

just write a basic script for it!

jovial warren
#

yeah that won't work here

#

since this isn't a standard directory listing

cinder flare
#

surely there's a way to get the directory listing of a web server

jovial warren
#

I wonder if Jenkins' API allows me to query all artifacts from a build

cinder flare
#

oh probably

#

you want to download the latest one I presume?

#

try http://example.com/jenkins/job/my-job/lastBuild

jovial warren
#

dw I got this

old wyvern
#

That should be it

#

just call build on any parameter then

cinder flare
#

could I not just... put that inline?

old wyvern
#

configuration[id].build()

cinder flare
#
    'primaryIpv4Address' : {
        'dim'   : (fields) => fields.newDimension(),
        'id'    : 'primaryIpv4Address',
        'name'  : 'Primary IPv4 Address',
        'type'  : dsTypes.TEXT,
        'data'  : (entity) => entity[this.id]
    },```
#

that's what I've been doing

#

though build is a better name ngl

old wyvern
cinder flare
#

oh I see

old wyvern
#

And refactoring that at some point will be hard

#

If it all points to the same function, you can just modify that if needed

#

Wouldnt have been nice if it was possible to keep this file separte tbh xD

cinder flare
#

so i'd do like, configuration[id].build().setId(configuration[id].id).setName(configuration[id].name).setType(configurationId[id].type)

old wyvern
#

Maybe with some compiler

#

webpack can inline to a single source right?

cinder flare
#

afaik, Google Apps Script just literally copy pastes any code you write in another file into the main one

cinder flare
#

same as C importing

stuck harbor
#

at some point you shouldn't oneline things

cinder flare
#

that won't be one line

cinder flare
#

it will be prettily indented

old wyvern
#

Only the visible sources clarity matters

cinder flare
#

oh so I can make another file to declare all my shit?

jovial warren
#

hey star

old wyvern
#

Atleast for this, if possible

jovial warren
#

wanna see the script I wrote?

cinder flare
#

yes

#

ooooh i am hyped Yugi

old wyvern
#

😇

jovial warren
#
#!/bin/bash

BASE_URL="https://ci.kryptonmc.org/job/Krypton/lastSuccessfulBuild"
ARTIFACT=`curl "${BASE_URL}/api/json?tree=artifacts%5BrelativePath%5D" | jq '.artifacts[0].relativePath' | sed 's/"//g'`

curl -o Krypton.jar "${BASE_URL}/artifact/${ARTIFACT}"
stuck harbor
#

hm

#

not terrible

cinder flare
#

ah now that's pretty nice

stuck harbor
#

I would make the user do it manually cause you are their overlord and you need to assert dominance

#

make things too easy for the user and they might start thinking for themselves

#

they might even start to PR

stuck harbor
#

also i think I see jenkins

cinder flare
#

okay how tf do I import another file in TypeScript

stuck harbor
#

start using go then do that

old wyvern
#

Does google appscript inline it by itself?

cinder flare
#

probably?

old wyvern
#

If not, you might need a compiler beforehand

cinder flare
#

but I need it to know that my other class exists in my IDE

#

the clasp utility converts it down to GoogleScript

old wyvern
#

Alright

#

Look into its doc

#

Most probably either require or import i assume

cinder flare
#

Warning: Apps Script's runtime/execution is different than Node or web browsers. In particular, you cannot use the terms export or require in the same way you would with Node. You cannot use window like in web browsers.

#

bruh

old wyvern
#

Some posts seem to suggest appscript doesnt require the import statement

#

Try creating a second file and trying to use variables from it in your main one

cinder flare
jovial warren
#

oh btw, Krypton Pterodactyl egg anyone?

old wyvern
#

8th point

cinder flare
#

read my link

#

I used the exports thing and it's working so nice

old wyvern
#

Oh alright

cinder flare
#

$1 for an entire minigame server, anyone?

jovial warren
#

lol

eternal compass
#

@jovial warren Will Krypton have a built in anticheat? (Better than vanillas)

jovial warren
#

lol

eternal compass
#

Not a perfect one by an means

#

But one that stops very blatent things

jovial warren
#

it won't allow invalid packets at all

eternal compass
#

So no forge?

jovial warren
#

doesn't Forge append something to the handshake packet?

#

I think it puts FML in the address, which will break Krypton completely

eternal compass
#

Uh it might actually

jovial warren
#

I will add support for those null-separated strings though at some point, since I need to for Bungee support

eternal compass
#

But like a max packets setting aswell

jovial warren
#

yeah there will be rate limiting if I can get it to work

eternal compass
#

Cool

#

And are ticks a thing?

jovial warren
#

yeah

#

unfortunately

eternal compass
#

:( ok

jovial warren
#

packets aren't handled in ticking though, that's why rate limiting packets/s might be difficult

cinder flare
#

bro calm down, Bardy doesn't even have a fully functioning game yet, let him think about anticheat after it works lol

eternal compass
#

Lol ik, was just wondering

jovial warren
#

lol fair

eternal compass
jovial warren
#

player movement won't be limited by the tick scheduler's speed

eternal compass
#

Nice

jovial warren
#

that's handled asynchronously with the power of Netty

eternal compass
#

ooh

jovial warren
#

no packets will be handled sync generally

#

they're handled from the Netty thread that calls the handle function

eternal compass
#

Mhm, ok

jovial warren
#

if you've got time I can show you what it's like so far if you want

eternal compass
#

Ok, sure

jovial warren
#

and I just found a bug, yay

eternal compass
#

Ok, gimme a min

#

windows is updating

#

😦

cinder flare
jovial warren
#

when you try to make things cleaner and you just break them

old wyvern
#

Pass your object as an argument

#

so like