#dev-general
1 messages ยท Page 267 of 1
Fuck was running out of time, couldn't delete all the spaces i had
why does it say clashing when I'm clearly not
you're always clashing
Ctrl f " " ""
i'll be back for more coc soon
Kinky
Matt
Yeah?
val input = Scanner(System.`in`)
val inputer = input.nextLine().split(" ").map { it.toInt() }``` == ``` val i = readLine()?.split(" ")?.map {it.toInt()}```
Fuck was running out of time, couldn't delete all the spaces i had
oh
ok
didn't see that
my bad
well I mean I didn't have time to finish at all xD
I misread the question tbh
I had it finished, then was reducing the characters when i noticed i also had to do median
So took a while
o
o
that's cool
look ^ xD
when did that become a thing?
oh yesterday. cool
o
@half harness @old wyvern joining?
yes
oh nice barry
was it package the task for maven to build a jar?
my computer slow
i would join but im downloading battlefront 2
yes Gaby
its free yeet
whats the difference between gradle build and gradle publish hm?
aparently I only have to download 17% to be able to play
ah I see
xD
so guess we're starting?
@pallid gale when you get online. Barry is deleting the COC message a bit to fast. Make it maybe 1 more minute? if you can of course. thanks
Ofc it's reverse..
lmao
I mean
this is too easy
???
oh nvm
thought from the first one that its 6 hours to 3600 seconds
but its not that lmao
wait you're laying
?
liar
there was already sout
how did you get 100% ?
i just did everything in sout
what's sout?
what?
and i had to remove the string already inside it
i removed the stuff already in the system.out.println and added 7 letters/numbers/symbols
ok but what do they have in common ? xD
I hate reverses
show code blitz
Matt its just n*n*100
or n^2*100 would work as well
๐ฅณ ๐ฉ
Boring
Math.pow(n,2)
Pow pow
pew pew
Tbh i only like shortest
reverse
ye I got no idea
wait
how the fuck is that even possible on localhost
good point
more like 12 actually
Ip whitelist maybe? or Secured network or something like that
ugh k do it then
lmao Matt
Ah, i see
@oblique heath ;-;
;-;
That's why i hate reverse, it's not always just numbers like math stuff, it's weird combinations
My solution made sense for the first 2
reverse is better than fastest tho imo
is it finished?
Waiting on ivan
link
no
Shortest > fastest > literally anything else > reverse
oof
one more if anyone wants to join
after that you'll have to make them for yourself xD
๐
ill just go watch yt
start
start
Yay
i dont have nitrotho D;
to transform binary to decimal?
ok i give up
ugh
I want Binary to int
fuck I'm a bit lost
had to do something else
wait what we got to do?
How bad is to throw an exception just to stop the code there and send the exception message to a player ??
I found a plugin that does that and I want to change it -.-
160 has been the smallest i can think of
๐
readLine Matt
Python
๐ฅฒ
Forgot about that yeah
welp gl boys. got to go do something else
bye ๐ฎ
another one?
I mean we can just give up
well me
at least
because Python is just going to win
lmao 84
ok ill stop using python
@ocean quartz If you do any work on chat, mind just testing the reply stuff for me <3
yeeee
Why did I read that as yeet Ivan
i think our tactics combined could get even an even lower count
don't yeet me ๐ฆ
its not really needed xD
ye I know
Quick question fellas
Anyone ever played with making custom uis using maps?
If so, what's the limitations on clicks, if you can even detect it
How would one properly interact with it tho?
i dont think you can click on the map at all, you probably can only detect if a click has happened
If you keep 1 itemframe per button, that might work
oh i thought he meant like holding in his hand
There's gotta be a hacky way of getting the mouse position
actually.... just spitballing,
you can summon an item frame relative to the player's perspective
and see where they click in the air
Yea and have the cursor
You could kind of with yaw and pitch
You do some sort of raycast to find the exact collision point
you wouldnt even need to raycast
Such good ideas
as long as the position of the item frame was constant relative to the player
So close, 95 chars
Has noone seriously done this before?
it seems like a lot of effort
LivingEntity#rayTraceBlocks or World#rayTrace both return a RayTraceResult which you can get the exact Location from
Well yea, hella worth it tho
true
it'd be pretty cool to have an interactive menu hovering by your side in-game
Fellas, I know what we're gonna do tommorrow
Me*
Sure thing
ye no idea what I did
If it didn't ask for the length i would have done it with 84 char as well
But had to do an empty readline
Expect a showcase in a week or so
Can we restart?
xD
Im sick of shortest
just play yugi
no idea how to convert decimal to binary eaither
why do I suck so much
Integer.toBinaryString iirc
Are you using kotlin?
ye
toString(2) should work on numbers
matt if you want to shave off 2 characters next time use print xd
True
I should really spend a few days learning methods because I know very few and I just hope IIJ would recommend them lmao. well when I press TAB I just go thru them and hope they do what it sounds like they do
you could have beat me ๐ฌ
starting in ~20 seconds
fun main()=println(readLine()!!.toInt().toString(2).sumBy{it-'0'})
How? ;o
to didnt need the to char array
how to add comment line to config.yml file
#this is a comment
and the final to int could have been reduced
or that
its time for revenge?
Oooh interesting
:)
ye got it
lmao
my brain just told me nah you're stupid its not that
so I was like realy?
xd
xD
ffs
xD
k this is broken
i need help
There is no time to wait! Ask your question @obtuse gale!
when I turn on my microwave wifi craps out
some guy was already past the goal
the total distance was 6000 and they were at like 6200
oho
fine
xD
time to be speedy
@static zealot join
Had one public question that wanted us to do a some path finding xD
like im p sure everyone quit

H
stort
OMG
OMG?
He's part of Yatopia lmao
The argument guy, that efe sent
ah
Also i like how his argument for Kotlin being worse than Java is literally "i suck at making things work"
We have been SILENCED
I didn't even say anything-
harsh
well besides for ๐ฅฒ
1 warning before a ban
Yikes
As Kenny said
Yatopia, "The combined power of Paper forks for maximum instability and unmaintainablity!" - Messy, tossed salad of people that haven't even really understood the patch system.
xD
whoops
Classic LuckPerms dev-api support
> help IllegalStateException: The LuckPerms API is not loaded.
> are you shading the luckperms api into your plugin?
> No
> implementation 'net.luckperms:api:5.2'
Classic
People seemed to hate that on tuinity discord
And on paper
xD
why cant i react
๐ฆ
bad
They legit had the entire nms in their github repo before
Wtf does modules have anything to do with github?
i think crazycrates might be different versions for each module but i forget
yeah it definitely is
had to add particle support to every version in a $10 commission ๐ฅฒ
๐
he wants like versioned modules
Revision 1
5 out of 8 repositories i have in the org have modules lmao
There's usually only 1
whered u find that?
Ivan huh....
yes, run buildtools
Yatopia is a big mess that ivan and that guy did
Like i said they had the entire nms there
Ready to get a dmca takedown
lmao
Yeah
xD
Who thought that was a good idea?
People on paper were yelling at them lmao
Last time I saw him here, he switched out a few immutable collections with sets in papi somewhere saying its a memory leak
๐ฅฒ
?????????????
I'm sorry what
Check voice chat logs, might be there
I mean the text channel
not sure if they merged tho
he did pr them
@old wyvern does return do nothing if it's not the last expression?
Also, will elara have something similar to list.forEach {}?
Does anyone still remember poker night at the inventory?
If you can, please make continue work on it xD
That might be weird to add since forEach would just be a std lib function
and the argument is just a function
What could maybe be done is adding inline functions that can do control flow?
I guess
So you could essentially have something like continue()
An example i saw for kotlin was continue@forEach which, would be interesting where it was only allowed on certain functions
Yeah, continue@forEach doesn't work, but i wish it would
Hmm would continue() be good enough?
I think so
Awesome
@prisma wave
I need help to voteparty
Thanks You!!
Anyone got some ideas for a new plugin?
I'm done so far with the projects I started with.
But basiclly the term done is not correct.
Cuz you are never done.
Oh of course lol
continue() would have to somehow check if it's applicable or not
No I meant as in rather we would straight up inline it
But we don't have a continue statement anyway
Yea
It would be a return
Just sugar for return
Hmm
I mean now that I think of it it could be bad
yeah
Like ending up with functions that return out of nowhere
It's messy
I mean
continue in a forEach is just the same as returning from the function
Yea
Matts suggestion was to allow continue to work like return
Atleast in the context of foreach
My suggestion was to allow it to work like on a normal for
but continue is the same as return
Yea comtinue reads better I guess
Does it do the same as a return?
In case of forEach
Yes
Normal for, no
Or rather any normal loop
We only have a while loop as as a loop language construct rn
Other loop is a recursive func
Oh okay
Basically all i wanted was something like:
list.forEach {
if (it.something()) {
doThings()
continue@forEach
}
doSomethingElse()
}
Instead of
list.forEach {
if (it.something()) {
doThings()
} else {
doSomethingElse()
}
}
yo y'all heard of https://vercel.com/ free hosting for personal stuff forever
for like web apps and stuff at least
O.o
and like it hooks to your github so when you push to master or whatever branch you want it will build it for you automatically and deploy it
pretty nice
Not sure what the idiomatic way of doing that in FP would be, I guess an if-else is fine
Idk
I'm not sure introducing a whole new keyword* is a good idea
That's fair
On the one hand, break and continue are more imperative than declarative
On the other hand, we want it to be multi-paradigm
Sooo
๐
Idk
resolved - 3 months later
whats the skeleton spawner worded id for 1.16.4
SPAWNER
skeleton spawner tho
d;spigot material%spawner
public static final Material SPAWNER```
The spawner is a single block
Then it would be the BlockState that contains the entity info
Or BlockData
Idk lol
public interface CreatureSpawner
extends TileState```
CreatureSpawner has 4 super interfaces, 18 methods, and 1 extensions.
Represents a captured state of a creature spawner.
i have question
@oak raft see that
It's the block's BlockState (after changing things from it you call BlockState#update)
If I have compileOnly 'com.github.dmulloy2:ProtocolLib:4.5.1' in my cps project, and then shade my cps project into a plugin, will it work?
no ones online right now ๐ญ
Yeah, I mean after all plib isn't shaded in
Fefo is always on
hows this?
MATT
UR ON TOO
I am also always on
Not a single final
matt got the most fucked sleep schedule
I do
I go to sleep at 6am and wake up at 2pm
๐ฅฒ
o
night owl
4-12 for me lol
i fixed my sleep schedule today and here i am at 3am breaking it again ๐
I no longer believe in a normal sleeping schedule
If I do this: ```java
public void a() {
final String e = "j";
b(e);
}
public void b(String c) {
String d = c + "d";
}
Try and see it
;-;
no like
I need to put this into a config
Error: A JNI error has occurred, please check your installation and try again
๐ค
Wtf is that?
fun fact you forgot to make a plugin.yml
?materials
uh
package me.dkim19375.clickspersecondlib;
public class test {
public static void main(String[] args) {
final String a = "a";
b(a);
}
public static void b(String c) {
c = c + "d";
System.out.println(c);
}
}
my whole class
well that's not what was linked lol
Reassigning parameters ๐ฌ
how do I have libs in java?
@oak raft that doesn't change the fact that it is one single SPAWNER Material and the entity it spawns (alongside many other properties) is defined in the BlockState (being CreatureSpawner)
like how can I get the classes
so how do I change the blockstate
no dude
Yes dude
im trying to have someone win a skeleton spawner in crazycrates
im not making a plugin
Well how the fuck am I supposed to know that lmao
I TOLD you
And this is #dev-general
ok wrong channel my bad
https://github.com/dkim19375/ClicksPerSecondLib hows the code
Why is everything static?
If you don't know, then why use it?
whats with the custom map implementation
dkim you ought to reconsider actually learning how to program in Java
More often than not when people ask you "why this" or "what's that for" you respond with "idk"
You don't do things "just because", the things you do must have an underlying purpose that explains why you made the things the way they are or why you took certain design decisions
for jitpack how can I add something on there that requires a dependency?
my project requires protocollib...
Execution failed for task ':compileJava'. > Could not resolve all files for configuration ':compileClasspath'. > Could not find com.comphenix.executors:BukkitExecutors:1.1-SNAPSHOT.
You can't
Also i like how you just ignored Fefo's message xD
"oops"
๐ฌ
lol
it's not something to be laughing at
it just makes it look like you don't take anything seriously
he has 5 words in his vocabulary, leave him alone ๐ฅฒ
we can't help, and it's unlikely we'll continue to help if you don't take it seriously
porky's done playing ๐ณ
alright
Hello
hello
I'm having some errors on console using deluxe menu
#general-plugins/#general-plugins-2 for plugin support
hey @ocean quartz u wanna know why my sleep schedule is fucked again?
ive procrastinated homework all day and now that its 4am ive decided to do it. it took me 20 minutes to complete it ๐ ๐ ๐ ๐
i hate myself
Burn it
goodnight ๐
Talk about procrastination
There is no time to wait! Ask your question @obtuse gale!
Yeah just lemme read ur mind real quick
?help
ยป Give the helpers some details
ยป Ask suitable questions
ยป Be polite
ยป Wait
kinda terrified rn, gotta type like a crap ton of code without testing it
why
cos to get to the stage in which id test it it takes ages and i dont think theres any way i can simulate it without spending the tiem changing the code that it will take to write it
ah tuff
im gonna go crazy
ive been using i3 for so long and am back on windows to do something and i keep trying to switch windows with like winkey + jkl;
and it keeps locking the computer or bringing up voice assist lmao
welp
im at the point in my code where i can do something hacky or refactor half the plugimn
yes
Its not really that hacky ig
rightClicked.location.getNearbyEntitiesByType(ItemFrame::class.java, 5.0).filter { itemFrame ->
if(itemFrame.hasMetadata("position")) return@filter false
val position = itemFrame.getMetadata("position").first().asInt()
return@filter numbers.toList().contains(position)
}```
me:Tries to type double
Intellij
diD yoU mEan DoublEBinaRyOperaTor
DefaultBaseAbstractDoubleCreationUtilityFactoryInterfaceImplementation
@quiet depot how do you add a dependency from a libs folder in gradle?
yes
wdym yes
If I open google PC go boom
repositories {
flatDir {
dirs 'libs'
}
}```
then
compileOnly 'jar-name'
e.g.
compileOnly 'spigot'
no .jar at the end
NO
that's not it
it's
compileOnly name: 'spigot'
I think
thanks
you can also just use compileOnly files('file-path.jar')
piggy's way is cleaner
no it isn't :[
I'm just alluding you could call file('x.jar'') but also you'd have to declare the path then inside the file()/files() function
So I just had to remove some features from a plugin
It used lombok
Guess what I did first second
as opposed to just having to declare the name of the jar
do not present me with hollow accusations
for it is thee who crafted the absurd suggestion that the procedure of the response provided by PiggyPiglet was by some means "cleaner" than that of Brister Mitten
wow that took me a bit of time to write lol
ShAkeSpor
Worth it tho bardy
lol
@prisma wave never knew you played hollow knight
I was dragged onto that game by someone I know because they play it, and I haven't played it since lol
yeah it is
it was funny to laugh at my friend getting annoyed when she took a few days to kill this one boss lol
it was the flying thingy
there are a lot of flying ones lol
there's probably a lot of flying thingys so that probably doesn't help lol
I used to just tell the enemies that they have no friends, no family, and that no one cares about them lol
I mean, they are controlled by AI, and AI don't have families or friends or people who care about them so...
also true
anyway, changing the subject, ever heard of Hack The Box btw?
Yeah never done it though
i think i did the entry thing a while ago and then got bored
I started doing it the other day, and while it's fun, it's about as annoying as programming is
literally yesterday, it took me about half an hour to find out there was a hidden input tag on the register page that, when changing the value to 1 instead of 0, would give your new account admin privileges
it was literally highlighted in red as well on view source
wow took me a while to find out the name of this service
another box I did, literally just found exploits in elastix, got the password, and then had to ssh into root with that password
security at it's finest amirite
password-protected SSH
I mean, could be worse, you could run sudo sed -i 's/#PermitRootLogin yes/PermitRootLogin yes/g' /etc/ssh/sshd_config >> /etc/ssh/sshd_config && sudo sed -i 's/#PermitEmptyPasswords no/PermitEmptyPasswords yes/g' /etc/ssh/sshd_config >> /etc/ssh/sshd_config
please though, no one run that

(first one enables root login with SSH, second one allows empty passwords to be used with SSH)
what you confused about? lol
life
yeah because it's two separate commands to replace two separate things
there's probably a better way, but idk sed that well
sudo sed -i 's/#PermitRootLogin yes/PermitRootLogin yes/g;s/#PermitEmptyPasswords no/PermitEmptyPasswords yes/g' /etc/ssh/sshd_config >> /etc/ssh/sshd_config
oh also, interesting fact, I just found out it's Wikipedia's 20th birthday today
wow 20 years
I have a question fellas
What's an appropriate hourly pay for someone that's at my stage of plugin development
There is
You'd be surprised once you get into the right people group
What's the best way to handle updates for a live discord bot
Like just shutting it down? Or is there a better way
I mean depends on what technologies it uses
iirc, discord.py for example has a hot reloading system
or at least its command library
๐ฅบ
ive never got more than $15/hour, between $10 and $15 seems to be what most people charge
Well any reasonable answer to that from your work perspective is immediately going to get rid of your job opportunities in the scope of this server and similar
Elaborate Johnny :p
If you are professional, deliver good results and generally treat it like real work, then the amount you should charge usually exceeds what people in this community and similar have to offer
ignoring that I'll agree with BM
yeah it's pretty rare to find people paying more than $15/hr in this community, unless it's a really big server
I'll just go with 10 then
yep. If you want a proper well-paid job you need to look at bigger servers, although there are some bad apples there as well
Well I mean I doubt I'd ever even be considered if I apply on a larger scale server
generally though a real company with multiple employees is going to pay you more than a private 15 year old individual
jda
Definitely not trivial
$10
I would agree with Gian.
why tf you using a switch with a single case
good indicator that you shouldn't be using a switch
because switch is static
ideally you'd have a dynamic system
not saying if-else chanining is better
^
genuine question here, in efefury's case would it be fine to make a hashmap of <Integer, customClassName> for which the custom class is abstract and has a function for the appropriate response to the slot number
or is there some cleaner way of doing something like that
yes utilizing polymorphism could be beneficial
yes, that would be a fairly simple improvement
You separate the actions that have nothing to do with each other and it becomes trivial to add more behaviour
And you have freedom in how you model the action hierarchy
bro tf is polymorphism
is this some kinda geometry shit im too dumb to understand or something
Uhm
I just wanted to make minecraft plugins ๐ฅฒ
Well
List<List<?>> would be 1 example
so something inside something lol?
lmao im polymorphisming with ur mum
polymorphism is an object having multiple forms
polymorphism is when you call a method on one variable but it might do different things depending on the actual underlying type.
Yes so List<List<?>> is correct then
So for example an abstract method is always polymorphic
o
how so
the elements in the list could be any subclass of List
why not use the traditional Animal.feed() example
Shape[]
Animal.feed() might do different things depending on which type of animal it is
now
Iterable<Object>
Graphics2D#drawLine(0,0, (128 * percent).toInt(),(128 * percent).toInt()) makes this but only to a certain percent depending on the percent decimal
How make this, where the top right is the start,
will that actually make it work? That wont change the start location will it?
oh i think i misunderstood you
you want the line to be drawn partway right
not just flipped around
i see
in the above example if percent is .5 it makes this
tbh that doesnt look like a perfect 50% but its close enough for me
then you do 128,0,(128*percent).toInt(), 128 - ((128*percent).toInt()))
or it might be the other way around, where you flip param 1 with 2, and 3 with 4
ah then you might need to do it flipped
can someone review / advise on this database schema
https://docs.google.com/spreadsheets/d/1Rk9JaSz61DANqmGwMkmGxi2h3AfW2BTOTvQy7zniu8c/edit?usp=sharing
i'm fairly new to sql setups and i'm worried there might be a better way to organize how i have my player permissions than to have all of them for all my (infinitely many) servers in a single table (like somehow splitting them up per-world), but i dont see how i'd do that
@oblique heath uh wasnt starting a game xD
too bad >:)
Just tried to launch a game with a bot
you've commited
commited what?
treason
what? xD
@old wyvern apply for dev smh
oh you already have oof
guess i better go through those
๐
yugi bad dev instant decline
im 100% gonna get declined
๐ฅฒ
๐
Also, ill try to publish the clash thing so cube can add to barry
first cleaning it out
Why must spigot be so gae
@old wyvern is it node?
yes
nice
What is the liskov substitution principle?
?solid
What is SOLID?
S - Single-responsiblity principle
O - Open-closed principle
L - Liskov substitution principle
I - Interface segregation principle
D - Dependency Inversion Principle
If you wish to read up more on it, you can check here:
https://scotch.io/bar-talk/s-o-l-i-d-the-first-five-principles-of-object-oriented-design
It's very basic. If I have a variable foo of type A somewhere and B extends A, then I should be able to replace the variable type to be B and everything should still work
basically all rectangles are squares squares are rectangles
all objects are objects
no like all rectangles are not squares xD
kek
All Yugis are Yugis believe it or not
dammit
๐ฑ
you know what i meant ๐ข
๐
lopl
Yes but what if rectangle is cube

what did you mean?
i meant that all squares can be treated as rectangles
why not D;
Well they all are
A square is just a special case where width = height
A rectangle would have an associated width and height, a square would have both of them equal
so if square would be a rectangle, setWidth and setHeights contract would have to be broken to allow a square
they wouldnt be broken they would just both set / get to the same variable
setting a square's height does the same as setting it's width
Ok lets think about it this way
Just think of it as two triangles
thing is we wouldnt actually know its a square
Meshing is fun
Imagine you got some implementation of Rectangle
Rectangle r = ....```
ok?
now
r.setWidth(100);
r.setHeight(200);
System.out.println(r.getWidth());
What should be the expected answer?
Now for some reason, a random spigot noob uses reflection and it returned 69
well i mean it's still a square
ye you wouldnt get what you'd expect but
i still don't get why that wouldnt follow the substitution principle
Its because its not replaceable
Problem is that you're thinking of a square as something special, but in reality a square is just a special case for a rectangle in which the width is the height, just like a circle is a special case for an ellipse in which both radii are the same
When working with the maths a square is treated no different than a rectangle, it just allows for some math shortcuts
Im saying while yes it is a special case of a rectangle irl, but doesnt apply when using liskov
But you shouldn't have a special implementation for square
Theres a quote from a course
๐ฆ
Well LSP may not always be applied excessively. Like
That is not excessive
no
Also what the fuck
fuck the what
The Liskov Substitution Principle doesn't state what type you should use for your variable but that it shouldn't break when you replace it with a subtype
does liskov apply for API interfaces. I have an API thats all interfaces and I only expose that to people, and then in my plugin I have the implementations, and I pass the implementations where I need them because I have added different methods that I use, but people using the API don't need
You're all overthinking this too much
Choosing an abstract type over a concrete type falls more into Dependency Inversion
If it's a square, you shouldn't be expecting anything, things are supposed to happen "programmatically" as you do them without you having to worry what's happening BTS; the moment you have to do some hacky shit because of what you think the implementation is supposed to do, then you're doing something wrong.
because of what you think the implementation is supposed to do
Its not the implementation
its the interface that defines what the implementations would do in whatever way
interface specifies behavior or a functionality
setWidth should be setting width
It is, setWidth sets the width, in a non-square rectangle the height is not affected and the implementation for square does affect the height because they are meant to be the same
Unless the specification states that it should modify the width and width only
Fefo thats the point, it shouldnt be setting height at that point
In which case it would disallow the possibility of a square class extending that rectangle class
Then you can't have a square class extending the rectangle one
Because it doesn't allow it
Which is why square isnt fully substitute with a rectangle
Yes
You cant
It makes sense irl, ik
But it doesnt always work the same in this terms
"irl" 
Because it is
<> pls
Raw types are awesome /s



