#dev-general
1 messages ยท Page 263 of 1
@prisma wave
d;spigot Damgeable#setMaxHealth
There was no direct match for that query, did you mean any of the following?: damageable#getmaxhealth() damageable#resetmaxhealth() damageable#gethealth() damageable#setmaxhealth(health) damageable#setmaxhealth(double)
join clash
d;spigot Damgeable#setMaxHealth(health)
There was no direct match for that query, did you mean any of the following?: damageable#setmaxhealth(health) damageable#sethealth(health) damageable#getmaxhealth() damageable#resetmaxhealth() damageable#setmaxhealth(double)
ok
Gonna start, you'll join next one
do I just use evil !!
You'll have to manually add a resistance or protection
test 4 seems to be failing me
For me, this is easy asf
Yeah
oh damn
lets see how much I've got
oh
not much
wait what's this?
all divisors of the number?
Yeah, could be
Ok
i left
ok almost got it but ain't got it xD
They're still on it 
bruh I was doing something completelly different
Everyone did lmao
Lol
That is fucking disgusting Yugi
damn was so close
let res a
| a == 1 = "1"
| (n `mod` a) == 0 = (res (a - 1)) ++ " " ++ (show a)
| otherwise = (res (a - 1))
is that
๐
Scanner in = new Scanner(System.in);
int n = in.nextInt();
List<String> list = new ArrayList<>();
for (int i = 1; i <= n; i++) {
if (n % i == 0) {
list.add(String.valueOf(i));
}
}
System.out.println(String.join(" ", list));```
I cheese the system ._.
The magnificent
Why list thien, ew
I have no choice ๐
It can pattern match the arguments or validate expressions afaik
mhm pretty cool
Could've just used a string and then trimmed that additional space
Not catchy-looking for me
Ok but why not use streams
@prisma wave
Streams were the better choice
Anyway, I already figured out how to do the test in the first 3 minutes, but stuggling with the " " separate part
omg
I'm so dumb
I've just realised why mine wasn't working
I made it go to n/2 and didn't add n myself
lmaoo
i can join next one
Oh god oh no
I never got to Fast mode before 
lmaoo Frosty
ffs Blitz
Fuck you
I was using kotlin at the start, but switched to java at the middle
The fuck is this BLitz :ew:
HashMap<String, Int>()
shh
mutableMapOf()
it works right?
first I got scared like what the fuck is this? took me like 30 seconds to understand what it wanted lmao
excuses.
ugh its just calculate the sum from all cities that have the substring in their name
It said me to expect 9 from input 3, that's my main source of not understanding ._.
Well, let me fix my brain for a while first 
Welp, electricity's back now
Guess I have to wait for another clash then
Someone's just shorting the circuit causing the breaker to pop
you got 33 seconds xD
import System.IO
import Control.Monad
main :: IO ()
data Place = String Int
main = do
hSetBuffering stdout NoBuffering
input_line <- getLine
let n = read input_line :: Int
let places = []
replicateM n $ do
input_line <- getLine
let input = words input_line
let city = input!!0
let population = read (input!!1) :: Int
places = (Place city population) : places
return ()
search <- getLine
let value (Place _ i) = i
let searchFor [] _ = ""
let searchFor _ [] = ""
let searchFor query (x : xs)
| matches query x = value x
| otherwise = searchFor query xs
let matches (a : as) (Place str i)
putStrLn "total"
return ()
```peace
idk anymore
i think i could've done it in a minute
xD
jesus christ
That's too much, jesus
The deity language lives
Monads โบ๏ธ
xD
probably smallest you can get it in java
No thank you 
๐
that was actually surprisingly easy
scam
The true language
smallest ones are usually simple
All praise the haskell!!!
xD
Blitz you should use kotlins readLine instead for shortest
There still so much you could've compacted there Blitz
on mine
haskell is actually readable unlike yours ๐
No need for scanner
99% of the time it's smaller to do it functionally
docdex is getting added to spigot \o/
o
readLine()!!.split(" ").map {
it.sumBy(Character::getNumericValue)
}.reduce(Int::times)
ew
The server?
yea
but more compact than blitz's
nice
I ended up the most stupid code ever...
Oooo
wdym
lol
oof
tbh I'm not really sure of any other way to phrase that sentence dkim
.
apart from appending the word "discord" to the end
Come on, I can't think at that time lol
At first, I made only 115 codes in total
And then at last minute, I realized I am multiplying 0
@hot hull @regal gale
on coc?
nice
This is why I love reversed ._.
yep we can start
bm what browser do yuou use
chrome
okie
Shall I start?
ye
oh god
hm
hmm
hmmm
biggest fucking hmmmmmmmmm
this seems sus
oh wait
lmaoo
they gave us the answer
in the code
well at least in kotlin
oh
well not answer
lol
but the explanation
ain't going to solve this one lmao
i'm confused
my code is right
the algorithm is right
it's printing the wrong value
Therefore your code is wrong
worst code ever
but seems to work
nvm
20%
fuck yea
it did pass all 4 tests tho
so that's nice xD
can someone send a screenshot of the last examples? thanks
No
ah I see
damn
welp was close enough
that's why you should always read the instructions
damn and it was such an easy fix
just check the absolute values instead of the values
idfk
Frosty
first value is the sum of 2 numbers
second is the difference of the same numbers
find the numbers
but you gotta be careful at how you're printing them as well
because that's what I failed at
I am stuck at 20% too now
oh piggy's way is smart
This is what I am stuck
share code thien
Things reversed back at each random test
click the button
I think I am missing the minus somehow
๐ญ
very close
Output was messign with me
Welp... i realized the error..i forgot the minus
๐ฅฒ
^
Isn't there a button to look?
you have to click the share button for others to look
You need to share it
yea found that out but haskell kept giving a non exhaustive pattern matching error so welp
Oh
I am just new to coc
scary haskell
xD
clash of clans ๐ฎ
clash of clash of...
Lmao
wow the game looks so different
I am on
it's clash of clans i promise
@static zealot
Improvement
please don't kill me
shall we start
Yes
ok
uh oh
oh god
it will him cost.
what language r uguys using
F#
kotlin
Haskell

Failure
Process has timed out. This may mean that your solution is not optimized enough to handle some cases.
๐ฅฒ
welp math's hard
bm lol, I didnt think of that
yea I just iterated backwards
ye I know but I need to round
xD
and I don't know what needs to be rounded
you need to ceil technically
ye but doesn't work on all
it does
why?
if you + 1
The value is always a multiple of 2
is it?
By the question, yes
oh damn I had to +1 not -1
output is 3
welp I know math lmao
oh? wait
oh yea that's squares
it's log + ceil
are you sure?
ye
Can someone send ss of question?
yeah
There was once a king in India who was a big chess enthusiast and had the habit of challenging wise visitors to a game of chess. One day a traveler was challenged by the king. The traveler used to play this game all his life and had a lot of experience. To convince his opponent, the king offered the traveler anything he could name. The traveler modestly asked just for a few grains of rice in the following manner: The king was to put a single grain of rice on the first chess square and double it on every consequent one. The king agreed to the deal and did not think about what he just did.
Having lost the game and being a man of his word the king ordered a bag of rice to be brought to the chessboard. He started placing rice grains according to the deal: 1 grain on the first square, 2 on the second, 4 on the third, 8 on the fourth, and so on until he realized what huge amount of rice it will him cost.
Your are now given a number N, which says how many grains of rice you want. Print out the minimum number of squares F, starting with the first square, that would be needed to get the number of N rice grains.
Information: Due to the maximum byte size of numbers in some languages, the input values won't exceed eight bytes (default long value).
including examples frost
Input 7 output 3
hmm
you need to +1 i think
me?
oh
idfk
actually afk for 5 mins
Start without me, I'll catch up
Alrighty
famous last words
๐ฅฒ
inviteee
We had this one yesterday 
i might have copied the rev from stackoverflow
pretty sure it could just be ```fs
let rev str = Seq.rev str |> String.concat ""
yeye that's hideous
@onyx loom nuke plz
but that's just cuz i was lazy
ok
fuck this
did you just insert the reverse into the middle?
that's what i did at first
it has to be like intertwined
orig[n] + reverse[n]...
hello people of the helpchat discord server
didn't pick up on that
"Kaliber" has joined "clash of code"
brilliant
yeah, i only knew it because we had it yesterday
where it described the problem lol
because it was fastest
why no one else joining ๐
sad
oh hey frosty!
very sad
cant wait to get 0%
oh no
oh no indeed
bruh i dont even know how many days most months have
30.41666..
I stg there's a util to do this
are you just checking divisible by 4?
Lmao when y'all see my solution
leap years arent that simple
i specifically added t hat y % 4 != 0 just to make sure it couldnt fail it, but it still does
SPOILER!
||YearMonth.of(y,m).lengthOfMonth()||
import: ||java.time.YearMonth||
wat
o
bruh
java std?
You have std's yes
d;jdk YearMonth
This object is too big to be viewed in discord, please refer to it's javadoc page: https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/time/YearMonth.html
o
ยฏ_(ใ)_/ยฏ
_if(m == 2,_if(y%4==0 and (y%100~=0 or y%400==0),29,28), _if(m<7,_if(m%2==0,30,31),_if(m%2==0,31,30)))```
Ah yes
hideous
๐

why do u check 100 and 400
yo..
hax
๐
kek
i totally didnt copy
i passed all except for 1, so ill take the W with me calculating it myself
I had to make a ternary
Could've atleast cleaned the imports..
๐ฅฒ
yea i just used the website frosty, so didnt know which were unused so i cba
oof
same kali
4 character difference
it shows you which are unused tho
o
god damn it
There's nothing to compact here is there?
import java.util.*import java.time.YearMonth
fun main(args:Array<String>){
val input=Scanner(System.`in`)
val m=input.nextInt()
val y=input.nextInt()
println(YearMonth.of(y,m).lengthOfMonth())}
i love the way he calculated it himself and still managed to get less chars than u ๐คฃ
args
INPUT
input to i
oh fuck
No
I didn't see that
Scanner
readLine instead of scanner
args is useless
I don't use kotlin for coc
that will also help
#Elara for coc
open System
let readInt = Console.In.ReadLine >> int
let m = readInt()
let y = readInt()
let isLeapYear year = year % 4 = 0 && year % 100 <> 0 || year % 400 = 0
let allDays = [31; 28; 31; 30; 31; 30; 31; 31; 30; 31; 30; 31]
printfn "%d" (if isLeapYear y && m = 2 then
29
else
allDays.[m - 1])
here is uncompressed code
i think it's quite nice
because there are exceptions to the % 4 rule
^
๐
god sake
๐ฅฒ
why it gotta be so hard
calendars dumb
I mean there's also a way to use a Calendar to do it
Kaliber join
more chars tho 
no i gotta do work now
Last one for me
i have 1 hour to finish it and i havent started 
what's that?
good question
Start Yugi
i dont even know
oh no
bruh idk
hmm I thought it is if 1 letter appears in one but not in the other. but doesn't see m to be that lmao
lets try this
lmao
i doubt it's right
i did this for a python course
๐
its just checking if its an anagram
So declaring variables is like let type T but parameters are T type?
Yeah, kind of
oo matt makes a good point there
typed variables are like let var: Int = 3
frosty just check if its an anagram
which is a bit inconsistent, but i cant think of a better way ๐ฅฒ
But still the parameters seem to be the opposite of how variables are, which is kinda odd
well typically you don't use typed variables
there are very few situations where you'd need them
send a new one
I did suggest doing it like java does, so ```rust
let typeInference = 3
Int specific = 4
but
So on parameters it'd be (var: Int) as well?
im not sure that looks any better
no
parameters are Type name
most things are Type name
apart from variables (at the moment)
๐ฅฒ
ik, it's messy, but suggest a better way
join the coc @hot hull @static zealot
๐ฆ
Hmm okok
Well i think I'd be just better to be consistent, since that's how vars are declared it'd make sense for parameters to be too, or even just invert them if the : is an issue
yeah im not exactly happy about this arrangement
different orders look good in different places imo
I think Type name looks good for structs
but not so much for vars
struct Person {
String name
Int age
}```
๐ฅฒ
Well
struct Person {
name String
agr Int
}
Doesn't look bad either
(what language did you use for the color?)
prob rust
True
lol idk why it isnt working
๐ฅฒ
I skipped like 2 matches already lol
Freaking short circuit again
Anyway, I still love coc's reverse more than the other two
very pog
how'd u come up with the name elara
its a moon
I just looked up moon names and took one that sounded pretty
Is an intersection type an adt?
and it hasn't been used
Maybe
I'm not qualified to answer that question
ur very qualified
in everything
๐ณ
see?
That was quick!
BM what is linking Named and Aged to person? the fact that it has a name and an age?
Yes
The point is that a Person is also a Named, and an Aged
Even without an explicit link
Because it's contract based
ah nice
o ๐ฆ
sad pepe squidward face
that's a fucking lie
there are some in there I never even used
first line
second one:
I've never used reload. well not in the past 2 months lmao
u use a lot of emojis
the TCPShield one I've never used either lmao.
ugh I don't
the US flag. don't remember using it lmao
lol

๐ฅฒ
also observe the fact that I don't have nitro. if anyone is feeling kind I always accept donations lmao
um
Im using it in java
How would I use RGB colours in Java?
depends where you wanna use them
at the end of this
this.drawHollowRect(pos.getAbsoluteX(), pos.getAbsoluteY(), renderer.getWidth(), renderer.getHeight(), );```
0x08FFFFFF sounds like a memory address to me
true lol
It's a colour
idk
ah yeah
or rather the last byte
private fun registerCommandCompletion(ch: CompletionHandler) {
ch.register("#crateId", CompletionResolver {
return@CompletionResolver cratesMap.keys.toList()
})
}
this not working
or smth
cool
Well what should I do?
fun onCommand(sender: CommandSender, @Completion("#players") targetName: String,
@Completion("#crateId") crateId: String, @Optional amount: Int?) {
not completing ๐ฆ
wat is dat
MF
set the graphics colour, then drawRect
I don't really want to use this.drawHollowRect(pos.getAbsoluteX(), pos.getAbsoluteY(), renderer.getWidth(), renderer.getHeight(), 0x88FFFFFF; memory address
shows # in both places on the wiki
have you registered it ?
what
yes and what is your question
What about it
lol
also drawHollowRect is not in awt
bm have u registered completions before in kotlin?
i have no experience in making skins
try this kt private fun registerCommandCompletion(ch: CompletionHandler) { ch.register("#crateId") { cratesMap.keys.toList() } }
WHAT did I say
ok
WHAT did I SAY
@forest pecan
Sup Pulse
I smell fat cap on a wack stack
ive never used mfcmd before lol
Pulse why r u gay
it shouldnt make a difference tho
anyway
now seems like a good time to @ocean quartz
u be like java
I mean did you call the function?
why did you even make a function for all that?
i did
init {
loadCrates()
registerCommands(plugin.commandManager)
registerEvents()
}
override fun registerCommands(cm: CommandManager) {
registerCommandCompletion(cm.completionHandler)
cm.register(CratesGiveCommand(plugin, this))
cm.register(CombineCratesCommand(plugin, this))
}
private fun registerCommandCompletion(ch: CompletionHandler) {
ch.register("#crateId") { cratesMap.keys.toList() }
}
why not
:]
i might be having more completions
im gonna change the commands to self register too ๐
less maintainability
heh
i guess my completion is not gonna get complete
just make ur own os
with linux you can 
@forest pecan fuck you
It'll crash your discord
Just make your own kernal
It just stops playing on mobile 
my pc crashed
yea i kinda wanna watch it on windows
see what happens
Do it
ur whole pc?
i canโt rn
it only crashed discord for me
lol bad pc
ez
If your pc is a potato, then mine would probably explode
lol
Im not sure if the completion is working at all on MF
i just changed to #empty
and it stills completes for players
seems to be that when u add completions for first parameter its fine
but any parameter after doesnt work ๐ฆ
JS ๐คก
that just crashed Discord at like 6 seconds in haha
yeah lol
oh also, talking about Discord, an easter egg seems to have just been removed in the latest update today
on startup, you now here the "Discordo" sound that you used to hear from violently clicking the home button (the one in the top left), and violently clicking said home button doesn't seem to play the sound any more
or is that just me
Still does it for me on latest update
oh yeah i still have it too
why
im on windows 10 and it works
i just updated my discord like an hour ago too
ever since I did it and updated, I don't seem to have it any more, I just hear it on startup
lol
lmao u can hear the disconnect sound aswell
it plays on startup as well?
Doesnt for me, weird
Just updated and it did
Let me try again
what home button 
uhh doesnt seem to play on start up
the one on top left
spam click it
WOAH
Oh that
Oh wait
Yugi was faster
Oops
L
@obtuse gale https://vm.tiktok.com/ZMJcNcrHR/
tiktok ๐คฎ
oh
well frosty does
lol
does tiktok have any copyright rules?
๐
Np 
incognito mode
Talking keywords to your phone is supposed to also trigger ads, idk if that's true, and if it is, idk how tf that's allowed
Messenger went to complete shit due to new privacy rules, you can't even send pictures properly anymore lmao
whatsapp now sends ur data too 
We just switched to discord
Poor fucking snowman. https://youtu.be/c8_4PdGTgdg
#schrodinger #coldwar #takedown #bocw #cod #irl
develpment general
yes
unbelievable
very important development general for life
#shrodinger
Absolutely, you can clearly see the two different quantum states the snowman is in
efe make this in mc, I might use it for my snowman game
Kill the snowman
Wrong recording but that
Wait sec
Better cut
It would yea, I just cba
No lmao
Although death animations on a fucking snowman
That'd be godly
Anyhow, extend on this tyvm https://github.com/Frcsty/SnowmanBrawl
ProjectKorra is a thing already lol
ngl that plugin is dope
Every heard of LibsDisguise?
For real
Kek
doesn't LibsDisguise just hide the player and spawn a mob
or smth
thats what it looks like
Uses packets but yeah p much
any way to hide the mob from the player being disguised?
Yeah just don't send the packet 
Key word: advanced
;-;
You need to know at least the 6 levels of Java
nope
silence intensifies...
ExampleWasTaken
3 months ago
Okay...first you start of with a version, support ended for years ago. Secondly, you are using deprecated methods because you don't known the news ones anymore? As a developer who calls this series "advanced" I expect you to know what that means. In case you don't, I'll explain it for you: "deprecated" means the only reason it's in there is, for backwards compatibility. And yet, it will be taken out at some point.The topic of this series might advanced but the rest is crap (excuse my language, but it's almost rude to label something like this "advanced"!)!
oof
my point is
I can't find any tutorial on protocollib
first you start of with a version, support ended for years ago.
Hahahahahaha

1.8 plebs
Yesterday you said you only had 1.8 in your dependencies lol
1.8 spigot is bad
im making it for someone else
nothing i can do about it
ik
only pvpers who don't dev all day play 1.8
wdym?
1.8 ๐
1.8 minigames > 1.16 minigames
1.8 smp < 1.16 smp
1.8 dev < 1.16 dev
it depends
on what you're doing
It doesn't
๐ whatever I don't know what I can say to you guys anymore about this..
it's personal preference
I enjoy 1.8 pvp
you enjoy 1.16 pvp
You refuse to evolve
I don't enjoy 1.16 pvp, I enjoy bazookas and miniguns
You'll be a pikachu forever
okay
I enjoy 1.8 pvp
you don't enjoy pvp
bazooka irl
what is a bazooka
o 3 pings ๐ฅฒ
Not what I asked tho efe..
I'm saying make the stone barrier thingy kek
Because I'm gonna need it for an ability in the plugin
It's not, I just cba
And it has to be an animation lol
Same
Is this the place for "tech talk", or would off-topic be better?
Welcome to my tech talk