#dev-general

1 messages · Page 514 of 1

cinder flare
#

yea

forest pecan
#

😎

cinder flare
#

short walk

forest pecan
#

mhm

cinder flare
#

day trip maybe

old wyvern
#

Absolutely

cinder flare
#

watch out for the sea monsters!

old wyvern
#

FlashBeat

steel heart
#

@forest pecan why did u mail

cinder flare
#

(they bite)

forest pecan
#

is that bad

old wyvern
#

Watch out for the aliens

steel heart
#

U’re supposed to apply through forms

#

Google forms

cinder flare
#

lmao

forest pecan
#

Wait

#

what

#

🥶

#

uh oh

cinder flare
#

🌞

steel heart
cinder flare
#

may

old wyvern
#

Wtf is wrong with youtube

quiet depot
#

yes

forest pecan
#

i feel concerned now

old wyvern
#

😷

obtuse gale
#

You googled it

quiet depot
#

no

obtuse gale
#

Yes

gusty glen
obtuse gale
#

Oh now that you mention that I saw this video the other day talking about that

#

Let me find it

gusty glen
#

||Like Masked is doing right know||

obtuse gale
#

Lol

gusty glen
#

u got me on that one... the face

obtuse gale
#

:^)

obtuse gale
#

i hate wildcards

ocean quartz
#

same

obtuse gale
#

what about going back to Java 4

#

no generics = no wildcards

#

just Objects

ocean quartz
#

How about Java 1

cinder flare
#

was there a java prerelease

#

java .7

obtuse gale
#

hold on a second...

#

if Java 1.8 = Java 8

#

then Java 1.0 = Java 0???

#

:00000

ocean quartz
quiet depot
#

hello i am here emilyy

#

@obtuse gale

cinder flare
#

@obtuse gale

obtuse gale
#

yes

#

@obtuse gale

cinder flare
#

hey can you use maven for languages other than Java

#

like can I host my C binaries on reposilite 🥲

quiet depot
#

don't believe so

cinder flare
#

oof

quiet depot
#

but to answer your question more specifically

#

yes you can use maven for other languages

cinder flare
#

oh nice

quiet depot
#

like you can use maven as a build tool for other languages

#

but yikes if you do

cinder flare
#

just stick to CMake?

quiet depot
#

stick to the right tool for the job

cinder flare
#

that's the C boi if I remember

quiet depot
#

there's multiple c compilers

cinder flare
#

well yeah gcc or LLVM

#

but that's the build tool

#

Make/Cmake

quiet depot
#

oh thought cmake was a compiler

#

i know make is a build tool

#

didn't realise cmake = make

cinder flare
#

i think C make is like make but with more?

#

not sure

quiet depot
#

with more make

#

and more c

cinder flare
#

exactly!

quiet depot
#

I see c developers using make on java every now and then

cinder flare
#

CMake is a generator of buildsystems. It can produce Makefiles, it can produce Ninja build files, it can produce KDEvelop or Xcode projects, it can produce Visual Studio solutions```
quiet depot
#

They're like "I don't need these fancy build tools like maven and gradle"

cinder flare
#

then they cry

#

when they can't do anything useful

quiet depot
#

yes

cinder flare
#

sorry wtf is KDEvelop

#

i like KDE but they've gone too far

obtuse gale
#

so I kinda can't wrap my head around this whole inject/registerables/bindings/whatever thing

in the PlaceholderAPIPluginData i have this List<Binding<?>> and a package private getter
according to what you said earlier I would need to pass the bindings to the InitialModule and (I presume in configure()) do I go over all the bindings and bind them to their respective instances?
does this automagically tell guava "hey, if this type is in a constructor, provide this instance"?

quiet depot
#

probably a kde ide ig

cinder flare
obtuse gale
#

that looks like eclipse lol

cinder flare
#

why does everything have to be so white

quiet depot
#

hm

cinder flare
#

have they not learned

quiet depot
#

kde developers make an ide

#

kde developers make a desktop environment for linux

#

and they don't even use linux for their ide

cinder flare
#

wdym

#

that looks like it's on linux

#

it even has Konsole

quiet depot
cinder flare
#

wait which picture is that pig

quiet depot
#

second down

cinder flare
#

oh yeah the second one is obviously windows

#

you can tell by the top bar

quiet depot
#

unacceptable

cinder flare
#

the headliner is linux tho

#

and it's ugly as sin

quiet depot
#

sin aint that ugly

cinder flare
#

why is that TODO have a dark orange background and orange text

quiet depot
#

yes

#

emily what did you actually want

obtuse gale
#

kotlin programmers: let's add k in the name of every project
kde devs:

quiet depot
#

ah

cinder flare
#

yoooo they support Solaris

quiet depot
#

tell ya what

cinder flare
#

time to go back to my Sun worshipping bois

quiet depot
#

I can't understand your words

#

so push and link

obtuse gale
#

🥲

cinder flare
#

haha

obtuse gale
#

no pls

#

once it's on the internet there is no way back

#

my shame will be forever

quiet depot
#

it'll really help my explanation if I can see your attempt

cinder flare
#

it's okay emilyy we can help you

#

maybe ill actually make a PR for once

obtuse gale
#

also generics suck

cinder flare
#

who am I kidding, I'm not going to

cinder flare
quiet depot
#

I don't even use that many generics in papi

#

apart from in the keyable system

#

but you shouldn't be touchinng that

obtuse gale
#

in the PlaceholderAPIPluginData i have this List<Binding<?>> and a package private getter
this bit you get I presume, right?

quiet depot
#

yes but it's all part of the parcel

#

still push it

obtuse gale
#

I pass that list to the initial module, then is this okay?

obtuse gale
quiet depot
#

why is my shit underlined

obtuse gale
#

the for loop I added btw

quiet depot
#

where are the <?>

#

binding has a type parameter

obtuse gale
quiet depot
#

you need to do a generic fuckery voo doo

#

and yes that is the technical term

obtuse gale
#

lol

#

i mean it's not crucial for there tho but okay

quiet depot
#

not crucial

#

but gets rid of the warnings without suppression

obtuse gale
#

does it?

quiet depot
#

that's not a generic fuckery voo doo

#

i will show you how to do a generic fuckery voo doo

obtuse gale
#

thing is getKey returns a Key<? super T>

#

because getClass ig

ocean quartz
#

Oh boy

obtuse gale
#

idfk

ocean quartz
#

Please show us the generic fuckery voo doo

gusty glen
#

Generic<? super FuckeryVooFoo> 🥲

quiet depot
#

bindings should be a set btw not a list

#

binding order does not matter and we definitely don't want duplicates

obtuse gale
#

ah okay

#

bindBinding(Binding<T> binding)

quiet depot
#

no

#

maybe

obtuse gale
#

yes

quiet depot
#

it's internal who cares

obtuse gale
#

okay so second part of the q

does this automagically tell guava "hey, if this type is in a constructor, provide this instance"?

quiet depot
#

well

#

no

#

because guava has absolutely nothing todo with this proces

obtuse gale
#

guice

#

ffs

quiet depot
#

what it DOES do though is tell the injector from guice, that this class we're binding (a key, which contains a type and optionally an annotation) will always correspond to this instance

#

for as long as we're using this injector or a child of it

#

this instance will never change

#

and everytime we annotate a field or a method with @Inject

#

and that field is of the type the key specifies, or the method contains a parameter of the type the key specifies

#

guice will supply the instance to it

ocean quartz
quiet depot
#

tl;dr your job should be done u can go back to the fabric binding now

obtuse gale
#

i c

#

:D

quiet depot
#

@obtuse gale does binding have any factory methods?

obtuse gale
#

Binding.bind 👀

#

lmao

#

it had an ew public constructor

#

had

quiet depot
#

bind isn't an appropriate factory name

#

dw

#

leave it

#

i'll create proper methods eventually

obtuse gale
#

okay okay I'll name it of or between

quiet depot
#

ones that mimic the registerable bind methods

#

of

obtuse gale
#

idk lmao

#

i yeeted that

#

it just makes no sense

quiet depot
#

yeah idek what that does

#

might've just been for debugging at one point and forgot to remove

obtuse gale
#

also what's the PlayerFunctionProvider all about?

quiet depot
#

it provides functions

#

for Player

obtuse gale
#

woooooooooooooooooooow

quiet depot
#

that's its sole purpose

obtuse gale
#

do all "PlayerKeyNames" need to be added?

quiet depot
#

no

obtuse gale
#

ah okay

distant sun
#

player.quack()

obtuse gale
#

because when doing this i found out that the "health scale" is purely a Bukkit construct

#

it's not a thing in the actual game

quiet depot
#

i swear sponge has it

#

and nukkit

obtuse gale
#

nukkit is bukkit on chinese steroids

#

sponge also has it yes

quiet depot
#

then just make it for fabric

obtuse gale
#

but it's not a thing in vanilla

#

fabric is mostly vanilla except for the mixins

#

which is where the modding comes in

#

also do you have a checkstyle file or something I can slap on this?

quiet depot
#

no

#

checkstyle can't handle my style

#

without custom code

obtuse gale
#

smh

cinder flare
#

he's just too stylish

gusty glen
#

is this the correct / haskell plugin that y'all use?

jovial hearth
#

can i know if this is my id egg's alt#1612

gusty glen
jovial hearth
sly sonnet
gusty glen
sly sonnet
#

right-click on user profile

sly sonnet
jovial hearth
#

ty mr wxip

sly sonnet
#

no problem

obtuse gale
#

mixins pog

#

Man it's so satisfying not having to do nasty ass reflection and janky workarounds

prisma wave
#

It's usable but quite buggy

#

VSC plugin is a lot better

steep cargo
#

Can someone please tell me why this doesn't work? Basically every user can see the message even without the permission

        for (Player player1 : Bukkit.getOnlinePlayers()) { // Gathering all the onlinePlayers
            if (player.hasPermission("sneaky.staff")) { // If player has permission then
                player1.sendMessage(Color(message)); // Send message
            }
        }```
half harness
#

you're checking player, not player1

steep cargo
#

ohh you're absolutely right

#

Thank you buddy😅

half harness
#

np 🙂

forest pecan
#

Are static factory builders generally preferred over the class builders?

prisma wave
#

I feel like this is a threat

#

Or maybe they're trying to be encouraging

#

you can speak Arabic

potent nest
frail glade
forest pecan
#

MyShit.create(some arg) opposed to MyShit.builder().setArg(some arg).build()

steel heart
#

I mean those are kinda used for different things

potent nest
#

The first is a static factory method, the second is a builder.

I'd say there's no generally preferred pattern, it rather depends on what you're doing. For 1-3 parameters, static factory methods are fine, but if you want more and especially want to have default values, you'll have a lot of overloaded methods vs one method per parameter using the builder pattern

jovial warren
#

MyShit.builder().arg(someArg).build() would be better imo

forest pecan
#

yeah set seems redundant

steel heart
#

Pulse if you have a class which uses many different dependencies then a builder may be beneficial to increase readability and maintainability. The normal factory method is often preferred over a normal instantiation (new Blah() vs Blah.create()) because it limits you from extending it and it the create method basically says here is an instance of Blah, you don’t have to care about what subtype of Blah it is.

jovial warren
#

this is the one thing where I agree that the get and set prefixes are bad

ocean quartz
#

@obtuse gale If you need help with the fabric papi hit me up blurryeyes

gusty glen
#

to run haskell, do I have to install all of those?

prisma wave
#

You technically only need the first one

#

Which is like javac

#

The 2nd is like maven, the 3rd is like gradle

gusty glen
#

so we don't use cabal and stack at the same time?

prisma wave
#

As far as I know stack delegates a lot of its work to cabal

#

I'm pretty sure they're pretty closely linked anyway

#

You typically have a stack and cabal file in the same project I believe

gusty glen
#

let's see

prisma wave
#

Windows ☹️

gusty glen
prisma wave
#

shame

gusty glen
#

what is that?

prisma wave
#

Ah I ran into that issue a lot

#

I believe you need to run stack update and cabal update first

#

If not, make the project with stack and import with IntelliJ later

#

This is what I meant about the IJ plugin being a bit buggy

gusty glen
prisma wave
#

those are commands

#

stack update

#

Same with cabal

half harness
#

lol i made my own implementation of MutableMap just for fun and uh, let's just say it wasn't very fast

prisma wave
#

You made your own hash table?

#

Or is it just a list of pairs

gusty glen
#

IDEA doesn't want to let me add stack executable...

#

stack installed itself here C:\Users\User\AppData\Roaming\local\bin

half harness
#

i have no idea what a hashtable is

#

;-;

prisma wave
#

🥴

prisma wave
prisma wave
#

Very good explanation here

half harness
#

i didn't know linkedhashmaps were that slow though (what mutableMapOf uses)

forest pecan
#

why tf does gradle like rebuild your whole project for just running one class

#

for testing a class or smthing

half harness
#

¯_(ツ)_/¯

prisma wave
#

bear in mind that's not a particularly reliable benchmark too

half harness
#

ik

sturdy swan
#

Whats popping guys

forest pecan
#

hello

sturdy swan
#

Im mad

#

I still dont have my developer role

#

😢

obtuse gale
#

Matt we should make the dream team

#

Make an org and then do nothing and let it die

half harness
#

😌

ocean quartz
half harness
#

🤣

obtuse gale
#

You're laughing at Cherno?!?!‽‽‽

#

Please leave this server

half harness
#

what's the "limit" of how much info i can send through a websocket? like how much should i avoid?

ocean quartz
#

Don't think there is a limit, all you need to worry is about how big your message is in comparison to how many clients are receiving it

half harness
#

like if i send 15 char strings every time I send info, should I limit it at 100/s?

#

or 50/s?

#

or 500/s?

gusty glen
prisma wave
#

or maybe whereis

prisma wave
#

hmm

#

what doesnt work about that?

gusty glen
#

intellij doesn't accept it as SDK

old wyvern
#

Dont use the ij plugin 😔

#

Its forever a major headache

gusty glen
old wyvern
#

Yea, use vsc

gusty glen
#

with vsc you mean Visual Studio Code?

old wyvern
#

Any cloned project now defaults to Haskell SDK for me now 😄

old wyvern
gusty glen
#

nooo I hate vsc

old wyvern
#

May it be Java, C#, or who knows what

prisma wave
#

yeah thats a bit annoying

gusty glen
#

autocomplete/lint in vsc is not that great

prisma wave
#

it'll be the same for haskell as it is in IJ

old wyvern
#

I didnt find any difference between the two on trying

prisma wave
#

they both use hlint

old wyvern
#

The only difference barely noticable was the vcs plugin actually suggested functions to simplify stuff

prisma wave
#

the IJ did that occasionally for me

#

i think that's just a feature of hlint again

gusty glen
#

ok I'll install vsc 😦

prisma wave
#

or sublime

#

or emacs

#

or vim

gusty glen
#

is this one?

old wyvern
gusty glen
old wyvern
#

Just the haskell plugin secretx

gusty glen
#

I created the project using the commands i found on the stack website

prisma wave
#

stack install?

old wyvern
#

Version issue 🤷 , Should work fine otherwise

#

You should only have that error in your main app file

gusty glen
prisma wave
#

stack build should generate an exe

gusty glen
#

I won't have to use cmd each time I want to build and run the project, right?

#

I'll go crazy if I have to keep switching back and forth to run the project

prisma wave
#

i think there's stack exec too

gusty glen
#

ok, so vsc sucks, but the haskell plugin for vsc is very good

#

the docs are very clear

prisma wave
#

yeah that is very nice

#

And hlint can do some crazy things

#

It's like ij's warnings but even better, it can suggest different functions and things

humble silo
#

Aww, there goes my nitro

ocean quartz
#

Mine ended too :sadge:

obtuse gale
#

there are two ways to my knowledge to not run out of nitro

#

a) pay discord endless amounts of money

#

b) never get it in the first place

#

:thonksmart:

#

it can't run out if you don't have it

plain void
prisma wave
#

probably not

plain void
#

ye i guessed that tbh

#

but its worth giving it a try because otherwise i will have to shift plugins

obtuse gale
ocean quartz
#

Writing enterprise software

cinder flare
#

@steel heart wrapper conclure???!?!

steel heart
cinder flare
#

no IJ Ultimate though???

ocean quartz
#

A menu plugin 😮

eternal compass
#

PredicateStructureSerializer.java 😮

onyx loom
#

enterprise menu plugin 😌

cinder flare
#

menu wrapper 😌

eternal compass
#

InteliJ Community 🤢

#

I just realised, does anyone actually pay for JetBrains?

cinder flare
#

When I get a real job programming I will either force my work to pay for it or I will

#

It's an essential development tool

eternal compass
#

just get held back

#

then you get IJ ultimate for longer fingerguns

cinder flare
#

yeah but then I have to keep paying tuition for longer

onyx loom
#

most people here either have OS licenses or student pack

#

but yeah businesses will pay for jetbrains

cinder flare
#

and tuition costs more than an IJ license 🥲

cinder flare
old wyvern
#

xD

eternal compass
#

or OS yeah lol

old wyvern
#

What inspired you to become a major open source enthusiast?
Jetbrains.

cinder flare
eternal compass
#

ah 😦

#

what school?

old wyvern
#

😂

cinder flare
#

Southern Utah University

eternal compass
#

nice

cinder flare
# old wyvern 😂

did you see all those threads that are like "nobody wants to work on open source projects anymore cause they don't get paid"

#

jokes on them, I need my JetBrains license

old wyvern
#

lmao

eternal compass
#

well thats 1/2 the reason it exists lol

#

keeping OS active

obtuse gale
#

Get a jet brains license it’s op

eternal compass
#

you have one?

obtuse gale
#

Yes

eternal compass
#

OS or paid

obtuse gale
#

Paid

#

Or just pay the monthly it’s very cheap

eternal compass
#

its like $50/m the first year

obtuse gale
#

I mean also depends how many ides you’re really using

eternal compass
#

I use like 4 rn

#

(student license)

forest pecan
#

i also use student license

obtuse gale
#

Nice I mean to pay for one of the ides monthly is like 7-8 bucks probably

forest pecan
#

you can also use OS license if you want it too

obtuse gale
#

Might depend on the ide

eternal compass
#

oh wait its way cheaper for an individual

#

$12/m for IJ at year 3

cinder flare
#

$150/year for all of their products in year 3, not too shabby

#

yooooo

eternal compass
cinder flare
#

yeah me too, 3 years at least

eternal compass
#

atleast 8 years for me 🙃

cinder flare
#

are you in... 8th grade?

eternal compass
#

I'm just cool 🙃

forest pecan
#

@cinder flare a lot of people here are near enterprise coders but in or close to highschool

#

lmao

#

im a freshman

eternal compass
#

The difference is I'm not anywhere near enterprise

#

lmao

forest pecan
#

you'd be surprised how much you can change within 1 year

eternal compass
#

thats fair, I've only known java for like 2.5 months

#

3.5 actually

eternal compass
forest pecan
#

highschool

eternal compass
#

ah, nice

forest pecan
#

mhm

eternal compass
#

lmfao your github

#

I assume that's meant to be formatted markdown though

steel heart
#

Flexbox has carried me so many times now

forest pecan
humble silo
#

Omg kotlin is so nice.... This went from like 10 lines to one:

  return (findLoadedClass(name) ?: loadClassBytes(name).let { defineClass(name, it, 0, it!!.size) }).also { if (resolve) resolveClass(it) }
#

Is it bad practice to put everything that tight or no?

ocean quartz
#

That should be fine yeah

humble silo
#

Cool! Such a great language!

cinder flare
#

What did I tell you!

eternal compass
#

Is kotlin JVM aswell? Or is it like a java wrapper or smth

obtuse gale
#

it compiles to jvm bytecode, yes

ocean quartz
#

Yeah it compiles to JVM, JS, Native

#

And now WASM 😌

ocean quartz
#

Oh shit didn't even see that 😨

humble silo
#

I never realized that i really like more of a functional programming style, but im digging stuff like let in kotlin

old wyvern
#

😌

gusty glen
#

yugi I want to code in haskell using intellij but I he plugin doesn't recognize stack :/

old wyvern
#

Ill join you in an hour, working on something atm

gusty glen
#

actually I'm in bed right now, but intellij just says "Haskell Tool Blah [Invalid]" or something like that in red

#

in my jdk list

old wyvern
sly sonnet
#

Isn't Haskell bad? I did hear something like that in this discord server 🤔

cinder flare
#

🤡

obtuse gale
#

the more i learn about vanilla on fabric, the more i understand how... weird bukkit is

#

it's bizarre

ocean quartz
#

It's so much different right? I decompiled the server with the mappings and looked at the and i could hardly find anything i did on Bukkit, checked fabric and it was much closer to vanilla which actually made it so easy to work with

obtuse gale
#

the thing is that bukkit is like a whole plugin environment with a shit load of things here and there to hold your hand

#

fabric is like "nah mate, this is the core game, i load the mod you do the rest"

#

for instance, entities don't actually have NBT
there is no "plugin logger"
worlds don't actually have a UUID
there is no "offline player"

#

probably the best of all differences is that everything regarding messages is components 😌

obtuse gale
cinder flare
#

stupid binary compatability

#

Can't believe C# did the right thing

#

why oh why couldn't they have sane conventions

lunar cypress
#

Right off the bat this is 100% true lol

Ask any developer about Java generics, and you'll likely get an angry (though often uninformed) rant about erasure. Erasure is probably the most broadly and deeply misunderstood concept in Java.

prisma wave
prisma wave
potent nest
#

and wrong!

steel heart
#

Would a requirement for a programming to be an actual programming language be that it has to be turing complete?

prisma wave
prisma wave
#

although most languages nowadays are turing complete

steel heart
#

So what’s the requirement for a language to be a valid programming language

#

For instance HTML is mostly seen as not being one

prisma wave
#

that depends what you define as "programming"

#

html could be considered a programming language in that it's telling a computer to do something

#

but on the other hand there's no logic

steel heart
#

Hmm okay

potent nest
#

there's no clear line to differ between programming languages, scripting languages and stuff

steel heart
#

Okay so technically html is a programming language then

distant sun
#

is there an algorithm that I can use for a graph to find a node between point a and b? I have a problem with two friends in two different cities and I can move one at a time to a neighbor city and find one where they will meet

lunar cypress
#

directed graph?

primal juniper
#

is there any any event that call every tick?

lunar cypress
#

Why?

#

There is the bukkit scheduler

primal juniper
#

what is that

#

xD

jovial warren
#

lol

#

Bukkit.getScheduler()

#

you can schedule tasks with it

distant sun
lunar cypress
#

That was a question, not a solution

#

Are we talking about a directed or undirected graph

distant sun
#

Ah

#

It doesnt mention anything, let me find the picture

lunar cypress
#

Looks undirected

#

Any constraints on the node you need to find?

#

Since it's weighted, I assume you have to optimise it

static zealot
#

sup

vagrant bobcat
#

spigot down?

pallid gale
#

=check spigot

compact perchBOT
#
Invalid Args!

=check <@user>

pallid gale
#

can't even check spigot

static zealot
#

lmao

#

I took 3 days off the PC and I don't even remember the links anymore

pallid gale
#

seems like spigot is down

static zealot
#

nah its up for me

pallid gale
#

tis back

vagrant bobcat
#

its up now

#

it was though

static zealot
#

ah Ic.

distant sun
#

Like friend A starts from Oradea and friend B starts from Eforie (top left and bottom right) and I need to make them meet somewhere in between

jovial warren
#

Spigot seems to go down every now and then, you would've thought that md_5 would at least know how to be a good system administrator and schedule downtime

#

Then again though, this is md_5 we're talking about here

gusty glen
gusty glen
#

so one can easily generate a 100MB JAR file from a few lines of code.

Doubt (X)

#

if that was the case, then C++ would also generate files over 100MB with just a few lines of code, which is super wrong since I know C++ enough to know that it produces super compact artifacts

gusty glen
old wyvern
#

Not the stack root

#

Find the installation location

#

Use where on stack.exe

gusty glen
potent nest
gusty glen
potent nest
#

you see, there's the difference to java

gusty glen
potent nest
#

specialized types like that doesn't need to be generated as a new class but in the JVM it would be required to

ocean quartz
#

exe.exe

old wyvern
#

hmm

static zealot
#

exe.exe.exe?

old wyvern
#

What error shows up in ij?

gusty glen
#

too hard to implement

gusty glen
#

I've done this to add it to the sdk list

potent nest
gusty glen
#

let's pretend List<T> have a parameter (that is hidden from us devs, but is inserted when creating Lists, a parameter Class<T> tClass or whatever you want to call it), then you could receive a generic list and check against it's type before you try to cast it

ocean quartz
#

Haskell bad?

gusty glen
gusty glen
prisma wave
jovial warren
#

man, reification is such a hack, I just read a stack overflow article on it

lunar cypress
#

So what happens here then?

<T> List<T> create() {
  return new ArrayList<>();
}```
static zealot
#

send help smiling_face_with_3_tears

lunar cypress
#

your "solution" assumes that every use of generics is a concrete class

#

which is not the case

gusty glen
potent nest
#

and what is T?

potent nest
#

that's exactly the point, those information aren't necessarily available at compile time

gusty glen
lunar cypress
#

So, if I compile this, what will it compile to?

jovial warren
#

the only way reification works in Kotlin is because the function is inlined and so copied at the call site lol

potent nest
#

also, what type would be encoded in code compiled in older versions?

lunar cypress
#

Which Class object will it pass to the arraylist?

gusty glen
#

java is a strong typed language, every parameter type is available at compile type unless using generics <?>

lunar cypress
#

what

gusty glen
lunar cypress
#

So, if I compile this, what will it compile to?
just try to answer this

jovial warren
#

I mean, parameter types are kinda also available at runtime iirc through some hacks with reflection

potent nest
gusty glen
jovial warren
#

if they weren't in the runtime bytecode somewhere, things like Gson's TypeToken wouldn't work

lunar cypress
#

yes it's in the class file

jovial warren
#

I think they're stored in the info, yeah

lunar cypress
#

It has to be for compile time

potent nest
#

that's what I linked above

gusty glen
jovial warren
#

yeah, it's so the compiler can see what the type is for checking

karmic fjord
lunar cypress
gusty glen
jovial warren
#

tClass is not of type String

#

or it's not the string class, that's what I mean

static zealot
karmic fjord
#

😏

jovial warren
#

and even though String extends Object, that doesn't mean that Class<String> also extends Class<Object>

lunar cypress
gusty glen
#

nah, this generic function create() will have to be called in a contextualized manner, in a reified context, correct? You have to specify the type at compile time, correct?

jovial warren
#

so you want type reification in Java then

gusty glen
#

either that or the compiler will infer it for you

lunar cypress
#

I do not know what you're talking about

gusty glen
#

I'll try to explain

lunar cypress
#

My point is, the solution is not that simple

gusty glen
#

yes it is

lunar cypress
#

You can't just have a tClass field in every generic class and it's solved

#

No it is not. lol

gusty glen
#

unless using fuckery <?> in which case tClass would return null

jovial warren
#

yeah I agree with Johnny here

lunar cypress
#

I just showed you a contradiction of what you suggested

#

But if you have a well-defined proposal, go ahead

prisma wave
#

just do whatever rust / haskell does, as that is obviously the best solution

jovial warren
#

if you think you've figured out a solution, submit a new JEP

lunar cypress
#

One thing that's clear is that you're not just gonna come up with the perfect solution without any background in type theory

jovial warren
lunar cypress
#

reification is just the opposite of erasure

jovial warren
#

yeah ik

prisma wave
#

rust is monomorphisation afaik

lunar cypress
#

it's not a precise procedure

lunar cypress
prisma wave
#

i.e copy paste specialised versions

jovial warren
#

ah, so it does a C++ then

prisma wave
#

mhm

gusty glen
#

public List<String> doStuff() {
  // compiler knows you have to return a List of Strings here then, if I try to return the create function here, it'll compile
  return create();
  // to something like
  return create<String>();
  // which would pass String as type to create method, and String.class would be passed "hidden" parameter to `ArrayList` constructor
}

public <T> List<T> create() {
  return new ArrayList<T>();
}```
prisma wave
#

i think theres a reason that cant work on the jvm though

jovial warren
#

I think the bottom line of this is that, just like in pretty much every other problem in existence, there is no real perfect solution

prisma wave
#

Apart from what Haskell does

#

That's the perfect solution

#

Obviously

jovial warren
prisma wave
#

😌

prisma wave
#

Just erase every type

#

Problem solved

onyx loom
#

clearly

prisma wave
#

.getClass? I think you mean UnsupportedOperationException

hidden apex
#

Where can i start development? i want to learn

#

I*

prisma wave
onyx loom
#

?learn-java

compact perchBOT
#
FAQ Answer:

Online Courses:
Online courses are also great for learning java. Some websites that offer them are:

  • Coursera - Free unless you want a certificate
  • PluralSight - Great courses from what I've seen. Mostly Paid
  • Udemy - Never used them myself but they seem to all or at least most be paid.
    My first ever course was one from Coursera. - I can say it was pretty good at introducing me to the programming world as a whole not just java.

Oracle Docs:
Oracle docs can help a lot at learning and understanding java:

  • Start with this,
  • Breeze through this (skipping stuff that doesn't seem relevant like bitwise operators),
  • Hit this.
    They're the first three from this larger thing which you should definitely go through overall. But those three should be enough for slightly better understanding of what is happening here without feeling like a huge time sink.
    That one is a small part of this larger site wherein "Essential Java Classes" and "Collections" also have good useful stuff

Other services:
Some other cool services that will help you learn java are:

As you can see there are plenty of good ways to learn as long as you're willing to invest the time. Have fun learning!

onyx loom
#

😌

prisma wave
#

?learn-java

compact perchBOT
#
FAQ Answer:

Online Courses:
Online courses are also great for learning java. Some websites that offer them are:

  • Coursera - Free unless you want a certificate
  • PluralSight - Great courses from what I've seen. Mostly Paid
  • Udemy - Never used them myself but they seem to all or at least most be paid.
    My first ever course was one from Coursera. - I can say it was pretty good at introducing me to the programming world as a whole not just java.

Oracle Docs:
Oracle docs can help a lot at learning and understanding java:

  • Start with this,
  • Breeze through this (skipping stuff that doesn't seem relevant like bitwise operators),
  • Hit this.
    They're the first three from this larger thing which you should definitely go through overall. But those three should be enough for slightly better understanding of what is happening here without feeling like a huge time sink.
    That one is a small part of this larger site wherein "Essential Java Classes" and "Collections" also have good useful stuff

Other services:
Some other cool services that will help you learn java are:

As you can see there are plenty of good ways to learn as long as you're willing to invest the time. Have fun learning!

static zealot
#

@old wyvern I just want to say THANK YOU.
Every time I'm sad or just very bored I come in here and watch that pinned message and it just makes my day a lot better.

onyx loom
#

wall of text

prisma wave
#

😌

static zealot
prisma wave
#

wall of java 🤢 🥶 😖

static zealot
#

at least for those who want to learn

hidden apex
#

Thank youuu

jovial warren
#

yw

karmic fjord
#

should i do something like this

prisma wave
#

you know what else spreads happiness?

karmic fjord
#

or just leave it to bukkit

eternal compass
#

money spreads happieness

old wyvern
#

Rich Hickey?

prisma wave
old wyvern
#

😌

gusty glen
#

you all, listen to that amazing song: https://www.youtube.com/watch?v=YnSW8ian29w

Ado

ノヽ・/ ノヽ° 👾ナょら ⓚⓞーー💥🤟💙 🌴👽笑笑

Streaming & Downloadはこちら:
https://ado.lnk.to/odoID

↓inst音源↓
https://piapro.jp/t/TDE9

Vo:Ado
https://twitter.com/ado1024imokenp

Music & Arrange & Mix:Giga様
https://twitter.com/GigaMozuku

Music & Arrange:TeddyLoid様
https://twitter.com/TeddyLoidSpace

Lyrics:DECO*27様
https://twitter.com/DECO27

Illust:かゆか様
https:...

▶ Play video
prisma wave
#

😌

hidden apex
#

so how i use java in minecraft (i know that minecraft is made on java)

old wyvern
#

And ofc

#

Aristotle!!

#

The supreme lord!!

eternal compass
eternal compass
#

Money >> Haskell

prisma wave
#

you will not regret it

prisma wave
old wyvern
#

Aristotle >> Money

#

Would love to see you live without the great inventions of the greeks!!!!

eternal compass
#

I never learned java first :p
I went straight into Bukkit, and fell down my staircase code and broke my leg

prisma wave
#

Monadic discard operator 😌 😌 😌 😌

old wyvern
#

(\x -> true)

#

Aristotle good

karmic fjord
#

oh its just me 😌

old wyvern
#

Predicate good

hidden apex
steel heart
#

Function<? super T, ? extends Optional<Boolean>>

old wyvern
#

Also began diving into this hellhole 😷

onyx loom
#

why

old wyvern
#

They call their plugin tasks "Mojo" it seems

prisma wave
#

They call it hell

old wyvern
#

😫

prisma wave
#

😌

eternal compass
#

in ubuntu, how do I point to a java executable?
there's no EXE file or something like windows (well, ofc no exe)

potent nest
eternal compass
#

like on windows you could run path/to/jre/bin/java.exe -jar x.jar

prisma wave
#

exactly the same, but without the .exe

eternal compass
#

oh wait really?

#

cool

prisma wave
#

mhm

eternal compass
#

doesn't that just make it executable?

#

but that won't matter if I'm running it via command line

karmic fjord
ocean quartz
#

Why must you do that to yourself 😩

old wyvern
#

😟

ocean quartz
#

Also at first I read that as SlimJarMofo extends AbstractMofo

steel heart
#

Omg Gson merged my 2 line pr

#

Les goooooooo

#

Official google contributor

static zealot
#

gg lmao

#

u corrected 2 letters?

#

bcz that's what I Did in Krpyton and got contributor role xD

steel heart
#

Yeah I changed 2.8.6 to 2.8.7 in 2 places

static zealot
#

added 2 missing '

steel heart
#

Lmao

static zealot
onyx loom
#

yo congrats man

static zealot
#

look guys this is my friend

#

I'm friends with that COnclure guy

onyx loom
#

u can put this on ur resume now

ocean quartz
#

Oh shit that reminds me i still have an open PR on Ktor that i never added the test for yikes

steel heart
old wyvern
#

lol

#

They made you verify your commit as well

steel heart
#

Yeah lol

thorny garden
#

@autumn tundra your weird

prisma wave
#

sir this is

static zealot
#

is there a way to catch multiple exception in one block in kotlin? I know in java there's something like
catch (Ex1 | Ex2 exception) but can't seem to find anything similar in kt

#

Ig I could just catch Exception and check if it is the exception I want

prisma wave
#

There is nothing

static zealot
#

alr

prisma wave
#

maybe runCatching + is checks could be a nice equivalent

static zealot
#

using kt } catch (ex: Exception) { when (ex) { } }

prisma wave
#

alias nano="vim"

#

Chaotic evil

gusty glen
#

bm

prisma wave
#

yo

static zealot
#

lmao

gusty glen
#
private fun Collection<Group>.bestGroup(player: Option<Player> = None): Group 
  = when(player) {
    is Some -> firstOrNull { it.owner == player.value.uniqueId } ?: first()
    is None -> first()
  }``` arrow-kt
#

I'm actually using it in a project

prisma wave
#

Nice

#

that is quite nice

gusty glen
#

I'll make a plugin to teleport items through chests based on rules

prisma wave
#

Sounds perfect for FP

humble silo
prisma wave
#

Too late

#

You're here now

#

Everyone in #dev-general falls to the purely functional temptation eventually

#

Some people think they can "resist"

gusty glen
#

FP is nice, very nice

humble silo
#

Is it a JVM language?

onyx loom
#

no

humble silo
#

Well then, that will be easy to never use it

prisma wave
#

Elara 😌

prisma wave
humble silo
#

lol, what do you use it for then?

onyx loom
#

anything u want to

prisma wave
#

umm

#

yeah

#

I have made the basics of a minecraft server implementation in haskell

#

Then got bored

onyx loom
#

just because u cant make mc plugins with it doesnt mean its totally useless 🌚

humble silo
#

lol

onyx loom
#

pain

prisma wave
#

Even the creator says so

#

😌 😌 😌 😌 😌 😌 😌 😌

humble silo
prisma wave
#

you should

#

because useless = safe

humble silo
#

lemme just clip that quickly

prisma wave
#

Useless programs have no bugs

humble silo
#

thats funny

static zealot
#

what's the latest version of kotlin?

#

or where can I Just check

jovial warren
#

1.5.10

prisma wave
#

Just 😌

jovial warren
#

BM how is that something to react relieved about?

#

Haskell being useless

static zealot
#

oh is it on maven central?

#

ty BBG btw

jovial warren
#

yw

prisma wave
eternal compass
#

but

#

but

#

no

prisma wave
#

yes

eternal compass
#

yes I guess ._.

prisma wave
#

Watch the video

humble silo
prisma wave
#

I'm only half joking

eternal compass
jovial warren
#

where's your evidence though that Haskell is good?

#

the creator has said that Haskell is safe and useless, never said that makes it good

prisma wave
#

safe is good

#

nobody likes bugs

jovial warren
#

nobody likes things that aren't of use to them either

eternal compass
prisma wave
#

because it's not really useless

jovial warren
#

also, bugs can be kinda nice sometimes

prisma wave
#

Masochism?

jovial warren
#

for example, creepers were a bug, but they remained and became a cool feature

prisma wave
#

that was a logic bug, which could still happen in haskell

#

The point is that not interacting with the outside world means that the only flaw in a program is you messing up somewhere

#

In the logic

#

You can't accidentally leave a variable as null, you can't accidentally clear a list, you can't try and read a file that doesn't exist, etc

humble silo
eternal compass
#

so BM when are you remaking minecraft in Haskell?

#

(Client and server ofc)

prisma wave
#

Whenever I stop being lazy

eternal compass
#

so never? dangit

prisma wave
#

too many side projects, so little time

#

Maybe

jovial warren
humble silo
#

Huh, thats a very strange bug lol

eternal compass
# prisma wave Maybe

I want HaskellCraft this year.
I gotta be able to connect to it with a proprietary HaskelClient that has a built-in anticheat

prisma wave
#

proprietary? Absolutely not

eternal compass
#

fine

#

vanilla client

prisma wave
#

no we can have a client maybe

eternal compass
#

and there better be a plugin system, idc about chunks and lighting, I WANT PLUGINS

prisma wave
#

We need to recruit a team

eternal compass
prisma wave
#

nice

onyx loom
prisma wave
#

Nirvana

humble silo
#

I guess I didnt write the Java modularity stuff, but it feels like alot of the reflection stuff was kindof messed up? idk though

old wyvern
#

Thats a lie

#

And you know it

humble silo
#

they dont seem to mention anywhere that all of this stuff is caller sensitive...

old wyvern
#

"Oh why is this image not changing??? ffs!!"
5 hours of debugging later
"Oh.... cached"

prisma wave
#

😌

#

Wouldn't get that issue in purely functional programming

#

Although....

#

Is a memoised function functionally pure?

old wyvern
#

Assuming the non-memoised function is, then I guess so

prisma wave
#

Yeah

#

I suppose it would be

#

You could make a pure and Impure implementation

old wyvern
#

That section I wrote is impure 😔

#

Stupid

#

IO

#

I wish everyone would write useless programs

prisma wave
old wyvern
#

This is a summary of today morning

#

😄

prisma wave
#

Oh I see

#

see this customer testimony about the dangers of impure programs!

#

After Yugi#1829 started using Haskell, he could never go back!

old wyvern
#
Glide.with(view)
   .load(avatar)
   .diskCacheStrategy(DiskCacheStrategy.NONE)
   .circleCrop()
   .into(view)
#

Would you imagine this caches?

#

especially with this? diskCacheStrategy(DiskCacheStrategy.NONE)

prisma wave
#

certainly not

old wyvern
#

Answer is, yes. It still has another cache

#

There is another in-memory cache apparently

#

xD

prisma wave
#

So what you're saying is, impurity should be explicitly marked for the compiler to warn users about?

#

if only there was a language that does that!

old wyvern
#

Im saying, impurity shouldnt exist!!

#

Impure bad

prisma wave
#

!!!!! 😌 😌 😌

old wyvern
#

Elara good

#

Java bad!!

prisma wave
#

Elara good

#

Oh I meant to ask

ocean quartz
#

Elara best 😌

old wyvern
#

😌

prisma wave
#

what are your thoughts on using let everywhere?

old wyvern
#

wdym?

prisma wave
#

Rather than something like Haskell

#

with no keyword

#

On the one hand, let good, and I think it looks nice in some places

#

On the other hand it's nice to be able to have type hints with the same indentation as their values

#

Wait I have an idea

old wyvern
prisma wave
#

What about something like this: ```rs
def add2 : (Add a) => a -> a -> a
let add2 a b = ...

#

Then it lines up

#

and you can separate let and def too if you want

old wyvern
#

😮

#

That looks great

gusty glen
old wyvern
prisma wave
#

Also

#

How the heck do you do type classes on the JVM

#

Because they're not possible in java or kotlin

#

We're probably gonna just need to generate a bunch of unchecked casts (or the equivalent bytecode)

old wyvern
#

😣

old wyvern
jovial warren
#

type classes?

old wyvern
#

Yes

jovial warren
#

what are type classes?

old wyvern
#

In computer science, a type class is a type system construct that supports ad hoc polymorphism. This is achieved by adding constraints to type variables in parametrically polymorphic types. Such a constraint typically involves a type class T and a type variable a, and means that a can only be instantiated to a type whose members support the over...

prisma wave
old wyvern
#

Um what?xD

#

"Push back"

prisma wave
static zealot
#

so I'm returning to this issue after taking a break from it. When I switched to ubuntu, my keyboard drivers do not get automatically installed.

So according to the keyboard manufacturer, the drivers should be automatically installed when I Plug it in. What the drivers should do is just allow me to enable/disable the backlight when I press on the Scroll-Lock button.

Now pressing scroll lock does absolutely nothing but if I switch to windows it works.

Also on my other keyboard the keys are just messed up. So basically my ctrl, win and alt keys (left and right) are just read as Left Shift for some reason.

I have a laptop so if I test the laptop keyboard, ctrl, alt, win keys, all do what they should but the external one does not.

What I Need is someone help me install the drivers or something. They are not existent on the internet and don't show up in Software and Updates. I don't care for which keyboard I just need to get at least one to work as it should.

#

I'm on KDE Neon btw but this persisted when I Was on Ubuntu latest as well

#

(think at the time it was 21.04 or something)

#

Also one more small thing, Discord can't see the apps I have opened. When I go into settings it always sees these

static zealot
#

so basically I can't change the settings to it

prisma wave
#

Also @old wyvern with library support, how can we guarantee that only 1 type class instance per type exists at runtime? If we consider that other classes can be on the classpath even if they're not known at runtime

#

Upon thinking about it, this could probably be mitigated with relocation

distant sun
#

Does anybody have an algorithm for this? I just need to give it two points and find the shortest way for the friends to meet at one point,
Like friend A starts from Oradea and friend B starts from Eforie (top left and bottom right) and I need to make them meet somewhere in between

static zealot
#

stackoverflow gaby. smh

old wyvern
#

or wait no, that would still have the same issue

#

nvm

distant sun
#

I thought about it but doesn't that find the path from A to B?

old wyvern
#

Yea

distant sun
#

what about a center point between these

prisma wave
old wyvern
static zealot
#

or the closest

old wyvern
#

You should be able to do this with slight additions

static zealot
#

I want to die rn.

#

U think that maybe Ubuntu HIdeout discord would help me if I Use KDE Plasma?

old wyvern
potent nest
static zealot
#

kde neon?

old wyvern
#

Yea they suppourt neon

#

go ahead

static zealot
#

well then time to see if someone in there has a bigger brain

#

well actually

#

most of them do

#

xD

old wyvern
#

lol

static zealot
#

also where do u recommend I put my .appimage apps

#

I installed LUnar Client and its an appimage which I have to run every time. I Can't even pin it to my task bar

#

should i just make a Games folder in my home directory?

prisma wave
onyx loom
#

should a library use implementation or compileOnly for when it comes to dependencies?
like, if im making a library in kotlin, should i make kotlin stdlib implementation to avoid any issues with version mismatching? or leave it up to the library user?

prisma wave
#

java interop ez

prisma wave
onyx loom
#

alr

old wyvern
prisma wave
#

We could have a look at how scala does traits maybe

#

That's probably a similar thing

prisma wave
old wyvern
#

😮

ionic talon
#

can anyone tell me what you learn in ap comp sci principles?

#

im taking it next year

static zealot
#

welp @ocean quartz got u some work for this next week xD

#

I'm talking about role request

ocean quartz
#

Nice, this one will be faster