#dev-general

1 messages Β· Page 122 of 1

prisma wave
#

easier said than done

heady birch
#

idk sounds pretty easy to me πŸ™‚

#

for (int i = 0; i < 10; i++) {

new Thread() {
@Override

#

public void run() {
calculate();
}
}
}

#

you got no excuses really

prisma wave
#

damn you're right

#

my bad

heady birch
#

sxtanna you too @topaz bay ?

#

ah hes probably bed

prisma wave
#

imagine sleeping

heady birch
#

eat code complain repeat

topaz bay
#

?

#

I'm watching Hamilton

signal tinsel
#

Github packages wtf

#

Do you need to authorize to use a public github packages thing?

old wyvern
#

Yes

#

πŸ˜‚

quiet depot
#

@signal tinsel yes, that's why no one uses gh packages for public projects

signal tinsel
#

Lmao

jovial warren
#

good day all

regal gale
jovial warren
#

well it's Java for a start lol

regal gale
#

I was at first like "This tutorial is interesting, i need this a lot"

jovial warren
#

no the Java isn't that bad

#

the uneven indentation bugs me

#
public class DummyNetworkManager extends NetworkManager {

    public DummyNetworkManager(EnumProtocolDirection enumprotocoldirection) {
    super(enumprotocoldirection); // <-- this should be indented by the same amount as the rest of the indentation smh
    }
}
```wtf is that
regal gale
#

There's a lot of missing explanations on that tutorial actually

jovial warren
#

yeah this guy's just copy and pasted from his IDE and done no refactoring I bet

#

actually no because even then indentation would be fine

#

maybe he just writes like that

#
@Override
    public void tick() {
this.getBukkitEntity().teleport(...); //make it teleport to a location
}
```that's straight copied from the IDE
#

anyway enough about the styling

#

what's he actually trying to teach

regal gale
jovial warren
#

"Where texture is the texture" well nah no shit sherlock

#

that was harsh lol

#

also this guy doesn't know what πŸͺ πŸ’Ό is or what coding conventions are

regal gale
#

Just observe all of the explanation, you'll see lol

jovial warren
#

just commented on it

#

told him to fix indentation and to rename variables to πŸͺ πŸ’Ό

regal gale
#

Camelcase thonking

jovial warren
#

camelCaseLooksLikeThis

#

PascalCaseLooksLikeThis

#

snake_case_looks_like_this

#

three main cases used in programming

#

in Java/Kotlin we mostly use camelCase and PascalCase

hot hull
#

I use MaDfIsHbOiCaSe

prisma wave
#

Camel case is mostly used

#

PascalCase is only for types

jovial warren
#

you use whatever the fuck case @hot hull

#

in Python they use snake_case a lot

#

and in C as well

#

C# uses PascalCase for methods which is really fucking weird

#

varies between language

old wyvern
#

Thats because C# is considered closer to java

jovial warren
#

Java doesn't use PascalCase for method names though lol

#

PascalCase on method names just looks weird imo

#

probably because I'm used to camelCase

old wyvern
#

Yea That lost me a lot of marks in my unity exams

jovial warren
#

Unity's in C#?

old wyvern
#

yes

jovial warren
#

also who has a Unity exam

old wyvern
#

Scripting lang

#

I do

heady birch
#

they grade you on convention?

jovial warren
#

ofc they do lol

old wyvern
#

ofc not, the default functions use those conventions

jovial warren
#

we get taught Python at my school

regal gale
#

You guys forgot js ._.

jovial warren
#

and we don't even get a good fucking IDE

#

we get PyScripter

heady birch
#

IDLE?

regal gale
#

My school only grade how functional it is πŸ‘€

jovial warren
#

I've asked for IntelliJ many times and they don't even say no they just don't respond

old wyvern
#

update funtion in unity would be Update() while I kept overriding update() in all classes

#

This is on paper

#

so

#

no IDE to correct me

hot hull
#

Why the fuck would you write code on paper lmao

old wyvern
#

Exams

hot hull
#

Ah yes go memorize everything, that's hella dum

#

b

old wyvern
#

Design + Basic Script for dedigned game

#

Its actually not

jovial warren
#

My so-called "I.T" team consists of one guy who's employed under the title "Desktop Support", because people are so stupid that they can't even navigate around fucking Windows 10 or use a projector properly. And the the other guy is the Sys Admin for the academies trust.

old wyvern
#

You shouldnt always rely on the IDE to hold your back

hot hull
#

How is it not

jovial warren
hot hull
#

Well no shit, but you won't be coding without an IDE now will you

jovial warren
#

I love how that allows you to find out the area that I live in and the school I go to lol

old wyvern
#

Would

jovial warren
#

I can't even compile Java on the machines

old wyvern
#

lol

jovial warren
#

there's no software that'll do it

#

PyScripter is the portable version so it doesn't compile Python on the actual machines lol

#

it's just a piss take

old wyvern
#

Tbh Java has cost me a lot of random marks

#

I used a new keyword to construct object in a C exam

jovial warren
#

Java's kinda easy

old wyvern
#

Its not a java exam tho

jovial warren
#

lol

#

C can go fuck itself

old wyvern
#

Nah

jovial warren
#

static = local variable? fuck off

#

I got to that point and just kinda gave up

old wyvern
#

Im still learning C

#

first thing that comes to my mind when I think of creating a object is the new keyword so I kept writing that everywhere xD

jovial warren
#

use Kotlin so you can still kinda be familiar but get used to not using new

old wyvern
#

nah Im more familiar with C now

#

That exam back almost a year ago

jovial warren
#

you still using Java btw?

old wyvern
#

Im using many languages?

jovial warren
#

what about JVM languages

#

Java and Kotlin or just Java?

old wyvern
#

Java, Scala and Kotlin

jovial warren
#

or just Kotlin even better

#

okay good lol

prisma wave
#

Scala πŸ€”

jovial warren
#

what's Scala like btw?

#

heard it's a bit like Kotlin but not as good

prisma wave
#

it's more functional

jovial warren
#

since Kotlin compiles faster and has coroutines

#

and other features

#

also btw just out of JVM languages for the minute, anyone here used Dart?

prisma wave
#

very briefly

#

in one of those coding challenges

#

i wanna do some more of them now lol

jovial warren
#

gotta use Dart for Flutter

old wyvern
#

Idek what Dart is

jovial warren
#

Dart is the language that Flutter uses, made by Google

prisma wave
#

it's pretty nice

jovial warren
#

Flutter is the framework that works on both Android and iOS

#

one codebase

old wyvern
#

I see

jovial warren
#

think it does more than just Android and iOS as well

#

though no one really uses anything other than those OSes

heady birch
#

symbian

pastel imp
#

so bois quick question.. which version of spigot would you guys recommend to do a server? (any version that supports viaversion etc..)

jovial warren
#

that's up to you

#

depends on what you want

glad spear
#

Paper pft use good ol vanilla gachiCOOL

pastel imp
#

ye was speaking about paperspigot

#

but like..

jovial warren
#

it's just paper

pastel imp
#

It came to my attention that newer versions may have more features.. ex. deluxemenus has more features in the newer versions

glad spear
#

1.14.4 I use

jovial warren
#

the "spigot" was dropped from paper a couple of years ago πŸ™‚

pastel imp
#

oof

old wyvern
#

You should choose depending on the specs you have I guess

pastel imp
#

I am outdated

jovial warren
#

yeah but newer versions are generally lower performance

glad spear
#

Generally ye

jovial warren
#

so there's that to consider

old wyvern
#

Wouldnt go below 1.12 either

jovial warren
#

why?

old wyvern
#

1.13+ works better if you have enough ram

glad spear
#

Get 1.8 PepoDanceLS

jovial warren
#

1.13+ is slower than 1.12-

old wyvern
#

@jovial warren thats the last version before a lot of the thigns were rewritten

jovial warren
#

yeah ik

old wyvern
#

You asked why

jovial warren
#

but 1.13 is still lower performance than 1.12

#

believe it or not

old wyvern
#

It works fine if you have a good enough server

jovial warren
#

true

glad spear
#

64G dedicated server gachiCOOL

jovial warren
#

I always suggest going for 1.13+ or ideally the latest for SMP servers, 1.8 for KitPvP or PvP-based servers and hub servers, and 1.12 for prison/skyblock servers

#

why does one need a 64 GB dedi?

glad spear
#

You don’t lmao

jovial warren
#

unless one owns a large server

old wyvern
#

I have a 15GB 1.15.2 server, runs fine till like 30 players

jovial warren
#

yeah 1.15.2 is crap for performance

glad spear
#

Facts

old wyvern
#

yea but players want the latest as well

#

So yea

#

Now they want 1.16 asap πŸ˜‚

glad spear
#

My survival on 1.15.2 ate shit at 20 players all building fucking cactus farms and shit

jovial warren
#

sounds about right

#

1.7.10 is so good with performance

#

even with mods

#

until someone I know logs on and builds some monster machine

old wyvern
#

Yea I had a dude build a laggy restone piston build, server crashed in like a minute

glad spear
#

Fr I don’t understand why people do that lmao

old wyvern
#

Trolls

#

mostly

glad spear
#

They just build laggy ass shit it’s annoying lmao

old wyvern
#

I mean he wasnt tryign to build anything useful

#

it was litrally a whole bunch of pistons

glad spear
#

I logged on one day to find some dickhead built like a contraption with item frames, moving doors and pistons the minute you loaded that chunk, the server crashed even with 10g ram

#

Might’ve been 15 actually

spare niche
#

how to give permission of guishop help plz

lavish notch
#

how to permission mod use

pastel imp
#

so I was thinking on using a 1.12.2 paper but my friend is saying maybe using a plugins so that 1.8 can also join may be a little bit sh@ cause lag and some other compatibily issues

#

is that a fact?

#

or just some random things he's saying?

errant geyser
#

?tryandsee

compact perchBOT
errant geyser
#

Mostly though ViaBackwards should be fine, I've never had any issues with it

tiny flower
#

anyone have a library of bezier path in java?

hot hull
#

Bezier?

tiny flower
#

yes

#

to do something like this

jovial warren
#

that's the C++ version ofc

tiny flower
#

is like that i guess

#

the idea is when i add some points he gives me a set of points that forms a curve path

errant geyser
#

Pretty sure Yugi is very good with this kinda stuff

jovial warren
#

@old wyvern

tiny flower
#

he is offline :/

#

i can wait πŸ˜‰

jovial warren
#

he'll appear

tiny flower
#

ok

#

its like that

#

but this use android.graphics.Path

#

and that is a problem

jovial warren
#

if there isn't an existing pure Java implementation and you really want this to work you could always make your own

tiny flower
#

obviously i will need to adapt to my project but create one from scratch ..

jovial warren
#

yeah might be a bit complex

tiny flower
#

yup

#

because is not a normal bezier cube, its a bezier path

errant geyser
#

Again, I expect Yugi is your man

#

He's really good with this kind of stuff

tiny flower
#

rip gifs dont load

errant geyser
#

It's just a Tier 1 limitation

tiny flower
#

😭

#

where i see my level?

errant geyser
#

#bot-commands you can type =level, but level != tier

#

You get Tier 2 at level 10 I think it is

onyx loom
#

indeed

#

1-9 = tier 1
10-19 tier 2 etc

obtuse gale
#

so i was wandering if someone can tell me how a vps host works as in like the little box where the internet is and people buy webhosts for minecrraft serverr im wondering how they get the internet to be fast do they all have their own seperate routers or what?

jovial warren
#

VPS' are basically glorified virtual machines

#

they all run on the same physical machine, but use different networks, and so have different IP addresses

#

both VPS and web hosting are shared

obtuse gale
#

ah okay

eternal compass
#

Where is the correct place to ask to hire someone to design "phases" for a oneblock server? (phases are which blocks/entities will spawn, and what will spawn inside chests)

#

(Like forums and such)

ocean quartz
#

@hot hull Did you test the inventory types on your fork?
Like, setting items, interaction with the fillers, interaction with the invalid slot?

old wyvern
#

@jovial warren
Was asleep welp, had to wake up early today- I have my course registration in a few hours.
@tiny flower
By bezier path I assume you mean a bezier curve with n control points.
You can just use the generalized equation of a bezier curve to calculate that.
which would be:

f(t) = sigma(r = 0 to n){ nCr * (1 - t)^(n - r) * (t)^(r) * point[r] } where n = (no. of points - 1)

Here's a simple implementation I wrote
https://gist.github.com/Vshnv/691ce20fd16c082f6f7b2b35e9739eef

Gist

GitHub Gist: instantly share code, notes, and snippets.

hot hull
#

@ocean quartz Yes

tiny flower
#

@old wyvern what i think is that what i need wtf you're a god!

#

its hard do adapt to 3d?

#

according to this

#

is like that?

old wyvern
#

Should be easy to adapt to 3d
Just set the point array size to 3 and add the func w.r.t z too

tiny flower
#

yes xd i already added

old wyvern
#

Alrighty that should be it

tiny flower
#

you helped me a lot! thank you.

old wyvern
#

you're welcome

topaz bay
#

Hey

#

I've done this before

tiny flower
#

@old wyvern Hey u already help me a lot but a question, is possible for the spacing between points always equals? http://prntscr.com/tbloe3
In this case, instead of saying how many points I want, he would get the points he thinks is necessary

obtuse gale
#

oof

#

really boutta test intellijs refactoring skills

topaz bay
#

thoughts?

#

Emulating how Mercy's (from Overwatch) healing/damage boost beam works

tiny flower
#

@topaz bay your wave moves when you're still, how did you do that?

topaz bay
#

That beam uses 3 control points

#

that stationary party, a point right in front of my face, and then a third one that is being constantly pushed forward and back from my face

tiny flower
#

aaa true

#

very cool

hot hull
#

kek name

#

You got the whole alphabet or just those two?

topaz bay
#

getting there

#

πŸ˜‰

hot hull
#

oof

topaz bay
#

mi familia

#

those whores, I hate them all

hot hull
#

kek

tiny flower
#

getting there
@topaz bay xDD ok

#

rip gif i forgot again

hot hull
tiny flower
#

you can divide by modules

topaz bay
#

fucking gross

hot hull
#

Exactly, so suggestions?

heady birch
#

first off

#

FactionOptions

#

put a load of those settings into a class

tiny flower
#


    public boolean isBanned(FPlayer player) {
        for (BanInfo info : bans) {
            if (info.getBanned().equalsIgnoreCase(player.getId())) {
                return true;
            }
        }

        return false;
    }
``` btw u can use lambda
#

    public String getRule(int index) {
        if (rules.size() == 0) return null;
        return rules.get(index);
    }
``` ternary operator: rules.size() == 0 ? null : rules.get(index)
hot hull
#

Not my code, I wouldn't be asking for suggestions on cleaning up since I'd make it clean from the start

tiny flower
#

ofc

heady birch
#

Frosty what are you doing

#

Commission

hot hull
#

Contemplating life decisions

tiny flower
#
private int getChestSize() {
        int size = FactionsPlugin.getInstance().getConfig().getInt("fchest.Default-Size");
        switch (getUpgrade(UpgradeType.CHEST)) {
            case 1:
                size = FactionsPlugin.getInstance().getConfig().getInt("fupgrades.MainMenu.Chest.Chest-Size.level-1") * 9;
                break;
            case 2:
                size = FactionsPlugin.getInstance().getConfig().getInt("fupgrades.MainMenu.Chest.Chest-Size.level-2") * 9;
                break;
            case 3:
                size = FactionsPlugin.getInstance().getConfig().getInt("fupgrades.MainMenu.Chest.Chest-Size.level-3") * 9;
                break;
        }
        return size * 9;
    }
``` U cane store `FactionsPlugin.getInstance().getConfig()` into a variable
#

most of the code is getters and setters

heady birch
#

DI framework

#

How many classes in the project?

hot hull
#

342 πŸ˜‚

heady birch
#

Ok yeah DI container πŸ™‚

tiny flower
#

342 πŸ˜‚
@hot hull lel

hot hull
#

I mean it's all static so :kek:

tiny flower
#

static

#

hm

#

it was best to do it all again when that happens

heady birch
#

Is it all static

#

Or do you mean a single static getter

tiny flower
#

that is a singleton

#

i think it means all static

heady birch
#

It aint really a singleton

hot hull
#

Like 10 classes tops use actual DI, the rest just access everything statically

#

Probs gave up with DI and went with static

tiny flower
#

It aint really a singleton
@heady birch ??

heady birch
#

its just a static getter really

tiny flower
#

@hot hull how much does the project mb?

heady birch
#

Probs gave up with DI and went with static
Me sometimes

tiny flower
#

its just a static getter really
@heady birch with an instance right?

hot hull
#

Without shading it's 1.2mb, with shading it's 9mb, since it's a chonk

heady birch
#

What dependencies does it use

tiny flower
#

so big O.o

hot hull
#

I mean I kinda feel him since with larger projects DI doesn't really help all that much

heady birch
#

πŸ‘€

#

That's why you use a container

#

πŸ˜…

#
  • Factory classes are useful
tiny flower
#

how i get developer tag in helpchat?

heady birch
tiny flower
#

all my projects are private :/

hot hull
#

Disgusting

tiny flower
#

'-'

#

its private comissions

steel heart
#

Frosty you 4head

tiny flower
#

i will not put public of course xd

heady birch
#

Frosty are you making a factions plugin

steel heart
#

Frosty if you have a big project, you should probably use guice

topaz bay
#

guice is evil

steel heart
#

What isn’t ?

hot hull
#

I'm cleaning it up Niall

steel heart
#

All those cmds though

heady birch
#

Guice is stupid

steel heart
#

Not really

topaz bay
#

Its not stupid, it serves its purpose well

heady birch
#

It's alright unless you got a 5mb upload limit

topaz bay
#

But its evil

heady birch
#

PicoContainer

hot hull
#

Imagine caring about jar size

#

Fucking weak

heady birch
#

Imagine caring about "code cleanliness"

#

OCD

hot hull
#

I mean when the code isn't performing as well as it should be, it's a sign

heady birch
#

πŸ™

#

Your cleaning it up

#

as Comission?

hot hull
#

Yes Niall

heady birch
#

πŸ˜•

hot hull
#

hm?

#

@heady birch Elaborate your πŸ˜• emoji

steel heart
#

Frosty is the source open?

hot hull
#

The original yes

#

SaberFactions

#

Go cringe

steel heart
#

I mean your faction plugin?

topaz bay
#

I'd sooner die

steel heart
#

Sounds fun

hot hull
#

The things I've changed aren't, no

steel heart
#

Oh you forked it

hot hull
#

yessir

topaz bay
#

Hmmmmm

#

Something seems wrong here

#

Maybe I'm tired and going crazy, but one would expect those to be the same fucking things

old wyvern
#

@old wyvern Hey u already help me a lot but a question, is possible for the spacing between points always equals? http://prntscr.com/tbloe3
In this case, instead of saying how many points I want, he would get the points he thinks is necessary
@tiny flower
Sorry was a bit busy with my pre course registration stuff.

Since we have n control points, the integral to calculate the exact arclength to get that would be impossible or very hard at least to the point where it wouldn't be useful, the workaround would be to approximate the arclength corresponding to our input t.
Basically we "cheat" integration and switch the integral for a sigma and our derivatives for relatively small changes thus just having us do a sum of the small changes instead
I revised the gist, should be fine for the most part now, The result is ofc not perfect but its fairly smooth

https://gist.github.com/Vshnv/691ce20fd16c082f6f7b2b35e9739eef

#

What project was the bubble thign for?

topaz bay
#

It was just a part of a testing module in my industry plugin

#

I was doing stuff and then I got bored, so I decided to figure that out

old wyvern
#

ah

#

industry?

topaz bay
#

old project

#

just added machines

#

and an ME like storage system

old wyvern
#

I see

jovial warren
#

oh hey someone I'll get an honest opinion from

#

two classes from my simple framework I've started working on

hot hull
#

feels bad

[10:59:56 WARN]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
[10:59:56 WARN]: SLF4J: Defaulting to no-operation (NOP) logger implementation
[10:59:56 WARN]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[10:59:56 WARN]: SLF4J: Failed to load class "org.slf4j.impl.StaticMDCBinder".
[10:59:56 WARN]: SLF4J: Defaulting to no-operation MDCAdapter implementation.
[10:59:56 WARN]: SLF4J: See http://www.slf4j.org/codes.html#no_static_mdc_binder for further details.

quiet depot
#

imagine not using an slf4j impl

jovial warren
#

logback-classic

heady birch
#

The things I've changed aren't, no
@hot hull Legal time

#

Show me the source

#

Oops correction, under the GPLv3 license you are legally required to show me the source

#

Ok I want a lawyer 😐

jovial warren
#

ya gotta show the source if it's GPL Frosty

hot hull
#

I couldn't care less honestly, so πŸ–•

topaz bay
#

Thats kinda hot

old wyvern
#

Damn

topaz bay
#

like... UGH

#

Its SO HOT

normal talon
distant sun
#

God no

#

One sx is enough

jovial warren
#

lol

topaz bay
#

hater.

old wyvern
#

@topaz bay what plugin do you use for the syntax coloring?

topaz bay
#

Its not a plugin

#

IntelliJ has built in custom file type creation

old wyvern
#

Ah I see

topaz bay
#

It even does this

#

Which is kinda fire

old wyvern
#

wait what

topaz bay
#

(its basic in file sub matching, no intellisense involved)

old wyvern
#

oh

topaz bay
#

still kinda fire

old wyvern
#

πŸ˜‚

regal gale
#

I really do wish if IntelliJ has a keyboard shortcut to import all at once

#

Eclipse has it

old wyvern
#

import all of what?

#

There is no point

regal gale
#

The class import

topaz bay
#

Just turn on optimize imports on the fly

#

If it can import something without a doubt, it will

old wyvern
#

It already imports everything when you auto complete a function name or something too

distant sun
#

Why sometimes when I add a dependenci it doesnt recognize the class at first, but only after I type it name and press import?

old wyvern
#

wdym?

distant sun
#

I type the class name and it's not suggested on that thing

topaz bay
#

why do I do this to myself

old wyvern
#

uh might be coz it was still indexing

distant sun
#

Idk tbh

heady birch
#

Not hot

#

Your idea of hot is kind of meh

#

My idea is factories builders and constants 😍

distant sun
#

What are all these icons?

#

Sx

topaz bay
#

Your idea of hot is trying to make everything look like spring

heady birch
#

O object

#

C class

topaz bay
#

Which is terrible

heady birch
#

You just jealous

distant sun
#

E enum?

topaz bay
#

yes

heady birch
#

nope

old wyvern
#

@topaz bay Should kotlin files with multiple classes be named with a lower case?

topaz bay
#

technically, they tell you to name those classes what they do

#

I use lowercase because it makes more sense to my brain

old wyvern
#

ah ok

heady birch
#

You ever type in a random number and get some medical disease thing

old wyvern
#

no?

distant sun
#

You ok niall?

heady birch
#

ncbi dont like me

distant sun
#

Ncbi?

prisma wave
heady birch
#

struct is a nice keyword

#

I really like it

topaz bay
#

ugly

prisma wave
#

it is

#

Quite elegant

topaz bay
#

What is __upon?

prisma wave
#

a massive hack

topaz bay
#

yikes

#

cant relate

prisma wave
#

it stores the object that a function is being called upon

heady birch
#

Type ina random 6 digit number gOOGLE

prisma wave
#

so in this case __upon is type

topaz bay
#

Why didnt you use.... "this"

#

Or "self"

prisma wave
#

because it's not this

heady birch
topaz bay
#

It kinda is "this"

#

lol

distant sun
#

__upon is better than this?

heady birch
#

I prefer "Me"

distant sun
#

In what world lol

heady birch
#

Like in VB

distant sun
#

:)))

prisma wave
#

it's semantically different to this

heady birch
#

Just use Me

#

like any normal human being

topaz bay
#

Thats only because you defined the function as a property in kotlin

heady birch
#

Me.age

topaz bay
#

When the analog would be a function inside of the test class

prisma wave
#

true

heady birch
#

Me.age

prisma wave
#

but since there is no default value, it's implied as something you would pass

#

ah fine i'll use this

#

looks nicer anyway

heady birch
#

Sargent Balles

#

Lol

onyx loom
#

Like in VB
@heady birch 😠

distant sun
#

Dont be rude with sergent ball

heady birch
#

For some reason my system picks up the local air ambulance as police

#

then flicks to helimed when they send their identity

distant sun
#

Seems fine for me

heady birch
#

specialist aviation services

topaz bay
#

lucky for me

#

Odin has no concept of "this"

hot hull
#

Niall, can I say it?

topaz bay
#

for now

heady birch
#

No you cannot

prisma wave
#

imagine not having this

hot hull
#

:c

#

@prisma wave Why did I read that as tits..

prisma wave
#

lmao

#

good question

heady birch
#

Lol the systems correct

topaz bay
#

I am genuinely happy with the progress I've made on Odin

#

It is now the most complete language I've ever designed and written

prisma wave
#

πŸ‘ πŸ‘

#

Likewise

distant sun
#

Main.o

#

Potat.o

prisma wave
#

Odin is still trash though

topaz bay
#

If Odin is trash Frigga is shit

prisma wave
#

That logic seems flawed

distant sun
#

I want a clean fight ladies

topaz bay
#

Flawed.

#

But true.

prisma wave
#

Well let's face the facts here

old wyvern
#

Yup

prisma wave
#

Odin has a few keywords

old wyvern
#

Djinn is the new og

prisma wave
#

Frigga has this

old wyvern
#

Die both of you

#

πŸ˜‚

distant sun
#

Dying

old wyvern
#

Also

topaz bay
#

Lets face a couple of more facts

old wyvern
#

Guess who I found

prisma wave
#

@old wyvern I propose an alliance against Odin

distant sun
#

Frigga has this
@prisma wave you mean __upon

topaz bay
#

Odin was written entirely by hand, with no reference, and 0 help

hot hull
#

BM, since you stopped learning Slovenian, I'm sorry but Odin is better

prisma wave
#

I just renamed it to this actually 😎

#

Who said I stopped?

topaz bay
#

Frigga uses a generated lexer and parser, uses components "inspired" by odin, and is TRASH

prisma wave
#

so

hot hull
#

You stopped posting updates atleast

topaz bay
#

I think I win by default

old wyvern
#

Djinn doesnt, but on the other hand its only a lexer rn

hot hull
#

Hence my assumption that you've stopped

prisma wave
#

If I wrote the lexer and parser myself would it be better?

heady birch
#

untouched odin

prisma wave
#

^

topaz bay
#

Yes....

old wyvern
#

@Yugi I propose an alliance against Odin im in

#

πŸ˜‚

topaz bay
#

The lexer and parser is like 90% of the work

#

They are a combined 2.5k+ lines of code in Odin

prisma wave
#

@hot hull tbh I did lose my streak but I will still be able to introduce myself in like 20 days

hot hull
#

You better be

prisma wave
#

Seems like wasted effort though

#

Why reinvent the wheel

old wyvern
#

Its fun

hot hull
#

Cause you can

prisma wave
#

Instead of using an INDUSTRY STANDARD for language parsing

hot hull
#

It's not like he has anything better to do kek

topaz bay
#

Its not reinventing the wheel

old wyvern
#

I think its more about learning how to do something

#

Than making something else do the work

topaz bay
#

I mean... I already knew how to do it

#

Its much more sane for me to write the lexer and parser by hand

prisma wave
#

I could do it, it's just effort for very little reward

topaz bay
#

To know how every single part works

#

I mean... if its effort, you cannot possibly claim that frigga is better

#

She has no SOUL

onyx loom
#

πŸ₯Š

topaz bay
#

She is but a repurposed machine

onyx loom
#

fight

old wyvern
#

I mean... I already knew how to do it You havent implemented an actual parsing algorithm right?

prisma wave
#

That's rude

topaz bay
#

BUT TRUE

prisma wave
#

I have put a tremendous amount of effort into the runtime

old wyvern
#

True what?

prisma wave
#

I just cba to do parsing

topaz bay
#

@old wyvern It probably would be able to be defined by certain algorithms

old wyvern
#

There is still more to learn

topaz bay
#

I just dont know what it would be

old wyvern
#

Always is

prisma wave
#

You cannot deny the truth

old wyvern
#

Lol

topaz bay
#

After googling, it seems the term that fits closest is a "pratt parser"

#

Yeah, this looks about right

jovial warren
#

lol

#

why you guys in competition over who's language is best

#

personally I believe that working together is always the way forward

steel heart
#

It’s a really nice fw though

topaz bay
#

@jovial warren no

#

No teamwork

#

Odin is best

jovial warren
#

what's it better than?

old wyvern
#

I swear Ill beat that in a few days

#

πŸ˜‚

jovial warren
#

Kotlin is still πŸ‘‘

old wyvern
jovial warren
#

haha lol

old wyvern
#

πŸ˜‚

jovial warren
#

I don't need counselling, I already get Psychotherapy

prisma wave
#

Frigga is better

#

More features

jovial warren
#

Kotlin still πŸ‘‘

prisma wave
#

Nope

jovial warren
#

lemme take a look at this syntax then

prisma wave
#

Syntax ain't everything

jovial warren
#

Syntax is a very big part of it though

#

for me at least

prisma wave
#

True

topaz bay
#

It's better than Frigga

jovial warren
#

still agree that Kotlin is πŸ‘‘ ?

steel heart
#

Scratch is better

jovial warren
obtuse gale
#

vest language is Minecraft Code Builder

jovial warren
#
git config --global user.name "Your Name"
git config --global user.email "Your e-mail address"
topaz bay
#

WHAT

#

FUCKING.

#

WHAT?!?!?!?

jovial warren
#

assert not null smh

topaz bay
#

You DARE to blaspheme

onyx loom
#

!!!!!!!!!!

jovial warren
#

Professor Sxtanna over here with his big words

#

you realise "blaspheme" means "speak irrelevantly about God or sacred things"

prisma wave
#

I can guarantee it will be present

#

So it's ok

#

But that needs cleaning up

topaz bay
#

I am well aware of the definition of blasphemy

jovial warren
#

!! is never okay imo

topaz bay
#

It was clearly a joke

#

But also no, its not ok.

#

Handle your nullability

prisma wave
topaz bay
jovial warren
#

ew who uses Windows BM

#

am I right guys

hot hull
#

No

prisma wave
#

I got sick of having to restart every time for dual booting

#

Giving windows another try

jovial warren
#

Linux > Windows any day

prisma wave
#

@topaz bay it will always be present, I just couldn't be bothered for a full blown null check

jovial warren
#

and Linux > Windows is very much subjectively because I much prefer free and open-source over proprietary

topaz bay
#

Doesnt matter

#

handle it

prisma wave
#

ugh

#

Fine

topaz bay
#

never manually code in a null pointer exception

errant geyser
#

I love watching you guys do this

prisma wave
#

Imo !! Is fine if you can guarantee it will never actually happen

#

That's kinda the point of it

errant geyser
#

I'm like πŸ€” yes, I definitely know what you're on about

jovial warren
#

!! was put there for lazy, sloppy coding, to just be able to put that and be done with it

#

and accept the consequences of an NPE being thrown if it's null

topaz bay
#

No, its not fine

#

If you want to assert non null, do it properly and with context

#

use requireNotNull or checkNotNull

#

oh fuck

#

I just realized I forgot to update the type

prisma wave
#

and accept the consequences of an NPE being thrown if it's null
Afaik the intention of !! Was to manually cast to a notnull type when the compiler can't smart cast

jovial warren
#

requireNotNull is just as bad imo as it's still not handling your nullability, it's just improving readability a bit

prisma wave
#

it will never be null

#

the properties will always be present

jovial warren
#

then why's it an Optional?

topaz bay
#

@jovial warren it is 100% handling nullability

#

The issue here is that !! does nothing but throw an NPE

prisma wave
#

then why's it an Optional?
@jovial warren ?

topaz bay
#

Using require or check gives context to the null assertion

jovial warren
#

can requireNonNull do other thingys?

#

what BM

prisma wave
#

wdym

jovial warren
#

it wouldn't be nullable if it was definitely not going to be null

hot hull
#

Imagine knowing what the fuck these three nerds are on about

topaz bay
#

Thats.... no...

#

Thats not how computers work

jovial warren
#

three nerds? I'm just the idiot stuck in the middle lol

prisma wave
#

findProperty is a glorified Map.get call

#

But the contract of the function is that those properties will always be present

jovial warren
#

so isn't there some sort of not null call then like there is with getValue()?

prisma wave
#

it's my code lol

#

and no

topaz bay
#

well technically its my code

#

but yeah

prisma wave
#

I prefer nullable types to exceptions, gives you more possibilities to handle it

jovial warren
#

well then why ain't you handling it

prisma wave
#

because it will always be present

hot hull
#

always will it tho

prisma wave
#

yes

jovial warren
#

it wouldn't be nullable if it's 100% always present though because that makes no sense

prisma wave
#

as I said

#

The contract of the function is that those properties will always be present

#

They are integral to the actual functionality

jovial warren
#

how do you know that in every context of that program running those two values will always be present?

topaz bay
#
val map = String[Int]

map["A"] = 0

val value = map["A"]
prisma wave
#

Because I know the code that I've written

topaz bay
#

You know

#

As you read that

#

value will never be null

#

You can see that

#

because its right there

prisma wave
#

The compiler doesn't know

topaz bay
#

But the caller cannot know that

#

because its completely decoupled

jovial warren
#

but in a map you'd use getValue() which throws a NoSuchElementException if it's null

topaz bay
#

You would not use getValue

prisma wave
#

I prefer nullable types to exceptions, gives you more possibilities to handle it

jovial warren
#

asserting not null and throwing an NPE if null leads to arbitrary stack traces

prisma wave
#

what?

topaz bay
#

micro brain in action here boys

jovial warren
#

lol

prisma wave
#

what does that even mean lol

topaz bay
#

I'm not advocating for the not null assertion operator, but you are just wrong here

jovial warren
#

yeah I can kinda see that now

topaz bay
#

the context is a completely decoupled structure

jovial warren
#

as usual I'm talking out of my ass again

topaz bay
#

There is no way that the program or the developer can strictly assert that the value couldnt be null

jovial warren
#

true

topaz bay
#

speaking of the context

#

I made trait/class instances extend context

prisma wave
#

IntΓ©ressant

jovial warren
#

tf is that

#

interesante seΓ±or

topaz bay
#

when it goes to call a function thats defined in a class, it uses the instance as the context

#

instead of the global program context

jovial warren
topaz bay
#

Reusing the logic of the global scope to making internal trait/class route command able to lookup properties and functions

heady birch
#

πŸ‘

prisma wave
#

That's probably more elegant than how I've done it lol

topaz bay
jovial warren
#

it's sx BM

topaz bay
#

overriding the lookup logic to search both this context, and the context of the super types

#

Its kinda beautiful

jovial warren
#

elegance is like his middle name

heady birch
#

context

topaz bay
#

Made it a lot easier to just shove class instances into the current command design

signal tinsel
#

Anyone know some good free-to-use remote desktop software?

prisma wave
#

TeamViewer is decent

#

Feels like scammer software but I can vouch that it works lol

obtuse gale
#

vnc server/viewer

topaz bay
#

parsec

#

Its more marketed towards gaming

#

But its pretty fire for general use

heady birch
quiet depot
obtuse gale
#

shit

steel heart
#

I mean you could eventually do something like (Field field = Some.class.getDeclaredField(β€œfield”)).setAccessible(true); or am I wrong?

quiet depot
#

you're wrong

steel heart
#

Wait let me check my class

old wyvern
#

I mean you could eventually do something like (Field field = Some.class.getDeclaredField(β€œfield”)).setAccessible(true); or am I wrong?
setAccessible would return void so you would be unable to get the actual object

quiet depot
#

I mean if one liners is all we're after, that class is technically useless, as I have my generic builder as an alternative

old wyvern
#

link?

heady birch
#

shitterField?

quiet depot
#
GenericBuilder.of(() -> shit.getClass().getDeclaredField("shitter"))
    .with(field -> field.setAccessible(true))
    .build();```
steel heart
#

I find GenericBuilders useful but isn’t that a waste of consumers ?

quiet depot
#

wym waste?

#

it's not like there's a predefined amount of consumers you can use

old wyvern
#

Isnt that the same as just having

final Field shitterField = shit.getClass().getDeclaredField("shitter");
field.setAccessible(true);
final Shitter shitter = field.get(shit);```
Except with unneccessary lambdas?
quiet depot
#

yes

#

that's why I don't use genericbuilder for that, but have it's own util

prisma wave
#
val field = getDeclaredField("field").apply { isAccessible = true }
``` πŸ˜”
quiet depot
#

tbh, now that you've got me thinking about it, I'm not a fan of the generic builder anyway

topaz bay
#

πŸ”₯ πŸ”₯ πŸ”₯ πŸ”₯ πŸ”₯

quiet depot
#

I implemented it because builders in general are nicer to use, but it's kinda a code smell

heady birch
#

That actually looks pretty nice Sxtanna

topaz bay
#

600 microseconds

#

microseconds

quiet depot
#

slow

topaz bay
#

Less than a millisecond is pretty fast to me xD

steel heart
#

Piggy I like generic builders but it feels kinda overkill sometimes though

quiet depot
#

yeah

#

might get rid of them

steel heart
#

Also yeah that getAccessible is probably not useless my bad but I used to do something like ```java

final Field field;

{
(field = Some.class.getDeclaredField(β€œa”)).setAccessible(True);
}```

old wyvern
#

There is literally no reason to write it like that ^

steel heart
#

Why not

old wyvern
#

why?

topaz bay
#

anonymous block bodies are bad design

steel heart
#

I mean I’d do that instead of later having to invoke #setAccessible(true)

old wyvern
#

doing that later would be more concise
There is no reason to crunch those 2 lines together

topaz bay
#

I dont see how not delaying the call is mutually exclusive to using a block body

#

I think I just did a bad language thing

steel heart
#

Yugi well that would be instead of having a helper class

old wyvern
#

But still there is seriously just no point in doing that

#

what are you even trying to save there

steel heart
#

1 line :0

old wyvern
#

What does that one line provide you except less readability?

steel heart
#

Compactness

#

(:

old wyvern
#

Why would you think compactness is desirable?

jovial warren
#

I've ran in to what looks like an unsolvable problem

steel heart
#

Yugi because less lines

#

It’s just shorter which I like

jovial warren
#

lemme try and explain: basically, I want to run code for a few different cases, here they are:

  1. There are no channels in the guild
  2. The user is not in a channel and neither is the bot
  3. The user is not in the same channel as the bot, or the user is not in a channel but the bot is
  4. The bot is in the same channel as the user

#4 is fine because it's just checking if the user's channel is not null and then connecting the bot to the same channel as the user
#2 and #3 is where I get issues, as the way I get the channel to connect the bot to is by getting the channel the user is in, and I can't find a way to get it otherwise, meaning I cannot check if the bot is in a channel if the user isn't in one

#

and since I'm using Spring there's no possible way I can think to give ConnectionService the guild, since I can't create a bean of a guild because JDA handles guild instances

topaz bay
#

You're overthinking

jovial warren
#

wdym?

topaz bay
#

I can just tell

jovial warren
#

what do you think I'm overthinking?

topaz bay
#

every part of this

jovial warren
#

well what do I do about it?

topaz bay
#

Think about what needs to happen

#

Break that logic a part

#

And solve it part by part

#

Do not try and force fancy syntax or make it overly concise

#

Solve the problem.

ocean quartz
#

@hot hull Copy your code, delete your fork, fork again, paste the code back in, PR and I'll merge it/

topaz bay
#

hi matt

#

:)

ocean quartz
#

Just to clear your eeeee commits

#

Heyo! ;p

hot hull
#

How about you just copy those 3 methods I changed and put em directly into your repo ;C

ocean quartz
#

I've been quiet here recently

topaz bay
#

You've missed big progress dude

ocean quartz
#

Then you won't be contributor :c

topaz bay
#

It's a great day to be an Odin supporter

#

:D

ocean quartz
#

Oh? Let me look at the chat history

old wyvern
#

lies

hot hull
#

I mean you can just manually write down that I contributed

ocean quartz
#

Yeah but you won't show there on Github

hot hull
#

Meh no worries

ocean quartz
#

Alright alright

#

You meant the speed of lexing and stuff Sx?
That awesome!

topaz bay
#

That, and Odin now has fully functional traits and classes

#

Which means I can start on a standard library

jovial warren
#

anyone know a good way of globally caching values that can be retrieved or updated from literally anywhere in the project?

#

wait this is why I fucking depended on Spring redis configuration

ocean quartz
#

Maybe caffeine?
I mean you can access any cache from anywhere, just inject it

#

Also, Sx, when is it going to be ready to use? πŸ‘€

jovial warren
#

true Matt

#

@heady birch you ever used Spring Data Redis before?

#

you're probably the most likely to know how it works lol

heady birch
#

I have not im afraid

jovial warren
#

😦

#

well, google it is then lol

topaz bay
#

@ocean quartz I mean... After this next push it should be fine

#

I might add support for using it with the Java script engine api

#

That could be fun

heady birch
#

does odin have annotations

topaz bay
#

Absolutely fucking not

ocean quartz
#

Nice!
I wanna try it
And haha, you touched on one of his most hated features xD

heady birch
#

I know thats why i said it

topaz bay
#

I am truly insulted by such a scenario

heady birch
#

who is your programming idol

hot hull
#

Me, myself, & I, (probs why my code so shit :kek:)

ocean quartz
#

Is there such a thing as a programming idol?

topaz bay
#

I have a question for you nerds

heady birch
#

yes

topaz bay
#

Do you think when it comes to numbers and math, should be the values be coerced to the highest operand type

#

Or should they strictly acquire the type of the right operand

heady birch
#

no

#

all type operator

topaz bay
#

I hate you.

heady birch
#

none of this byte to int stuff

#

none of this internal casting

#

just do the stuff on the data type

topaz bay
#

huh?

heady birch
#

byte a = 0;

#

byte b = 1;

#

byte c = a << b;

#

none of this

#

byte c = (int)a << (int)b

topaz bay
#

Yeah no, thats not what I mean

old wyvern
#

highest precedence

heady birch
#

ok

topaz bay
#

How do I define precedence though

old wyvern
#

as in?

#

Do you mean how you would want to order it or any issues with structuring to that?

topaz bay
#

like for example

val a: Float = 1.0
val b: Double = 2.0

val c = b + a

Should c be double now, because its the larger type
or should it be float, since its the right side

old wyvern
#

yes

#

Double

#

that makes more sense

topaz bay
#

Now apply the same thing to the whole numbers

ocean quartz
#

Yeah that's makes the most sense

#

Same would apply to like, short + int right?

topaz bay
#

For context, all numeric values are coerced to doubles before any operation is applied

heady birch
#

or do that kotlin thing

#

where they must be the same type

topaz bay
#

Kotlin has numeric coercing

#

They dont have to be the same type

old wyvern
#

Since you already hold it as a double maybe convert it to the smallest type that can hold it in its specific type

topaz bay
#

It just doesnt have coercing between whole and decimal numbers when passing to functions

old wyvern
#

like Int.MAX +1 would auto change it to a long

#

or same with short for that matter

ocean quartz
#

I think unless specified it should coerce
Like unless you do val c: Float = b + a

old wyvern
#

oh wait that wouldnt make sense before runtime huh

#

hmm

topaz bay
#

also, odin has no short, because its the most useless numeric type

#

I'm not sorry

old wyvern
#

lol

heady birch
#

add a medium

#

24 bit integer

topaz bay
#

fuck no

#

Theres enough built in types

heady birch
#

i need 24 bit

old wyvern
#

add a bit type

#

☠️

heady birch
#

Lol

topaz bay
#

Technically, there is a bit type

old wyvern
#

I mean technically thats just a boolean

#

so eh

topaz bay
#

Its used for booleans

old wyvern
#

yup

ocean quartz
#

That's fair xD

topaz bay
#

Also for clarity

#

Nil is not null

heady birch
#

add some cool data types

topaz bay
#

odin has no nullability

heady birch
#

uuids

#

idk

old wyvern
#

odin has no nullability
@topaz bay
That might end up being quite a constraint in some cases

topaz bay
#

I have no issue with that

#

Absence of data in odin is represented by kotlin's Unit

#

which has its type asserted as "All"

old wyvern
#

so like Any or Object ?

topaz bay
#

sure

old wyvern
#

That feels wrong

topaz bay
#

Well you technically cant come across it using purely odin code

#

The only one to achieve a value of Unit in odin is through the result of a call to jvm code

ocean quartz
#

Is Nil like, empty?

old wyvern
topaz bay
#

Yes

ocean quartz
#

Nice i like that

topaz bay
#

It only exists on properties before they are initialized

old wyvern
#

How else an I supposed to present this

topaz bay
#

This seems...

#

😬

heady birch
#

wonder if you could do some cool thing

#

extension functions on the data types

#

yeah

#

can you do static extension functions?

old wyvern
#

Holy fuck

heady birch
#

Byte.coerceAtLeast(Long)

#

something like that idk

old wyvern
#

The people who set the answers should die

#

The issue was that the last line shouldnt end with the \n with println adds but all other lines should

prisma wave
#

@heady birch yes

#

if you're talking about kotlin

topaz bay
#

How can people just like... not use kotlin

#

Its really such a shame

prisma wave
#

I mean, you could use a StringJoiner instead of a for loop, no?

#

not entirely a fair comparison but kotlin still better

topaz bay
#

That is idiomatic java string creation code

#

vs idiomatic kotlin string creation code

#

They could also just concatenate the raw values instead of using a builder

old wyvern
#
String.format("%s.%s(%s)", obj, method, String.join(",", args))
topaz bay
#

(it would compile to a builder anyway, but still)

distant sun
#

@old wyvern sx noob

old wyvern
#

πŸ˜‚

topaz bay
#

Even using format syntax (which is very slow btw) in kotlin would look better

#

"%s.%s(%s)".format(caller, method, params.joinToString(", "))

#

lol

distant sun
#

is strong format good for anything at all?

old wyvern
#
StringBuilder builder = new StringBuilder();
builder.append(obj)
       .append('.')
       .append(method)
       .append('(')
       .append(String.join(",", args))
       .append(')')
obtuse gale
#

Question

#

is there any way possible to execute code in between when the server shuts down and when it turns back on?

prisma wave
#

You could start another process possibly

obtuse gale
#

I feel like ill run into issues if I try and replace the server jar while its in use

prisma wave
#

You absolutely will

obtuse gale
#

Whats the best thing I could do rn?

topaz bay
#

that works

#

that was pretty easy...

prisma wave
#

Oh no

#

@obtuse gale experiment with starting new processes onDisable

#

Might work, might not

obtuse gale
#

alright

#

I still need to find a way to get the server .jar file name

#

couldnt I like

#

make my plugin onDisable run another jar (thats not a plugin) and that jar does the ol switcheroo with the server jars

#

or is that overcompilcating it

prisma wave
#

In theory you could get the CodeSource of a spigot class to get the spigot jar

#

I'm not sure how well that would work

#

But theoretically it might be possible

onyx loom
#

anythings possible

obtuse gale
#

val process = Runtime.getRuntime().exec("java -jar FuckYou.jar") couldnt I do something like that?