#dev-general

1 messages ยท Page 364 of 1

lunar cypress
#

why is javac not simply a copy of kotlinc

old wyvern
#

xD

forest pecan
#

try implementing jni or jna or bitshift in kotlin

#

lol

#

much harder

quiet depot
#

kotlin should have java/kotlin interop like holyc c/asm interop

#

that'd be cool

#

and probably useless

#

but still cool

lunar cypress
#

The kotlin compiler isn't much smarter than javac, the language just has more features in its spec

forest pecan
#

^

old wyvern
#

How does holyc interop work

#

Was it you jsut writing asm inbetween C?

quiet depot
#

u can basically just type asm in the middle of ur c

old wyvern
#

lmao

forest pecan
#

lmao

#

thats why its called holyc

#

cause its hella holy language

quiet depot
#

a gift from the gods

jovial warren
#

No semicolons, smart casting, decent type inference, compile time constants, the list goes on

#

Delegated inheritance

onyx loom
#

lol

jovial warren
#

Extension and expression function mapping

stuck harbor
#

we should rewrite the linux kernel in holy c

forest pecan
#

that is basically a utility method

#

lmao

#

the extension methods

stuck harbor
#

that would be much better

jovial warren
#

Yeah ik

old wyvern
#

type inference exists in Java as well

jovial warren
#

The compiler wraps them into utility classes and changes the calls

old wyvern
#

compile time constants are also handled by javac as well afaik

forest pecan
#

also kotlin jar size is bigger ๐ŸŒš but that shouldnt be taken account of lol

old wyvern
#

final and static primitives

lunar cypress
#

yeah again that's the language, not the compiler

old wyvern
#

same as kotlin consts

lunar cypress
#

I doubt the compiler does much more on its own than javac

#

And it doesn't need to

#

because jvm

forest pecan
#

are the unsigned primitives really unsigned or just disguised as normal primitives (in kotlin)

old wyvern
#

mhm

jovial warren
#

Also, kotlinc can compile to three different formats

#

The same language, three formats

quiet depot
#

what js and native?

#

and jvm?

old wyvern
#

Also, instanceOf pattern matching exists in java as well

quiet depot
#

does anyone use js and native

stuck harbor
#

no

#

nobody does

old wyvern
#

No, it just exists

quiet depot
#

thought so

old wyvern
#

Some people use Kotlin native for mobile devices tho afaik

#

not really sure of that

lunar cypress
#

having more targets doesn't make it smarter

old wyvern
#

^

forest pecan
#

makes it harder in fact

#

not smarter

quiet depot
#

harder

#

what

#

that is not the right word

old wyvern
#

xD

forest pecan
#

lmao

#

XD

old wyvern
#

kotis

forest pecan
#

maybe it does make people hard

onyx loom
#

it makes bardy hard thats for sure

forest pecan
#

Mhm

old wyvern
#

lmao

onyx loom
#

mushroom

stuck harbor
#

mushroom

half harness
#

mushroom

old wyvern
#

mush

forest pecan
#

room

old wyvern
#

no balls

oblique heath
#

mushlong

quiet depot
#

mushort

forest pecan
#

yea it got no balls

old wyvern
#

Maybe the earth is its ball

#

๐Ÿฅฒ

onyx loom
#

big balls

forest pecan
#

anti-testes

#

only balls

quiet depot
#

yugi if the earth were its ball

#

it'd be but a mere hair on the ball

#

hell

old wyvern
#

xD

quiet depot
#

probably a little microscopic bug

old wyvern
#

Small pp?

forest pecan
#

Lmao

quiet depot
#

idk

half harness
#

uh

#

=offtopic

#

plz

old wyvern
#

Microscopic*

half harness
#

this is some... weird chat

forest pecan
#

admin ban

#

/s

#

lol

old wyvern
#

uhm

static zealot
#

wtf did I just watch?

quiet depot
#

yeah

#

pls no

#

none of that in here

old wyvern
#

what?

#

What other guy?

forest pecan
#
You turn my floppy disk into a hard drive...
Are you linux? Because we can mkdirs.
I'll always have cache for you
ind if I run a sniffer to see if your ports are open? ;)
Come to my 127.0.0.1 and Iโ€™ll give you sudo access.
Are you CoffeeScript? Because I am looking to drink you out.
My main method is 'public love iLoveYou().'
Want to see my secret plug-in?
Are you a GitHub repository? Because I want to fork you.
You can unzip my files anytime...
Hey, bb, want me to get winrar in here so we can unzip our files ;)
Will you be mybb?
#

who remembers this

old wyvern
#

Im confused

forest pecan
#

lol

static zealot
#

was this the guy who asked for more pickup lines and asked if these are good enough?

old wyvern
#

Oh he told that you didnt make it?

forest pecan
#

yea lol

old wyvern
#

oh lol

quiet depot
#

i've seen these before

#

there was a thread on spigot

#

it had some of these

#

years ago

forest pecan
#

Oh lmao

onyx loom
#

uve used them in practice havent u pig

static zealot
#

yeah the guy was googling developer pickup lines

#

because his crush was a developer

#

or something like that

forest pecan
#

oh shit

#

lmao

quiet depot
#

nah

#

it was a thread

#

and no kaliber

static zealot
#

why is that a resource?

quiet depot
#

there was another pickup line though

onyx loom
#

smash or pass papi expansion ๐Ÿฅฒ

forest pecan
#

"Are you a diamond pickaxe? Because Iโ€™m harder than obsidian"

quiet depot
#

something about wanting to "insert my usb stick into you"

#

can't remember the exact line

#

actually heard that one used irl sadly

onyx loom
old wyvern
#

Im wondering who he picked up with that...

forest pecan
#

LMAO

static zealot
#

:smiling_face_with_3_tears: please

old wyvern
quiet depot
#

yeah that's like the raw format of it

#

it was a pickup line

#

I just can't remember it

old wyvern
#

xD

static zealot
quiet depot
#

it wasn't actually used to legitimately get a girl

#

it was just a conversation full of computer related innuendos

onyx loom
#

its on the papi repo blitz

static zealot
#

yeah I know

#

but me.glaremasters.

old wyvern
#

yea I understand

onyx loom
#

๐Ÿฅฒ

static zealot
#

yeah lmaooo

old wyvern
#

Is there a way to change the pulling branch in a pr?

half harness
#

If i made a papi expansion, where would i put it (so its public)?

static zealot
#

and 69 level

#

lmao

half harness
#

since i dont think spigot would allow non-plugins

onyx loom
#

ecloud dkim

half harness
#

can u link

#

plz

onyx loom
half harness
#

i have zoom open so my browser is slow ๐Ÿ˜ซ

onyx loom
#

if ur making an expansion for a plugin just put it inside the jar (if its ur plugin)

static zealot
#

or make you an account

onyx loom
#

funnycube

half harness
#

Registration is currently locked. If you feel it is necessary to create an account, please join our discord and get in touch with us.

#

oop

onyx loom
#

yes he has to make the account

#

then u can do the rest urself

half harness
#

ohhh

#

yes

#

primitives aren't objects

#

BUT

#

i misspelled maybe -_-

forest pecan
#

i think it could work

#

cause java supports autoboxing

half harness
#

ya

#

T > Object

eternal compass
#

@half harness :p

half harness
#

rip

eternal compass
#

my CPU fingerguns

half harness
#

like me

forest pecan
hot hull
#

1.19 sheesh

eternal compass
#

it has 8 threads though

half harness
onyx loom
#

laptop im guessing?

forest pecan
#

you need to define T tho

half harness
#

yea

#

1 sec

#

lemme get example

eternal compass
#

its a I-5, but its pretty nice for a laptop

onyx loom
#

i5 what gen?

eternal compass
#

1035G1

onyx loom
#

cool

oblique heath
#

that's pretty good

eternal compass
#

yeah

half harness
#
public <T> T getT(T obj) { return obj; }
```something like this
forest pecan
#

oh you mean in a method

#

lmao

half harness
#

yes

forest pecan
#

cause

ArrayList<?>
#

anyways, my library is getting kinda thicc

#

in size

#

which

half harness
#

mine?

onyx loom
#

generics

half harness
#

lol

#

it can also be E

#

and A

#

etc

half harness
#

yes

oblique heath
#

do you guys think it's worth it for me to wait for zen 3 laptops to come out and get one of those, or get an intel 11th gen laptop with iris xe graphics

half harness
#

afaik

forest pecan
#

you pass in some variable with some type T, and it returns the same type (and it's defined in the method header)

onyx loom
#

K, V fingerguns

half harness
#

T just stands for Type

#

just conventions

#

K, V means key and value

forest pecan
#

ArrayList<Void>

half harness
#

wot

#

mutableListOf<Unit>()

onyx loom
#

Void lol

forest pecan
#

this aint kotlin

#

lmao

half harness
#

ik

#

isn't void a "primitive"

#

sorta

#

not really

forest pecan
#

its not

#

this is literally the whole "Void" class

#
/*
 * Copyright (c) 1996, 2011, Oracle and/or its affiliates. All rights reserved.
 * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 *
 */

package java.lang;

/**
 * The {@code Void} class is an uninstantiable placeholder class to hold a
 * reference to the {@code Class} object representing the Java keyword
 * void.
 *
 * @author  unascribed
 * @since   JDK1.1
 */
public final
class Void {

    /**
     * The {@code Class} object representing the pseudo-type corresponding to
     * the keyword {@code void}.
     */
    @SuppressWarnings("unchecked")
    public static final Class<Void> TYPE = (Class<Void>) Class.getPrimitiveClass("void");

    /*
     * The Void class cannot be instantiated.
     */
    private Void() {}
}
#

lol

half harness
#

oh its a thing?

#

btw

#

can't u make an instance with reflection?

onyx loom
#

why would u

half harness
#

lol

stuck harbor
#

i just realised

#

all the pseudocode ive been writing

#

its just lua

forest pecan
#
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.List;

public class JavaTests {

  private static Void ELEMENT;

  static {
    try {
      final Constructor<Void> CONSTRUCTOR = Void.class.getDeclaredConstructor();
      ELEMENT = CONSTRUCTOR.newInstance();
    } catch (final NoSuchMethodException
        | IllegalAccessException
        | InstantiationException
        | InvocationTargetException e) {
      e.printStackTrace();
    }
  }

  public static void main(final String[] args) {
    final List<Void> voidList = new ArrayList<>();
    voidList.add(ELEMENT);
  }
}
half harness
#

rip

#

:c

#

what happens if u try?

forest pecan
#
java.lang.IllegalAccessException: Class com.github.pulsebeat02.minecraftmedialibrary.test.java.JavaTests can not access a member of class java.lang.Void with modifiers "private"
    at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:102)
    at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(AccessibleObject.java:296)
    at java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:288)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:413)
    at com.github.pulsebeat02.minecraftmedialibrary.test.java.JavaTests.<clinit>(JavaTests.java:28)
half harness
#

whaaaaaaaaaaaaaaaaaaaat

lunar cypress
#

you'd need to set it to be accessible first

half harness
#

ooooo

forest pecan
#

oh wait

half harness
#

lol

lunar cypress
#

Depending on the version this may or may not work

forest pecan
#

i forgot that

#

lol

#

oh shit

#

it works for java 8

#

lmao

#

though for higher versions

#

when they enforced encapsulation

#

i would be worried

half harness
#

java 8 ftw

forest pecan
#

it doesnt do anything

#

there arent any methods or anything lol

#

for the Void class

half harness
#

lol

#

what if u try returning it in a method

#

wdym

forest pecan
#

pretty sure it would be the same

#

for methods too

half harness
#

||im still confused||

lunar cypress
stuck harbor
#

i hate testing

#

i despise it

lunar cypress
#
jshell> unsafe.allocateInstance(Void.class)
$6 ==> java.lang.Void@3e6fa38a```
stuck harbor
#

its soooo boring

#

almost as boring as making those graph thingies

forest pecan
stuck harbor
#

ya know

#

algorythm graph thingies

#

ya know

#

imagine using discord's default layout

#

compact gang

prisma wave
stuck harbor
#

hehe

#

i do enjoy clojure type hints

#

emphasise hints

prisma wave
#

hint hint

stuck harbor
#
[JavaPlugin^ this]
``` iirc
prisma wave
#

I thought the ^ was first

#

But yeah

stuck harbor
#

maybe

#

idk

#

i havent done it in a while

prisma wave
#

Me neither

lunar cypress
#

Yes, ^ is the symbol to attach meta to an object

stuck harbor
#

ive been busy setting up macos in kvm

#

i mean

#

nothing

#

nope

#

im not using qemu

#

not at all

forest pecan
#

macos?

stuck harbor
#

we are all law abiding citizens here officer

#

i am not happy that i bought a processor with an iGPU cause i can pass it thru

#

that isnt happening

#

because i am not emulating a mac

prisma wave
quiet depot
#

what

#

i am not happy that i bought a processor with an iGPU cause i can pass it thru
that isnt happening

#

you can you can pass it thru

#

you say you're not happy about it

#

but then you say it isn't happening

#

so you are happy about it?

stuck harbor
#

i

#

uh

#

dw i'n casau pel droed achos mae'n ddiflas iawn

#

whee

#

run away

quiet depot
#

what language is that

prisma wave
#

horrible language

quiet depot
#

is that even a lang

stuck harbor
#

man

quiet depot
#

i only know one phrase from another language, japanese

#

ore wa ochinchin ga daisuki nandayo

prisma wave
#

welsh ๐Ÿคข

quiet depot
#

and it's not even in japenese chars

stuck harbor
#

sadge

onyx loom
#

weeb

old wyvern
stuck harbor
#

i bet bm agrees with me tho

quiet depot
#

@old wyvern I think that actually makes sense

old wyvern
#

wdym?

quiet depot
#

like as a response to what I wrote

#

I think it actually makes sense

old wyvern
#

oh xD

prisma wave
stuck harbor
#

what i said

#

yn gymraeg

onyx loom
#

shut it sheep shagger

stuck harbor
#

shut it

old wyvern
#

tf

quiet depot
#

yeah that's not a good translation

prisma wave
old wyvern
#

What does it actually mean?

quiet depot
#

because I really, really love pee pee

old wyvern
#

lol

onyx loom
#

๐Ÿ˜ณ

prisma wave
stuck harbor
#

no

prisma wave
#

wales contributes nothing to society

quiet depot
#

chinchin is like childish slang for penis in japanese

prisma wave
#

Apart from being inbred

stuck harbor
#

man

old wyvern
#

I see

quiet depot
#

ore wa is a masculine introduction, like a manly way of introducing yourself

stuck harbor
#

what has england contributed, hm bm?

#

hmmm?

prisma wave
#

genocide

stuck harbor
#

yes

quiet depot
#

and I believe the nandayo is what introduces the "because", but I don't actually know japanese

#

so yeah

stuck harbor
#

steve be so sweaty doe

prisma wave
#

he's no simon

stuck harbor
#

he's more than simon could ever be

old wyvern
#

ore wa piggeh pigletto, Hito ใ€…!, Watashi o osoreru

quiet depot
#

simon cowell?

#

lol yugi

stuck harbor
#

simon peyton jones u cretin

quiet depot
#

one of your chars didn't translate

prisma wave
#

Simon Peyton-Jones

old wyvern
#

xD

old wyvern
#

The pioneer

quiet depot
#

wtf

#

what does that sentence even mean

old wyvern
#

Which?

quiet depot
#

yours

old wyvern
#

"The pioneer"?

quiet depot
#

no

prisma wave
#

when you see a monad

quiet depot
#

the japanese one

old wyvern
#

oh

quiet depot
#

sorry when I described ore wa

lunar cypress
quiet depot
#

it's not like a full introduction

#

it's literally just "I"

#

in english

old wyvern
#

Probably doesnt mean anything, was trying for an anime like introduction xD

quiet depot
#

but imagine you're saying it with batman voice

old wyvern
#

ooo

#

lmao

old wyvern
#

Looks like man misplaced his kleisli arrow

prisma wave
#

Man can't get a good picture of himself

quiet depot
#

whos simon

stuck harbor
#

simon

quiet depot
#

did he create haskell

stuck harbor
#

simon is the god of monads

prisma wave
#

not exclusively

#

But he had a very big part in it

old wyvern
#

This is the best one

#

Still haunts me

prisma wave
#

๐Ÿ˜ซ ๐Ÿ˜–

#

every night

old wyvern
#

xD

old wyvern
#

Churchill College's annual Computer Science lecture.

In this talk Simon discusses Haskellโ€™s birth and evolution, including some of the research and engineering challenges he faced in design and implementation. Focusing particularly on the ideas that have turned out, in retrospect, to be most important and influential, as well as sketching some...

โ–ถ Play video
prisma wave
#

wisest man on earth

old wyvern
#

truely

quiet depot
#

fixed him

old wyvern
#

oh god

half harness
quiet depot
#

thanks dkim

prisma wave
#

thanks dkim

quiet depot
#

that play button really adds a lot

half harness
#

yes

#

the play button is magical

#

because it makes the picture move

#

you see

old wyvern
half harness
#

oh no

old wyvern
#

Wait

#

I have the perfect thing

half harness
half harness
stuck harbor
#

i bet simon runs centos

#

ffs

prisma wave
#

simon went to cambridge ๐Ÿ˜ฉ

stuck harbor
#

sadge

prisma wave
#

how

#

How could he do this to us

stuck harbor
#

shoulda gone to icl

prisma wave
#

the same uni that EVIL Alan Turing went to ๐Ÿ˜ซ

stuck harbor
#

lol

#

cambridge does have one of the oldest CS departments in the world

#

but man

#

why would u go to the south east

#

and not go to london

#

thats just dumb

old wyvern
stuck harbor
#

there is nothing else in the south east

prisma wave
#

Since when is cambridge in the south east

stuck harbor
#

uh

onyx loom
#

was thinking same

stuck harbor
#

thats

#

where it is

#

no?

prisma wave
#

it's like central east

stuck harbor
#

meh england is just north or london

prisma wave
#

It's further north than london lol

stuck harbor
#

north or london

#

those are the two england options

onyx loom
#

"south east"

stuck harbor
#

it is

#

you just cut off the entire north

quiet depot
prisma wave
#

north or london

stuck harbor
#

u nerd

onyx loom
#

south east

old wyvern
prisma wave
prisma wave
quiet depot
#

yugi

#

do that

#

but with my pic

old wyvern
#

one sec

#

xD

stuck harbor
#

cambridge is in the south east

onyx loom
#

wrong

#

pretty sure that would come under east midlands county

stuck harbor
#

south east is south of norwich and east of sheffield

prisma wave
#

Yeah

#

Maybe south east of uk

#

But definitely not south east england

stuck harbor
#

who was talking about england?

#

i wasn't

#

i said 'the south east'

onyx loom
#

ok sorry mr "i live in an irrelevant place called wales"

stuck harbor
#

shut

old wyvern
#

whales

#

whalecum

stuck harbor
quiet depot
#

aus has a place called new south wales

#

'murica has new england

old wyvern
#

holy shit

#

This has scarred

#

me

onyx loom
#

classic donald trump

forest pecan
quiet depot
#

what the actual fuck

quiet depot
forest pecan
#

XD

old wyvern
#

๐Ÿ˜‚

quiet depot
#

someone needs to make him aware of this

#

does he use twitter?

stuck harbor
#

don't

old wyvern
#

xD

stuck harbor
#

halt

#

nein

lunar cypress
#

please don't

prisma wave
stuck harbor
#

okay unglund

prisma wave
#

wails

stuck harbor
#

you have a queen

#

you nerds

prisma wave
#

you don't

#

wait yes you do

onyx loom
#

lol

stuck harbor
#

no we don't ๐Ÿ‘€

onyx loom
#

"the commonwealth"

stuck harbor
#

"communwulth"

#

england don't even have their own language

onyx loom
stuck harbor
#

stole america's language

prisma wave
stuck harbor
#

nerds

prisma wave
#

gn

stuck harbor
#

false

#

google are royalist scum

#

:))

prisma wave
#

she is still your queen

#

Whether you like it or not

stuck harbor
#

pfffft

prisma wave
#

because welsh people aren't smart enough to be independent

stuck harbor
#

๐Ÿ‘€

ocean quartz
# old wyvern

I wake up and first thing i see is this ..
I'm going back to sleep

onyx loom
#

scotland Independence tho ๐Ÿคฃ

stuck harbor
#

k lets not get into politics man

old wyvern
#

it will get you in your sleep

#

dw

prisma wave
onyx loom
#

^

stuck harbor
#

because if u get me going on welsh/scottish independance

#

im not going to stop

prisma wave
#

go on

onyx loom
#

go on

stuck harbor
#

cymru am byth

onyx loom
#

blah blah blah

#

talk english

stuck harbor
#

nag ydw

prisma wave
#

those are made up words

stuck harbor
#

welsh is older than english

prisma wave
#

speak an actual language

stuck harbor
prisma wave
#

slepqlqnif qpalqlslwq asowoysyt

stuck harbor
#

who got invaded by the romans first, hm?

onyx loom
#

are we talking iterations of english too?

stuck harbor
#

'iterations' pfft

ocean quartz
#

Why does the UK still has royalty? Didn't y'all learn from the French that you have to cut their heads off?

stuck harbor
#

bretonic

onyx loom
#

because welsh looks like a very first form of english, just jumbled up letters

stuck harbor
#

sadge

prisma wave
#

Unfortunately our royals don't starve us so we don't really have an excuse for a revolution

onyx loom
#

good

stuck harbor
#

england has no cuisine

#

have u ever had welsh cakes?

onyx loom
#

and welsh does hello?

#

๐Ÿคฃ

stuck harbor
#

we do

#

need i link some

onyx loom
#

welsh cakes wtf are them? what ur mom bakes when ur 5?

stuck harbor
onyx loom
#

hello son were gonna make some cakes today, get the flour!

stuck harbor
#

welsh cakes are like scones but better

onyx loom
#

highly debatable

prisma wave
#

they can't be better if they have welsh in the name

stuck harbor
#

welsh rarebit is awesome

#

much better than cheeese on toast

lunar cypress
onyx loom
#

good song ngl

ocean quartz
#

Tell me whyyy

stuck harbor
#

tell me whyyy

prisma wave
#

rich ๐Ÿ˜ฉ ๐Ÿ˜ฉ

#

I'd let him give me a rich hickey

onyx loom
#

๐Ÿคจ

prisma wave
#

?

stuck harbor
#

what

forest pecan
#

save us!!!

half harness
#

uh

#

serious or not serious?

onyx loom
#

disgraceful behaviour @prisma wave

forest pecan
#

click on it

#

!!!

half harness
#

๐Ÿ‘€

hot hull
#

Anyone got 5min to hop on a server and help me with something? fingerguns

#

cba to get an alt on

onyx loom
#

sir what is ur internet protocol address

hot hull
#

frosty.op65n.tech:25583

#

include the port cause yes

onyx loom
#

lol

hot hull
#

can't be asked to add this one to bungee

stuck harbor
#

bm

#

ur 502'ing

#

rip

#

tf is caprover

#

lazy bm cant even make an nginx config

old wyvern
oblique heath
#

poor wiki

prisma wave
#

1 click to host docker image

oblique heath
#

make your own docker image with your own config ๐Ÿง 

old wyvern
#

James gosling roll

stuck harbor
#

pfft bm

#

just use hestiacp

#

and make ur own docker template

winter iron
#
plugins {
    kotlin("jvm") version "1.4.31"
}

group = "me.senseiju"
version = "0.0.1"

repositories {
    mavenCentral()
}

subprojects {
    apply(plugin = "org.jetbrains.kotlin.jvm")

    dependencies {
        implementation(kotlin("stdlib-jdk8"))
    }
}

Cannot resolve external dependency org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.31 because no repositories are defined.

#

the repo is there

quiet depot
#

move repo block into subprojects block

winter iron
#

same thing :/

#
plugins {
    kotlin("jvm") version "1.4.31"
}

group = "me.senseiju"
version = "0.0.1"

subprojects {
    apply(plugin = "org.jetbrains.kotlin.jvm")

    repositories {
        mavenCentral()
    }

    dependencies {
        implementation(kotlin("stdlib-jdk8"))
    }
}
half harness
#

move it out

winter iron
#

Cannot resolve external dependency org.jetbrains.kotlin:kotlin-stdlib:1.4.31 because no repositories are defined.

half harness
#

and in

#

put it both

winter iron
#

2 blocks?

#

ok

half harness
#

yes

winter iron
#

Oh

#

why is that then

half harness
#

iirc u need the repo in both subprojects and base

winter iron
#

i guess plugins uses the outside block

#

and subprojects use inside block?

quiet depot
#

what happens if u use allprojects instead of subprojects

winter iron
#

erm

#

same thing

#

if i have it outside only

quiet depot
#

put it inside

#

with allprojects

winter iron
#

works good inside

#

๐Ÿ™‚

quiet depot
#

yeah

#

up to u then

#

allprojects or duplicate repos

winter iron
#

allprojects

quiet depot
#

good choice

winter iron
#

does it matter much except for that

quiet depot
#

no

winter iron
#

gucci

half harness
#

o my

#

thats some teacher

#

๐Ÿ˜ฌ

ocean quartz
#

You got net.minecraft.servered?

half harness
#

๐Ÿ˜‚

forest pecan
#

it got deleted

#

from the bot

#

why is your teacher so mean

#

lmao

#

and what are they teaching you abt in general

hot hull
#

If this cunt knows there's a semi colon missing why doesn't it just add it itself!

onyx loom
#

this would not be a problem in kotlin!

hot hull
#

stfu

onyx loom
#

sorry

hot hull
#

When the framework forces you not to make mistakes and be a dumbass

#

@onyx loom hop on I need more hulp

#

or Ivan if you got time

oblique heath
#

i can hop on sure

prisma wave
#

Ok

#

So

oblique heath
#

yes

prisma wave
#
        let top_index = -1
        let top_val = -1
        let cur_index = 0

        replicateM 8 $ do
            input_line <- getLine
            let mountainh = read input_line :: Int 

            let myIf top_index = if top_val < mountainh
                then cur_index
                else top_index

            let myOtherIf top_val = if top_val < mountainh
                then mountainh
                else top_val



            let cur_index = cur_index + 1
            return ()
      print top_index -- always prints -1
oblique heath
#

yis

prisma wave
#

Do you still have the original problem or has it ended

oblique heath
#

i still have it

#
At the start of each game turn, you are given the height of the 8 mountains from left to right.
By the end of the game turn, you must fire on the highest mountain by outputting its index (from 0 to 7).

Firing on a mountain will only destroy part of it, reducing its height. Your ship descends after each pass.  
hot hull
#

ooh where's that problem from

oblique heath
#

clashofcode

#

it's a practice problem

hot hull
oblique heath
#

booting up ๐Ÿ˜‚

hot hull
#

slow sm

#

smh

oblique heath
#

i'm in

#

so if i can't change the value of my int variables

#

do i need to use like a class or whatever haskell has instead

prisma wave
#

It's best to not think of them as "variables", since they can't ever change

oblique heath
#

sure

#

is this a situation for one of those fancy pants monads

#

not that i know what those are

prisma wave
#

A little bit

#

You'll need monads to get the user input

#

The issue you're having is you're thinking about the problem in the wrong way

#

I can't really put it into words so I'll just describe how I would do it

oblique heath
#

okay

prisma wave
#

Are you familiar with map and filter?

oblique heath
#

not really ๐Ÿฅฒ

#

that's a stream api right

hot hull
#

yes

oblique heath
#

i've seen it in luckperms and tried using it once or twice, but i'm definitely not confident in my understanding of it

hot hull
#

It's really simple, filter filters out items for a given condition, and map maps the items to a given thingy

old wyvern
#

map takes a wrapper value, applies a function on the value and returns the another wrapped value

hot hull
#

I said it better Yugi

#

<o/

old wyvern
#

Filter similarly, but keeps only the ones that satisfy a given condition

old wyvern
oblique heath
#

so do I have to put the entirety of the user input code inside of a stream

#

or something

old wyvern
#

Well no

#

Its not a stream

#

But rather you use getLine which returns a a generic IO value

prisma wave
#

The stream API is strongly based off of FP

old wyvern
#

You then either use bind on what or use the shorthand in a do block

oblique heath
#

FP?

#

oh functional programming

prisma wave
#

Functional programming

#

Yeah

oblique heath
#

so i have to get all of the user input as a list

#

and pass that into a map

old wyvern
#

Basically you are providing it a combined function that should be applied on the input to bring it down to your use case

#

No no

#

You dont need a list

#

Map is more generic

oblique heath
#

i guess where i'm confused right now is

#

when exactly do i ask for user input

#

relative to when i'm using map

old wyvern
#

getLine

stuck harbor
#

FFFFFFF

#

PPPPPP

oblique heath
#

like do i get all 8 values first, then pass those into map

#

or do i ask for each value within the function i call in map

#

though i guess that second one doesnt make sense

prisma wave
#

replicateM actually collects all of the values into a list for you

old wyvern
#

main = getLine >>= putStrln

#

This takes an input and prints it

oblique heath
#

ah so i'd be working with the list returned by replicateM

#

and i dont want any extra code inside of it itself

prisma wave
#

So you can do ```hs
inputList <- replicateM 8 $ do
line <- getLine
getLine :: Int

#

That should give you every input as an int

#

In a [Int]

old wyvern
#

No bm

#

You need the arrow

prisma wave
#

where?

old wyvern
#

Instead of the let binding

prisma wave
#

Oh right yeah

#

Fixed

#

I think

old wyvern
#
inputList <-  replicateM 8 (getLine :: IO Int)
prisma wave
#

Even better

old wyvern
#

This probably works

#

Emphasis on probably

#

๐Ÿ˜‚

prisma wave
#

So then you can just find the max element in the list with maximum, and then elemIndex to get the index of that maximum value

#

Easy

oblique heath
#

so with this default code

replicateM 8 $ do
input_line <- getLine
let mountainh = read input_line :: Int 
return ()

do i change the return statement to (mountainh) to get replicateM to return a list

prisma wave
#

Return isn't a statement ๐Ÿ™‚

old wyvern
#

Mhm

prisma wave
#

But yeah you can do return mountainh and it should mean replicateM gives an IO [Int]

oblique heath
#

what's the correct term

old wyvern
#

return converts the given value to an IO value

prisma wave
#

return is just a function

#

^

oblique heath
#

i see

old wyvern
#

return () is IO Unit

#

Or IO ()

prisma wave
#

It turns a normal value into a monadic value

old wyvern
#

Since () is unit

#

Oh is it is MonadIO bm?

prisma wave
#

wot

old wyvern
#

The constraint

prisma wave
#

return is part of the IO monad (or any monad) no?

#

Idk

oblique heath
#

what are the differences between IO [Int] and just an int

old wyvern
#

That onr allows for both the IO monad and Maybe I think

#

Maybe even more

#

Not sure what the constraint ensures

prisma wave
oblique heath
#

what does IO mean, and what do the square brackets mean

old wyvern
#

Square brackets = list

prisma wave
#

IO T represents a side effect that returns a T when completed

oblique heath
#

ah so [Int] is the equivalent to an int[] array in java

prisma wave
#

It's kind of like a Future

prisma wave
oblique heath
#

i see

prisma wave
#

So IO String isn't a string, it's an IO action that would give you a String when completed

oblique heath
#

right

#

is it only IO because it involves user input

#

in this case

prisma wave
#

pretty much yeah

#

Because user input obviously isn't pure, but we can make it pure with some monad magic

oblique heath
#

i guess this means i have to figure out the stream api in haskell

prisma wave
#

It's just the standard library in Haskell

#

Literally everything in FP is based around map and filter and reduce / fold

#

(well almost everything)

#

map (+ 1) [1..10] gives [2..11]

oblique heath
#

does map (+1) map (+1) [1..10] give [3..13]

#

is that the right syntax

prisma wave
#

You'll need a $ or () in between the 2 map calls but yes

oblique heath
#

ah

prisma wave
#

map (+1) $ map (+1) [1..10]

#

map (+1) (map (+1) [1..10]) or alternatively this

oblique heath
#

i see

#

the $ seems cleaner

prisma wave
#

Yeah it usually is

#

Fewer parentheses = better

stuck harbor
#

as a lisp user

prisma wave
#

lol

stuck harbor
#

i do not agree

#

very agreen't

prisma wave
#

even clojure has a similar thing

stuck harbor
#

u said fewer parens == better

#

which is false

prisma wave
#

The ->> macro is much cleaner than chaining map and filters the usual way

oblique heath
#

((((((no))))))

stuck harbor
#

(defun yes)

oblique heath
#

oo

stuck harbor
#

altho thats common lisp

#

defun

#

clojure is defn

oblique heath
#

how would ->> look for our [3..13] example

onyx loom
#

defun bceause everyone knows clojure bad and removes the fun

prisma wave
#

that's clojure lol

#

But

oblique heath
#

aw

stuck harbor
#

clojure in emacs :)))

#

emacs is written in lisp

#

emacs config is done in a lisp

#

so take that

prisma wave
#
(->> (range 1 10)
    (map #(+ 1 %))
    (map #(+ 1 %)))
``` this is the rough equivalent I think
#

but nobody sane would actually write that

stuck harbor
#

why not hm?

#

we are all sane

oblique heath
#

too many parentheses

prisma wave
#

because it could just be (range 3 12)

stuck harbor
#

not enough parentheses ngl

stuck harbor
prisma wave
#
[1..10]
    |> List.map (+1)
    |> List.map (+1)
``` just for good measure
oblique heath
#

is that F#

onyx loom
#

๐Ÿคค

stuck harbor
#

OUI

#

oops

#

caps

prisma wave
oblique heath
#

sexy

prisma wave
#

very sexy

prisma wave
#

lambdas

onyx loom
#

o

#

and the %?

prisma wave
#

basically it from kotlin

onyx loom
#

ah k

oblique heath
#

so literally "add one to it"

#

?

lunar cypress
#

In this particular case you'd use inc but yeah

prisma wave
#

yeah

prisma wave
oblique heath
#

that's actually nifty

prisma wave
#

yeah it's cute

#

currying is kinda hotter tho

oblique heath
#

i think i saw something about haskell and currying

#

what is that o.o

prisma wave
#

Partially applying a function

#

(+ 1) is currying

oblique heath
#

what makes it partial

prisma wave
#

Because you're not supplying all of the arguments to the + function

oblique heath
#

ah

#

so it just assumes the arguments that were left out

prisma wave
#

You're only supplying the first one, so you get a function as the returned value instead of a number

#

Not sure assume is the right word

#

It just returns a new function

oblique heath
#

aaah

#

so it's a function... that makes a function

prisma wave
#

Yup

oblique heath
#

interesting

prisma wave
#

The fancy term for that is a higher order function

#

And haskell does this for everything by default

#
add a b = a + b

The signature of add is Int -> Int -> Int

#

I.e, it's a function that takes an int and returns a function that takes an int and returns an int

oblique heath
#

ooo

#

so that's how you'd sort of get around only being able to have one param per function

prisma wave
#

Yeah

#

It looks like there's multiple parameters but in fact it's only 1

lunar cypress
#

it looks good enough because function application is just name arg

oblique heath
#

would haskell do this automatically for you for any function you write

lunar cypress
#

so foo bar baz => (foo bar) baz

oblique heath
#

as in you make a function that uses 10 different values

#

interesting

prisma wave
lunar cypress
#

still good practice to specify the signatures explicitly I've heard

prisma wave
#

yeah for anything that isn't very simple I think you're supposed to write the signatures

lunar cypress
#

but inference is still insane

#

it looks at the way you use your parameter and tries to find a matching type

prisma wave
#

yeah the inference is crazy

#

Although when you're new writing the signature sometimes helps you get more descriptive errors

#

Since if you messed up the function body, it might infer the parameters to something else, moving any error to the call site

old wyvern
#

Lint warns you if you dont specify type signature explicitly for top level functions

prisma wave
#

ah nice

#

?

#

hello

#

It doesn't ping you know

#

Sorry

forest pecan
#

should i have an annotation called "LegacyApi"

cinder flare
#

I think that's called "Deprecated"

oblique heath
#

^

forest pecan
#

nono

#

its a special annotation where it stores like the removal date

#

the date it should be added

#

papi has one similar

#

i think

obtuse gale
#

what?

forest pecan
#

@ApiStatus.ScheduledForRemoval(inVersion = "2.11.0")

#

Its a bit different

#

but you know

obtuse gale
#

Yeah that's jetbrains annotations

prisma wave
#

Why would you not just deprecate it

#

Then you get IDE Warnings too

forest pecan
#

Oh

#

I see

obtuse gale
#

And the deprecated annotation has a variable for "scheduled for removal" or something

forest pecan
#

it does?

#

oh

#

uh wot

#

it doesnt

#

lmao

#
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(value={CONSTRUCTOR, FIELD, LOCAL_VARIABLE, METHOD, PACKAGE, PARAMETER, TYPE})
public @interface Deprecated {
}
#

lmao

onyx loom
#

just use the ApiStatus one then

#

no point creating another annotation if one already exists in jetbrains

forest pecan
#

it says that isnt an annotation and idk why

prisma wave
#

And deprecate it too

#

Make ur own then ig

prisma wave
#

Or just deprecate + javadocs

forest pecan
#

im using java 8

#

๐Ÿฅฒ

obtuse gale
#

I have that bookmarked

#

Not the annotation

#

The Java 11 docs

#

Ah, since java 9 anyway lol

onyx loom
#

pain

forest pecan
#

is it just me or annotation for ApiStatus

#

not showing

#

lol

prisma wave
#

paper 1.17 had better hurry up

onyx loom
#

java 8 be gone

prisma wave
#

about time

hot hull
#

java 11 be gone

prisma wave
#

Shame the timing doesn't sync up with java 17 being released

#

Since that's the next LTS

#

And making plugins on java 17 would actually be amazing

obtuse gale
lunar cypress
#

I wonder what they'll put in jdk 17

#

with records instanceof pattern matching and switch expressions finally in the release, this could be a well-rounded version for once

obtuse gale
#

Valhalla ๐Ÿฅฒ

lunar cypress
#

COPIUM they will finish it

prisma wave
#

Valhalla and Loom coming in 6 months time ๐Ÿ˜ณ

onyx loom
#

dont die!

jovial warren
#

Wait what

#

Valhalla and Loom are finally coming around?

#

Fucking about time

lunar cypress
#

no

eternal compass
#

was just looking at some things about potion effects, and this person was told to google it, and called it toxic, lol

lunar cypress
#

fr though telling someone to look something up is fine if you can actually find a good and precise explanation for it, but "go test it" is just so stupid

#

I don't want to test and try to reverse engineer every spigot method with bad documentation

eternal compass
#

well asking what opaque means is stupid

#

you can google that

#

its not got anything to do with even spigot

ocean quartz
#

Check some of StackOverflow's replies, they'll eat you alive

eternal compass
#

my stackoverflow account was disabled for like 30d because I asked a "bad" question or something, even though I would spend about 30 minutes researching before asking

lunar cypress
lunar cypress
#

try it and see is justified if you already have something and you're asking if it will work

#

it's not a very efficient research method if you have a lot of different things

eternal compass
#

if you have a lot of things, then you need to test a lot of things..
its pretty darn easy to test it with opaque and with non-opaque particles or whatever it may be

lunar cypress
#

you are still more likely to get better insight from others because there is a lot you can miss or do wrong when you just try and guess what it does.