#dev-general

1 messages Β· Page 224 of 1

surreal quarry
#

lol

prisma wave
#

better

steel heart
#

Interfaces in kotlin btw?

prisma wave
#

what about them?

steel heart
#

Are they advantageous as in java ?

prisma wave
#

um

steel heart
#

Everything is in fields anyways

prisma wave
#

strange question lol

#

but yes

#

arguably better

steel heart
#

Oo

#

Why

prisma wave
#

support fields as well as methods

#
interface Blah {
  val x: Int
}```
steel heart
#

YO

#

it’s like implementable classes

prisma wave
#

well yeah lol

steel heart
#

Why

#

Do

#

Some one

#

Fukin

#

return null

#

When it’s an Optional

prisma wave
#

lol

prisma wave
#

ooo x2 multi

#

lemme just

#

Firstly, it's a compiler hack. The Java compiler isn't intended to be used like that and so it can cause compiliation errors, or worse:
I was working with a project using Lombok recently and method references for a lombok generated method were causing some pretty difficult to debug runtime errors.

Secondly, it requires an IDE plugin. You have to properly configure your build tools and IDE to avoid hundreds of errors, and installing an IDE plugin + setting up annotation processing takes time, especially if you're inexperienced.

Generated code also doesn't show up in Javadocs, so unless users have source code available it's going to look like nothing is accessible

If Lombok's code generation does something unintended, it can be difficult to debug, and usually requires you to remove the annotations and do a certain impl manually anyway. However, once you get used to this it's very discouraging to do, so it's easy to rewrite an entire class just to make it work with Lombok

There's also an extra degree of complexity with Lombok. Java is supposed to be explicit, and transparent. If you don't notice an annotation at the top of a class, it's easy to wonder where a method is coming from, or why a field is never initialized.

It also can be harder to work with. Again recently, IntelliJ couldn't find usages of a constructor, because as far as it was concerned, there was no constructor - Lombok generated it - meaning I had to find every usage of the class and search for a constructor which wasted a lot of time.

A final, slightly petty point: Lombok'ed bytecode doesn't match the source code (obviously), but it means a pretty annoying IJ warning (look at BungeeCord source for example)

Lombok may seem good in the short term, but it comes with a heavy price. Favour IDE generated boilerplate, or consider using a language like Groovy or Kotlin if you really dislike boilerplate.

#

:))

obtuse gale
#

Firstly, it's a compiler hack. The Java compiler isn't intended to be used like that and so it can cause compiliation errors, or worse:
I was working with a project using Lombok recently and method references for a lombok generated method were causing some pretty difficult to debug runtime errors.

Secondly, it requires an IDE plugin. You have to properly configure your build tools and IDE to avoid hundreds of errors, and installing an IDE plugin + setting up annotation processing takes time, especially if you're inexperienced.

Generated code also doesn't show up in Javadocs, so unless users have source code available it's going to look like nothing is accessible

If Lombok's code generation does something unintended, it can be difficult to debug, and usually requires you to remove the annotations and do a certain impl manually anyway. However, once you get used to this it's very discouraging to do, so it's easy to rewrite an entire class just to make it work with Lombok

There's also an extra degree of complexity with Lombok. Java is supposed to be explicit, and transparent. If you don't notice an annotation at the top of a class, it's easy to wonder where a method is coming from, or why a field is never initialized.

It also can be harder to work with. Again recently, IntelliJ couldn't find usages of a constructor, because as far as it was concerned, there was no constructor - Lombok generated it - meaning I had to find every usage of the class and search for a constructor which wasted a lot of time.

A final, slightly petty point: Lombok'ed bytecode doesn't match the source code (obviously), but it means a pretty annoying IJ warning (look at BungeeCord source for example)

Lombok may seem good in the short term, but it comes with a heavy price. Favour IDE generated boilerplate, or consider using a language like Groovy or Kotlin if you really dislike boilerplate.
ye lombok is a hacky whacky janky solution to a non-existing problem

steel heart
#

Firstly, it's a compiler hack. The Java compiler isn't intended to be used like that and so it can cause compiliation errors, or worse:
I was working with a project using Lombok recently and method references for a lombok generated method were causing some pretty difficult to debug runtime errors.

Secondly, it requires an IDE plugin. You have to properly configure your build tools and IDE to avoid hundreds of errors, and installing an IDE plugin + setting up annotation processing takes time, especially if you're inexperienced.

Generated code also doesn't show up in Javadocs, so unless users have source code available it's going to look like nothing is accessible

If Lombok's code generation does something unintended, it can be difficult to debug, and usually requires you to remove the annotations and do a certain impl manually anyway. However, once you get used to this it's very discouraging to do, so it's easy to rewrite an entire class just to make it work with Lombok

There's also an extra degree of complexity with Lombok. Java is supposed to be explicit, and transparent. If you don't notice an annotation at the top of a class, it's easy to wonder where a method is coming from, or why a field is never initialized.

It also can be harder to work with. Again recently, IntelliJ couldn't find usages of a constructor, because as far as it was concerned, there was no constructor - Lombok generated it - meaning I had to find every usage of the class and search for a constructor which wasted a lot of time.

A final, slightly petty point: Lombok'ed bytecode doesn't match the source code (obviously), but it means a pretty annoying IJ warning (look at BungeeCord source for example)

Lombok may seem good in the short term, but it comes with a heavy price. Favour IDE generated boilerplate, or consider using a language like Groovy or Kotlin if you really dislike boilerplate.

prisma wave
#

smh

#

clearly this is faq worthy

frigid badge
#

why do you guys not use the reply feature

#

smh

onyx loom
#

eggspee

ocean quartz
#

Doesn't work like that though

onyx loom
steel heart
#

Oo ur pfp is a fish not a head

frigid badge
#

yea

ocean quartz
#

It's a Stunfisk

obtuse gale
#

each time I look at that picture I see something different

frigid badge
#

magic

runic flume
#

Since when is Sxtanna gone

#

@Sxtanna

prisma wave
#

for like

#

4 months now

#

maybe more

runic flume
#

oh lol

#

Why

prisma wave
#

i'm not sure i am allowed to say

ocean quartz
prisma wave
#

some unkind things were said

runic flume
#

he's dev at invaded

prisma wave
#

o

#

wow

runic flume
#

And thats not easy

#

xD

runic flume
ocean quartz
#

He did say he was applying to some servers actually

frigid badge
prisma wave
#

didn't say that to me πŸ˜”

#

i bet he's making some nice money though

frigid badge
#

eh

light venture
#

mhm

frigid badge
#

not as much as just a normal job

prisma wave
#

no

frigid badge
#

irl*

prisma wave
#

but still nice

#

big servers usually pay pretty well

prisma wave
#

Joe Biden has announced that Sxtanna will be on his cabinet as Minecraft Secretary

#

This is the future the left want.

ocean quartz
#

He left us for sleepy Joe!

prisma wave
#

So rude πŸ₯Ί

#

What does a Minecraft Secretary even do

ocean quartz
#

Watches over the christian servers

prisma wave
#

of course

static zealot
#

how does discord's @here work? Does it ping everyone that is online?

lunar cypress
#

yes

#

that is exactly what it does

static zealot
#

why does it ping if I'm invisible

#

😦

#

oh

#

shit

lunar cypress
#

because discord doesn't care about your status, probably just if you're connected or not

static zealot
#

ye they should add a check for that but whatever. ty for answering

onyx loom
#

eh it makes sense for u to be pinged when ur invisible

#

because ur still technically online

ocean quartz
#

I mean it makes sense to ping offline too, the point of pinging is to let people know about something, even offline

static zealot
#

ye but that's why @Everyone exists

#

wasn't there a way to block those pings per server tho?

#

oh there is. I never saw it til now xD

onyx loom
#

here to ping online people. everyone to ping everyone and offline people

daring cedar
#

anyone wanan work on a project with me

steel heart
#

What project?

static zealot
steel heart
lunar cypress
#

The project to finish all projects

static zealot
#

its called The What Project

#

How may I help you Fefo?

#

seems like your keyboard is broken? xD

obtuse gale
static zealot
#

ok and?

mental trench
#

haha

obtuse gale
#

is cool ig

mental trench
#

🀭

#

thats a really old version, weird

north spoke
#

any of yall can lnik ur spigot acounts?

obtuse gale
#

how i fix this error:

#

has been compiled by a more recent version of the Java Runtime (class file version 58.0), this version of the Java Runtime only recognizes class file versions up to 55.0

regal gale
#

Lower the compile level when building a .jar

prisma wave
normal talon
#

Bm got the nitro I see xd

prisma wave
#

All thanks to Mr conclure fingerguns

lunar cypress
#

finally team fortress guy is able to speak

prisma wave
#

finally

#

because I never said anything before

hot hull
#

Indeed you have not

lunar cypress
#

I meant the guy in your pfp πŸ˜”

prisma wave
#

oh of course

#

yes

#

He's been reanimated

hot hull
#

Oh that's what u meant

onyx loom
#

sexy

prisma wave
#

Kotlin Multiplatform Mobile or Flutter?

old wyvern
#

Flutter?

#

possibly

#

havent had to use either yet

prisma wave
#

Flutter seems to be "full stack" whereas kotlin is just logic

old wyvern
#

mhm

prisma wave
#

Me neither but I wanna try one

old wyvern
#

Flutter is a lib, and kotlin would in general be a language

#

not sure how to compare them

old wyvern
prisma wave
#

Although

#

If it was a game, I guess UI wouldn't be needed as much

#

But yeah I think I'll try flutter

#

Dart is ridiculously easy as far as I know

#

No gimmicks, just statically typed JavaScript with a few other things

steel heart
#

Wait typescript is both dynamically and statically typed

hot hull
#

typescript is typed fingerguns

normal talon
#

:keching:

#

:sp:

main sundial
#

Ahhhhh

#

!level

hot hull
#

How bout no.

main sundial
#

Ok

ocean quartz
old wyvern
#

nah

prisma wave
#

Pff... Easy... Ever heard of the enhanced for loop? Java 5 is great!

forest pecan
#

he also recommended the hardcover 😭

distant sun
#

the price would also make me cry

onyx loom
#

oof

lunar cypress
#

the meme needs more jpeg

obtuse gale
#

say no more

onyx loom
#

JPEG

prisma wave
#

add a kangarko watermark and it'll be perfect

warm nest
hot hull
#

jesus fuck

static zealot
#

this is a lot of text

warm nest
#

there

ocean quartz
#

Hmm LobbySwitcherGUI.this., .this, what, why, how?

static zealot
#

yes Matt yes. xD

steel heart
ocean quartz
#

How does that even work?

static zealot
#

indeed

#

it even works

ocean quartz
#

Btw not throwing shade at your code, this is a legit question

old wyvern
#

maybe hes inside a anonymous class

#

oh god

#

what is that

hot hull
#

but that's static tho Yugi?

old wyvern
#

no frost

obtuse gale
#

it isn't

hot hull
#

wut

static zealot
old wyvern
#

You have to use <ClassName>.this to access the outer instance inside anonymous classes and inner classes

obtuse gale
#

simply this will refer to the anonymous class' instance

hot hull
#

Ah, ew anyhow

warm nest
#

Guys... it's not my codee. I paid for a plugin and the dev then fucked off with issue. So I'm not trying to fix it; with little to no java knowledge.

ocean quartz
#

Wait, is this decompiled code?

warm nest
#

yeah.

#

He was suppose to send the source but πŸ€·β€β™‚οΈ

ocean quartz
#

That would explain a lot of things there
You probably won't get far with decompiled code, a lot of things will be messed up

warm nest
#

It works, to an extent. As I said, it's not displaying the correct number of items in the GUI. Suppose to be 6 but it's showing 5

hot hull
#

Just add another item fingerguns

warm nest
#

Ha, They suppose to be added dynamically, so as servers start, it alters it. Hence the loop

heady birch
prisma wave
#

I agree

#

var OVERRATED we should ALL use let

#

VueRs

#

what if javasCRIPT had let

ocean quartz
#

Hmm, question, what sounds better:
Having permissions for specific things like:
plugin.format.legacy.bold, plugin.format.markdown.bold
Or just lumping them together plugin.format.bold?

heady birch
#

Use the one that best suits your requirements πŸ™‚

ocean quartz
#

I mean there is no requirements, just asking a question based on what the users would prefer

hot hull
#

Specific, but have a parent permissiom which groups the entire thing

prisma wave
#

As someone who is not a user, I prefer the first

ocean quartz
#

Insert another useless comment here

#

Gotcha, specific it is

hot hull
#

Mine was useful

ocean quartz
#

Was referring to Niall

hot hull
#

A parent perm would be nice if possible Matt

heady birch
#

Well I mean- A and B both have the same effect? I'd just do C

hot hull
#

Someone bonk this man

prisma wave
#

You might want to only allow markdown for PROFESSIONAL users

heady birch
#

True. the PROFESSIONAL users would probably like that extra permission control

#

I love this capitalisation of KEY POINTS to express your view.

prisma wave
#

makes you look DISTINGUISHED and like a real PROFESSIONAL

#

Maybe even PRESIDENTIAL

ocean quartz
#

Was thinking maybe like:

plugin.chat
           .legacy
                  .format                  
                         .bold
                         .italic
                         .strikethrough
                         .underline
                         .magic
                  .color
#

Was trying to format this xD

heady birch
#

But I mean, is there any difference between LEGACY bold and another bold? They both achieve the same thing right? I could see maybe if it was standard colours/hex

ocean quartz
#

Difference is **bold** vs &lbold

remote goblet
ocean quartz
#

Hell yeah

hoary lake
#

so this has me a bit confused and i was wondering if anyone knew why this is the case, basically

if (event.getModifiedType() == PotionEffectType.SLOW){
  System.out.println("player would get slow");
} else {
  System.out.println("effect isnt " + PotionEffectType.SLOW + ", its " + event.getModifiedType().toString());
}

I have this code that follows after an EntityPotionEffectEvent, where I compare the changed potion effect type to a PotionEffectType enum value. I was always under the impression that enums should be compared using ==, not .equals()
Turns out, if I try to compare the two using == the output when getting a slow is "effect isnt PotionEffectType[2, SLOW], its PotionEffectType[2, SLOW]", so the two enums aren't the same. But if I use .equals() the expected output "player would get slow" shows up. How does this work?

prisma wave
#

PotionEffectType is not an enum

#

basically

ocean quartz
#

It's an abstract class

hoary lake
#

oh allright

prisma wave
#

clash of code?

hot hull
#

On mobile

#

It's 11pm for u right @prisma wave ?

prisma wave
#

nah not that late

#

9pm

hot hull
#

Oh yea you're 1hour behind smh

#

Goddamn timezones

onyx loom
#

11pm what u smoking

light venture
#

10:27 pm what you smoking

steel heart
#

23 pm

#

U guys are nerds

light venture
#

agreed

static zealot
#

00:29 you guys are high

#

also if its 23 pm what is 23 am?

#

do you use a 48 hours / day format?

remote goblet
ocean quartz
#

Likely the entity doesn't exist at the time you are trying to spectate it

remote goblet
#

that sounds like it

steel heart
lavish notch
#

OLD

steel heart
#

No

forest pecan
#

=paste

compact perchBOT
#
HelpChat Paste

Please use a paste service to share configs, errors, code and long logs.
β€’ HelpChat Paste

forest pecan
#

connect 4

#

whats wrong with it

remote goblet
#

Everything

#

give up coding

#

that is an issue

#

im joking but genuinely delete it

lunar cypress
#

oh my lord

regal gale
#

A lot of issues just to make a 6x7 connect-4 thonking

lunar cypress
#

that doesn't work, mind you

forest pecan
#

it works trust me

#

now im going to do the same

#

but with chess

#

or even better

#

roblox

#

fornite

#

a[s[ag[ag

lunar cypress
#

please do chess

#

make a boolean for every possible position

forest pecan
#

yes

#

im going to write them all down

lunar cypress
#

I think if every particle in the observable universe were a byte of storage you couldn't store that

forest pecan
#

its possible

onyx loom
#

everythings possible if u try hard enough

forest pecan
#

yes

#

or you can believe

#

people need to start believing

lunar cypress
#

doubt that

forest pecan
#

@ocean quartz your gui framework is ebic

#

but it doesnt compare to my connect 4

ocean quartz
#

It tries to, but unfortunately can't

forest pecan
#

yep

remote goblet
#

Pulse your connect for makes me wanna commit toaster bath

forest pecan
#

its cause my connect 4 too skillful

#

too good

obtuse gale
#

Hello, can help me ?
how to set knockback for a damage ?

hot hull
#

Apply a velocity to the damaged entity

obtuse gale
#

can give me example code ? i test it and not worked

hot hull
#

Show me what you did

obtuse gale
#

@hot hull Ok

#

pls wait for opening idea

#

@hot hull

#
    @EventHandler
    public void onHit(EntityDamageByEntityEvent e) {
        Player target = (Player) e.getEntity();
        Player damager = (Player) e.getDamager();
        target.setVelocity(damager.getLocation().getDirection().normalize());

    }
hot hull
#

You're setting the same velocity, multiply it by like 2

obtuse gale
#
        target.setVelocity(damager.getLocation().getDirection().normalize().multiply(2));
#

its work ^^^ ?

hot hull
#

Well have you tried it?

obtuse gale
#

and not working

obtuse gale
#

@hot hull Wroked

#

Thx

prisma wave
#

lol

prisma wave
#

I'm at school

hot hull
#

Weak

prisma wave
#

bruh I was literally in a class of 2 people I couldn't exactly whip out a laptop

hot hull
#

Weak I tell you

obtuse gale
#

ill play if you can find some more people and you want an easy win

prisma wave
#

I can play now

regal gale
#

I'm having a really hard time getting this JArduino working on my board

frigid badge
#

why JArduino

#

just do it plain arduino

regal gale
#

I was trying if I can hook Minecraft into it

static zealot
#

how the hell would I make a 2d map in kotlin? xD

frigid badge
#

a map in a map

#

why do you need a 2d map

static zealot
#

bcz I'm dumb and can't find another solution to this problem

frigid badge
#

what's the problem

static zealot
#

I just got 1 minute to solve it so its fine

frigid badge
#

oh it's a coc

static zealot
#

yep

#

just joined a random one

#

its over tho

prisma wave
#

Table

#

But that's from guava

hot hull
#

Big coc

#

😏

obtuse gale
#

wow frosty

#

I didn't knew you were into those kind of things πŸ˜‰ 😘

hot hull
#

oh

#

Anyone COC?

obtuse gale
#

0h frosty πŸ₯°

static zealot
#

yes

#

Frosty send link

#

to video chat website

hot hull
#

Fefo, I'm taken, otherwise I'd be down 😏

#

Blitz, gimme a bit, PC is a slow war machine today

static zealot
#

restart? xD

#

my brain is to fried for reverse mode

hot hull
#

Just submit

#

@old wyvern, @distant sun, @prisma wave, @obtuse gale

#

@ocean quartz 😏

static zealot
#

@onyx loom

onyx loom
#

sure

#

1min

static zealot
#

you got 2:50

hot hull
#

Anyone else?

#

@obtuse gale

obtuse gale
#

can't 😦

static zealot
#

@surreal quarry

obtuse gale
#

would love to

distant sun
#

Sleeping

hot hull
#

ooh this gon be fun

onyx loom
#

oh god

static zealot
#

almost done I think xD

#

nvm

#

I fucked up

#

wait a second

#

I fucked up

#

bad

#

oh nvm

#

fuck mee

#

I added 2 instead of 4

static zealot
#

kali u ok?

onyx loom
#

it was so easy

#

but my brain peepoSad

#

havent coded in long time

#

yeah math cba

static zealot
#

you need to print the number that is in the middle right?

hot hull
#

The middle value out of the three numbers yes

onyx loom
#

no?

static zealot
#

ye frosty this is all you

#

yes Kaliber

hot hull
#

Yes Kali..

onyx loom
#

one of the tests was 3 1 2

static zealot
#

yes and it printed 2

hot hull
#

And you need 2 yes

#

The middle value

onyx loom
#

say mean pls

prisma wave
#

clash of code on the bus?

#

What could go wrong

distant sun
prisma wave
#

kotlin

static zealot
#

what's that?

prisma wave
#

Mobile syntax highlighting

static zealot
#

oh

onyx loom
#

πŸ™‚

static zealot
#

they made it different for kotlin?

#

or is it same for java and kotlin

#

but just on phone?

distant sun
#
const test = require("something");```
```java
String test = new String("str)";```
#

:((

surreal quarry
#

i’ll join in a sec if you’re still playing

onyx loom
#

new String pauseChamp

distant sun
#
var test: String = "test";```
#

o

prisma wave
#

hot

onyx loom
#

var

#

: String

#

;

distant sun
#

Foff

onyx loom
#

πŸ₯²

hot hull
#

It seems to be broken

#

It was printing out a random 7 on Test 5

#

So :kek

regal gale
#

What lib should I use? Firmata or JArduino?

static zealot
#

brb

surreal quarry
#

are you saying your method looks better

hot hull
#

hell nah

surreal quarry
#

println(message.replace("[^A-Za-z]".toRegex(), "").length)

class Solution {

    private static final String ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

    public static void main(String args[]) {
        Scanner in = new Scanner(System.in);
        String message = in.nextLine().replace(" ", "");

        for (char c : message.toCharArray()) {
            if (!ALPHABET.contains(String.valueOf(c).toUpperCase())) {
                message = message.replace(String.valueOf(c), "");
            }
        }

        System.out.println(message.length());
    }
}``` lol
hot hull
#

It's not about code cleanness, it's about sp33d

surreal quarry
#

this was reverse mode no?

hot hull
#

Yea, still speed

surreal quarry
#

i mean you still came in first but

remote goblet
#

yes

hot hull
#

I don't worry about clean code here

remote goblet
#

I got bored

surreal quarry
#

i just woke up and was being stupid. i was trying to invoke length as a method for a while there

prisma wave
#

clash of clojure

hot hull
#

Whos this WickyPlays?

onyx loom
#

clash of clans

#

clash royale

prisma wave
#

invite me immediately

hot hull
#

My PC lags so the mouse is twitchy so I accidentally opened IJ :c

prisma wave
#

Hi. Despite my previous request I'm not seeing an invite to any "clash of code" games. Please do so immediately.
Thanks!

surreal quarry
#

i think you can join it started

#

but idk

prisma wave
#

75% what

onyx loom
#

oh right weve started

surreal quarry
#

gotta play all those test cases BM

static zealot
#

oh

#

this is math

onyx loom
#

yes

static zealot
#

not meth

onyx loom
#

its fully a miracle how i passed maths

static zealot
#

thought you guys were advertising meth

#

k I need to go now

onyx loom
#

im so bad at it

prisma wave
#

n(n + 1) / 2

static zealot
#

I know

#

oh wait

#

isn't it -1?

#

xD

#

fuck

#

that makes sense

hot hull
#

My brain hurts

#

mAtH

surreal quarry
#

i didn't even think about a formula

#

i just used a for loop

#

blitz lmao

hot hull
#

I had something that sort of worked, but deleted it, then gave up

onyx loom
#

if this is maths again im leaving

#

cba with that shit

surreal quarry
#

BM playing?

static zealot
#

ok what the fuck?

surreal quarry
#

yo its that game

#

its called like foobar or something

static zealot
#

oh

hot hull
#

uh what

ocean quartz
#

Modes: Fastest, Reverse

static zealot
#

wait

#

what?

ocean quartz
#

Why no shortest?

static zealot
#

wait

#

I seee

#

what's happening

surreal quarry
#

fizzbuzz right?

onyx loom
#

fuzz bee or smth @surreal quarry ?

surreal quarry
#

yea

onyx loom
#

yes

hot hull
#

Shortest sucks matt

onyx loom
#

i cant remember what to do tho kek

ocean quartz
#

Shortest are the best ones

surreal quarry
#

mult of 5 is foo, mult of 7 is bar, 5 and 7 is foobar

onyx loom
#

ye ty

static zealot
#

didn't even test

#

lets see

#

0%

#

awsome

surreal quarry
#

gg

static zealot
#

I understood the question but

#

didn't get the answer right

#

and I ain't got time to test it xd

hot hull
#

That's pretty easy

static zealot
#

I still don't get what I got wrong

#

ohh

#

wait

hot hull
#

else if

#

Is what you should've used

static zealot
#

nvm

hot hull
#

Since it'll trigger multiple times 4head

static zealot
#

why?

#

well I don't rly care

hot hull
#

Oh ew why the hell did you make it like this

static zealot
#

bcz they don't need optimization or anything like that

#

but whatever

#

someone try this and tell me why it's not working

#
    val N = input.nextInt()
    for (i in 1..N) {
        if (i%5==0 && i%7==0) println("FooBar")
        if (i%5==0 && i%7!=0) println("Foo")
        if (i%5!=0 && i%7==0) println("Bar")
        if (i%5!= && i%7!=0) println(i)
    }```
hot hull
#
    val N = input.nextInt()
    for (i in 1..N) {
        if (i % 5 == 0 && i % 7 == 0) println("FooBar")
        else if (i % 5 == 0) println("Foo")
        else if (i % 7 == 0) println("Bar")
        else println(i)
    }
#

This would've worked

static zealot
#

its the same fucking shit.

hot hull
#

Look at this geek

if (i % 35 == 0) {

surreal quarry
#

lmfao

hot hull
#

@onyx loom u good?

static zealot
#

I was just in a hurry

#

xD

onyx loom
#

testing now

prisma wave
#

foobar!!

surreal quarry
#

fizzbuzz!!

onyx loom
#

fizzbuzz!!!

surreal quarry
#

lol

onyx loom
#

can u not have 2 conditions in a when?

static zealot
#

pfff

#

fuck this shit

onyx loom
#

like x == 0 || x == 1 -> blah

static zealot
#

and fuck you frosty

ocean quartz
#

Add shortest and i'll join

static zealot
#

why my code isn't running

#

...

onyx loom
#

πŸ₯²

static zealot
#

forgot to add a 0

hot hull
#

lol

static zealot
#

I would've been first

#

so you can all think you're first

hot hull
#

That's why you should properly space shit

static zealot
#

but in reality I am

hot hull
#

you idiot

onyx loom
#

lol

surreal quarry
#

thats why you should run all test cases

prisma wave
#

Maybe not

onyx loom
#

hm

static zealot
#

wait we started

#

fuck

onyx loom
#

i was struggling with trying to do FooBar, but then i just yoinked james solution of i % 35 == 0 xd

ocean quartz
onyx loom
#

u sure?

ocean quartz
#

Yup

onyx loom
#

i did i % 5 == 0 && i % 7 == 0 and it wasnt doing anything

hot hull
#

Kali stop slacking

onyx loom
#

SHUSH

hot hull
#

James share code

static zealot
#

playing test cases

#

and failed

#

nvm

#

all working seems like

#

what is that code Jaimss?

surreal quarry
#

wdym

hot hull
#

<= 2 ?

static zealot
#

oh wait

#

nvm

#

I didn't understand the question fully I guess

earnest horizon
#

@kindred hatch

#

I sent you a friend request, I'm willing to work with you! :D

surreal quarry
#

yea blitz it was even/odd

static zealot
#

ah ok

onyx loom
#

aaaaahhhhh

#

my brain

static zealot
#

I mean

onyx loom
#

i suck at these character things

static zealot
#

my thing still works 75% of the time

#

which is better than 0

#

sooo...

hot hull
#

These are the best ones Kali

surreal quarry
#

75% of the time it works 100% of the time tbh

hot hull
#

The Mountain Tops counting was so far the best one

surreal quarry
#

i dont think i was here for that one

static zealot
#

ye I just quit that one as well

onyx loom
#

75%

hot hull
#

Waiting on Kali

#

smh

surreal quarry
#

slow

onyx loom
#

im slow, cut me some slack 😭

surreal quarry
#

here now tho

#

start

static zealot
#

there was a formula for this

#

fuck

onyx loom
#

WHAT 0%

#

i got one of the tests right

#

thats all i wanted 🌝

#

i cba with math

static zealot
#

I forgot the formula fuck

onyx loom
#

its probably factorial or smth

#

idk

static zealot
#

wait

#

wait

#

no

onyx loom
#

actually no

static zealot
#

I remember now

#

it was the one I confused

#

before

#

when bm

#

gave it

#

here

#

omg

#

frosty

hot hull
#

Goddamn it BLITZ

static zealot
#

1 second

#

jesus

#

println((n*(n-1))/2)

#

this was the entire code

onyx loom
#

not if ur java

hot hull
#

I was doing all the tests ;C

static zealot
#

xD

onyx loom
#

System.out

static zealot
#

I did them all as well

#

and I didn't even remember the formula at first

hot hull
#

Same

surreal quarry
#

what is that formula even for

static zealot
#

complete graphs

#

I learnt c++ in highschool

#

and we did graphs

hot hull
#

Join 4head

static zealot
#

thought I pressed join

#

xD

prisma wave
#

(1..n).sum()

#

(reduce + (range 1 n))

hot hull
#

Test 2??

onyx loom
#

yea idk

#

oh wait

hot hull
#

How does one truncate a number?

onyx loom
#

i got it i think

static zealot
#

test1 isn't working for me

onyx loom
#

println(answer.toString().substringBefore('.')) i just did that lmao

static zealot
#

well non that are female

prisma wave
#

@hot hull round to int

static zealot
#

I just get UNKNOWN

hot hull
#

Well it's 96 but it has to be 100

onyx loom
#

oh right yea ur smart bm

surreal quarry
#

Lmfao i tried to cheat it and it didn't work

hot hull
#

Cheater.

static zealot
#

why the hell

#

why the hell does it not work when its F

surreal quarry
#

i thought the 4 test cases were all that you needed

static zealot
#

if (G.equals('F'))

hot hull
#

Nah James

static zealot
#

I have this

#

but it just jumps over it

surreal quarry
#

that was my last one ill be back for more later tho

static zealot
#

I'm so confused rn

hot hull
#

ignoreCase Blitz?

static zealot
#

nah

#

ibcz

#

I outputed W

#

G*

#

and its F

#

wait nvm

#

it doesn't work for M either

hot hull
#

You do realize you have to printout the opposite weight right?

static zealot
#

yes

#

it doesn't even go inside the if tho

#

only one out of 3

#

work

hot hull
#

Cause it's a string

#

Not a char

#

Change it to ""

static zealot
#

A single letter : 'F' for Female, 'M' for Male

#

fuck me

#

why did they use ''

#

nvm

onyx loom
#

input.next returns a String tho

hot hull
#

It makes sense?

onyx loom
#

so

#

yea

hot hull
#

Y'all finished?

onyx loom
#

G.startsWith('F') fingerguns

static zealot
#

no

onyx loom
#

still stuck on 2

#

what did u put frostY?

hot hull
#

You need to round to hundreds

onyx loom
#

fuck it idc

hot hull
#

But I don't know how to do that

static zealot
#

test 2 is broken

hot hull
#

It's not

#

Read the rules weeb

onyx loom
#

if (!G.equalsIgnoreCase("F") &&! G.equalsIgnoreCase("M")) {
System.out.println("UNKNOWN");
return;
}
this is necessary?

prisma wave
#

speedrun time

onyx loom
#

oh nvm i didnt see the print

hot hull
#

smh

onyx loom
#

🀫

#

using else if in kotlin

#

nice blitz fingerguns

hot hull
#

I guess you could cheat the system using ```java
(int) (number / 100) * 100

#

Which would round it to 100

#

but oh well

static zealot
#

I just gave up

static zealot
#

BM didn't finsih tho

hot hull
#

We'll wait for him

onyx loom
#

@surreal quarry ?

prisma wave
#

clojure

#
(defn -main [& args]
  (let [G (read-line)
        W (Integer/parseInt (read-line))]

    (if (= G "M")
        (output (int (/ W 1.2)))
        (if (= G "F")
            (output (int (* 1.2 W)))
            (output "UNKNOWN")))))
``` arrow code ![clojuremoon](https://cdn.discordapp.com/emojis/745067282450874481.webp?size=128 "clojuremoon")
onyx loom
#

lisp be like

prisma wave
#

if m
output int (w / 1.2)
if f
output int (w * 1.2)
else output unknown

#

ez

#

what

#

what

#

wh at

onyx loom
#

i saw the inputs and im out

#

fuck that

hot hull
#

lol

prisma wave
#

NEVER MIND

hot hull
#

Y'all hella dumb it's easy

static zealot
#

it is

onyx loom
#

nope dont care

#

not doing that

static zealot
#

thanks frosty

#

for letting me win

#

yo what you doing @hot hull you said its ez?

hot hull
#

I typed 4 instead of 3 and was confused what's wrong..

static zealot
#

xD

onyx loom
prisma wave
#

bruh it won't tell me what line the error is on

#

smh

hot hull
#

Clojure

prisma wave
#

yes

hot hull
#

idk why I said Conclure

#

smh

prisma wave
#

at Solution.main(Unknown Source)
😐

hot hull
#

Can you fuck off with the emojis

onyx loom
hot hull
#

Die

onyx loom
static zealot
#

I have to Kaliber 😦

#

they told me to

#

they'll kill me if I don't

static zealot
#

I'm playing some cs:go now

hot hull
#

Come on last one

static zealot
#

nah

onyx loom
#

https://twitter.com/discord/status/1332006887148183553 if only i could be best friends with myself 😭

what’s better than 1 nitro? 2 nitros.

when you subscribe to $9.99/month nitro starting today through 11/30, you’ll be given an extra month of nitro to gift to a friend.

(you can't gift it to yourself, even if you're your own best friend)

Likes

514

static zealot
#

wow ... ok

prisma wave
#

lol

hot hull
#

Kali

onyx loom
#

ig ur a fat neek bm

hot hull
#

smh

onyx loom
#

oh weve started

#

oops

hot hull
#

We've finished you mean

onyx loom
#

why is it just u lol

hot hull
#

Cause noone wanna play

onyx loom
#

i cba

#

i couldve done it but dont wanna waste 10 mins fingerguns

prisma wave
#

finally

#

clojure is no longer my best friend

onyx loom
#

congrats

#

uve finally figured it out

hot hull
#

Wdym 10min

onyx loom
#

well yea, im slow πŸ™‚

hot hull
#

It's a contains check, split and a replace space with nothing

prisma wave
#

bruh i would've got it within 2 minutes if dynamic typing wasn't a thing

#

used split-at instead of split πŸ₯²

hot hull
#

Noob

prisma wave
#

another

hot hull
#

Another what

prisma wave
#

clash

hot hull
#

Not on pc

prisma wave
#

why not

hot hull
#

Cause icba

old wyvern
#

Still clashin?

prisma wave
#

not anymore but wanna do one?

#

actually i think i have food soon

#

later

grave pine
#

How hard would it be to make a Q&A bot? And what would be the cost.

prisma wave
#

And probably fairly simple

lavish notch
#

How do format a double (java) with commas? (obviously becomes a string)

213156765.2347696124 => 213,156,765.2347696124 
static zealot
#

well first you cast it to a string, then you split it from .

#

well what I would do then is I'd transform it into a charArray and then I'd go from the end to the start

#

and just have a result where I'd just add the first 3 numbers then I'd add a comma and so on

ocean quartz
static zealot
#

oh look a better solution

#

who would've thought xD

ocean quartz
#

StackOverflow is a bless

static zealot
#

ye

#

I was reading some posts as well

#

to find a better solution

#

just didn't search using the right keywords I guess

hot hull
#

Matt you're a bless 😏

ocean quartz
onyx loom
#

uwu

lavish notch
#

@ocean quartz didn't ask for rounding smh

ocean quartz
#

I mean you don't have to round, it just shows an example on how to format the numbers to have the comma

#

Take solutions according to your problems, not according to the person that asked the question

prisma wave
#
(.format (new DecimalFormat "#,###") amount)
``` πŸ™‚
onyx loom
#

NO

#

actually

#

thats quite nice

prisma wave
#

ikr

lunar cypress
#

lol

prisma wave
#

this is what pragmatic code looks like

lunar cypress
#

ew, pragmatism

#

you've been continuing on your path with clojure a little bm?

prisma wave
#

mostly in clash

#

still haven't found anything to actually do with it

#

but yeah

#

starting to get used to it

lunar cypress
prisma wave
#

interesting

lunar cypress
#

I've wanted to implement some type of tcp/udp server since forever

prisma wave
#

so it's like antlr for binary?

#

yeah networking stuff is really cool

lunar cypress
#

but I hate manually writing packet format encoding/decoding

#

I want something where I can just plug some spec in and it does the job

lunar cypress
#

I want to go a different path with my implementation (mainly because source (text) code generation is pretty pointless with clojure and because it only generates parsers)

#

I'll keep the struct language though, it's pretty good and so far the only one I've seen that actually supports rather complex specs

prisma wave
#

yeah code gen seems redundant

#

So this would be serializers too?

lunar cypress
#

that's the plan, I haven't thought it all out yet though, so there may be some dead ends in kaitai that prevent me from doing it

prisma wave
#

Potentially

#

sounds cool though

#

and could be very useful

lunar cypress
#

yes

prisma wave
#

Currently my only issue with clojure is how vague the errors are

lunar cypress
#

that is indeed very annoying

prisma wave
#

i was debugging in a clash game for like 10 minutes only to realise i'd passed function args the wrong way around

lunar cypress
#

yeah, errors in clojure are not helpful at all

prisma wave
#

yeah, I guess it'll get easier with experience

obtuse gale
#

no

#

I am amazing

prisma wave
#

I disagree

obtuse gale
#

I disagree with you disagreeing

distant sun
#

wtf dude

tranquil crane
#

My soul is in pain from reading that

tranquil crane
#

IntelliJ has frozen 3 times in the past 15 minutes and I'm losing my mind

ocean quartz
#

Omg mine has been freezing all the time

tranquil crane
#

It's freezing specifically when I try to import something from nms packages

ocean quartz
#

For me it tends to freeze when updating indexes, and it does that way too often

obtuse gale
#

for me its just when typing in kotlins string concatenation things

#

like when im typing in here

#

"${lags hwne i type in hjere}"

ocean quartz
#

Also Kotlin code completion has been so slow, ever since 1.4

tranquil crane
#

froze again simply selecting a variable

hot hull
#

Nicole, I feel you

prisma wave
#

IJ also lags like hell when doing anything with Material

obtuse gale
#

is java/kotlin a practical language to have like running on a small computer just to control some smart home things based off another element, or is something like python better for that

quiet depot
#

kotlin native should be fine

#

wouldn't use the jvm though

#

python is generally the preferred language for shit like this afaik

obtuse gale
#

yeah thats what ive heard

#

is it just for performance reasons and speed and stuff or?

quiet depot
#

yes

obtuse gale
#

and is python worth learning

quiet depot
#

yes

#

if you've got the ram, feel free to use the jvm

obtuse gale
#

well i probs wont so

quiet depot
#

what small computer is it?

obtuse gale
#

idk yet lol

quiet depot
#

budget?

obtuse gale
#

not high

#

any reccomendations?

quiet depot
#

I need a number lol

hot hull
#

Rob a bank

quiet depot
#

"not high" is not useful at all

obtuse gale
#

whats the price range around these things lol

quiet depot
#

$100 - $300

#

aud

obtuse gale
#

probs like 150 or smthn

quiet depot
#

oh wtf

#

these pi's are way cheaper now

#

they used to be expensive af

obtuse gale
#

o

floral basin
#

Yeah

obtuse gale
#

what r we looking at

quiet depot
floral basin
#

Pi’s are cheap af

obtuse gale
#

o

quiet depot
#

yeah they're not as cheap as in uk drew

#

but cheaper than they used to be

#

a model 3 b would set you back $100 aud

floral basin
#

I can get the same one for about 60usd

quiet depot
#

wait drew you're british right?

obtuse gale
#

hm

floral basin
#

Nah I’m from Texas lmao

quiet depot
#

or am I thinking of someone else

prisma wave
#

as far as I know kotlin/native relies on c interop a lot, so unless you know at least basic C I'm not sure it's a good idea

quiet depot
#

sorry, my bad

floral basin
#

All good

prisma wave
floral basin
#

Prob

quiet depot
#

idk who harry is

obtuse gale
#

yeah so is my best option getting something that can run java or learning python?

quiet depot
#

I was thinking of the retrohost guy

prisma wave
#

Β―\_(ツ)_/Β―

floral basin
#

I am the retro host guy πŸ‘€

obtuse gale
#

learning pythons probably a better longterm solution but its harder lol

quiet depot
#

and I swear you were british

#

oh well

prisma wave
#

Python is incredibly easy

floral basin
#

Nah

#

Me and Patrick both live in Houston

obtuse gale
#

is it?

prisma wave
#

Yes

#

It's designed to be easy

obtuse gale
#

looks ugly to me lol

floral basin
#

I quit retro host though, decided it wasn’t for me and I wanted to make money by actually working for it

prisma wave
#

And given you have prior programming knowledge, it's even easier

quiet depot
#

ah

#

aj don't go straight to the pi tho

#

what sort of system were you planning on making?

obtuse gale
#

thats what im tryna work out rn

quiet depot
#

chances are you can achieve whatever you want with arduinos

obtuse gale
#

yeah true

quiet depot
#

should probs check amazon for a pi

#

if you go that route

prisma wave
#

Consider using rust

quiet depot
#

go could also be a good choice

#

or if you're feeling adventurous, v

prisma wave
#

vouch for Go

heady birch
#

Java runs fine on raspberry pi. Not sure about a full fledged IDE.

prisma wave
#

memory though

#

Need something lightweight

obtuse gale
#

feel like ive definitely asked this before but

quiet depot
#

the pi I linked was 8gb

#

more than enough memory

distant sun
obtuse gale
#
class A{
  @OneToMany
  val things:MutableList<B>
}

class B{
  @ManyToOne
  val a:A
}

class C(private val bRepo:BRepo){
  fun AHHH(b:B){
     bRepo.delete(b)
     // What happens to the A`s that contained this b in their lists?

  }
}
quiet depot
#

why is kotlin so ugly

obtuse gale
#

i just typed that in discord its probably got some problems with it lol

#

the annotations might be the wrong way round as well

distant sun
#

Have you ever seen py, pig?

quiet depot
#

yes but python isn't necessarily ugly

#

it's just stupid

distant sun
#

??

obtuse gale
#

I dont like the :

distant sun
#

Using yaml idendtation instead of curly brackets doesnt bother you at all?

quiet depot
#

no

distant sun
#

._.

prisma wave
prisma wave
hot hull
#

Oh I didn't know IJ auto detects what folder to put shit in depending on the group id

#

That's cool

prisma wave
#

lol

distant sun
#

@kindred hatch another site?

kindred hatch
hot hull
#

Fellas what's a good cache expiry time

#

5min, 10min, 15min?

obtuse gale
#

5 seconds

old wyvern
#

Uh how often do you think requests for the same obj be made?

hot hull
#

Unless the user is a 4head only once

old wyvern
#

ah then 5 should be fine

#

minutes ofc

hot hull
#

yeye minutes

obtuse gale
hot hull
#

yikes

obtuse gale
#

shes still goin

#

Im beginning to think theres a problem

#

what in the world

#

wth are you trying to build

#

something in android studio

#

time to invalidate caches/restart i guess???

hot hull
#

yes

obtuse gale
#

didnt work lol

#

halp

hot hull
#

Throw the plugin out

#

Wait what

#

My brain

#

That's not what I was gonna type..

obtuse gale
#

what plogin...

hot hull
#

That's not what I was gonna type..

#

I was gonna say throw the PC out

#

But my brain

onyx loom
#

do it anyway

obtuse gale
#

what should i actually do tho lol

frigid badge
#

cancel it

#

restart your pc

obtuse gale
#

rly?

hot hull
#

Yes