#dev-general

1 messages ยท Page 191 of 1

quiet depot
#

most people know us for placeholderapi

#

not much blocky

#

just exposure

analog crater
quiet depot
#

?

#

wym jolly

empty flint
#

Oh oof. Thats why there's always the same group of people in #development and #dev-general
@analog crater Sounds like you feel like that's a bad thing?

analog crater
#

No? I just mean that there is always the same people dominating those xhats. I believe this is causated by the discord primarily known as a support server for PAPI not a development server.

quiet depot
#

the same people doing what?

#

asking questions about papi?

analog crater
#

No....

#

Dominating the chats by talking about topics such as kotlin or shit like that

#

Honestly, I find it rare to see anyone new

quiet depot
#

I don't see how you could infer that from this server's relationship to papi

#

papi has absolutely nothing todo with kotlin

analog crater
#

Oml thats not what I meant. It wa sjust an example of a topic. This server is known as a PlaceholderAPI not a hangout for developers. Thats why there's rarely any new developers who stay

quiet depot
#

ah

#

we have been trying to branch out a bit over the last year or so

#

the introduction of this very channel is an example of that

#

the problem is, we're also trying to get partnered/verified (ironically in the same timeframe)

#

so it's kinda one or the other

#

papi vs diversity

#

we chose papi

#

if/when we get partnered, I'm sure we'll push the development aspect of hc a bit more

onyx loom
#

๐Ÿ‘๏ธ

analog crater
#

Ei

distant sun
#

But @quiet depot :( I need it

quiet depot
#

then fix it urself

distant sun
#

Idk how

empty flint
#

@distant sun wanna send over the source code? I could maybe take a look?

#

Or is that about something else?

#

Also, why does processResources get executed when running the build in IntelliJ?

distant sun
obtuse gale
#

I can try, ill probably fail but im really bored

quiet depot
empty flint
#

Ah jeez

#

Why does it fail on version 1.16.1?

#

And what the fuck is 1.16.3?

#

wait

obtuse gale
#

the latest version?

empty flint
#

1.16.3 is already out?!

#

when?!

obtuse gale
#

mm

empty flint
#

How

obtuse gale
#

like the other day I think

empty flint
#

Ah fuck then I gotta update my own shit as well

#

:((((

#

This doesn't specify anything about 1.16.3

#

wtf

prisma wave
#

me when 1.16.5 adds support for commonlisp scripting ๐Ÿ‘ ๐Ÿ˜

#

Probably isn't out on spigot yet

dusky drum
#

maven so gud
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project lambdaattack-version: Fatal error compiling****

obtuse gale
#

maven bad

quiet depot
#

@dusky drum it will error in ij but maven can compile it

dusky drum
#

aha

#

how

quiet depot
#

mvn package?

dusky drum
#

aha so compile doesnt work but package does wierd intellij

quiet depot
#

and @empty flint both spiglet and paper have 1.16.3 builds

prisma wave
#

I mean gradle is the same

quiet depot
#

no it aint

#

gradle literally canโ€™t do what maven does here

#

which sucks

#

or maybe it can, I personally havenโ€™t figured out how to tho

#

that is having multiple versions of the same dep

dusky drum
#

for me that lambada attack does nothing when i run it, like it just throws null

quiet depot
#

well duh, itโ€™s broken

dusky drum
#

ow

#

whats broken in it?

quiet depot
#

it throws null

dusky drum
#

imagine throwing entire error ๐Ÿ™‚

obtuse gale
#

imagine null

#

I can

#

because spring is fucking giving me null for no reason and this is kotlin ๐Ÿ˜ 

hot hull
#

Well I mean make it not null

#

Duh

quiet depot
#

ez

dusky drum
#

make it throw Frosty

heady birch
#

It is not spring's fault

blissful sluice
#

Nah make it throw piggy

prisma wave
#

@quiet depot I mean it's the same in that compiling with intellij's system won't work

hot hull
#

Elara build tool when?

prisma wave
#

we will need one

#

Might just add gradle support

#

Could be easier

obtuse gale
#

im bored what should i make lol

jovial warren
#

a familiar question

#

one I usually answer by looking at other people's thingys and seeing how I could make them better

prisma wave
#

think of a simple idea and overabstract it

obtuse gale
#

like?

jovial warren
#

I usually love making libraries

prisma wave
#

I wanted to convert a POJO to a GUI and ended up making a reflection library AND a GUI framework for a simple thing

obtuse gale
#

I usually love making libraries
linraries for most things already exist lol

jovial warren
#

so?

prisma wave
#

Recreate it

jovial warren
#

and also, not true

prisma wave
#

But better / worse

jovial warren
#

Recreate it
this

obtuse gale
#

like theres nothing wrong with command/gui libaries that already exist

jovial warren
#

no matter how useless, recreate it

prisma wave
#

get a gimmick

jovial warren
#

all of my projects are either commissions or just recreations of others' ideas

prisma wave
#

make your own language

#

Elara 2

obtuse gale
#

sounsd hard

prisma wave
#

eh

#

ANTLR is pretty easy

#

Ish

#

And that does most of the work for you

quiet depot
obtuse gale
#

is that something i should actually look into? itd be interesting but sounds very hard

prisma wave
#

I'd like to think they wouldn't @quiet depot

jovial warren
#

@quiet depot I believe Java should deal with that

prisma wave
#

@obtuse gale it's kinda tricky but quite fun

quiet depot
#

getting a java.io.IOException: The filename, directory name, or volume label syntax is incorrect

prisma wave
#

Even if it's very simple

empty flint
#

Is this working for anybody else with gradle: Could not find org.spigotmc:spigot-api:1.16.3-R0.1-SNAPSHOT. ?

prisma wave
#

Hmm maybe it is then

#

just do a little string replace?

jovial warren
#

@empty flint you got the repository config?

empty flint
#

@empty flint you got the repository config?
@jovial warren Not sure what you mean

#

What repo config are you refering to?

jovial warren
#

maven { url 'https://hub.spigotmc.org/nexus/content/repositories/snapshots/' } in Groovy DSL I believe

quiet depot
#

nah that didn't fix it bm :/

empty flint
#

I think I do, it works with 1.16.2

#

lemme check

prisma wave
#

replacing / with \ or the other way around?

jovial warren
#

you sure Spigot even supports 1.16.3 yet btw?

quiet depot
#

\ with /

prisma wave
#

Could be a windows thing

#

Would E:/ work?

empty flint
#

you sure Spigot even supports 1.16.3 yet btw?
@jovial warren Well I can build it with BuildTools so I think it should, right?

quiet depot
#

yeah

#

might be todo with the fact it's an absolute path

jovial warren
#

if you're using BuildTools, you need mavenLocal()

quiet depot
#

not sure why it is an absolute path

prisma wave
#

idk

#

maybe try with \ everywhere?

quiet depot
#

yeah tried that too

#

same result

jovial warren
#

this is why Windows is annoying lol

#

because Windows likes to be stupid and do things differently from literally everything else

#

browsers use /, Mac & Linux use /, but Windows says "hey let's be dicks and say fuck everyone else, we're gonna use \ instead, just to make things more complex"

prisma wave
#

I mean

#

I doubt / was a "standard" when DOS became a thing

heady birch
#

Get that pepper of there

unreal briar
#

Windows is underrated

prisma wave
#

doesn't it have like

unreal briar
#

It just works

prisma wave
#

70% market share

#

lol

quiet depot
#

more like 98%

unreal briar
#

By the technical community

#

Market share for linux is mainly cloud

prisma wave
#

Apparently it's about 78% on desktop

#

How is that underrated lol

unreal briar
#

(servers)

quiet depot
#

are you talking about windows being underrated for servers stef?

#

cuz if so

#

windows is overrated for servers

prisma wave
#

windows server sucks ass

unreal briar
#

Ah, for servers its overrated

#

But with WSL 2 it's getting better

#

Being able to run both windows and linux containers with native performance

prisma wave
#

WSL2 is nice

unreal briar
#

EEE

prisma wave
#

Apart from when it broke and I had to reinstall it lol

unreal briar
#

Embrace, Extend, Extinguish

prisma wave
#

meaning?

unreal briar
#

Meaning you embrace some tech

#

You extend it with your huge microsoft resources

jovial warren
#

also can we all just sit back and admire Bukkit's deobfuscation of Minecraft server code

prisma wave
#

absolutely not

quiet depot
#

microsoft doesn't really do that anymore stef

onyx loom
#

nice one

jovial warren
#

lol

#

let's not just select 10+ images and spam the submit button

onyx loom
#

imgur galleries ๐Ÿ‘€

prisma wave
#

wut

unreal briar
#

Yeah, they took a more open but the idea still stands

#

For example a company may rather want a windows server that has no worry running either linux or windows VS just linux

#

And yeah virtualisation but that's not the same thing

jovial warren
#

there we go

prisma wave
#

I genuinely can't see a use case for Windows server apart from domains in schools and things

unreal briar
#

Cloud Gaming

#

Spin up windows docker images with the games pre-installed

jovial warren
#

when you're starting your type names with I, that's supposed to mean it's an interface

quiet depot
#

lel

#

prefixing with i is an anti pattern

jovial warren
#

yeah ik

#

but if you're gonna use that anti-pattern, at least use it correctly

prisma wave
#

Favourite anti pattern

empty flint
#

How do I include classes from another project in gradle that is on my disk without declaring them as submodules?

jovial warren
#

also, AbstractHorse = interface apparently

quiet depot
#

use the flatfile repository format blocky

#

there's an example on my tutorial

jovial warren
#

"Piggy's Barn"
always loved that name lol

empty flint
#

use the flatfile repository format blocky
@quiet depot So I have to compile the other project into a jar and then I can import the classes from the jar?

quiet depot
#

believe so

#

you might be able to only do specific classes

empty flint
#

Oh that's something else

#
repositories {
  flatDir {
    dirs 'libs'
  }
}
#

How do I declare a dependency to that flatfile repo?

prisma wave
#

You just declare it as normal I believe

quiet depot
#

implementation name: "jar-name"

hot hull
#

I'm still annoyed you name it placeholderapi instead of PlaceholderAPI as the project name Piggy -.-

jovial warren
#

you realise having it lower case is actually better right?

#

it's the convention

#

WebStorm actually has that built-in as of a certain update, where you can't have project names that have upper case characters in them

prisma wave
#

Webstorm != Gradle

#

Afaik there is no convention

jovial warren
#

but still, placeholderapi > PlaceholderAPI

quiet depot
#

IDIOT

jovial warren
#

what's so stupid about that?

quiet depot
#

returning "test" instead of the field

jovial warren
#

omfg lol

quiet depot
#

wew ok

#

expansions can have configs now

#

that took ages

jovial warren
#

@File?

#

is PAPI 3 annotation-based?

#

actually I know the answer to that

quiet depot
#

annotations are used where appropriate

jovial warren
#

also what's that key system I've seen in the API for?

quiet depot
#

everything

jovial warren
#

Key, Keyable, Keys, KeyFactory, KeyWhateverTheFuckElse, the list goes on

hot hull
#

Lmao Piggy

#

Gotta love those silly mistakes amirite

quiet depot
#

player.get(PlayerKeys.UUID)

#

player.get(PlayerKeys.INVENTORY)

#

etc

hot hull
#

I assume all expansions will need to be rewriten for the new system right?

quiet depot
#

nah ima make a compat layer

hot hull
#

ew nah, make it not compatible so all the expansions look nice fingerguns

jovial warren
#

for the first few versions

#

I'd say give people time to migrate over to the new system and then basically say "anyone who hasn't migrated their shit over to the new system can go fuck themselves"

quiet depot
#

yep

jovial warren
#

but in a nicer way than that

hot hull
#

Basically the same thing that was done for the ez hook or whatever the fuck it was called

quiet depot
#

i'm still not sold on the api tbh

#

I'm not sure on having two ways to register placeholders

#

might change it up

hot hull
#

Well then only have 1

jovial warren
#

what are the current methods Pig?

quiet depot
#
@Override
    public void enable() {
        System.out.println("Enabled test");

        registerPlaceholder("name", context -> context.getPlayer().get(Keys.NAME).orElse("null"));
    }

    @Placeholder("uuid")
    public String uuid(@NotNull final PlaceholderContext context) {
        return context.getPlayer().get(Keys.UUID).orElse(UUID.nameUUIDFromBytes("null".getBytes())).toString();
    }```
jovial warren
#

okay so with a lambda

#

or?

quiet depot
#

or with a method

heady birch
#
#

PDM for rust?

prisma wave
#

Absolutely not

heady birch
#

Maven download

jovial warren
#

also what about doing a Spring and using classpath scanning to register placeholders internally

heady birch
#
// Create a JVM
let jvm = JvmBuilder::new().build().unwrap();

// Define a Maven Artifact
let artifact = MavenArtifact::from("org.apache.commons:commons-lang3:3.9");

// Deploy the artifact in order to call it from our Rust code
jvm.deploy_maven(artifact).unwrap();
prisma wave
#

oh no

quiet depot
#

wym bardy?

prisma wave
#

wow they stole my incredibly original idea wtf

heady birch
#

Jvm in rust

#

kind of cool

prisma wave
#

Rust in JVM

heady birch
#

I want that

#

bindings or whatever

prisma wave
#

Rust scripting support

heady birch
#

Like

#

How does it bind C to java

prisma wave
#

it's just implemented in the JVM I think

heady birch
#

what about structs/objects

jovial warren
#

@quiet depot I mean basically looking for anything on classpath annotated with annotations for example and registering them internally

prisma wave
#

There are no natively implemented objects?

jovial warren
#

like what Guice does with it's DI

heady birch
#

wait

#

so can I use rust struct from java or not

quiet depot
#

erm that's basically what we do

prisma wave
#

@jovial warren guice doesn't do that?

jovial warren
#

what does it do then?

prisma wave
#

@heady birch idk probably not

heady birch
#

nothing

quiet depot
#

it scans classes you tell it to

prisma wave
#

Guice doesn't do classpath scanning

heady birch
#

guice does nothing

#

except add 4 mb to the jar file

prisma wave
#

You bind classes statically and the rest is resolved with reflection

#

Lol

jovial warren
#

ah okay

quiet depot
#

code gen

jovial warren
#

isn't classpath scanning easier though?

prisma wave
#

ehhh

#

Easier for the user

#

Trickier to implement

jovial warren
#

yeah

prisma wave
#

And it adds a degree of complexity

jovial warren
#

I mean, VMware did it (VMware are the ones behind Spring), and well

prisma wave
#

wat

heady birch
#

Oh

#

Spring makes a load of meta or something

jovial warren
#

Spring does big brain things

quiet depot
#

rpf does big brain things

heady birch
#

If you try decompiling it

#

All the actual project files are in like /boot-inf/ or something

jovial warren
#

yeah but RPF only works with Guice and it's still in-dev

prisma wave
#

Isn't spring boot just a wrapper for the XML stuff?

#

What's wrong with guice

#

Nothing

heady birch
#

Everything

#

First of all you need guava

prisma wave
#

Poppycock

heady birch
#

No one wants guava

#

Lol

jovial warren
#

Guice isn't as idiomatic as say Koin is for Kotlin users

prisma wave
#

koin bad

jovial warren
#

Koin good

#

you bad

prisma wave
#

no

jovial warren
heady birch
#

Pico container

prisma wave
#

It uses field injection for everything

#

bad design

heady birch
#

No

#

No!

quiet depot
#

koin?

#

or pico

#

pico is strictly constructor iirc

jovial warren
#

Koin uses field injection

prisma wave
#

Koin

heady birch
#

Apart from being made in like 2000 its fine

prisma wave
#

dumb decision

jovial warren
#
val yourField by inject<YourClass>()
prisma wave
#

Field injection bad

jovial warren
#

very idiomatic for Kotlin

prisma wave
#

No

#

Field injection bad constructor injection good

jovial warren
#

Constructor injection means that the object needs to be controlled by the DI framework

prisma wave
#

Being idiomatic doesn't matter if it leads to bad code

#

exactly

heady birch
#

every used Jboss application server?

prisma wave
#

Which is what a DI framework should do

jovial warren
#

meaning you're basically taking away any instantiation

prisma wave
#

Which is what a DI framework should do

jovial warren
#

says who?

prisma wave
#

Both guice and spring heavily discourage the use of field injection

#

Because it makes the dependencies of a class too implicit

jovial warren
#

field injection isn't against the law

prisma wave
#

it should be

#

It's bad design

jovial warren
#

you're bad design

prisma wave
#

๐Ÿ™„

jovial warren
#

I mean, don't get me wrong, I think Spring is better than Koin, but there are some situations where you need to be able to control the instantiation of the object, especially when you're working with Spigot

heady birch
#

You are hereby being sentenced to life in prison for using field injection within a java application

prisma wave
#

execution*

#

death sentence

heady birch
#

๐Ÿ˜ฎ

empty flint
#

@quiet depot is there a way to use the + for jar versioning purposes?

prisma wave
#

evil

#

@empty flint using + is an anti pattern

jovial warren
#

you try using constructor injection with Bukkit then

prisma wave
#

wdym

empty flint
#

I just always want to use the latest jar from the flatfile repo

jovial warren
#

with Koin, I can just load the modules in onEnable for use around the project

quiet depot
#

i use constructor injection exclusively with bukkit

prisma wave
#

Guice can do that too?

#

That's kind of the point

#

You initialise the modules upon startup

jovial warren
#

I think I'm confusing DI with Spring's method of DI

prisma wave
#

yes

jovial warren
#

because Spring and Koin are the only two DI frameworks I've ever used

prisma wave
#

Don't say guice bad if you've never used it

heady birch
#

Spinjector

prisma wave
#

Elara inject

heady birch
#

Also N had a better concept of DI

prisma wave
#

Just kidding

#

No DI allowed in elara

heady birch
#

N.get("itemName")

prisma wave
#

N.el?

heady birch
#

gives you the instance instantly

#

Are you making elara

#

Wonder how sxtannas odin is coming along lol

prisma wave
#

Bad

#

Odin sucks

#

Yugi is currently doing all the work for elara

#

Ima make an interpreter or something eventually

heady birch
#

Add let mut and &

prisma wave
#

we have let mut

#

Pointers might be a thing

#

Maybe not

heady birch
#

use a different synbol for pointers

#

use the hand cursor icon instead

#

'pointer'

#

โ–บor this lol

prisma wave
#

we will use = and == for pointers

heady birch
#

emoji

prisma wave
#
let a = ="hello"

let b = ==(a + 1)
#

Hot

#

segfault

hot hull
#

ugly

heady birch
#

lol

#

Rust gets everything right

prisma wave
#

only a fool says a language is ugly
David 9:36

#

Good old david

ocean quartz
#

Hmm I don't like that either
Why not use the common *

prisma wave
#

Not readable enough

hot hull
#

I may be a fool, but atleast I'm not a weirdo who thinks that's nice fingerguns

prisma wave
#

looks like multiplication

#

= and == is very clear

ocean quartz
#

Imo == is confusing because it's already an operator

prisma wave
#

it's whitespace sensitive

hot hull
#

ยป use this

ocean quartz
#

That one would be nice but it's not easily accessible
It isn't a character in english keyboard

prisma wave
#

julia moment

hot hull
#

Imagine not having a numpad, weak af

onyx loom
#

wait what

ocean quartz
#

I mean i have a numpad, but not everyone does

onyx loom
#

thats on the numpad?

hot hull
#

Alt + 1 + 7 + 5

ocean quartz
#

Every character is, Kali

onyx loom
#

oh das crazy

#

had a pc for like 5 years and never knew that ๐ŸŒ

hot hull
#

lol

ocean quartz
#

I use alt + 2 + 5 + 5 a lot because it's a blank character that isn't whitespace

hot hull
#

โ†“

#

โ—™

heady birch
#

Related to earlier

#

Here you can see same process used for 4 different messag types

hot hull
#

It's funny cause you can only use alt and your numpad to write everything

#

It's all caps tho :((

jovial warren
#

@hot hull you think alt codes work on all systems?

hot hull
#

Well I mean get good if they don't fingerguns

jovial warren
#

they only work on Windows

onyx loom
#

windows good

heady birch
#

WAIT

#

How would A rust enum look in java???

jovial warren
#

and that's a problem when there are a hell of a lot of developers that use Linux for development

heady birch
#

๐Ÿ˜ญ

prisma wave
#
rust enum { }```
#

Lol speaking of Linux it randomly just stopped accepting my password

hot hull
#

Linux is superior, but I ain't got the braincells to actually use it

jovial warren
#

@heady birch ```java
public enum MyEnum {

MY_ENUM_VALUE(1)

private final int value;

MyEnum(final int value) {
    this.value = value;
}

}

heady birch
#

no

#

because enums are kind of instances

#

apparently closest thing is a class heirachy

jovial warren
#

enums in Java are instances

ocean quartz
#

Pretty sure it also worka on Mac

heady birch
#

yes but arnt they singletons

jovial warren
#

yeah

heady birch
#

rust enums are like non singleton

prisma wave
#

closest equivalent is probably sealed class + objects in kotlin

heady birch
#

beans

prisma wave
#

No?

heady birch
#

beans

jovial warren
#

closest equivalent is probably sealed class + objects in kotlin
yeah this maybe

heady birch
#

elara moon

#

comeone

#

the background

#

:elara_moon:

jovial warren
#

Elara's logo doesn't exist yet afaik

prisma wave
#

Elara moon

#

It does

heady birch
#

E

onyx loom
#

that is the logo

#

๐Ÿ™‚

prisma wave
#

elara moon

jovial warren
#

ah okay

hot hull
#

Looks nice ngl

prisma wave
#

ikr

jovial warren
#

not what's on the GitHub page matey

onyx loom
#

altho u need to make it transparent

prisma wave
#

the one on GitHub is a variant?

#

Yea

jovial warren
#

is that you asking a question or making a statement

prisma wave
#

Both

#

We've got lots of variants

jovial warren
#

also, still not sure about using let to define both variables and functions

prisma wave
#

Why should functions be any different?

#

If they're first class surely they're just variables?

jovial warren
#

because they do different thingys

#

a variable is for storing thingys, a function is for doing thingys

prisma wave
#

consider them as lambdas rather than functions

jovial warren
#

then it'd make sense

#

so Elara doesn't have the concept of functions then

prisma wave
#

Except functions and lambdas are the same thing

#

strictly speaking no

#

But a lambda is basically just a function anyway

jovial warren
prisma wave
#

yes

#

Because they are referred to as functions

#

Because they are named

#

a lambda is just a function without a name

#

And vice versa

jovial warren
#

a lambda is just a function without a name
wat

prisma wave
#

that's the definition of a lambda

#

In any language

#

An anonymous function

jovial warren
#

actually you're right

#

it's an anonymous function

prisma wave
#

i.e a Function without a name

jovial warren
#

not really

#

actually, no, you're right

#

it's a function that cannot in any way be identified

prisma wave
#

In computer programming, an anonymous function is a function definition that is not bound to an identifier.

#

As far as elara is concerned, functions / lambdas are no different to any other variable

jovial warren
#

which seems a bit weird to me

#

since like pretty much every other programming language makes a clear distinction between those, as it's much easier to read

prisma wave
#

clojure doesn't

#

Not entirely anyway

jovial warren
#

one of the reasons I don't like the language

prisma wave
#

(defn name [args]) is just a macro that expands to (def name fn [args]) i.e a lambda

#

Iirc anyway

jovial warren
#

wtf is that

#

yeah this is why I don't use Clojure

prisma wave
#

๐Ÿ™„

hot hull
#

I'm so bored I legit just watched a guy clean his car for 40min..

jovial warren
#

defn

#

lol

prisma wave
#

like I said it's shorthand for def fn

onyx loom
#

I'm so bored I legit just watched a guy clean his car for 40min..
@hot hull boy do i have the video for u then

#

honestly, this is a great watch

hot hull
#

Already watched it

onyx loom
#

ow

prisma wave
#

Also if functions are first class, then logically they should be declared in the same way as variables

#

Having 2 separate syntaxes implies that they are different entities

#

when 3 and ```
(Int a) => a * 2

jovial warren
#

is it just me or is programming like the worst way to relieve your boredom lol

#

it just kinda makes you more bored

hot hull
#

If you have a fun thing to work on it's actually a good way, atleast for me

jovial warren
#

I mean, don't get me wrong, I love programming, but sometimes, it can get really, really boring

hot hull
#

Like right now I've finished a plugin so I don't have anything to do, so I'm just fiddling around with shit and it's hella boring

#

Also bruh why the fuck did youtube change the video size on mobile, like the entire video image is over the screen size

heady birch
#

its all fun

#

untill you stuck on decisions ๐Ÿ™‚

jovial warren
#

I like programming, I just don't have all that many ideas

hot hull
#

Random idea generator fingerguns

old wyvern
#

Also bard, about your argument about functions not being similar to variables, look into von neumann architecture

jovial warren
#

yeah but if I google "programming projects" or some bull shit, I either get projects that I can't be assed to do or that I have no use for

#

also Yugi I think that was something we learnt in Computer Science at some point

#

still uses data and instructions though, both of which are different from each other

old wyvern
#

Not computer science, computer org. And arch

#

Von nuemanns style i.e, our current model stores both in the same place

#

Data alongside instructions

jovial warren
#

ah okay

#

yeah but that doesn't necessarily make it very readable

old wyvern
#

Dont see it not being readable in any way

#

Also consider the fact that functions act exactly like variables in elara

#

First class functions

jovial warren
#

yeah true

prisma wave
jovial warren
#

I think I prefer OOP tbh

prisma wave
#

Biased

jovial warren
#

also @prisma wave, making Discord bot not in Spring bad

prisma wave
#

ah you saw that

#

meh

#

Classgraph + guice is usually close enough

#

and no 40s startup time

jovial warren
#

wdym 40s start time?

#

BardyBot starts in under 3 seconds

prisma wave
#

spring slow

#

For startup anyway

jovial warren
#

wat

hot hull
#

Everything is slow

jovial warren
#

@heady birch

#

"Spring is slow on startup"

heady birch
#

Robert de niro is waiting

#

Yes I can agree

#

You lose a little start up time

#

For years saved on development

prisma wave
#

Lol

jovial warren
#

@prisma wave 40 seconds though? wtf do you have in this thing?

prisma wave
#

ยฏ\_(ใƒ„)_/ยฏ

onyx loom
#

just think of all that precious enterprise time saved while developing in spring!

jovial warren
#

^

#

and Spring does thingys better

heady birch
#

Some of mine takes 50 / minute

jovial warren
#

Spring >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Classgraph + Guice

prisma wave
#

Absolutely not

#

too much ceremony

jovial warren
#

wat

old wyvern
#

How about handle dependency yourself

prisma wave
#

Register all commands in like 8 lines

jovial warren
#

@heady birch kill this man

prisma wave
#

Spring overkill

heady birch
#

Thats like saying

#

How about handling everything by your self

old wyvern
heady birch
#

Like the whole world

#

Let your tests drive you

old wyvern
#

๐Ÿคทโ€โ™‚๏ธ

prisma wave
#

test driven development

frigid badge
#

guice sucks

jovial warren
#

test driven development
aaaaaaaahhhhhhh

#

someone please teach me dis

heady birch
#

testIfThisMethodIsGoingToWorkWhenProvidedNullAndNotAndInteger

frigid badge
#

assembly best

jovial warren
#

because I have a habit of making software without writing a single test

prisma wave
#

justw rite unit 5est

jovial warren
#

for example, BardyBot is getting quite large now, and I haven't written a single test, at all

prisma wave
#

Junit3

#

kunit5

jovial warren
#

there are like 20+ classes in BardyBot and not a single test

prisma wave
#

Eunit

#

Gounit

#

Assemblyunit

jovial warren
#

Cunit

#

lol

prisma wave
#

C++unit jupiter

#

Elara unit test

old wyvern
#

EUT

prisma wave
#

let test { validate

#

assert-equal

jovial warren
#

Google?

hot hull
#

One of the craft evets jakub

#

CraftItemEvent is cancellable iirc whereas PrepareItemCraft is not

hot heron
#

Yeah tdd is not taught enough tbh

jovial warren
#

TDD?

hot heron
#

yeah, test driven development

jovial warren
#

ah okay

#

yeah I'm rubbish at testing anything

hot heron
#

My whole 4 years in college and I think 1 class touched on how to write tests

#

but not enough to be useful

jovial warren
#

I test it manually rather than writing tests to test it automatically

prisma wave
#

Unit tests are easy

#

And invaluable

jovial warren
#

yeah but they're not something that I've got in to the habit of doing

hot heron
#

They're one of those things that if you're not used to doing them, then you don't do them ha

jovial warren
#

^

hot heron
#

Or you don't even understand them, even if they are simple

jovial warren
#

I mean, I understand them, but I'm just not used to doing them, as you said

#

and as I said, I test manually

hot heron
#

I'm the second one ๐Ÿ˜›

#

I just haven't had much experience with them

#

so i overlook them

jovial warren
#

I forget they exist

#

PIT is really handy though

#

mutation testing

#

basically tells you what you've covered in testing and what you haven't

#

a.k.a it tries as hard as it can to break your code and flags up where it wasn't able to break it

prisma wave
#

Never got that working

jovial warren
#

oh I got it working easily

#

in Maven

prisma wave
#

it ran but just didn't mutate anything

#

Ew

jovial warren
#

this was before I started using Gradle

#

these days, I've got in to the pattern of create new project -> gradle -> unselect Java and select Kotlin, select DSL build script -> put in group ID and artifact name -> done

#

because Kotlin DSL > Groovy DSL

#

I haven't properly used Groovy DSL since I made my first Kotlin DSL project (which was a Spring project, since Spring Initializr will give you a Kotlin DSL build script if you select Kotlin and Gradle)

hot hull
jovial warren
#

that's a massive oof

prisma wave
#

Kotlin DSL bad

onyx loom
#

elara dsl ๐Ÿ˜ณ

#

elara everything

hot hull
#

Let's see if War Thunder still works on my pc fingerguns

prisma wave
#

I think an elara dsl might actually be possible

jovial warren
#

Kotlin DSL bad
no matter how many times you say that, you're still wrong lol

hot hull
#

Everything is possible if you try hard enough

prisma wave
#

Your only reason as to why I'm wrong involves personal preference

#

The groovy DSL is much more flexible

hot hull
onyx loom
jovial warren
#

@prisma wave technically, both of our views are just opinions, but this is #dev-general, "personal preference" and "opinion" are meaningless here

prisma wave
#

Mine is facts

onyx loom
#

all opinions are meaningless imo

jovial warren
#

@prisma wave that is wrong

prisma wave
#

Elaborate

#

the groovy DSL is more flexible than kotlin's, it's more mature (having more documenation etc), less verbose, and lets you say you know Groovy

#

what does kotlin have

#

nothing

#

except so called "static typing"

jovial warren
#

Kotlin DSL in my opinion is more readable, and it's more idiomatic towards Kotlin users meaning it's easier to understand

prisma wave
#

that's not really a point

#

"the kotlin dsl is more idiomatic for kotlin"

#

well yeah

#

that doesn't make it better

#

And your other point is just opinion

jovial warren
#

well so are your points

#

actually no, it's not your points that are opinions, it's you using them as reasons why the Groovy DSL is better that's opinion

prisma wave
#

wut

#

Apart from the last one which is a joke all of mine are objective

jovial warren
#

the Kotlin DSL only has less documentation because it's been around for less time, that's like saying Java is better than Kotlin because it's got more documentation

#

in what way is the Groovy DSL more "flexible"?

ocean quartz
#

Groovy is simpler

prisma wave
#

the Kotlin DSL only has less documentation because it's been around for less time, that's like saying Java is better than Kotlin because it's got more documentation
@jovial warren your analogy would only work if the 2 were not interoperable - the kotlin DSL usually has quite different methods of doing things so it needs documentation for everything

#

^

jovial warren
#

there is no reason whatsoever why a build language should be less verbose, and the Kotlin DSL isn't all that much more verbose anyway, and it makes much more sense in my opinion

ocean quartz
#

For example shadowJar
shadowJar { vs task.shadowJar() {

prisma wave
#

Groovy has collection literals, less syntax, dynamic typing in this case is actually useful since you don't need to worry about types as much

ocean quartz
#

Kotlin DSL in a way becomes more verbose

prisma wave
#

It is objectively more verbose

jovial warren
#

but tasks.withType<ShadowJar> means I can look at that and go "oh okay, so we're configuring the task ShadowJar"

#

whereas shadowJar {} looks like we're defining a lambda

prisma wave
#

Again that's subjective

ocean quartz
#

So you can when looking at shadowJar { if you have a functioning neuron

prisma wave
#

You are only saying that because you're viewing it from a kotlin perspective

jovial warren
#

you're viewing it from a Groovy perspective

prisma wave
#

Because I'm talking about the groovy DSL

jovial warren
#

the word "better" itself is subjective anyway, it's relative to one's perception and interpretation

prisma wave
#

not necessarily

jovial warren
#

yes necessarily

ocean quartz
#

I am not viewing it from any perspective only from the perspective of which is more intuitive and i am sorry but Groovy is way more intuitive
You can get the file and start to get it working without needing any sort of documentation explaining that it needs to be specific way

#

And even then you can write in many ways

#

Not just one

jovial warren
#

in your opinion, Groovy DSL is more intuitive, that's your perspective

prisma wave
#

but tasks.withType<ShadowJar> means I can look at that and go "oh okay, so we're configuring the task ShadowJar"
@jovial warren
whereas shadowJar {} looks like we're defining a lambda
@jovial warren

This entire point is "it's ambiguous because it uses the same syntax as a different language for a different thing"

#

Also something can be objectively better

jovial warren
#

wrong (the above sentence)

ocean quartz
#

Lol that doesn't mean i am looking at it from Groovy's perspective lol
Just means that when looking at it from an intuitive perspective, Groovy comes ahead

jovial warren
#

no you're looking at it from your own perspective

#

and so are the rest of us

prisma wave
#

lol

jovial warren
#

yeah okay, fine, I was also wrong there

#

I'm surprised you bothered to dig that up

prisma wave
#

I just searched "objectively better" and copied the first thing I saw lol

onyx loom
#

lol

#

no but he right tho

prisma wave
#

Ok but let's be honest the XML DSL is objectively the best

#

Elara dsl*

jovial warren
#

lol

onyx loom
#

xml thonking

jovial warren
#

not objectively, subjectively, and no, I'm not agreeing with that since I haven't seen it

#

and I prefer Kotlin over Elara personally since I don't like the idea of functional programming without OOP all that much

prisma wave
#

Elara supports OOP

#

To a degree

#

It's just not the most idiomatic way to express most things

jovial warren
#

how do you call functions in elara?

#

like in Groovy DSL we call plugins {} and we do the same in Kotlin DSL, what do you do in Elara?

prisma wave
#

oh boy

#

yugi might correct me here

jovial warren
#

that doesn't sound good lol

prisma wave
#

since we are having a few problems

#

but it's usually either identical to kotlin / java syntax, or ```
function-name arg1 arg2

#

but the "infix" syntax might be a problem

#

there is a lot of ambiguity

jovial warren
#

oh my

#

so how would you deal with things like the plugins block?

prisma wave
#

We've not really got that far yet, at the moment you'd have to use something like plugins (config) => { config.id 'blah' version 'blah' }

jovial warren
#

jesus christ

prisma wave
#

might end up adding a shorthand and / or receiver functions

#

actually

#

that's partly incorrect

jovial warren
#

that's worse than a Java DSL would be

prisma wave
#
plugins () => {
  id 'blah' version 'blah'
}
``` it would be this at the moment
#

I think

#

since receiver functions are a thing

#

kind of

jovial warren
#

so basically the Groovy DSL but slightly more verbose

prisma wave
#

kind of

jovial warren
#

and kinda worse

prisma wave
#

real talk it probably wouldn't try and replicate gradle

#

and we might add consice lambda syntax

#

making it syntactically identical to groovy

#

but this is a very small very niche example

#

monologue time

#

where Elara really starts to shine is the type system

jovial warren
#

let name = "Hello"

#

I don't think so

#

let

prisma wave
#

that's not a type system

#

also what's wrong with let

jovial warren
#

this keyword just lets the language down

prisma wave
#

why though?

jovial warren
#

lol

#

didn't even react to the really bad pun

prisma wave
#

People seem to say they hate it but can't give a real reason

#

soz

jovial warren
#

because it's just no

prisma wave
#

:/

#

let reads naturally

#

and is used in maths

#

so

#

val bad let good

#

and I will fight anyone who disagrees to the death

onyx loom
#

val good let good FINAL STRING NAME bad

prisma wave
#

nahhh

#

๐Ÿ˜ฆ

#
define final variable with type STRING with name hello with value "lol"
onyx loom
ocean quartz
onyx loom
#

lmao

jovial warren
#

how about Transcript lang

prisma wave
#

dev general :(

#

this is supposed to be for circlejerking not "gaminG"

onyx loom
#

we circlejerk the gaming

prisma wave
#

not on my watch

#

the only circlejerking allowed is elara and sometimes clojure

ocean quartz
#

Games also had to be developed!

onyx loom
#

๐Ÿ˜ฑ

prisma wave
#

but they use stinky c++

onyx loom
#

true

#

better than java tho ๐ŸŒ

prisma wave
#

:clojureangrymoon:

#

wait no

#

that's correct

#

clojure ๐ŸŒš

onyx loom
jovial warren
#

the only circlejerking allowed is elara and sometimes clojure
we should start a rebellion against the monarchy after this

prisma wave
#

yeah can't get kotlin moon can you

#

suckers

jovial warren
#

off with the King's head

prisma wave
#

๐Ÿ™„

onyx loom
#

damn

#

looks like i gotta make kotlinmoon now

prisma wave
#

it wouldn't work

#

wont fit

#

wrong shape

onyx loom
#

๐Ÿ˜ฆ

prisma wave
#

meanwhile moons are idiomatic in elara

#

another W for the best language ever to be ever made ever

onyx loom
#

has the replit competition ended yet lol

prisma wave
#

yeah they haven't announced the winners yet though

#

I think we all know who it will be

onyx loom
#

๐Ÿคž

#

wait no need for fingers crossed

#

its a unanimous decision

prisma wave
#

precisely

#

if elara doesn't win then the judges must be deluded

onyx loom
#

clearly

frigid badge
#

what's the prize

onyx loom
#

10k

prisma wave
#

Discord wouldn't let me send images smh

onyx loom
#

๐Ÿ‘€

frigid badge
#

lmfao

ocean quartz
lunar cypress
#

google photos

#

wow

#

new meme sharing page

prisma wave
#

lol

#

Edited on mobile

#

Hold on can you send images to this channel?

#

If so discord must think it was malicious or whatever lmao

ocean quartz
#

Same rules for images as all other channels, tier 2+

prisma wave
#

Hm

#

lol

#

It must think it's nsfw

lunar cypress
#

Discord doesn't have such safety features, does it?

prisma wave
#

Pretty sure it has some degree of it

jaunty maple
dusky drum
#

yay tommorow i gotta rework line handler in my plugin

hot hull
jaunty maple
#

aaand the guy told me that you've told him that it can't be done @hot hull

#

why it can't be

static zealot
#

...

jaunty maple
#

why not implement player independent hooks

static zealot
#

we said its not a thing yet ...

#

but the dev of the PlayerList expansion is working on adding that

jaunty maple
#

ok it looks between us and that guy has some language barrier

hot hull
#

Why does everyone just rush to conclusions lmao

onyx loom
#

theres no way my ij just crashed

#

what the frick

remote goblet
#

Does anyone know if you'd be able to hide the items a player is holding in a plugin

#

i'm sure it'd be mostly server side but im not convinced

hot heron
#

Yeah you just change the packet or send the packet saying they don't have anything in hand

pliant dagger
#

@old wyvern are you going to complete my job?

finite cloud
#

Hey if anyone needs help with plugins or building or gfx then slide me a dm ๐Ÿ˜† (Im really damn cheap lol)

obtuse gale
empty flint
#

can I add a dependency on a project to all its subprojects in gradle?

#

something like

subprojects {
  dependencies {
    implementation project(this_project)  
  }  
}
#

I just don't know how to reference this_project properly without using its name

steel heart
#

you can do this iirc
subrprojects.each { subproject ->

}

#

Else referencing project inside the closure should work

obtuse gale
#

Anyone ever tried making a discord bot in js with kotlin?

regal gale
#

What?

obtuse gale
#

like with kotlin/js

#

I found this

empty flint
#
rootProject.name = 'Blocky Lib'

include 'Blocky Nms Lib'
include 'Blocky Nms Lib:v1_12_R1'
include 'Blocky Nms Lib:v1_13_R1'
include 'Blocky Nms Lib:v1_13_R2'
include 'Blocky Nms Lib:v1_14_R1'
include 'Blocky Nms Lib:v1_15_R1'
include 'Blocky Nms Lib:v1_16_R1'
include 'Blocky Nms Lib:v1_16_R2'

This is the settings.gradle

steel heart
#

Send ur gradle scripts

#

Also prett sure you can declare a vararg of inclusions

hot hull
obtuse gale
#

Why would spring be giving me a : Null value was assigned to a property... class A on a ClassBRepo#findById line....

#

oh wait

#

hol up

#

oh wait maybe not

empty flint
#

@steel heart I figured it out. It had to do with spaces in my Module names. Gradle is dumb like that...

astral quiver
empty flint
#

Do you guys know how I could publish a shadow jar to my local maven repo?

#

I can't get it to work with the maven-publish plugin for gradle

#

Ah I'm stooopid

#

shadowJar already does it for me

#

lovely

frail glade
#

Please keep it to a single channel.

lost edge
#

Ok so if any of you play 1.16 you would have noticed that cubecraft has hex colors in their motd but if you also play on a lower version of mc you will also see that they still have normal mc colors. Anyone have an idea of how they are determining if someone is using 1.16 or pre 1.16? Are they looking at the handshake packet then modifying the response?

pseudo owl
#

Hello, i have question about SQL

now i'm getting an input from player and store it to database
if player input is an SQL keyword what's gonna happen
how can i prevent this

example sitiation:

>> input: SELECT //player wrote 'SELECT' to input.
SELECT 'SELECT' FROM menu #probaly it will throw syntax error

because of 'SELECT SELECT' section probaly it will throw syntax error
so players can find an bug or something to break server or database.

hot hull
#

Well if you put it in `` it shouldn't

#

Since it's looking for a string

pseudo owl
#

for every input

#

?

hot hull
#

I'd assume so

pseudo owl
#

i will try that thanks

#

i have a one small question too

#

storing symbols like that in sql

#

is it safe

astral quiver
#

shadowJar already does it for me
@empty flint Actually, if you want the true shadow jar type, you need to apply it in our publish configuration

#

if you are using Kotlin DSL:

empty flint
#

@empty flint Actually, if you want the true shadow jar type, you need to apply it in our publish configuration
@astral quiver Yeah I found that on google

astral quiver
#
create<MavenPublication>("maven") {
  shadow.component(this)
}
empty flint
#

Didn't know shadowJar would do that so I didn't even consider it

#

stumbled upon it by chance

astral quiver
#

I will make a PR for PDM to have something like shadow.component(this) as well

#

Is a little different, because the focus is to add dependencies in to the Maven POM

#

I shift my library that was shading using shadow

#

to PDM

#

and all my projects kinda break because now, the PDM is Compile Only

#

I still use Shadow plugin for the bstats

#

But I still have this problem that all the transtive dependencies from my libraries

#

My plugin is not getting it because of the compileOnly

#

So I will add a Utility to PDM to be able to auto insert in the POM this dependencies

empty flint
#

@astral quiver Do you happen to know how I can get a ReplaceTokens filter to work with shadowJar?

#
import org.apache.tools.ant.filters.FixCrLfFilter
import org.apache.tools.ant.filters.ReplaceTokens

task filter(type: Copy) {
    from 'src/main/webapp'
    into "$buildDir/explodedWar"
    // Substitute property tokens in files
    expand(copyright: '2009', version: '2.3.1')
    expand(project.properties)
    // Use some of the filters provided by Ant
    filter(FixCrLfFilter)
    filter(ReplaceTokens, tokens: [copyright: '2009', version: '2.3.1'])
    // Use a closure to filter each line
    filter { String line ->
        "[$line]"
    }
    // Use a closure to remove lines
    filter { String line ->
        line.startsWith('-') ? null : line
    }
    filteringCharset = 'UTF-8'
}

Something like this

astral quiver
#

check if shadowJar task depends on it

heady birch
#

@lost edge They will receive a packet and it will probably contain the protocol version

#

Using the protocol version they can tell if its below 1.16 and show old colours, else show the new colours

lost edge
#

Yea I figured packets... I now wonder if its better to do something like via backwards and look for the closet color for each hex or just edit the response..

heady birch
#

Depends on the content

#

If it's just static text might as well have two seperate strings. one for 1.16 and one for below

#

But it is possible to do that closest to thing.

lost edge
#

thx for the input!

prisma wave
#

@heady birch static abstract String color()

pseudo owl
#

hello, i need help i don't know how to do that

i have a folder named "kits" and there is {kit}.yml files
i want to load them and make configs and getting them

any tutorial any idea please

#

i searched a lot on google but can't find any usefull tutorial or resource

prisma wave
#

loop over the directory

pseudo owl
#

and where can i save them config file variables

#

lets suppose i created yaml file and its ready but where can i save

pseudo owl
#

@prisma wave is it okey?

private HashMap<String, FileConfiguration> configs = new HashMap<String, FileConfiguration>();
    
    public FileConfiguration getConfig(String config) {
        return configs.get(config);
    }
    
    public void createConfig() {
        File[] kitsFile = new File(ShinySystem.getInstance().getDataFolder() + File.separator + "kits").listFiles();
        for(File file : kitsFile){
            if (!file.exists()) {
                file.getParentFile().mkdirs();
                ShinySystem.getInstance().saveResource(file.getName(), false);
             }
            FileConfiguration config = new YamlConfiguration();
            try {
                config.load(file);
            } catch (IOException | InvalidConfigurationException e) {
                e.printStackTrace();
            }
        }
        
    }
prisma wave
#

:)

pseudo owl
#

no ๐Ÿ˜„

#

i'm asking how is it

prisma wave
#

:(

hot hull
#

Liskov

prisma wave
#

i mean

#

does it work?

#

^^

pseudo owl
#

i didn't try yet. i think its not done there should be something more

prisma wave
#

hmmm

#

well

#

initial observations

#

liskov

#

listFiles() can return null

#

and also, use File(File, String) instead of concatenating with File.separator

#

no need to catch a runtime exception too

pseudo owl
#

okay thanks

#

no need to catch a runtime exception too
@prisma wave where

prisma wave
#

InvalidConfigurationException is runtime iirc

#

maybe not though

hot hull
#

Pointless to catch that

pseudo owl
#

its giving error when i remove that

#

config.load needs to check

hot hull
#

uh what

prisma wave
#

maybe use YamlConfiguration.load instead?

hot hull
#

loadConfiguration

pseudo owl
#

okay thanks a lot

steel heart
#

Yeah you should have a FileConfiguration instance nonfinal which you redeclare with YamlConfiguration.loadConfiguration() when you reload your config.

prisma wave
#

nonfinal
i'll pass

steel heart
pseudo owl
#

what do you mean reloading config ?

steel heart
#

Just loading it again

prisma wave
#

plugin.reloadConig

#

but not

#

like

pseudo owl
#

i don't have to reload that

prisma wave
#

good

#

make it final then

steel heart
#

^

prisma wave
#

immutablemap

steel heart
#

ImmutableMutableMap

prisma wave
#

MutableImmutable

steel heart
#

Lol

#

But like immutability is nice

hot hull
#

mutability inception sheesh

steel heart
#

Just realized how much I hate static

prisma wave
#

rich hickey has joined weezer

hot hull
#

We all do

steel heart
#

No but I was kind of life with it in a sense

prisma wave
#

everything is staitc in elara

#

apart from 1 thing

pseudo owl
#

inmutablemaps are java 9 feature i guess

steel heart
#

Guava