#dev-general

1 messages ยท Page 306 of 1

jovial warren
#

it was secured in Java 8

#

but Oracle said they wanted to remove it in Java 9 remember

#

o

#

it doesn't work

#

weird

#

oh yeah, never changed to 11

#

that's with 8

lunar cypress
#

@prisma wave scratch the id

jovial warren
#

yeah it just exits with code 1, doesn't throw an error or anything

lunar cypress
#

then it should work I think

#

and yeah const is curried

prisma wave
#

ok

#

im not sure i can easily google this because of the symbols so im gonna ask you, what's the difference between . and $?

#

. is for composition and $ is for chaining arguments?

jovial warren
#
public static Unsafe ventureIntoSomeUnknownDeepAndDarkForestToRetrieveThisThingTheyCallTheUnsafe() {
    try {
        Field field = Unsafe.class.getDeclaredField("theUnsafe");
        field.setAccessible(true);

        return (Unsafe) field.get(null);
    } catch (NoSuchFieldException | IllegalAccessException exception) {
        exception.printStackTrace();
    }

    throw new RuntimeException("How the fuck did we get here?");
}
```๐Ÿ‘Œ
#

actually I can make that better lol

lunar cypress
prisma wave
#

oh ok lol

lunar cypress
#

. is definitely composition

prisma wave
#

afaik $ is for chaining arguments, eg a (b c) is the same as a $ b c

#

okay

#

so the const is just to avoid a messy lambda

lunar cypress
#

yeah

prisma wave
#

okay that looks good

#

let me test

lunar cypress
#

Ok then $ might be a more elaborate way of what I'm doing

prisma wave
#

seems weird that applyMaybe wouldn't be in the standard library

old wyvern
#
import Data.Maybe
import Text.Read
main = putStrLn (getType "asaswwfwef")

getType s = head $ catMaybes [
    (readMaybe s :: Maybe Integer) >>= (\x -> Just "integer"),
    (readMaybe s :: Maybe Float) >>= (\x -> Just "float"),
    Just "string"]

There we go

prisma wave
#

god

old wyvern
#

readMaybes type was one of the issues

#

xD

prisma wave
#

oh ofc

lunar cypress
#

makes sense

prisma wave
#

okay im a bit confused about yours johnny

#

(const (Just "integer")) this is of type Maybe String right?

lunar cypress
#

No

#

(b -> Maybe String) I think

prisma wave
#

lmao

#

uh ok

#

because of the laziness?

#

oh no

#

wait what lol

#

const :: a -> b -> a

lunar cypress
#

No bcs const is a -> b -> a

prisma wave
#

ohh

#

yeah

#

you're only applying 1 argument

#

right

#

okay

#

in that case

#

if applyMaybe :: Maybe a -> (a -> b) -> Maybe b, shouldn't the first argument be of type Maybe a not b -> Maybe a?

lunar cypress
#

and >>= makes sense, I think that's basically my applyMaybe

prisma wave
#

probably a dumb question, is Maybe a a function?

old wyvern
#

no

prisma wave
#

then how is that working then?

old wyvern
#

oh yea the first argument there should be the maybe

#

reverse the arguments

prisma wave
#

aah right

#

okay

#

i thought i was missing something

lunar cypress
#

huh?

old wyvern
#

applyMaybe :: Maybe a -> (a -> b) -> Maybe b
applyMaybe (const (Just "integer")) (readMaybe s :: Integer)

lunar cypress
#

oh

#

yeah

old wyvern
#

in the bottom application the first argument ends uo being the function

#

mhm

lunar cypress
#

my mistake

prisma wave
#

okay great lol

old wyvern
prisma wave
#

i was so confused

#

okay this seems to work

#

now to try and comprehend yugi's

old wyvern
#

pretty much the same thing I think bm

lunar cypress
#

yeah

prisma wave
#

yeah

lunar cypress
#

Just that you actually know your stuff lol

prisma wave
#

just trying to understand the semantics of >>= in this case

#

it's pretty much like Optional#or right?

old wyvern
#

yes

prisma wave
#

great

lunar cypress
#

More like Optional#map, no?

old wyvern
#

if lhs is Nothing it does nothing

prisma wave
#

possibly

old wyvern
#

if lhs is just it maps to a new Maybe value with the lambda

old wyvern
lunar cypress
#

yeah that's not or

prisma wave
#

oh what

#

ohh

#

yeah

#

i see

old wyvern
#

the returned value is also a Maybe bm

prisma wave
#

if present, map to Just "integer" etc

#

ic

lunar cypress
#

semantically equivalent to the applyMaybe function i made

prisma wave
#

right

old wyvern
#

mhm

prisma wave
#

awesome

#

okay that makes sense

#

i changed it to use const too which looks a bit nicer

#

ty for assistance

#
line <- getLine
putStrLn $ getType line
``` is there any way to condense this into 1 line?
#

i feel like there is

#

i need a function m a -> (a -> b) -> m b

#

similar to >>=

#

i think

#

aha fmap

#

maybe

#

wait no

#

because putStrLn wants a String not an IO String

#

๐Ÿฅฒ

old wyvern
#

I mean

#
main = (getLine >>= (\x -> return (getType x))) >>= putStrLn
#

You probably dont want to do that tho

#

xD

prisma wave
#

oh my god

#

that is awful

old wyvern
#

ikr

prisma wave
#

so is there no way to do this?

#

without <-

old wyvern
#

<- is just a shorthand for the callbacks like above

prisma wave
#

right

old wyvern
#
f = do
    a <- getLine
    putStrLn a

is equivalent to

f = getLine >>= (\a -> putStrLn a)
prisma wave
#

isn't that also equivalent to ```hs
f = getLine >>= putStrLn

old wyvern
#

Yup

#

But ther eis possibly that wrapping function as it considers the rest of the body to be a continuation

#

similar to how suspend works on kotlin

prisma wave
#

uh

old wyvern
#

whats wrong?

prisma wave
#

wdym?

old wyvern
#

everything after a suspend function is part of a Continuation

prisma wave
#

yeah

old wyvern
#

yea <- is similar

prisma wave
#

oh

forest pecan
#

What the hell does Task 'wrapper' not found in project '[project name here]'

obtuse gale
#

it means you are homosexual

forest pecan
#

how do i undo

obtuse gale
#

is that the error where the entire build.gradle is greyed out kinda?

forest pecan
#

no

#

its just when building

obtuse gale
#

idk then

hot hull
#

@forest pecan means you don't have the wrapper within the project, gradle init should fix it

forest pecan
#

ah

#

ty

old wyvern
frail glade
#

I think I can count the pixels in that photo.

hot hull
#

Lol

old wyvern
#

There we go

#

Was stuck at 144p for some reason

hot hull
quiet depot
#

@hot hull do you not go to school or something

#

how do you have 40 hours

obtuse gale
#

my time stats all messed up cos i leave my IJ open

quiet depot
#

that's not how it works

obtuse gale
#

isnt it?

quiet depot
#

no

obtuse gale
#

Is it code time?

quiet depot
#

it's based on when you're typing

#

and it has a cooldown

obtuse gale
#

o... thats concerning

quiet depot
#

after 2 minutes or so from when you stopped typing, it'll stop counting

regal gale
#

But it only supported on version under 1.12-

#

So the project was open-sourced, and when I am looking at the code...

dawn hinge
#

How wonderful

regal gale
#

And if anyone is wondering why I'm editing it, I'm just updating it to 1.16 ._.

hot hull
#

I'm an active person, what can I say

regal gale
#

Bro, is this a freaking joke?

#

Snowball action in PlayerInteractEvent doesn't even work right (Spigot API 1.16.4)

#

It fires both action LEFT_CLICK_AIR and RIGHT_CLICK_AIR at the same time

#

It only happens for snowball; every item else works fine

old wyvern
#

wdym?

#

Both the hands firing an event is normal

regal gale
#

That happened when I shoot snowball

#

2 actions fire in 1 click, why thonking

old wyvern
#

oh wait, it fired left click and right click?

#

weird

jovial warren
#

imagine having to go to school

#

it's half term for me (basically, we get a 1 week break in around the middle of every term which we call "half term", for those unfamiliar)

jovial warren
winter iron
regal gale
#

??

distant sun
#

You can't?

winter iron
#

u can

#

idk why

#

but it works fine

dawn hinge
#

You can actually

prisma wave
#

hi clever haskell people, any idea what's wrong with this? ```hs

split :: [String] -> [[String]]
split [] = []
split a = [a]
split (a:b) = [[a], [b]]
split (a:b:c) = [[a] ++ parts[0], [b] ++ parts[1]] where parts = split c

#

eg split [1, 2, 3, 4] returns [[1, 3], [2, 4]]

#

not sure what's wrong but the compiler seems to think split (a:b) = [[a], [b]] is wrong for some reason

old wyvern
#

The patterns for the list are probably incomplete there

#

this should be an easier way to do it

import Data.List
import Data.Maybe

main = putStrLn (show (split [1, 2, 3, 4]))


split l = do
        let isEvenIndexed l x = 
                fromMaybe False $ (elemIndex x l) >>= (\x -> Just $ x `mod` 2) >>= (\x -> Just $ x == 0)
        partition (isEvenIndexed l) l
#

@prisma wave

prisma wave
#

hmm

old wyvern
#

Its not that cryptic

#

Give reading that an attempt

prisma wave
#

lmao

old wyvern
#

Thats pretty much equivalent to what you would have with streams in java?

#

Or kotlin?

#

or similar

regal gale
#

Oh no

old wyvern
#

๐Ÿ‘

prisma wave
#

yeah the process isn't that different, the syntax is just different

old wyvern
#

Even that not by much I think

#

Learn? xD

prisma wave
#

the first element in a List of Optionals filtered where Optional#isPresent

old wyvern
prisma wave
old wyvern
#

They have an easy interactive tutorial on the website

onyx loom
#

no

old wyvern
#

There are a few jvm ports

#

That probably isnt clean anyway efe

#

Those are just what is written fast during coc

prisma wave
#

coc code is never readable lol

old wyvern
#

mhm

prisma wave
prisma wave
#

๐Ÿ™„

old wyvern
#

Finally got everything installed

prisma wave
#

nice

#

have you ever used either?

old wyvern
#

xD

prisma wave
#

wow

#

๐Ÿ‘

#

you are now an expert on both

old wyvern
#

"I dont know Egyptian, Cant read, 10/10 sucks. k tnx bye"

onyx loom
#

๐Ÿคจ

prisma wave
#

you can make an informed opinion

#

this isn't informed

old wyvern
#

Make an opinion once you have made an attempt

prisma wave
#

^^

#

lmao

#

fair

old wyvern
#

lol

prisma wave
old wyvern
#

Yea you can

prisma wave
#

the same way you learn what public static void main means

#

only because you know what each of those things mean

#

and what does static mean?

#

what does void mean?

#

what exactly does public mean?

old wyvern
#

A beginner does not know

prisma wave
#

you only know that because you actually learned the language...

#

^^

old wyvern
#

Thats the point

#

You gotta make an attempt to learn before you can judge

prisma wave
#

if you've never seen java before , that code makes no sense

#

not necessarily

#

public to what?

#

what's a class?

#

why is it public?

old wyvern
#

I've seen many people ask what that means

onyx loom
#

lol

old wyvern
#

A lot of juniors this year got into java

#

xD

onyx loom
#

yes

old wyvern
#

18*

prisma wave
#

i wont deny that imperative languages are usually easier to understand than declarative

old wyvern
#

Lets rather not

#

No need to be disrespectful to them

prisma wave
#

but every language has its own quirks that wont make sense if youve never learned that language

onyx loom
#

take lambdas as an example ig

#

if u look at a lmbda first ull have no idea what it is

old wyvern
#

Again, this is all just random stuff coming from a person who hasnt yet tried

#

If you dont know arabic, you aint reading arabic

#

And you shouldnt expect to read arabic until you learn to do so

lunar cypress
#

intuitive readability is not everything

prisma wave
#

im sure a beginner would have no trouble understanding this ```java
Optional.ofNullable(v)
.map(Math::sqrt)
.or(() -> Optional.of(2 << 4));

old wyvern
#

๐Ÿ˜‚

prisma wave
#

they're not the same thing

old wyvern
#

wrong comparision

onyx loom
prisma wave
#

you can't compare those 2

old wyvern
#
public static void main(String[] args) {
}
main = ()
lunar cypress
#

(act like you dont know both languages)
not really possible, also yeah those snippets are not equivalent.

old wyvern
#

thats better

prisma wave
#

let's compare java public final class Main { public static void main(String[] args) { System.out.println("Hello World"); } } with ```hs
main = putStrLn "Hello World"

#

which is easier?

onyx loom
#

lol

old wyvern
#

lies

#

xD

quiet depot
#

not even a final class

onyx loom
#

lmao

prisma wave
hot hull
#

Not even final args

onyx loom
#

haskell is obviously easier to read there

lunar cypress
#

we're having a discussion without fixed premises here

#

For example, what constitutes a "beginner"

#

Someone who hasn't touched any programming language at all?

prisma wave
#

^^ someone who's never used either language isn't gonna be able to understand either

lunar cypress
#

Any other background knowledge?

onyx loom
#

python Kappa

prisma wave
#

no programming knowledge at all?

#

then they won't understand either...

old wyvern
#

lol

prisma wave
#

haskell is closer to english in that example

#

but that's not how to rate a language

#

skript looks like english

#

it doesnt make it good

onyx loom
#

java got more words in it so that means the language can do more things so its better right?

old wyvern
lunar cypress
#

I would agree that yes, imperative style is more intuitive in the beginning, but I'd also argue that this isn't fixed and will change according to how much you learn. Now you may say "sure, but that's not only true for beginners" but I think it's simpler to recognise with beginners

prisma wave
#

i love putting at least 4 keywords and annotations for every method ๐Ÿ™‚

lunar cypress
#

I mean people experiment with teaching complete beginners a lisp as a first language

quiet depot
#

is that about the plain english compiler I've seen floating around yugi?

lunar cypress
#

And the learning curve of reading that is not very steep

old wyvern
#

Probably yea piggy

quiet depot
#

I saw some guy plugging it on quora a while ago

old wyvern
#

Yea I saw it there too I think

#

or maybe on stackoverflow

#

not sure

prisma wave
#

imperative is usually more intuitive to a beginner, but does that mean it's better?

quiet depot
#

according to md_5 no, frvlstsyibyr wins

#

declarative*

prisma wave
#

lmao

quiet depot
#

gotta love typing one key to the right on every key

old wyvern
#

Seems the haskell opposer had fled

lunar cypress
#

The point I was trying to make regardless of what you think is better is that readability should be seen as a graph over time spent learning, not a fixed rating

old wyvern
#

!! cheers to haskell gang

prisma wave
#

coward

#

haskell wins again

old wyvern
#

========

lunar cypress
#

And I would still argue that Haskell has a rather steep curve

prisma wave
#

haskell has a very steep curve

#

for me at least

#

compared to other less strict FP langs

lunar cypress
#

Just talking about readability here, obviously in most other aspects Haskell is very difficult too

unkempt tangle
#

haskeli?

#

is that c

prisma wave
#

lol

#

the complete opposite

unkempt tangle
#

c#

prisma wave
unkempt tangle
#

Sharp is different

prisma wave
#

1 c-style language is not "the complete opposite" of c

#

lol

lunar cypress
#

Haskell is Haskell

onyx loom
#

aaaaa

prisma wave
#

wow!

#

YES

old wyvern
#

IO Haskell

prisma wave
#

it actually took me to haskell

onyx loom
#

lol

prisma wave
#

ocaml ๐Ÿ˜ฆ

unkempt tangle
#

eww google

prisma wave
#

rust

#

rust has caused a lot of internal conflict

#

so safe and pragmatic but it's imperative ๐Ÿ˜ฆ

lunar cypress
#

wrong

#

it's actually a dialect of haskal

prisma wave
#

oh

#

okay

#

great

#

so rust is the perfect language then!

old wyvern
#

Wait really?

prisma wave
#

well

#

they both have let

#

they both have functions

#

seems pretty similar

quiet depot
#

rust is haskell without hkts

old wyvern
#

let seems to be common among the best languages ๐Ÿ™‚

quiet depot
#

worst*

prisma wave
#

hkts?

old wyvern
quiet depot
#

higher kinded types

unkempt tangle
#

senpai is hyperactive once again.

prisma wave
#

oh

quiet depot
#

lol idk what i'm talking about

unkempt tangle
#

We might send him to a sandbox once again.

prisma wave
#

me neither

quiet depot
#

literally just found a gist

unkempt tangle
quiet depot
#

then another gist incase i was asked what a htk was

#

which I was

#

so was definitely worth finding it

prisma wave
#

the rest of you will wonder for a very long time
๐Ÿ˜ฆ

unkempt tangle
#

Without any knowledge about neither of those two languages.

#

But Rust simply cant die yet, cuz it brings solutions everyone seeks.

prisma wave
#

clever type systems are so cool

#

like i dont understand them

#

but it's crazy how simple java's is in comparison

unkempt tangle
#

;c

quiet depot
#

it is beyond me how my school managed to acquire a pdf of my physics textbook

#

i scoured the interwebs for ages looking for one

prisma wave
#

maybe you get one when you buy the book

quiet depot
#

no you don't

old wyvern
#

What if....

#

They

quiet depot
#

you get access to some weird online viewer, full of drm

#

but it's not a pdf

old wyvern
#

scanned it

quiet depot
#

it's not a scan

old wyvern
#

Maybe a digital copy is distributed to the school by your syllabus centre?

quiet depot
#

could be

#

except some of the other textbooks that are provided to us online are scans, as you said before

#

and some textbooks simply aren't available online

old wyvern
#

weird

lunar cypress
#

l*bgen?

quiet depot
#

wat

lunar cypress
#

have you looked there

#

not condoning pirated books of course

quiet depot
#

don't see it on there

#

but thanks for telling me about that site

#

will come in handy

#

people say "for educational purposes" when doing sketchy shit all the time

#

and I feel like this is the one time where it actually, truly applies

heady birch
#

What is an HKT?

lunar cypress
#

I can't believe I now actually understand terms like "endofunctors in the category of types"

prisma wave
#

dear god

prisma wave
#

So I've heard

lunar cypress
#

basically when type constructors in data (Haskell) or enum (Rust) constitute an own type

jovial warren
#
private class ComponentHolder(override val extra: MutableList<Component>) : Component {

    override val data: ComponentData
        get() = throw UnsupportedOperationException("Not allowed!")

    override val colour: Colour
        get() = throw UnsupportedOperationException("Not allowed!")

    override val clickEvent: ClickEvent
        get() = throw UnsupportedOperationException("Not allowed!")

    override val hoverEvent: HoverEvent<*>
        get() = throw UnsupportedOperationException("Not allowed!")
}
```๐Ÿ‘Œ
#

lol

#

I wanted the DSL to return a single Component object, so had to make an implementation specifically to store the children components

hot hull
#

"Colour"

#

you should be shot

jovial warren
hot hull
#

Might want to add proper reasons on the gets

#

Otherwise it can get confusing as shit

jovial warren
#

Komponent's colours all have colour spelt the British way

#
  1. because I'm British
  2. to avoid confusion with existing colour objects, such as AWT's Color
#

and I thought ComponentColor was a bit too long

#

and didn't want to copy adventure's TextColor

hot hull
#

ColorComponent

jovial warren
#

that will confuse it with component types

#

e.g. TextComponent, KeybindComponent, SelectorComponent, TranslationComponent and ScoreComponent

#

those are the 5 chat component types

#

also, wanna see the DSL I made for this?

#
component {
    text("Hello World!") {
        colour = NamedColour.BLACK
        formatting {
            bold = true
            italic = true
        }
        clickEvent = ClickEvent.openURL("https://example.com")
        hoverEvent = HoverEvent.showText("Click me")

        children {
            text("I am a child!")
        }
    }
}
#

mmmmm

hot hull
#

children {
text("I am a child!")
}
Indeed you are

jovial warren
#

oi

#

also, wanna see some RGB conversions?

hot hull
#

pray for me rn plz

jovial warren
#
fun toInt() = red shl 16 or green shl 8 or blue
hot hull
jovial warren
#
fun fromInt(value: Int) = RGB((value shr 16) and 0xFF, (value shr 8) and 0xFF, (value shr 0) and 0xFF)
onyx loom
jovial warren
#

phat oof

onyx loom
#

guess where u dont get them

jovial warren
#

Kotlin

onyx loom
#

clojure

#

nil

jovial warren
#

wat?

prisma wave
prisma wave
onyx loom
#

๐Ÿฅฒ

prisma wave
#

Haskell doesn't have NPEs

#

Fun fact

onyx loom
#

omg haskell good?

jovial warren
#

how does one not repeat oneself there?

prisma wave
#

yes!

#

Make a function to throw the exception

jovial warren
prisma wave
#

Also

#

MutableList ๐Ÿ˜

#

Not happy about that

#

Not happy at all

jovial warren
#

it's because the DSL's list is mutable

#

actually wtf am I doing with my life

hot hull
#

I don't know either, dw

prisma wave
#

ban mutability

#

Also those static functions are ew

#

Top level those bad boys

jovial warren
#

also, can I have an interface val that is overridden with an unreadable val?

prisma wave
#

what

jovial warren
#

actually I can just remove it from the super

prisma wave
#

what

jovial warren
#

no reason for it to be there

#

I had children and formatting as public vals in Component.Builder (extended by each component type's builder), but I didn't want people to be able to access them in the DSL

prisma wave
#

why

#

why public i mean

jovial warren
#

because you can't make vals protected or private in interfaces

#

they have to be public

#

I fixed that now anyway by just moving those into the impls

#

now gotta figure out how I'm gonna serialise this lol

hot hull
half harness
#

Doesn't know what you're talking about || ๐Ÿ˜” ||

hot hull
#

@heady birch When does JFrame#paintComponent get called?

prisma wave
half harness
#

javafx is so awesome ๐Ÿ˜

jovial warren
#

yeah JavaFX >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Swing > AWT

prisma wave
#

elm

hot hull
#

Honestly can't be fucked with javafx

jovial warren
#

wdym

#

it's so ez

hot hull
#

no I mean the usecase is so simple it's not worth

half harness
#

it literally has a app where you can drop and drag items

#

like buttons

#

and text

#

its so EASY

hot hull
#

But I mean the more you talk about it the more I'm tempted in switching

jovial warren
#

you think JavaFX is just designed for advanced use cases?

#

you know it's built around simplicity right?

half harness
jovial warren
#

also, Swing is old (and I think deprecated)

hot hull
#

Honestly fuck you, switching

half harness
#

๐Ÿฅณ

#

get scenebuilder

jovial warren
#

imagine needing that

half harness
#

._.

jovial warren
#
<VBox>
    <Label text="Hello World!"/>
</VBox>
```ez
hot hull
#

dw

half harness
#

edited your message -_-

jovial warren
#

dependency for JavaFX is a separate JDK module iirc

prisma wave
jovial warren
#

for OpenJDK it's OpenJFX

heady birch
jovial warren
#

JavaFX good Swing bad AWT bad

heady birch
#

You can call repaint() yourself and it will call it aswell

half harness
#
plugins {
    id 'org.openjfx.javafxplugin' version '0.0.9'
}
javafx {
    modules = [ 'javafx.controls' , 'javafx.fxml' ]
    version = '11.0.2'
}
#

thats all i put

jovial warren
#

looks about right

half harness
#

in build.gradle

prisma wave
#

build.sbt

#

.cabal

jovial warren
#

ew

#

I swear SBT is that thing Scala uses

half harness
#

ill showcase my project that is super ez to make once you learn how to use containers in javafx

#

epic

#

sorry for the first 10 seconds, sharex does some weird stuff

hot hull
#

How do you apply a plugin to only one module?

half harness
#

gradle plugin?

hot hull
#

yes

half harness
#

go to its build.gradle

#

maybe

#

๐Ÿคท

#

and do apply plugin: blah

heady birch
#

Good work although I can suggest never actually releasing whatever it is with that Progessbar with gui programming I could never structure it nicely and after the app starts getting big it starts getting messy for me with dependencies everywhere absolutely everywhere

jovial warren
#

apply from?

half harness
#

apply something

#

๐Ÿ˜›

heady birch
half harness
#

oh

frigid badge
#

nice work dkim

half harness
#

wdym by this:

it starts getting messy for me with dependencies everywhere absolutely everywhere

half harness
heady birch
#

I believe java fx is better

#

In the fact you can bind stuff to objects and things

half harness
#

me too

heady birch
#

And I quite like that it's all CSS powered

half harness
heady birch
#

What's that GUI designer?

jovial warren
#

JavaFX

half harness
#

i added all the HBoxes so that it wouldn't be right above and below each other

jovial warren
#

imagine needing a GUI designer

#

FXML

half harness
#

-_-

unkempt tangle
#

javafx?

half harness
hot hull
#

God it's annoying creating new modules which depend on frameworks

half harness
unkempt tangle
#

use scenebuilder

half harness
#

its a library for creating guis

#

-_-

unkempt tangle
#

wtih With eclipse

hot hull
#

Die.

half harness
#

^

unkempt tangle
heady birch
#

I think I once used ORACLE JavaFX Scene Builder 2.0

half harness
half harness
unkempt tangle
#

Yeah

#

it does

half harness
#

i dont get you n3w0rk

unkempt tangle
#

cuz I am too fast for ya

half harness
#

also

heady birch
half harness
#

this thing took me like 5 hours to figure out how to center it

#

then i found out that im dumb

#

and it took 2 seconds to center it

heady birch
#

E

prisma wave
heady birch
#

Lawrence Joseph Ellison is the oracle CEO!

#

Okay this SCENE BUILDER is kind of cool

#

How does JAVA FX performance comapre to SWING?

jovial warren
#

about the same afaik

#

but JavaFX is more updated, easier, and more intuitive

heady birch
#

Java FX should make a docking panel

jovial warren
#

and it's more widely used as well

heady birch
#

Currently developers must rely on modern third party alternatives such as INFONODE and JIDE COMPONENTS

jovial warren
#

InfoNode?

#

just googled that and I found a site that still has copyright from 2009, and looks like it hasn't been updated since then lol

heady birch
#

Yeah lol thats the irony!

jovial warren
#

afaik, most companies that use Java for UI use JavaFX

#

or Android lol

heady birch
#

@half harness How do I add a Menu

prisma wave
#

You under estimate the market SHARE of LEGACY software

half harness
#

more specific pls

heady birch
#

Swing MenuBar, but I want it in JavaFX

half harness
#

whats swing menubar look like

prisma wave
#

Nine craft launcher (copy right Mojang) has been using AWT since 2011 and still refuses to update!

heady birch
#

File Edit View kind of thing

half harness
#

oh

#

u have to put a MenuBar

heady birch
#

There is something beautiful about Swing Metal UI

half harness
#

the template has it

heady birch
#

Yeah but I can't find the MenuBar object!

half harness
#

search bar?

#

๐Ÿ˜›

heady birch
#

Ah found it

half harness
#

lol

#

gj

half harness
#

๐Ÿ‘€

heady birch
#

Okay this is kind of chill

jovial warren
#

is that meant to be some sort of joke?

half harness
#

time to use AWT

jovial warren
#

no

#

AWT is ancient, deprecated, and should not be used by anyone ever again ever

half harness
#

o

#

nvm then

heady birch
#

Swing is just AWT with a "J" on the front

prisma wave
#

yes i have many sources for my claim

#

i will now proceed to list my sources

half harness
#

lol

heady birch
#

legitimate sources

half harness
#
somber tulip
#

Isn't Intellij made with pure java swing

jovial warren
heady birch
#

Yes it is

jovial warren
#

you think BM's capable of providing legitimate sources to backup his claims?

heady birch
#

Yes I think he is

jovial warren
#

wow you well overestimate him lol

prisma wave
heady birch
#

He has proven many times

prisma wave
#

this is all the proof you need

heady birch
#

And also provided me with the sources for my own research

#

VoCodes

prisma wave
#

do your own research

heady birch
prisma wave
#

no

half harness
#

no

unkempt tangle
#

Where is 15 when you need it

heady birch
#

15 doesnt have TRUMP!

prisma wave
#

1 Attachment: donald_trump_interview_on_legacy_software.wav

unkempt tangle
half harness
#

niall

heady birch
#

15 ai is superior though

half harness
#

ur gonna become like n3w0rk

unkempt tangle
half harness
ocean quartz
half harness
heady birch
#

The ai that site uses is really good, I have a feeling they wouldn't add politicians or anything

half harness
#

๐Ÿ˜‘

prisma wave
#

I think software toolkits such as AWT and Swing are truly great, very well designed, perfect for any sort of Graphical Interface

  • Donald Trump, 2003
unkempt tangle
#

Senpai

#

wanna play now?

heady birch
#

@half harness Thanks for showing me that scene builder Im gonna play around with it now

half harness
#

lol np ๐Ÿ™‚

heady birch
#

Now I must find a Metal UI css sheet

half harness
#

lol

#

Once you get to know all the containers its really easy to put objects where you want

#

VBox HBox, Grid, and BorderPane are probably the most common

heady birch
#

And it has like a TreeTable and Pagination components

half harness
#

its epic ๐Ÿ™‚

heady birch
#

Charts as well? Nice

half harness
#

yep

unkempt tangle
#

Why am I watching korean made fastfood?

half harness
#

good question

unkempt tangle
#

#๊ธธ๊ฑฐ๋ฆฌ์Œ์‹ #๋ถ„์‹ #์‹œ์žฅ์Œ์‹
๐Ÿ’—์•ˆ๋…•ํ•˜์„ธ์š” ์–Œ์–Œ์ž…๋‹ˆ๋‹ค :)
2020๋…„ ๋งˆ์ง€๋ง‰๋‚  ํ•œํ•ด๋™์•ˆ ์ดฌ์˜ํ•˜๋ฉด์„œ ๊ฐ ์ข…๋ฅ˜ ์Œ์‹
์งง์€ ํŽธ์ง‘์œผ๋กœ ํ•˜์ด๋ผ์ดํŠธ ๋ชฐ์•„๋ณด๊ธฐ ์ค€๋น„ํ–ˆ์Šต๋‹ˆ๋‹ค :)
๋‹ค๊ฐ€์˜ค๋Š” ์ƒˆํ•ด์—๋Š” ํ–‰๋ณตํ•˜๊ณ  ์ฆ๊ฑฐ์šด ์ผ๋งŒ ๊ฐ€๋“ํ•˜์‹œ๊ธธ ๊ธฐ์›ํ•ฉ๋‹ˆ๋‹ค
์ƒˆํ•ด๋ณต ๋งŽ์ด ๋ฐ›์œผ์„ธ์š”!!

๐Ÿ’—Social media
โ–ถ์ธ์Šคํƒ€๊ทธ๋žจ : https://bit.ly/39D5adW
โ–ถ๋„ค์ด๋ฒ„๋ธ”๋กœ๊ทธ : https://bit.ly/2VQ3mdA

๐Ÿ’—๋น„์ฆˆ๋‹ˆ์Šค ๋ฌธ์˜

โ–ถakongfood@gmail.com

Copyright 2020. Yum Yum All Videos Cannot Be Copied Without Permission

โ–ถ Play video
half harness
#

๐Ÿ‘€

unkempt tangle
#

Everything looks so tasteful

#

And I am getting hungry

half harness
#

that looks red

#

well the title says 2020something YumYum something something something | YumYum's Best COllection 2020 Year

unkempt tangle
#

Not only ONE special meal

#

7:40

#

I'm hungry ;c

regal gale
prisma wave
#

risky

#

very risky

jovial warren
forest pecan
#

Java users when they see Kotlin:

ocean quartz
#

So, I just learned that C# doesn't have an equivalent to final variables and final parameters wtf

#

Literally unusable

lunar cypress
#

not true?

ocean quartz
#

Are you sure?

#

From what I could find, const/readonly for fields, sealed for methods and classes, but nothing for variables and parameters

lunar cypress
#

ok but local scope isn't really that important

#

semantically it adds nothing

heady birch
#

readonly?

lunar cypress
#

it's just a note for yourself

heady birch
#

what abt { get; <no set;> }

ocean quartz
#

I mean yeah, but I would prefer if that was a thing, that's why the "literally unusable" joke

stuck harbor
#

java be like

@NotNull private static final Map<List<Date>, Integer>
lunar cypress
#

ah it was a joke

prisma wave
#

is there any way of doing the weird annotation inheritance sorta thing

onyx loom
onyx loom
#

lol

stuck harbor
#

oui

prisma wave
#

so i could have like java @SourcedBy.KeyIn( in = @SourcedBy.File("fileName"), withKey = "key" ) but also permit ```java
@SourcedBy.KeyIn(
in = @SourcedBy.PluginConfig,
withKey = "key2"
)

stuck harbor
#

y

prisma wave
#

theres no inheritance

heady birch
#

@Child
public @interface Parent {
}

prisma wave
#

ridiculous

#

and it's gross

#

i want to be able to do SourcedBy in()

heady birch
#

What are the two related problems

#

Oh wait nvm

prisma wave
#

unrelated things in the reflection loading stuff

heady birch
#

SourcedBy in() ?

#

How

prisma wave
#

it's not possible

#

i dont think

heady birch
#

Wouldn't it be @SourcedBy.KeyIn

prisma wave
#

yeah

#

but i want KeyIn to be able to reference any of the other annotations

#
@KeyIn(
  in = @SourcedBy.File("fileName"),
  key = "blah"
)
#

does not work ;((((((((((

heady birch
#

oh, idk

lunar cypress
#

is that supposed to be java?

prisma wave
#

yes

#

lol

lunar cypress
#

Can you even use nested annotations in Java? I don't think so

prisma wave
#

i thought you could

heady birch
#

yeah one sec

lunar cypress
#

that's a kotlin thing I'm pretty sure

heady birch
prisma wave
#

yeah

#

something like that

#

or similar at least

lunar cypress
#

hm interesting

trim niche
#

Why is the default text highlighting of intellij not highlighting anything and how can I change this?

prisma wave
#

i dont think this is possible

trim niche
#

How people use it then?

prisma wave
#

i meant my problem isn't possible

#

dw

trim niche
#

oh

lunar cypress
#

what would you want to highlight by "default"

trim niche
#

By default I mean: the default text highlighting, what you get as soon as you download it.

winter iron
lunar cypress
prisma wave
winter iron
#

now its on mine too

#

๐Ÿ™‚

prisma wave
#

๐Ÿ™‚

trim niche
#

.java file

prisma wave
#

too bad that doesnt fix my issue

trim niche
lunar cypress
#

Yes and I asked "what text highlighting"

trim niche
#

The text highlighting of intellij

lunar cypress
#

....

#

are you trolling?

trim niche
#

no

#

I don't understand your question

onyx loom
#

what highlighting

#

like the font?

#

the colours?

lunar cypress
#

if I give you a .txt file with plain text

#

do you want to highlight that

trim niche
#

The colors

onyx loom
#

Settings > Editor > Color Scheme

prisma wave
#

i would pay a lot of money for Stream#associateBy to be a thing

onyx loom
#

k

#

o

#

t

#

l

#

i

#

n

#

without the streams ๐Ÿ™‚

prisma wave
#

๐Ÿ˜ฆ

hot hull
#

Just make your own

lunar cypress
#

4Head

prisma wave
#

๐Ÿ˜ก

jovial warren
#

I now love generics lol

#
sealed class ClickEventSerialiser<T : ClickEvent>(private val keyName: String) : SerializationStrategy<T> {

    override val descriptor = buildClassSerialDescriptor("ClickEvent") {
        element<String>(keyName)
    }

    override fun serialize(encoder: Encoder, value: T) = encoder.encodeStructure(descriptor) {
        encodeStringElement(descriptor, 0, value.content)
    }
}

object OpenURLSerialiser : ClickEventSerialiser<OpenURL>("open_url"), KSerializer<OpenURL> {

    override fun deserialize(decoder: Decoder): OpenURL = decoder.decodeStructure(descriptor) {
        OpenURL(decodeStringElement(descriptor, 0))
    }
}

object RunCommandSerialiser : ClickEventSerialiser<RunCommand>("run_command"), KSerializer<RunCommand> {

    override fun deserialize(decoder: Decoder): RunCommand = decoder.decodeStructure(descriptor) {
        RunCommand(decodeStringElement(descriptor, 0))
    }
}
```lol
hot hull
#

How the fuck do insets work

jovial warren
#

insets?

hot hull
#

How do you position shit?

jovial warren
#

ah right

hot hull
#

That yea

#

Tried using padding but that's all sorts of messed up

jovial warren
#

I could tell you how to do it in FXML, but you're probably not using FXML lol

hot hull
#

I'm not no

#

Good thing stack overflow exists fingerguns

jovial warren
#

in FXML we'd do this: ```xml
<GridPane>
<padding><Insets top="25" right="25" bottom="10" left="25"/></padding>
</GridPane>

#

Pane#setInsets?

hot hull
#
    button.setLayoutX(150);
    button.setLayoutY(100);
#

Either I'm hella dumb or I'm just retarded

onyx loom
#

press the button to quite life

jovial warren
#

tell me what you want to do first

hot hull
#

Sudoku

jovial warren
#

yeah that's not quite specific enough

hot hull
#

Just trynna play around with buttons rn lol

jovial warren
#

if you want a button to not be in the centre, GridPane probably isn't the right pane

#

since grid panes order their children by a grid (hence the name xD)

hot hull
#

I want free movement

jovial warren
#

try using a BorderPane?

#

that gives you top, left, centre, right and bottom sections to play with

hot hull
#

Why does setLayoutX/Y not work tho lol

jovial warren
#

yeah... no, that's not how that works afaik

hot hull
#

That's dumb tho lol, why would it force positioning on nodes

jovial warren
#

if you just put a button without any panes it should actually shove it in the top left

#

because you should be using a pane at all times

hot hull
#

Pane would be my application window, and Scene would be the different parts, correct?

jovial warren
#

Pane is a node that contains other nodes

#

it's job is to control it's children

hot hull
#

Doing a poor job so far

jovial warren
#

Scene is the window you have open

obtuse gale
#

Is it just me or has the average IQ dropped in the past few weeks?

jovial warren
#

care to share what brought you to that conclusion?

prisma wave
#

surely you dont need to close a stream you're collecting

obtuse gale
jovial warren
#

let me guess: LuckPerms Discord

obtuse gale
#

And EngineHub but yes

jovial warren
#

you're a mod at EngineHub as well? or do you just minimod there? xD

obtuse gale
#

Nah I'm just there for the laughs

jovial warren
#

inv me

obtuse gale
#

/enginehub

jovial warren
#

got it

#

channel?

obtuse gale
#

WorldGuard mainly lmao

#

The whole history is hilarious

jovial warren
#

okay just those latest messages without even needing to scroll make me go

hot hull
jovial warren
#

it's a square

hot hull
#

Shut up

remote goblet
#

Thatโ€™s the sexiest square Iโ€™ve ever seen

jovial warren
#

actually, I guess I got excited the other day over a cube so I can't really say shit

remote goblet
#

A proper Chad square

hot hull
#

Can I set individual pixels? Or will I have to make an image and just set the image

jovial warren
#

images in JavaFX are a pain in the fucking ass

hot hull
#

Bruh why can nothing be done properly for fucks sakes

jovial warren
#

or maybe it was just me

hot hull
#

I'm not asking for much

obtuse gale
#

Make a 1x1 rectangle for each pixel :cct:

onyx loom
hot hull
#

Fefo, I'm getting the rope

jovial warren
remote goblet
#

Kaliber, include the full screenshot

#

Add the part where you said ok

onyx loom
hot hull
#

oh yea btw, I ripped off one of my brace holders :kek:

remote goblet
onyx loom
#

wow bardy stalker

jovial warren
#

xD

#

trying to figure out how I should do hover components

hot hull
#

Just do them duh

jovial warren
#

well some of them are NBT

#

duh

#

which means komponent will need to optionally hook into nbt

remote goblet
#

insertion owoNydancedarkp

jovial warren
#

why am I making my own component library instead of using adventure?

  1. because BM wanted something custom for MineKraft
  2. because it means I can write in Kotlin, which means I can make a really sexy DSL, and also use kotlinx.serialization
hot hull
remote goblet
#

A bigger square slpyGasm

hot hull
#

On the blue square goes a big Go Fuck Yourself and on the gray one there's options on how you can go fuck yourself

jovial warren
hot hull
onyx loom
#

damn frosty thats like more customisation than ive ever done in apps

#

i cba with the design, i just slap the buttons on the page

remote goblet
#

Where can I download this

hot hull
onyx loom
#

on my way

prisma wave
hot hull
#

But no, blue square is map display, gray is settings for it

trim niche
#

What IDE most people use for java?

jovial warren
#

oh btw, I know I kinda keep asking this, but anyone wanna join the MineKraft project?

jovial warren
onyx loom
#

intellij

prisma wave
onyx loom
#

๐Ÿ™‚

hot hull
#

Bardy, too sm0ll brain fingerguns

jovial warren
#

not true

hot hull
#

yes yes

jovial warren
#

I thought I was small brain, but it's actually easier than you think

#

just lookup a packet, try and make something that works, if it works, great, if it doesn't, Google, go on IRC and ask the experts, you get the idea

hot hull
#

Sorry, but that sounds like effort

#

Can't be having none of that

jovial warren
#

anyone wanna see Komponent's smexy DSL btw?

prisma wave
onyx loom
#

great question

jovial warren
#
component {
    text("I am text!") {
        colour = NamedColour.BLACK
        formatting {
            bold = true
            italic = true
        }
        clickEvent = ClickEvent.openURL("https://example.com")
        hoverEvent = HoverEvent.showText("Click me!")

        children {
            text("I am a child!")
        }
    }
}
#

mmm

sick dove
#

Anyone know how to intercept a forge packet with protocollib on thermos 1.7.10? I haven't been able to find any examples but its supposed to support it.

onyx loom
#

1.7.10 Pepega

jovial warren
#

ProtocolLib doesn't support Forge afaik

sick dove
jovial warren
#

does Forge even send custom packets?

#

actually, probably does

#

also, isn't Thermos a fork of KCauldron which uses Bukkit anyway?

sick dove
#

yeah it's a bukkit/forge hybrid

#

basically I want to listen to forge packets on a thermos server with a bukkit plugin

hot hull
#

Why does javafx legit not work when in a module

#

Only when the entire project is just javafx

jovial warren
#

@sick dove ProtocolLib supports custom packets from the looks of it

jovial warren
hot hull
#

That's false, it legit does not work if you don't create the project as JavaFX from the start

unkempt tangle
#

Hm

#

Weren't there an alternative to javafx?

#

Swing

onyx loom
#

swing is outdated

#

javafx is the replacement lol

unkempt tangle
#

hmm

jovial warren
prisma wave
#

Jesus

jovial warren
#

pls help me

#

idk how to turn a list of components into a single one

#

actually I don't even need to

onyx loom
#

fun List<Component>.joinToComponent(): Component

jovial warren
#

trying to think of a way to serialise this now

obtuse gale
#

Put all of them as extra of a single empty TextComponent

jovial warren
#

o

#

that might work

obtuse gale
#

So {"text":"","extra":[...]}

#

Yea

distant sun
onyx loom
#

div div div div div idiv div id iv divi divi div id ivd idvi

#

clasic xml ๐Ÿ™‚

prisma wave
#

why do you all have everyone blocked

obtuse gale
#

You misspelled "y'all" ๐ŸŒ

prisma wave
#

why do you y'all have everyone blocked*

onyx loom
#

y'all is actually disgusting

prisma wave
#

ok

onyx loom
#

i guess i dont ๐ŸŒ

jovial warren
#

can't seem to get fold to work with anything

#

leave

onyx loom
#

what even is latest gradle version

#

i can never stay up to date, i think im on 6.5 or smth

jovial warren
#

6.8

obtuse gale
jovial warren
#

I got it to work dw

obtuse gale
#

Coolio

jovial warren
#

I'm just fixing really strange errors

distant sun
#

java.lang.NullPointException

half harness
#

java.lang.NullException

prisma wave
#

golang.NilPointerException

obtuse gale
#

segfault

prisma wave
#

๐ŸŒš

hot hull
#

what.the.fuck.LifeException

jovial warren
#

this is the biggest pain in the ass I swear

hot hull
#

Life indeed is the biggest pain in the ass

onyx loom
half harness
#

scenebuilder isn't working ๐Ÿ˜ข

obtuse gale
#

No suffering fingerguns

half harness
#

what isn't working

#

it doesn't shade?

#

oh

#

did u put correct stuff?

#

group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html thonking

#

alright

#

lol

#

upgrade

#

oh

#

dont use +

#

fine

#

but

#
buildscript {
    repositories {
        maven { url = 'https://files.minecraftforge.net/maven' }
        jcenter()
        mavenCentral()
    }
    dependencies {
        classpath 'net.minecraftforge.gradle:ForgeGradle:3.+'
    }
}
#

are these ur only repos?

#

?

#

oh