#dev-general

1 messages · Page 510 of 1

static zealot
#

u sure u don't date a monkey?

#

xD

old wyvern
#

idk man, do you have nipples on your balls?

cinder flare
#

mmm Pop!_OS

static zealot
cinder flare
#

my favorite normie distro

old wyvern
#

lol

#

is pop the one thats supposed to look like mac by default

cinder flare
#

no

cinder flare
#

System 76 (the company that makes Pop!_OS) also sells a sick af laptop that comes with Pop!_OS preinstalled

static zealot
#

imagine having money to buy a sick laptop tho

#

$1649

#

not even that expensive

#

I have like $2

#

rn

#

so almost there

obtuse gale
#

pretty sadge

old wyvern
#

ah

cinder flare
static zealot
#

hmm. guess I Should start looking into kde neon themes

obtuse gale
#

pretty sadge

cinder flare
static zealot
#

GIMP

#

smh

obtuse gale
#

ew

hot hull
#

Blitz, instead of chatting in this shithole all day, get a job 🤡

cinder flare
#

yeah I'll admit, gimp kinda uggo

#

now Krita, that's some good stuff

#

even comes from the KDE gang

obtuse gale
#

i think i've heard about it once or twice

cinder flare
#

so blitz surely must approve

static zealot
#

hmm anyone here has a very nice kde neon theme? OR should I Just go thru all of them and see which one are nice

cinder flare
#

just go to r/unixporn and fall in love with tiling wm's

static zealot
cinder flare
static zealot
#

oh nvm. was thinking of something else xD

#

well idk. I use GIMP.

#

well don't really use

cinder flare
static zealot
#

just have it

#

xD

cinder flare
#

literally their tagline

static zealot
#

yeah was thinking about the other one Matt was talking about a while ago

#

looks interesting but I don't really use GIMP anyways. just wanted it as a replacement for Paint

#

lmao

half harness
static zealot
#

looks pretty nice tho

#

I might want to get it

obtuse gale
#

it was nice

half harness
obtuse gale
#

nothing

#

lmao

half harness
#

oh

#

lol

#

ok

static zealot
#

oh

#

more

#

please

#

more

#

1

#

word

#

messages

#

yes

#

daddy

#

yes

obtuse gale
#

but if i had to choose i would get a completely legitimate fully paid copy of photoshop

static zealot
#

lmao

half harness
#

lmao

static zealot
cinder flare
#

oh yeah

#

GIMP big overrated

#

GNU/Linux, more like KDE/Linux amirite

static zealot
#

I mean it is free after all

obtuse gale
static zealot
#

so don't think that it really is that overrated

cinder flare
static zealot
#

lmao

static zealot
cinder flare
#

now that's what I like to see

#

very true

static zealot
#

wel back to themes

#

for kde neon

half harness
#

how does internal in kotlin work? when i decompile it it just shows ```java
public final class Test {
}

static zealot
#

all the themes have bad reviews lmao

#

like 5/10

#

3/10

#

6/10

prisma wave
#

it cant actually stop you using them from java, but it can scramble the names so it's obvious that you shouldnt use them

forest pecan
#

lombok!

obtuse gale
#

yeah yeah internal is nothing but a façade

half harness
#

o

cinder flare
#

any JVM lang is nothing but a facade 🥲

#

*besides java

obtuse gale
#

tbh

half harness
#
@Metadata(
   mv = {1, 5, 1},
   k = 1,
   d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\b\u0000\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002¨\u0006\u0003"},
   d2 = {"Lme/dkim19375/dkim19375jdautils/data/Test;", "", "()V", "dkim19375JDAUtils.main"}
)
```also
#

what is dat

obtuse gale
#

stuff

cinder flare
#

looks like metadata and unicode codepoints

obtuse gale
#

y'know

half harness
static zealot
#

do u know what metadata means?

half harness
#

yes

static zealot
#

just google it. first thing is the definition/description

cinder flare
#

data about a meta, duh

half harness
#

i mean like

#

what does it store

static zealot
#

ah

half harness
#

actually

#

nvm

#

kdocs ftw 🤡

static zealot
obtuse gale
#

should packages be plural?

#

ie tables or table

cinder flare
#

in what context

#

what's the full thing

prisma wave
static zealot
#

wtf is this cursor tho?

prisma wave
#

this might be the worst thing ive ever made

static zealot
#

the theme looks alright. besides that

prisma wave
#

thats a you problem

cinder flare
static zealot
#

damn. that's pretty big then

obtuse gale
#

or tables, utils

static zealot
#

I use singular

#

that's what most people here recommended

cinder flare
#

i think I'd need to see some example code to fully decide

static zealot
#

bcz its ...command.RELOAD or something like that

quiet depot
#

packages should be plural and singular

static zealot
#

well fuck

quiet depot
#

when applicable

#

e.g. command implementations would definitely go into a package called commands

#

but if I’m making a player api (like in papi), package would be player

static zealot
#

Piggy u got a theme to recommend ?

#

for kde neon

quiet depot
#

for

cinder flare
#

yeah that's why i said i need some examples

quiet depot
#

idk i just use default kde theme

prisma wave
#

java type system bad ☹️

cinder flare
#

i feel like very few people care about how pretty their computers look besides me

static zealot
#

found THE ONE

cinder flare
quiet depot
#

java type system gud

#

i say if it has types

cinder flare
quiet depot
#

it is gud

obtuse gale
#

sql column naming conventions?

prisma wave
prisma wave
old wyvern
#

Having types is not good enough 😔

quiet depot
#

lower snake case aj

obtuse gale
#

aight ty

old wyvern
#

Java Type System << Haskells Type System

cinder flare
quiet depot
cinder flare
#

it definitely extends the java type system, but yeah it isn't the haskell type system that's for sure

old wyvern
#

Any bad

quiet depot
#

but haskell isn’t comparable to java

old wyvern
#

casting bad

quiet depot
#

because u see

old wyvern
quiet depot
#

haskell is bad

prisma wave
quiet depot
#

and java is not

#

therefore not comparable

old wyvern
#

Java very bad

quiet depot
#

i rest my case

prisma wave
#

if java is so good why can't it do this

#

haskell can do this

old wyvern
#

Overruled

quiet depot
#

java can do this my dude

#

ur just bad

prisma wave
#

go on then

#

show me "how"

cinder flare
quiet depot
#

i don’t even know what that code does

cinder flare
#

it monads around

quiet depot
#

kotlin syntax confuseballs

static zealot
#

just seems to take a while

quiet depot
#

why

#

why would you switch to linux

#

and then transform linux into windows

static zealot
#

bcz I'm a madman

cinder flare
#

because I like the look of windows and the everything else of linux

prisma wave
quiet depot
#

that’s like buying a bus and then cutting it in half so it’s the size of a car

#

just buy a car

static zealot
prisma wave
#

still doesn't work

cinder flare
#

as I say, I would love a Windows Desktop Environment for Linux

prisma wave
#

java bad

cinder flare
#

the only thing that changes is the appearance

quiet depot
#

i was just trying to think of the stupidest analogy

#

i’m not here for serious talk

cinder flare
#

im kind of in love with that ngl

old wyvern
#

A half cut bus?

cinder flare
#

man maybe I shouldn't have reinstalled Arch because I was angry at KDE for looking bad

old wyvern
#

kde looks fine tho

cinder flare
#

i didn't think it looked that great with what I ahd

prisma wave
#

need to define a generic function <M, T>#bind that takes Function<T, B> and returns M<M, T> (i.e a monad of the same type but with a different T)

static zealot
#

yeah I like kde. idk what u talking about Star

prisma wave
#

i dont think this is actually possible in jvm

#

i wonder what arrow does

cinder flare
#

i just really like how my windows looks right now

#

i need me a wallpaper engine for linux

quiet depot
#

bm so T needs to change?

prisma wave
#

yes

#

basically

#

generic map function

#

so

quiet depot
#

can’t you just introduce another variable for T?

prisma wave
#

so if class IO<T> extends Monad<IO, T>, IO#bind should return IO<B>

#

at the same time class Maybe<T> extends Monad<Maybe, T> should return Maybe<B> when bind is called

static zealot
#

going to stay with default kde neon theme tho. not that bad

quiet depot
#

gimme a minoot

prisma wave
#

im reasonably confident this isnt possible

quiet depot
#

where’s a huell reasonably gif when I need it

old wyvern
#
interface Monad<M: Monad<M, T>, T> {
  fun <B, R: Monad<M,B>> bind(f : (T) -> R): R
}

What about this bm?

#

or wait no

#

hmm

prisma wave
#

Type mismatch.
Required:
Monad<IO<String>, TypeVariable(B)>
Found:
IO<Unit>

#

breaks this

half harness
prisma wave
#

only way of doing it

#

without compiler hacks

half harness
#

wat

#

how come?

quiet depot
#

proof haskell is bad

prisma wave
#

because do blocks are supposed to be a sugar for composing the monads

half harness
#

also why not make the functions infix 🙂

prisma wave
#
`do` {
  putStrLn("hello")
  getLine().bind(::putStrLn)
}
``` wouldn't actually do anything, it would just evaluate the IO<blah>s
prisma wave
old wyvern
#

bm how about something like a do context object which defines those functions, and adds up the expression as the functions are called?

prisma wave
#

hmm

#

then the functions wouldn't be accessible outside of a do block

#

unless you define them twice

old wyvern
#

Hmm

prisma wave
#

might have to just have IO<x> be the only monad for now

#

i dont think the monad interface is possible

quiet depot
#

sorry will take a min, downloading dev env on laptop

#

dis is def possible

prisma wave
#

hmm

#

okay

quiet depot
#

50% sure on the definite

cinder flare
#

wait piggy are you trying to fix the haskell problem?

quiet depot
#

ye

cinder flare
#

oh

#

uh, good luck

obtuse gale
#

"The Haskell Problem" sounds like a Wikipedia article describing a multi million dollar bounty lmao

prisma wave
#

lmao

quiet depot
#

i did it

old wyvern
#

Send

quiet depot
#

2 sec i test

obtuse gale
#

test fails

old wyvern
#

btw, binding with Maybe for eg, should return a Maybe, not just any monad

quiet depot
prisma wave
#

huh

quiet depot
#

i am self proclaimed generic master

#

where's my million dollars

jovial warren
quiet depot
#

@prisma wave so is that right?

old wyvern
#

Can you send it in a paste piggy

quiet depot
#
public interface Mondaddy<M extends Mondaddy<M, T>, T> {
    <B extends M> B bind(Function<T, B> func);
}```
#
public final class IO<T> implements Mondaddy<IO<T>, T> {
    @Override
    public <B extends IO<T>> B bind(final Function<T, B> func) {
        return null;
    }
}```
prisma wave
#

huh

old wyvern
#

And no

#

Thats wrong piggy

prisma wave
#

im not sure that works with an actual implementation of bind

quiet depot
#

idk how bind works

#

can u give me an example input

old wyvern
#

It needs to return a M which extends Monad<M, B>

#

And that M needs to be the same M

#

the captured one

prisma wave
#

getLine().bind(::putStrLn), where getLine returns IO<String> and putStrLn is String -> IO<Unit>

quiet depot
#

ok then it works fine

old wyvern
#

It doesnt

#

It returns the same type

quiet depot
#

ah i see the issue

prisma wave
#

B should extend Maybe<B> rather than Maybe<T>

#

but it can't

old wyvern
#

Hence

#

Java bad

prisma wave
#

😌

old wyvern
#

😌

cinder flare
#

Maybe<Java will *B*eat your ass>

old wyvern
#

Nothing

cinder flare
#

oracle big bullies

#

they might fight you

old wyvern
#

And then lose like they did with google

#

😌

cinder flare
#

hmm yeah well that was dumb

#

but they could get you on slander!

old wyvern
#

Oracle cant bully better than the circlejerk gang

quiet depot
#

ok what u could do

#

is just add so many type parameters and have the parent type as the very last one

#

hopefully causing a stack overflow so java forgets about the parent and only knows the child

prisma wave
#

hmmmm

#

yes

#

that does sound practical

old wyvern
#

xD

#

Couldnt be elara

quiet depot
#

i once again rest my case

#

where's my million dollars

old wyvern
#

Java bad

quiet depot
#

it's technically a solution

prisma wave
#

i think the logical conclusion here is that java bad

old wyvern
#

The technical solution is switching to Haskell

prisma wave
#

^^

cinder flare
#

could it be done in Rust

prisma wave
#

probably

errant geyser
#

Have you seriously found a use case where using Java just doesn't work?

#

Only you could do that

quiet depot
#

no not really kotsumag

old wyvern
#

Id assume so since their type systems are supposed to have some commonalities

prisma wave
#

this isnt exactly a "real" project

prisma wave
#

but as an experiment we can definitely conclude java bad

quiet depot
#

kot whatever is achievable via this monad/io/maybe api is achievable via plain old java

old wyvern
#

Bm

#

Babel?

quiet depot
#

perhaps just less nicely

prisma wave
old wyvern
#

Still cant figure out a nice name tho

#

Jabel

prisma wave
#

jabel

prisma wave
old wyvern
#

idk that sounds a bit bland tho

obtuse gale
#

b4j

old wyvern
#

bj

#

uhh

obtuse gale
#

jababel

#

javabel

errant geyser
quiet depot
#

bj4u

old wyvern
#

xD

obtuse gale
#

wink wink nudge nudge

errant geyser
old wyvern
#

😳

cinder flare
#

😉

quiet depot
#

excuse me madam

old wyvern
#

How about... Pecom

#

PrECOMpiler

#

idk

prisma wave
#

huh

#

jecom

old wyvern
#

xD

quiet depot
#

I am a quaint gentleman and I will not engage in such tomfoolery boy

errant geyser
old wyvern
#

This is a christian pig

obtuse gale
#

for now..

old wyvern
#

Also its considered animal abuse!

quiet depot
#

this is a christian server my good fellow

prisma wave
#

you cant chain infixes right

old wyvern
#

This is a muslim server

errant geyser
prisma wave
#

oh you can but with parens

quiet depot
#

we do not chain things unless they worship the devil bm

prisma wave
#

hmmm

old wyvern
old wyvern
prisma wave
#

wait

#

you can

old wyvern
#

Not properly

prisma wave
#

this kinda works

old wyvern
#

Yea but its only in the infix form

#

I tried making the sql syntax in kotlin once, didnt work out

prisma wave
#

yeah

old wyvern
#

lol

prisma wave
#

nice

#

wouldnt work with like fmap String::reversed getLine ☹️

#

but i gotta say i am pretty happy with this

ocean quartz
#

Cursed

prisma wave
#

apart from the lack of monad interface

#

okay we now have % instead of <$>

ocean quartz
prisma wave
#

(getLine % String::reversed bind putStrLn)

prisma wave
ocean quartz
#

Ah

cinder flare
#

sounds like what you're doing is pretty hacky and overcomplicated 👀

prisma wave
#

nah

#

no hacks here

#

just plain old kotlin

cinder flare
#

poko

static zealot
#

shit. unity is so slow smiling_face_with_3_tears

old wyvern
#

Shut up barry

#

Kabel!

#

Bringing Monads! To! Kotlin!

prisma wave
#

kotlin version: getLine % String::reversed * putStrLn
haskell version: reverse <$> getLine >>= putStrLn

#

not bad

#

i guess

ocean quartz
#

Fucking Andrey 😩

prisma wave
#

i'll pass

old wyvern
#

bm

#

What about a infix function that applies lhs to rha

#

like $

prisma wave
#

is that even possible

old wyvern
#

Maybe

prisma wave
#

oh it might be

#

with ``

old wyvern
#

Might need a few definitions

#

But yes

#
infix fun `$`(lhs: (A, B, C) -> D, rhs: A): (B, C) -> D {
    return {b, c -> lhs(rhs, b, c}
}```
prisma wave
#

dear god

old wyvern
#

😌

#

A few more such definitions

#

and we somewhat have currying

cinder flare
#

/bin or /usr/bin

old wyvern
#

/usr/bin

cinder flare
#

why

old wyvern
#

idk

lunar cypress
#

Why are you guys reinventing arrow

prisma wave
#

we're doing arrow but better

old wyvern
#

😌

cinder flare
#

call it hash

obtuse gale
#

"we're inventing the wheel but rounder"

old wyvern
#

brownies

cinder flare
#

wait wait

#

hash brownies or hash browns

jovial warren
#

just trying to not violate the equals/hashCode contract, and was just wondering, is kotlin override fun equals(other: Any?) = other is WorldVersion && id == other.id && isSnapshot == other.isSnapshot override fun hashCode() = id * 31 + (if (isSnapshot) 1231 else 1237) fine? (boolean hash code comes from java.lang.Boolean#hashCode)

cinder flare
#

those are very different

prisma wave
#

that could be fun actually

old wyvern
prisma wave
#

terminal emulator in haskell

cinder flare
old wyvern
#

Whats the browns one?

cinder flare
cinder flare
#

hash brownies are drug-laced brownies

old wyvern
#

Ik hash brownies

prisma wave
#

but shells are boring

old wyvern
#

Not hash browns tho

prisma wave
#

you have to parse shit

old wyvern
#

egg and... prawns?

cinder flare
old wyvern
#

wtf is on the right side of that plate?

cinder flare
#

hash browns

prisma wave
#

that is not a hash brown

cinder flare
#

what yes it is

prisma wave
#

actually it kinda is

cinder flare
#

it... objectively is

#

maybe you're thinking of the mcdonalds hash browns?

old wyvern
#

Google shows this

prisma wave
#

i am

old wyvern
#

So like nuggets?

cinder flare
#

well no it's hash browns

prisma wave
#

except the mcdonalds shape is the one you find everywhere here

#

even outside of mcdonalds

cinder flare
#

you can just get them in that compacted shape

cinder flare
prisma wave
#

mhm

#

weird

cinder flare
#

did you see termonad

prisma wave
#

i did

cinder flare
#

looks like you've been beaten to the punch

prisma wave
#

nah

#

ours will be better

old wyvern
#

Haskell discord???

prisma wave
#

😮

old wyvern
#

DisMonad

cinder flare
#

😮

#

Disnad

old wyvern
#

Mocord

jovial warren
#

currently cutting out all data classes from the Krypton API because I don't want binary compatibility issues in the future lol

cinder flare
#

what's wrong with data classes?

jovial warren
#

lemme get you the article I read yesterday

prisma wave
old wyvern
#

😌

#

wait

#

does that work?

prisma wave
#

yes

#

amazingly

old wyvern
#

I thought + had higher precedence

prisma wave
#

i think infixes are left associative?

#

or maybe right idk

old wyvern
#

Shouldnt it be (print 3) + 4

prisma wave
#

apparently not

old wyvern
#

weird

half harness
prisma wave
#
infix fun <A, B> ((A) -> B).`$`(rhs: A): B {
    val lhs = this
    return lhs(rhs)
}
#

so not pretty

half harness
#

i've got no clue what that does

prisma wave
#

it's like $ in haskell

#
main = print $ 3 + 4```
cinder flare
ocean quartz
#

Yeah curious too

gusty glen
prisma wave
#

main = print (3 + 4)

#
+(reverse % getLine * putStrLn)

okay this is the closest we can get to the haskell equivalent i think

#

not bad

old wyvern
#

That the modulo and multiply for?

prisma wave
#

% = <$>, * = >>=

old wyvern
#

ah

static zealot
#

@prisma wave one more for the album

prisma wave
#

lmao

jovial warren
#

so e.g. when the API reaches 1.0, you'll be able to use 1.0 compiled code on say 1.35 and it'll still work normally

cinder flare
#

why would you not recompile

jovial warren
#

¯_(ツ)_/¯

cinder flare
#

that is not a good reason to stop using amazing language features

jovial warren
#

maintaining binary compatibility is a very important thing for public APIs though anyway

cinder flare
#

i doubt paper or spigot maintain binary compatability

jovial warren
#

yes they do

#

why do you think deprecation exists?

cinder flare
cinder flare
jovial warren
#

and when does it get removed?

#

what happens when it gets removed?

cinder flare
#

whenever they feel like it? and it gets removed?

jovial warren
#

you increment the major version, because you made backwards incompatible changes

cinder flare
#

im not sure what you're getting at here

#

okay?

#

how is that related to binary incompatability

jovial warren
#

binary incompatibility is that backwards incompatible change

cinder flare
#

i mean it doesn't have to be

half harness
old wyvern
#

Then you delete system32

jovial warren
#

someone please try to do a better job at explaining to Star what the importance of binary compatibility is

old wyvern
#

I dont think theres really a major issue with how kotlin handles it

jovial warren
jovial warren
cinder flare
#

In fact, despite Java's binary compatibility features, I recommend frequent recompilations anyway, since other features of Java do a great job of letting the compiler spot bugs for you.

#

point deleted

#

i will continue using kotlin data classes thank you very much

jovial warren
#

I'm not saying that you shouldn't recompile when something is updated

#

what I am saying is that it is important for API authors to make sure that old code can still run on new versions

cinder flare
#

I don't think that's what binary compatibility is

jovial warren
#

yes it is

cinder flare
#

that's not what this article is saying

obtuse gale
#

like a whole lot

cinder flare
#

surely as long as you have the same methods and such you can still use it on a newer build?

jovial warren
cinder flare
#

i don't see why changing the copy function would break anything

jovial warren
#

because you're changing the signature of the function Star

cinder flare
#

the copy function takes nothing and returns a new copy of the object

#

it's the same no matter which parts of the object there are

jovial warren
#

not true

ocean quartz
#

Just update your stuff, if people choose not to, it's their problem

jovial warren
#

I think you're confusing copy with clone Star

obtuse gale
#

^

old wyvern
#

copy function can return a mutated copy star

cinder flare
#

oh huh

old wyvern
#

It takes all properties of the data class as optional params

cinder flare
#

well still, if they're updating your api they better be ready to fix some bugs

#

people can stay on legacy versions if they don't want to update

jovial warren
cinder flare
#

you're sacrificing a ton of code terseness for making it a little bit easier to upgrade minor versions

cinder flare
jovial warren
#

the whole idea of minor versions is that you make backwards compatible changes

cinder flare
#

in your specific versioning scheme, maybe

jovial warren
#

in semantic versioning

potent nest
#

in semver, which is pretty common

jovial warren
#

^

cinder flare
#

okay, and?

#

you can do whatever you want

#

I really don't see how many benefits you'll get from dismantling your nice kotlin code

potent nest
#

imagine if all plugins depending on WorldEdit would need to be recompiled each day or another

cinder flare
#

and if they do, they would recompile

jovial warren
#

not really an option

cinder flare
#

like they already do

#

not really an option?

#

are we talking about the same thing here

potent nest
#

server owners update their plugins

jovial warren
#

doesn't matter what version they depend on, it's what version the server is running

old wyvern
#

Another victory for haskell 😏

jovial warren
#

it would be extremely frustrating as a developer to have to re-compile your code every single day and release a new version every single day just because the author of the API you use doesn't know how to maintain a public API properly

cinder flare
#

well how come kotlin doesn't mitigate this

prisma wave
#

it would seem kotlin's weak-ass type system has caused yet another issue

cinder flare
#

if its so important

jovial warren
obtuse gale
#

couldn't be java

cinder flare
#

surely it can

#

if java can do it

queen rivet
#

Hi@

jovial warren
#

there's not much the compiler can really do to prevent the componentN and copy functions breaking binary compat

queen rivet
#

Does anyone know a server tunnel? (better than play.it)

ocean quartz
#

Kotlin bad!
Hasklin best!

cinder flare
jovial warren
#

perhaps

cinder flare
#

you should submit a feature request bardy

jovial warren
#

but then you're kinda breaking the contract of those functions

prisma wave
#

are generic variables possible

cinder flare
#

seems like a major flaw in kotlin

ocean quartz
prisma wave
old wyvern
#

Sir, this is dev general

queen rivet
cinder flare
#

Sir, dev general is this

jovial warren
#

if you add a new field in the middle of the data class, the componentN function should return the value for the position of that argument

jovial warren
#

e.g. kotlin data class Person(val name: String, val age: String) component1 returns name and component2 returns age

prisma wave
old wyvern
#

xD

jovial warren
#

now, say if I add a new field in the middle of that, component2 should return that new field

prisma wave
jovial warren
#

having that new field at position 2 be returned by component3 would kinda break the contract of the component functions

cinder flare
prisma wave
#

😌

jovial warren
#

I'm not saying you shouldn't use data classes, I'm saying you should exercise caution when using them in public APIs

ocean quartz
#

Or use them and don't care

jovial warren
#

well yeah, if you wanna break binary compatibility every time you add a new property and piss of developers, sure

cinder flare
#

this is why you have major releases

prisma wave
#

okay kotlin has introduced a major technical limitation

#

i dont think there is a fix for this

jovial warren
prisma wave
#

i need generic properties

cinder flare
#

branches exist

ocean quartz
prisma wave
#

🙄

jovial warren
#

¯_(ツ)_/¯

cinder flare
jovial warren
#

idk

obtuse gale
#

every single day apparently

cinder flare
#

and right now, Krypton is in alpha and rapid development, every update probably contains breaking changes

jovial warren
#

yeah ik, I'm just preparing lol

cinder flare
#

so use data classes, and then only update sparsely after a lot of development is done

jovial warren
#

I'm making my life easier in the future

cinder flare
#

seems like you're writing stupider code

jovial warren
#

also, half of the time I don't even need data classes in the API anyway

#

also, you know who wrote that article don't you

cinder flare
#

nope

ocean quartz
#

No, you're making people that doesn't update lives easier in the future while making yours shittier
Bukkit flashbacks

jovial warren
#

Jake Wharton, one of the lead developers in various Square projects like OkHttp and Retrofit

prisma wave
#

Simon Peyton-Jones, one of the lead developers of various good projects like GHC and F*

cinder flare
#

also never heard of him

jovial warren
cinder flare
#

okay, I don't care about his opinion in the slightest

jovial warren
#

also, if binary compatibility isn't important, why do some of the most popular and famous libraries in the ecosystem all preserve it?

cinder flare
#

because they're dumb, stuck in their old ways, and dislike updating and changing

#

similar to bukkit

jovial warren
#

oh yes, because Sponge, Adventure, OkHttp, Guava, Gson, Android, etc. are all stuck in their old ways

cinder flare
#

I could see it

potent nest
#

ABI compatibility is more important than API compatibility

prisma wave
#

what does haskell do?

#

that's the right answer

jovial warren
#

ask anyone who's maintained an at least semi-popular public API before, they'll tell you how important binary compatibility is

prisma wave
#

@obsidian galleon5

#

nooooooooooooooo

obtuse gale
#

LOLL

ocean quartz
#

Lmao

obtuse gale
#

how do i handle storing complicated permissions for like access to a certain page or something in a database? Do I just store it as like a string then check that in the app?

#

dunno if that made sense lol

ocean quartz
#

I'd probably create a permissions table then when you need to add a permission to a user add the id instead of the permission directly

cinder flare
#

what are you storing complicated permissions in a database for is my question

obtuse gale
#

wdym

cinder flare
#

what permissions are you storing that need to be in a database

obtuse gale
obtuse gale
cinder flare
#

Well what Matt said is just general relational database design

#

sounds like you could solve this with booleans

ocean quartz
#

That'd be the opposite, adding just a string to someone's profile will turn into a spaghetti in no time

obtuse gale
#

hm i see

#

but once the apps built the perms table wont change at all

#

since no new perms will need to be added

ocean quartz
#

until you need it to change

#

Future proofing is important

obtuse gale
#

true ig

#

so the user would have a list of ints or longs or whatever thats all the IDs of the perms they have?

cinder flare
#

yeah why use a relational database if you're not gonna design for a relational database

obtuse gale
#

yeah

jovial warren
#

@lunar cypress I remember the other day, we were discussing comparing vectors (which requires comparing floating point values too), and I'm using a fuzzy equals (absoluting the difference and checking against an epsilon value), but I was just wondering: what kind of hashCode should I write for this? because I don't think I can really fulfil the equals contract here using a fuzzy equals

#

current equals: ```kotlin
override fun equals(other: Any?) = other is Location &&
world == other.world &&
abs(x - other.x) < EPSILON &&
abs(y - other.y) < EPSILON &&
abs(z - other.z) < EPSILON &&
abs(yaw - other.yaw) < EPSILON &&
abs(pitch - other.pitch) < EPSILON

lunar cypress
#

We discussed that too, remember?

#

I think there is no solution

#

As soon as you introduce floating point numbers you break the contract

jovial warren
#

yeah

lunar cypress
#

If you want your thing to be practical

jovial warren
#

so what should I settle for then? something like kotlin override fun hashCode(): Int { var hash = 3 hash = 19 * hash + world.hashCode() hash = 19 * hash + (x.toRawBits() xor (x.toRawBits() shr 32)).toInt() hash = 19 * hash + (y.toRawBits() xor (y.toRawBits() shr 32)).toInt() hash = 19 * hash + (z.toRawBits() xor (z.toRawBits() shr 32)).toInt() hash = 19 * hash + yaw.toRawBits() hash = 19 * hash + pitch.toRawBits() return hash } ? (which is what Bukkit uses for Location)

lunar cypress
#

I have no idea

jovial warren
#

(x.toRawBits() is basically the same as Double.doubleToLongBits(x) btw)

#

I think that calculation is what's used by java.lang.Double#hashCode

jovial warren
#

generating hashed representations of objects

steel heart
#

Dkim rly

jovial warren
#

and that hash is used in things like maps and lists to store values iirc

cinder flare
jovial warren
#

that's equals

lunar cypress
#

no

half harness
#

but what about #equals?

jovial warren
#

lol

cinder flare
#

am I thinking of like MD5 hashes

#

and are those not the same

jovial warren
#

hashCode generates a hashed representation of the object

cinder flare
#

which you can use to test for equality

lunar cypress
#

yesn't

jovial warren
#

you can, but you generally don't

cinder flare
#

well that's what like file hashing is for

#

i mean you wouldn't use that like, in your program probably, that's why #equals exists lol

lunar cypress
#

The reason you hash files is because it's a lot more efficient

jovial warren
#

Tom Scott once described a hash as "a summary of data"

#

and that's basically what it is

old wyvern
#

equality wont really hold since collisions can happen

lunar cypress
#

But every hash function has some form of collision so when you have equals, you don't use hashCode for comparison

jovial warren
#

^

cinder flare
#

okay

#

but what about validating you downloaded the right file with an md5 hash

#

other hash algorithms are available

jovial warren
#

that's called a checksum

#

yeah

cinder flare
#

yeah but it's hashing right

jovial warren
#

yes

old wyvern
#

Yea

cinder flare
#

see, i knew I was talking about something

jovial warren
#

and if the algorithm is strong enough then it's pretty good for comparisons

#

but a hash isn't just for checking equality

lunar cypress
#

it's for checking integrity because universal hashing algorithms have the property that if you flip a single bit, the resulting hash is vastly different

jovial warren
#

for example, your passwords that you enter into most websites are hashed, but that's not for checking equality

old wyvern
#

salted and hashed

lunar cypress
#

It should be noted that although md5 is shit and shouldn't really be used for anything, you get values that are much longer from it

#

than hashCode()

cinder flare
lunar cypress
#

hashCode() is just int

old wyvern
#

Isnt it salted before being hashed?

jovial warren
#

yeah hashCode is limited to like 4 billion values

jovial warren
cinder flare
#

what

#

i don't know anything about computers, turns out

old wyvern
#

Thats what I have read about it star

jovial warren
#

the salt is just text that's used to get more randomising out of the hashing function

old wyvern
#

Havent really implemented it anywhere so 🤷

lunar cypress
jovial warren
#

oh most definitely

old wyvern
#

Are there no general libraries for this?

lunar cypress
#

there are

old wyvern
#

So people just ignore them?

cinder flare
#

yooo you could make a hash function in haskell

#

since it's pure

lunar cypress
#

php exists kekw

cinder flare
lunar cypress
#

I think that has a top level md5 function that people have been rolling with for several years

#

even though now it has password_hash or something too

old wyvern
#

rip

#

Wouldnt happen with Elara 😌

prisma wave
#

php has about 50 insecure and outdated functions

jovial warren
#

mysql_real_escape_string 🥲

prisma wave
#

Ah yeah that was it

#

Because mysql_escape_string is terrible and insecure

obtuse gale
#

i want help

prisma wave
#

don't we all

obtuse gale
#

i hant to updait my server

prisma wave
#

👌

obtuse gale
#

can you help me

#

@prisma wave

prisma wave
#

maybe

gusty glen
cinder flare
#

for a price!

obtuse gale
#

can i call you

prisma wave
#

Absolutely not

cinder flare
prisma wave
obtuse gale
gusty glen
#

BM returns Empty Nothing for you

prisma wave
#

Nothing

forest pecan
#

Is there an API which allows me to help send some request to all users that are on an html page using Java code?

#

Basically some sort of communication framework

#

that allows me to communicate from java to front end (html page)

steel heart
#

Why use Java for that

forest pecan
#

because plugins 🤡

steel heart
#

Maybe use a socket

forest pecan
#

wdym

steel heart
#

Idk if JavaScript provides a socket class or smtng but Java does, pretty sure you could use that to communicate.

forest pecan
#

yea ig

steel heart
#

A socket is like an endpoint (you probably alr know that lol) but yeah

old wyvern
#

Might have some extra work needed

old wyvern
#

Like to check if the same user is active across clients

steel heart
#

Oh yeah true

jovial warren
#

I watched a video on socket.io the other day lol

#

that's how I know about it

steel heart
#

Ah thank you for letting me know about it also

gusty glen
#

What happens if a project have two libs as implementation dependency, one require (e.g.) Guava 18.0.0, and the other require Guava 27.0.0, what version will be picken up by gradle? And what happens if I specify Guava as explicit dependency (e.g. version 30.0.0), will Gradle yeet the versions required by both libs?

steel heart
#

Weird shit happens, Idk but I think at runtime it can cause NoSuchFieldError, NoSuchMethodError and possibly LinkageError

lunar cypress
#
  1. undefined afaik
  2. yes, I believe
steel heart
#

d;sub_classes LinkageError

ruby craterBOT
#
Sub Classes:
java.lang.ClassCircularityError
java.lang.IncompatibleClassChangeError
java.lang.BootstrapMethodError
java.lang.ClassFormatError
java.lang.UnsatisfiedLinkError
java.lang.NoClassDefFoundError
java.lang.ExceptionInInitializerError
java.lang.VerifyError```
steel heart
#

d;sub_classes IncompatibleClassChangeError

ruby craterBOT
#
Sub Classes:
java.lang.NoSuchFieldError
java.lang.InstantiationError
java.lang.IllegalAccessError
java.lang.NoSuchMethodError
java.lang.AbstractMethodError```
jovial warren
#

public abstract interface class lol

#

the Kotlin binary compatibility validator's output is kinda funny sometimes

ocean quartz
#

detekt

jovial warren
#

yeah lol

#

it's a Kotlin static code analysis tool

cinder flare
onyx loom
#

literally every kotlin library: replace Cs with Ks or must start with a K!

ocean quartz
#

why is kotlin like this

jovial warren
#

I think it's worse than 244 btw

static zealot
#

Prepare yourself mentaly for June 8

#

1.17 is coming

gusty glen
#

what name is better, setStringList, setStringCollection, setList, or setCollection for this method (yes I know it's not technically a List)?

cinder flare
#

i like setStringList

#

since it only allows Collections of strings right? so unless you make a generic setCollection, that name would be wrong

gusty glen
steel heart
#

setStringCollection ?

gusty glen
#

secret-cfg now features automatic reload on file modification 👀

cinder flare
#

cause you could alternatively do like a set of integers or suttin

cinder flare
gusty glen
#

I'll expose a method for users to hook up their listeners on any type of modification they want to listen for

cinder flare
#

dang that IJ formatting looks really good

jovial warren
#

not bad, though Fira Code Medium is actually 👌

ocean quartz
onyx loom
#

MF-OS

cinder flare
#

yooo

#

im doing Linux from Scratch rn

#

guys wanna make MF-OS

ocean quartz
#

Yass

spring canyon
#

I've seen it a few times now

distant sun
#

Thats how IIJ render javadocs

spring canyon
#

It doesn't do that for me thonking

distant sun
#

Go to the left side of a comment

#

Javadoc* there should be an icon to toggle that view

spring canyon
#

Oh, now it does

#

Thank you!

distant sun
#

Np

gusty glen
#

does this mean the sponge api server is down?

rotund egret
#

Looks like you're not searching in the correct repository.

eternal compass
#

I love when server releases go smoothly 😌
I only messed up one thing that was fixed in like 30 seconds

#

I had so many custom plugins that didn't fail, its a miracle

obtuse gale
ocean quartz
#

Lmao

jovial warren
#

https://github.com/Netflix/governator I just found another really cool project

GitHub

Governator is a library of extensions and utilities that enhance Google Guice to provide: classpath scanning and automatic binding, lifecycle management, configuration to field mapping, field valid...

#

it brings a shit ton of extra stuff to Guice, including classpath scanning

gusty glen
#

Opinions?```KT
val config = ConfigProvider.create(plugin, "file", logger)

config.listener(FileModificationType.CREATE_AND_MODIFICATION) {
// Do things here whenever your config is automatically reloaded due to file modifications (or creation)
}```

jovial warren
#

lgtm

prisma wave
#

kotlin bad

forest pecan
#

why is google format like pretty but also mad scuffed at the same time

obtuse gale
#

I mean just ignore the line length thing

#

that's what I do lol

forest pecan
#

like the streams

#
    new EnhancedDependencyLoader(
            files.stream()
                .map(
                    x -> {
                      try {
                        return x.toUri().toURL();
                      } catch (final MalformedURLException e) {
                        e.printStackTrace();
                      }
                      throw new InvalidPathException(x.toString(), "Path is not a valid file!");
                    })
                .collect(Collectors.toList()))
        .loadJars();
#

that formatting

#

lol

eternal compass
#

kek

ocean quartz
#

Yikes

obtuse gale
#

I mean that doesn't really have to do with google style?

#

catching exceptions in lambdas is ugly

#

in and of itself

eternal compass
#

fair enough

forest pecan
#

endure the pain of google format suffering and one day you might get a job there

#

Lmao

eternal compass
#

anyone have free time to tell me what I did poorly with a server? :p

#

it seems to be working

#

but I don't know what its like to someone new

steel heart
#

sure

eternal compass
#

ty

forest pecan
#

im praying my plugin doesnt crash

#

going strong so far

#

damn it actually worked

old wyvern
#

😌

forest pecan
#

btw @old wyvern

#

I added you onto there

#

I even embed Slimjar for you 🥸

#

did it for Matt too

old wyvern
#

lol

forest pecan
#

Lol

old wyvern
#

Something is wrong

forest pecan
#

What's wrong

old wyvern
#

idk

#

not feeling well

half harness
#

lol

forest pecan
#

Oh lmao

half harness
frail glade
#

My guess is you have an infinite loop in a test?

old wyvern
forest pecan
#

how are your build times so long

#

That is like 6 times longer than mine which literally downloads BuildTools and compiles all NMS versions between 1.8 and 1.16

#

lol

half harness
eternal compass
#

it compiles all of spigot?

#

use a cache

#

theres a script for that

forest pecan
#

lol i do use cache

#

it still compiles it all tho

#

idk why

#

xD

eternal compass
#

._.

gusty glen
#

I've acidentally kicked my PC and may or may not have lost hours of work because Windows frozen, I and had to shut it down forcefully

half harness
#

oof

ocean quartz
#

small commits fingerguns

half harness
#

intellij autosave fingerguns

gusty glen
#

in KDocs, when referring to a method do people use Class#method or Class.method or Class.method()?

eternal compass
#

As I said, a scary place

half harness
#

lol

obtuse gale
#

Reason #1 why I have DMs off in my own support server: DMs

#

The only servers I have DMs on are the ones I moderate in and that's it

eternal compass
#

I'm thinking about disabling them

#

But then I just get friend requests

#

Lots of them

half harness
#

disable friend requests fingerguns

cinder flare
#

be offline 24/7 fingerguns

eternal compass
#

I don't get how people think they can DM a 1500 member serve r's owner and say "Can we be friends"

#

Like if its a serious question, yeah totally I'll reply

#

But I cant be friends with everyone

#

Not how that works

cinder flare
#

wow you just hate everyone fred?

#

that's what im hearing

#

smh

eternal compass
#

Huh? I hate evry fred?

cinder flare
#

im tired

eternal compass
#

Hi tired

cinder flare
#

NoOOnoonononoo

eternal compass
#

I am infact fred

cinder flare
#

life is pain

#

my soul is consumed by linux from scratch

eternal compass
#

Linux from scratch?

cinder flare
#

yeah it's where you build linux from scratch

#

im currently compiling gcc

eternal compass
#

Hand writing graphics drivers be like

obtuse gale
#

[23:21] Star: ... linux from scratch
[23:22] Fredthedoggy: Linux from scratch?
[23:22] Star: yeah it's where you build linux from scratch

#

👏

cinder flare
#

nah this don't come with no graphics

#

terminal gang

eternal compass
#

Terminals have graphics?

#

Theres text to render

cinder flare
#

not ones that you need graphics drivers for 😉

eternal compass
#

You need to know how to turn text into pixels

#

Unless you wrote an ssh client

cinder flare
#

you don't need specific drivers for that

#

and also yeah im using ssh lmao

eternal compass
#

Lame

#

Bad

cinder flare
#

what, it means I get the beauty of Windows Terminal

forest pecan
#

lol

cinder flare
#

fuck the default 640x480 pixel no anti-aliasing default terminal ubuntu comes with

eternal compass
#

Lmao

forest pecan
#

am i committing a crime

cinder flare
#

oh god damn

eternal compass
#

I'm fred

forest pecan
#

Oh Hi

cinder flare
#

at least it's async I guess?

forest pecan
#

Lol

cinder flare
#

yooo pulse is using our lord and saviour, ffmpeg

forest pecan
#

tbh I was actually genuienly concerned cause String#format is slow

cinder flare
#

i think i might compile that

#

actually

forest pecan
#

And ALl those logging statements

#

xD

cinder flare
#

very cool

forest pecan
#

I like ffmpeg and vlc

cinder flare
#

why use String.format when you could just + concatenate

forest pecan
#

idk i like how its cleaner

cinder flare
#

hmmm

#

better yet, swap to Kotlin and use string interpolation!

forest pecan
#

Lmao

cinder flare
#

or Rust