#dev-general
1 messages · Page 171 of 1
Libs folder, what?
storing your dependencies in a folder called libs frosty
you never seen projects that do that?
I see it all the time on gh
Give me an example, I might've but can't remember
don't know of one off the top of my head
I usually see it when checking out odd projects
like through role requests for example
or just browsing spigot
problem with maven local is that it's only usable to you
you can't assume that everyone else also has the exact version of your dependency downloaded to their m2
with a libs folder, you can make sure everyone has the same jar
Yea, so a libs folder would just be a seperate module/dir in your project containing them all or what?
yeah
Interesting
have you really never seen people do it?
I've not no
it's most common on projects that don't use build tools
especially eclipse projects (no reason for this in particular, I just find that most people who use ij also use a build tool, or simply store their deps elsewhere)
but gradle also has support for it
"eclipse"
Can you see if you can remember any projects which do that, cause I'm intrigued now
I'll check if any of mine do
I have an example on the barn if you want to see a gradle example
https://wiki.helpch.at/piggys-barn/java/gradle/tutorial#usage at the bottom of the usage section
Will check when I get home, thanks
you still use maven?
because it's not possible with maven
at least not to the extent as it is with gradle, or even the eclipse/ij build tool
I don't no lol, switched to gradle ages ago
one command to make maven local usable
I just get users to install a jar into the local repo
you still have to provide that jar lol...
that's more steps than simply integrating your libs folder into the build tool
libs folder > maven local
@quiet depot Yeah but I don't know how to properly include them so that the jar size doesn't explode
hm what if you can't get to the jar?
implementation
not sure what you mean by that
oh, do you mean if the jar isn't available at runtime?
then yeah, what frosty said
use implementation
make sure to use the shadowJar plugin too
No gradle thanks 🙂
Yes gradle.
niall doesn't like gradle because it couldn't perfectly convert his spring pom
god forbid manual effort on a conversion .-.
nah I don't blame niall, learning is effort
especially when maven works perfectly fine for him
Only reason I get annoyed when using gradle is cuz I've got an outdated mcdev version so I have to update everything when making a gradle project
I don't use that plugin anymore
just causes too many issues
haven't used it for like a year
For plugins which don't require modules and shit it's nice
Only saves a few minutes
I can pretty much remember the spigot dependency stuff off by heart now
Yeah same
pff
spigot dependency ew
apply from: "https://cdn.piggypiglet.me/gradle/spigot.gradle"
dependencies {
spigot "1.16.2-R0.1"
}```
is where it's at (©️ - Sxtanna)
If you don't know the paper one you're bad
Which one?
idk
i'll check
oh
there's the pre versions aswell
i was wrong
it's always R0.1
but some simply don't have R0.1
Ye
Ofc
i hate how they're all suffixed with SNAPSHOT
that's such a stupid convention
assuming it's even a convention, and not just spigot
Feels kinda unnecessary to have it
it is unnecessary
Pretty sure it's just spigot
I like that build.gradle
@gaming.extremes
So extreme
Not per gui unfortunately. Per command. One command has 2 guis and the other has a variable number, depending on the config
whats the general GuiHandler for?
Like you had RankupGuiHandler and GuiHandler
whats the general GuiHandler for?
@obtuse gale Handling the other two GuiHandlers of course.
No it's for common stuff that both need
and yeah also for handling the other two, just so there is one single entry point when it comes to gui
so then in the gui class what do we have? Like a setup method thats called onEnable and then a get method?
cuz if I want to change the implementation of one specific gui handler, I don't have to change the method calls where they are used, just the GuiHandler class
hm?
so then in the gui class what do we have? Like a setup method thats called onEnable and then a get method?
@obtuse gale Some static stuff that I can initialize on startup gets created (inventory templates that get populated with playerspecific items etc...)
Can somebody help me with Papi?
I can't get the placeholders to work for some reason
[11:45:09 INFO]: [PlaceholderAPI] Successfully registered expansion: blockyranks
but using /papi parse me <placeholder> I just get the literal placeholder string back
Hello.
How do I get the time played by the player on the server?
you can use the stats
spigot api?
USe the stat
i try player.sendMessage(String.valueOf(player.getStatistic(Statistic.RECORD_PLAYED))); but this return always 0
I think its TIME_PLAYED_TICKS or something
declaration: package: org.bukkit, enum: Statistic
Its that
and you will have to multiply it by 20 cos its in ticks by defauklt
Statistic enum contains only TIME_SINCE_DEATH and SNEAK_TIME in spigot 1.12.2
ah
declaration: package: org.bukkit, enum: Statistic
Now I will try PLAY_ONE_TICK
its PLAY_ONE_MINUTE, but the name is misleading, its actually in ticks
If Ive got a Enum that represents an item in my gui, and contains data for that item, for example item name, slot, and material, whats the best way to get the enum when they click it with the inv click event? Is it to get it by its slot with something like this? This seems kinda sketchy tho, but idkkotlin companion object{ fun getByInt(int: Int):GameType?{ values().forEach { if(it.guiSlot == int) return it } return null } }
mixing imperative and declarative code
return values().firstOrNull {
it.guiSlot == int
}```
or use a map
Why is my papi Expansion class onRequest(...) method never getting invoked even though it's registered?
is by slot the best way to do it? I cant think of another way but idk slot seems kinda iffy for some reason.,... idk why id think that tho lol
if you know that the items are placed in order you could just use the ordinal
eg values[clickedSlot]
alternatively you could use a map
just the hook I believe
Gian left me on read 
Is papi working for you guys normally?
Yes
Can you help me out with my expansion because it's not getting triggered and I don't know why
Did you register it
yes
[12:48:30 INFO]: [PlaceholderAPI] Successfully registered expansion: blockyranks
but then further down after loading the plugin it says:
[12:48:30 INFO]: [PlaceholderAPI] Placeholder expansion registration initializing...
[12:48:30 INFO]: No expansions were registered!
idk if that's relevant or not
also, this is the code: https://paste.helpch.at/dulocebuju.java
piggy just said to remove the constructor but I don't see how that's supposed to do anything. Firstly the examples on the wiki have one and secondly how am I supposed to instanciate it then?!
and he just left after that
lol
pls help, I'm trying to figure this out for the last 2 hrs
No I just said idk how to create an instance of it without a constructor...
The same way you do with the constructor
just without the parameters
Also, I didn't see the last part where you said that :P
lemme try
I don't see how that would make a difference though
but I can try for sure
😩😩
Can somebody send me an example of their expansion implementation so I can cross-reference?
I really don't see why it doesn't work
@empty flint Not home rn, hence why I just left
@empty flint Not home rn, hence why I just left
@hot hull I meant Piggy just left
https://github.com/DeathRealms/Expansion-ParseNear/blob/master/src/main/java/me/deathrealms/parsenear/ParseNear.java
@versed ridge I don't see a difference. How do you create it?
and register
Borz, no arg constructor is added if no constructor is provided by you
Oh wait
are you trying to have one without external plugin or with? @empty flint
I want to have the Expansion as a class inside my own Plugin.
Oh
Borz, no arg constructor is added if no constructor is provided by you
@old wyvern Removed the constructor. Not that it makes a difference since the Expansion class does nothing from within the constructor
https://github.com/PlaceholderAPI/PlaceholderAPI/wiki/PlaceholderExpansion#internal-class
@old wyvern I followed that exact example
Where did you call your constructor from earlier?
and it has a constructor as well
Does constructor does not register it
It takes in your plugins instance in the example
Anyway
Where do you call the constructor of the expansio?
Is that branch being executed?
[13:40:48 INFO]: [PlaceholderAPI] Successfully registered expansion: blockyranks
pretty sure it is
yes
Neither onPlaceholderRequest nor onRequest are beign called
Any other ideas?
Or is there somewhere I can file a bugreport?
am I supposed to use onRequest or onPlaceholderRequest?
https://github.com/PlaceholderAPI/PlaceholderAPI/issues
@old wyvern I'm not sure this is the section for my issue
I can't say this is definitely a papi bug
How mad do you think clip will be if I ping him?
to ask for help
I'll help u when I get home if you can wait an hour 
am I supposed to use onRequest or onPlaceholderRequest?
@empty flint onRequest
I'll help u when I get home if you can wait an hour
@hot hull I'll buy you a coffee if you can help me get it working
I don't mind waiting, I just hate having tried everything and not knowing what to do anymore so if you don't mind taking a gander I'd be very grateful
hey anyone got any idea if coroutines have an equivalent of something like CompletableFuture#then...
because ik it has async which returns a Deferred<T> but Deferred literally has none of those sort of methods in it
Coroutines are exactly that
everything after a call for a suspend function is passed to the continuation
ah okay
Deferred has await() doesn't it
Yea
yeah, and that's what it was trying to do
@empty flint
https://paste.helpch.at/dabahotaja.java
yea bard the point of coroutines in kotlin is to write the callback chains in a sequential fashion
but my method needs to return a future result (handle the asynchronous computation internally)
basically, it queries a specific REST API for results, and the original Java code I'm looking at uses CompletableFuture for asynchronous computation, but coroutines are much more lightweight, and better for use in Kotlin code since they clean things up, so I'm converting CompletableFuture to Deferred pretty much lol
and anything that returns CompletableFuture<Void> is just returning Job
You dont need to use deffered
Its used mostly when you need to compute parallelly in a coroutine
https://github.com/BomBardyGamer/Lavalink-Client/blob/feature/restapi/src/main/java/lavalink/client/io/LavalinkRestClient.java#L86 this is what I'm trying to convert
it's probably not very nice code as it is but hey, I didn't write most of it, I just copied existing code and ported it pretty much
The replacement for using then is just using suspend functions
having that be a suspend function? or what?
like making the user do the asynchronous handling instead of me
the ones you expect to take time should be a suspend func
^
I mean, it shouldn't take long, it just won't be done instantly
suspend function that returns the result
wdym?
well there is nothing left to handle when they use coroutines
because you can't execute suspending functions outside of a coroutine scope
Mhm
what I've currently got now is this: ```kotlin
fun getYoutubeSearchResult(query: String)
= RestClientScope.async { load(YOUTUBE_SEARCH_PREFIX + query)?.let { transformSearchResult(it) } }
should that be a suspending function then?
Depends on how you want the user to access it I guess. Not sure how its usually used in libraries but technically suspend functions would be more apt
I mean even Defferred#await() is a suspend func I think
yup
Library support for kotlin coroutines
I was thinking they could use Job#invokeOnCompletion or something, as an equivalent to then...
ah
isn't that how CompletableFutures work anyway? they're made up of stages, and each then is executed after the previous stage has finished
No wait
though invokeOnCompletion can't be used the same way CompletionStages work
invokeOnCompletion seems to just have the error thrown inside a Job
this is so different
that has it's downsides though but okay
I mean if you really dont want to have that, provide a suspend callback lambda maybe
bruh
at this point I'm thinking CompletableFutures might just be a better idea because this makes absolutely no sense at all to me
isn't this totally defeating the point of coroutines?
what is the actual point of coroutines?
a concurrency model
I just use them because I thought they were Kotlin's way of handling asynchronous computation
they're the most idiomatic way yes
@hot hull I am gonna literally just copy your class and see if that works
but the point is that you avoid callbacks
can you show me where you initialize it?
Ein moment
but the point is that you avoid callbacks
^
@prisma wave so I shouldn't be using coroutines then if I need callbacks?
why do you need callbacks?
Why not just have the user handle it in a CoroutineScope?
In my on enable @empty flint
new Placeholders(tokenManager).register();
why?
actually no you're right
what exactly is stopping you from just writing a suspending function
and calling it?
so is something like ```kotlin
suspend fun getYoutubeSearchResult(query: String) = withContext(RestClientScope.coroutineContext) {
load(YOUTUBE_SEARCH_PREFIX + query)?.let { transformSearchResult(it) }
}
you probably won't understand most of that but ¯_(ツ)_/¯
so I shouldn't be using my own scope for IO stuff then?
the only reason I'm using my own scope is so that it's easier to keep track of the thread, because they're named Lavakord-Rest-Client-Dispatcher
^
can I name threads with pre-made dispatchers?
or should I say, name the dispatcher
@hot hull first interesting thing: the logs say [15:15:22] [Server thread/INFO]: [PlaceholderAPI] Successfully registered expansion: blockyranks even though the identifier is unchanged from your "tokens"
because I think it'd be easier to keep track of in logs if the dispatcher was named Lavakord-Rest-Client-Dispatcher rather than whatever tf the name of the IO dispatcher is
IO just uses the Common FJP I think
And nope it doesn't work
@hot hull
idk what's happening but it's not getting passed to my plugin
What version of papi are you using?
@prisma wave okay
Because that was done on 2.10.6
@empty flint are you sure you're not using an old version of the jar or something?
I think shit changed in the last few versons
2.10.9
versions*
@empty flint are you sure you're not using an old version of the jar or something?
@prisma wave yes
@empty flint are you sure you're not using an old version of the jar or something?
@prisma wave I added some debug code to make sure
Could this be due to ChatControlPro not liking MC1.16.2?
Does Papi have any dependencies?
i am speed
that's a new one. sharing screenshots via dropbox...
lol
Ive got dropbox downloaded and whenever i screenshot it auto makes a link
idk why, it only does it on my mac
@obtuse gale try SHIFT+WIN+S, draw the rectangle and then just CTRL+V here in the chat
shift alt s aint doing anything lol
im on mac rn
i normally just windows key + s on my pc
my bad
Blocky, no reason it shouldn't work, double check that you're using the correct jar, cause that's the only feaseable issue
i normally use command shift 5 to ss on mac, but thats what made the dropbox link lol
then it doesnt even copy it to my clipboard, it just saves it to my desktop
shift alt s aint doing anything lol
@obtuse gale sorry I meant shift win s
but yeah
on mac
Blocky, no reason it shouldn't work, double check that you're using the correct jar, cause that's the only feaseable issue
@hot hull I swear I am
Decompile and check
anyone know why IJ is like incredibly laggy on mac lol?
I'll try making a test plugin with an expansion on latest just to verify
like it cant keep up with my typing its lagging so hard
yea it was weird on one of my friends mac as well once i think. It stopped showing any suggestions or something
i mean yeah i can type way faster than it can suggest stuff
o
bruh
hur dur mac bad
I found this
https://intellij-support.jetbrains.com/hc/en-us/community/posts/206833255-IDEA-very-slow-on-Mac-OS-X
But its like
only a couple months younger than me i think
any way to force coroutines to execute in order btw? or do they just do that if they're on the same dispatcher
Wha?
Can you explain what you are trying to refer to by "in order"?
Its not supposed to be parallel unless you use async or something
I need them to finish in the order that they were started
everything inside the suspend fun will be executed in order
Ok can you explain what you meant a bit more?
basically, I'll try to explain it like this: Lavaplayer has this thing called an OrderedExecutor, basically an executor service, with with an internal blocking queue of futures, which ensures that each future is started in order of when it was put in the queue
now, I want that, but for coroutines essentially
if that makes any sense at all
bruh
Channels perhaps
intellijs stopped auto-importing, and when i manually click import it takes a solid 5 seconds to import
channels? aren't they usually used for communication between coroutines?
though they are basically blocking queues for coroutines so that could work yeah
Bard, all childrens of a Job are executed in the proper order
what?
So if they use the suspend functions in the same job, it will execute it in the proper order
if i uninstall intellij will it delete the project files?
if i uninstall intellij will it delete the project files?
No
@old wyvern what if they are different jobs?
Then order is not assured
can I make a scope to handle that?
@hot hull I was mistaken with the identifier thing but there is no mistake, I am registering this Placeholders class:
https://paste.helpch.at/ezodolefos.java which couldn't be simpler.
The console output is:
[15:29:32] [Server thread/INFO]: [BlockyRanks] | DEBUG | Registered Placeholders successfully | ORIGIN: Placeholders in method register at line 19
...
[15:29:33] [Server thread/INFO]: [PlaceholderAPI] Placeholder expansion registration initializing...
Can you check if on your server the PlaceholderAPI is initializing the registration before you register your plugin placeholders?
I think this could be the reason...
Not fully sure what you want the result to be at this point tbh
Blocky, try delaying the registration of yours, lemme open console and I'll check real quick
I forgot how to delay execution on spigot
[17:43:10 INFO]: [PlaceholderAPI] Placeholder expansion registration initializing...
[17:43:10 INFO]: [PlaceholderAPI] Successfully registered expansion: vault
[17:43:11 INFO]: [PlaceholderAPI] %javascript_example% has been loaded!
[17:43:11 INFO]: [PlaceholderAPI] Successfully registered expansion: javascript
Make a runnable with runTaskLater
You're softdepending papi right?
api-version: 1.13
name: BlockyRanks
main: me.blocky.ranks.BlockyRanks
version: 1.6.1
softdepend: [Jobs, mcMMO, VotingPlugin, Multiverse-Core, PlaceholderAPI]
depend: [Vault]
is that the correct Softdepend name?
yup
Then why isn't it loading after Papi?
What gives?
Do you think we can get clip to check this channel without pinging him?
So he can maybe shed some light on the situation
Because I really don't like the runTaskLater approach
idk why but those dropbox sceenshots are the funniest shit to me rn
Shared with Dropbox
why the frick i got 2 intellijs
is one through jetbrains toolbox ad one through without jetbrains toolbox?
I had that at one point
mustve been
im tryna find the second one but cant find it anywhere in my files
i cant even find toolbox location
you gotta have at least 400iq to know how to open file locations
yeah ones through toolbox
@empty flint Try doing the delayed registration and see if it works
why the frick i got 2 intellijs
@onyx loom Are you paying for both?
found the jetbrains employee
@empty flint Try doing the delayed registration and see if it works
@hot hull Nope still doesn't work 🙃
Am I going crazy right now?
Yes
%identifier_placeholder%
Are you telling me that's what you've been parsing this whole time..
🤣
Am I blind or?
where is %string%
yeah
it's right there in the string
thats the player expansion
%<expansion indentifier>_<expansion placeholder>%
hold up
Show me your placeholder class Blocky
Ayyyyyyy I'm proper mentally handicapped it seems.

Now you know 
:p
bruh imagine I had pinged clip for this shit
kek
how does one change the material icons at the side
good question
I use atom material icons
how would one go about editing those? Cos I use them as well but I wanna change some up
also is that responsible for the package icon?
does kotlin have a try-with-resources thing?
I tried just doing try(val x = Thing()) but it didnt work
.use
where
ah
Add a custom file association?
@old wyvern how does my small brain do that
By adding a custom file association
😐
If I run a discord bot in intellij where does Paths.get() start looking for the file?
i presumed resources but I guess not
if So how can i make it get sometihng from the resources folder
Anyone knows why the fuck PacketPlayOutTitle as subtitle doesn't show anything unless title is sent as well?
Because
Hella dumb, just set the title as a space
@quiet depot Question about the libs thingy, how do I put the desired lib into it?
@obtuse gale ClassLoader#getResource
So, subtitles get queued and wait for a title what
Does anybody know a good UML class diagram tool?
One that doesn't look like it's from the 90/00s
IJ has one
can it go the other way as well?
I wanna design the UML by hand
as a plan/reference when doing the code
not sure but I imagine so
So i guess i need to send a null title packet for it to work .-.
private fun countPlayingPlayers() = lavalink?.getLinks()?.filter {
val player = it.player ?: return@filter false
socket == it.getNode(false) && player.playingTrack != null && !player.isPaused
}?.count() ?: 0
```how horrible is this code lol
is that even readable?
is that even readable?
@jovial warren takes a while but yeah
lol
there's nothing at all I can do there
don't ask why, but getLinks() returns links.values, not links
is it your code?
and links is a ConcurrentHashMap<String, T>
and yes it is, but it's kinda converted code
😠
wanna see the original?
(even though it's on my GH, that's my fork, it's not my code and it's not my project lol)
what's Javalink?
not acceptable
Lavalink is "a standalone audio sending node based on Lavaplayer", to quote the README
basically, it's used for sending audio to Discord
and I'm writing my own implementation of it's API because why not lol
@prisma wave come up with a better solution lol
property without backing field
what?
you mean like this? ```kotlin
internal val links: ConcurrentHashMap<String, T>
get() = links.values
Also @quiet depot I am honestly dissapointed
private static TerraformGeneratorPlugin i;
ah okay one of those @prisma wave , yeah I've been doing that in a few places already
also you got any recommendations for good Kotlin WebSocket libraries btw?
ktor
because at the moment I'm using Java-WebSocket, but it seems a bit too Java
I mean clients lol
I could use OkHttp since it's written in Kotlin and so has loads of extensions and other useful tools
(and I'm already using Retrofit for making HTTP requests)
if I override a method from java in kotlin it let me makes the parameters non-nullable
what happens if they are null, since im overriding the method from java, and they arent marked as Non Nullab
if they are null and you set them as non-null then you'll get a KotlinNullPointerException
right
^ it generates null checks for each parameter
I think
^ it generates null checks for each parameter
does it?
wow
Intrinsics.checkParameterIsNotNull or something
Am I dumb or?
@EventHandler
public void onSpawnerExplode(final BlockExplodeEvent event) {
final List<Block> exploded = event.blockList();
System.out.println("Triggered event");
}
It's registered, however it doesn't get called, am I going insane or am I just being dumb, this should trigger when a tnt explodes blocks right?
yes you are
Well yes, but it doesn't
Ummm
Anyhow, that's a problem for another day, I'm going to sleep
ok let me try this
try it with Bukkript
sleep?????????
Frosty need his beauty sleep
I'm working in on monitor, and in discord in another, this is allowed?
Bukkit calls works on Android ? 
No, we all know that the second monitor is for procrastinating while watching youtube videos
You know my secret !
Frosty need his beauty sleep
@ocean quartz yessir
Decompile time!
@ocean quartz that's so true as well haha
No, we all know that the second monitor is for procrastinating while watching youtube videos
@ocean quartz i do that with one monitor, whats the difference
where do i get support
The difference is that you can pretend to be coding if you have 2 
o
@subtle scroll Depends, plugins in #general-plugins or #general-plugins-2, development in #development and if any payed plugin then head to #spigot-linking
i guess i should setup my second monitor then 🙃
#general-plugins please it is urgent
Be patient
bruh spigot is gay
go sleep
Now that does sound good
elapsed spigot good
paper spigot good
Oof never call paper, paper spigot, in the paper discord
Whats up with that?
oh yeah, those guys get pissed easy
It's PaperMC, they hate being called paper spigot
when I was talking about using 1.8 previously they were all on me lol
It's PaperMC, they hate being called paper spigot
I mean its a fork of spigot either way
1.8 BEST version
1.8 BEST version
Debatable
Can't do this in 1.8 
know ur versions mitten
objectively wrong
when I make remencespigot it'll be possible to do that in 1.8
You remaking the client m8?
Then how the hell are you gonna add rgb support lmao
with java
I assume you are trolling at this point
I have awoken
wakey wakey rise and shine
:(
So I've just remembered how all the cool kids obfuscate their plugins
1.8 is neither bad nor good, it's very useful if you want a server that's gonna use the least RAM where it doesn't matter at all what blocks you have access to, and also for KitPvP servers, because 1.9+ PvP is shit
Just use kotlin, ez claps
i think u mean clojure frosty
tbf all minecraft PvP is kinda boring
So I've just remembered how all the cool kids obfuscate their plugins
@hot hull lol
KM, unless you have a twist to the gamemode it's hella boring
or click really slow
And Bardy, bruh ain't nobody know what shit is when you decompile a kotlin plugin :p
Its much more readable than obfuscated code
@hot hull more like all the kids who don't want people reverse engineering their shitty plugins because they think they deserve to earn money for their "hard work and effort" (there are some exceptions before you go off on one at me lol)
Decompiled clojure is a sight to behold
@prisma wave Holy god of
private static final Var dl_et = new Var()
That text in () stopped a crusade
But yea everything should be OS
I have 20 projects closed source, but that's besides the point
I mean honestly thats up to them
like there are some people who have actually put in hard work and do deserve something back from that, but most of these plugins on the market these days are shit lol
I have 20 projects closed source, but that's besides the point
@hot hull hypocrite
world where everything is os: 😎
world where nothing is os: 😦
cba to find the actual pic
Bruh it's commissions, I can't just OS that shit, otherwise I would
world where everything is clojur: 😎
world where nothing is clojure: 😦
@onyx loom
I mean, I'm a massive supporter of open-source in general, so I'm very biased, but yeah, I agree with you
just os the commissions no balls
fuck you
:))
Kali, inb4 I upload my entire projects folder smh
I know nothing of the sort
doit
idot
@old wyvern that was done on purpose lol
why is context so much harder over text than IRL lol
Every programmer born after 1992 cant paranthesies. All they know is npe, make js framework, be hipster and cry
How dare you call us an idot
NPE
Also ^
@hot hull that paragraph is an autobiography
Thag*
I mean NPEs are more of an issue of the person handing it so 🤷♂️
aka every programmer born after 1992
I vote for defaults
I vote for nukes
NUKES
We need another meteor
@prisma wave this is similar to what I was suggesting except this returns null for ref types
What language is that?
c#
Interesting
@hot hull @obtuse gale @somber tulip 👀
https://mf.mattstudios.me/message/mf-msg
❤️

Can't do this in 1.8
@ocean quartz why not?
Doesn't support hex colors
ah
Everything else works though
wait hex on 1.12 ?
that's what I thought 😦
It would show white
MF-Client when™️
never
Sad
Hex will work on lower versions though
how?
By translating to the closest approx color
Only sad part is this Matt
bad
KotlinClojureScalaGroovy
jur
By translating to the closest approx color
@hot hull if the gradient has 2 colors only, that would result in it being split in the middle, not looking like a gradient at all
1.12 ;p
can your gradients have multiple colors, @ocean quartz ?
Yeah unlimited
well... Int.MAX_VALUE but close enough
String.MAX_VALUE
Now what would that be?
2
69 
On 32 bit systems a String with the size of 4GB
Is the answer to "How often do planes crash?" - "X times a year." or "Just once."?
@prisma wave Clojure eyes and imagine it were an actually usable language.
Clojure? More like: Dumb! Hahahahaha
Gotem
Jesus I'm a SAVAGE
😬
@empty flint as someone who has used it I can confirm that it is usable
It certainly is
Yeah I wouldn't know, I just wanted to throw shade with a mediocre pun
Because you dared Blitzzz to do it
@hot hull You got us
Might might not always be an improvement
but sometimes it can be
Clojure? More like NOjure amirite!!
when's the next timed coding challenge thingy?
last week
next timed coding challengeCoding game?
Yeah I forgot what it was called
I mean, clash of code?
If a few people are up im in for one
lets go
do what?
clash of code
what's that? Like Clash Of Clans but you send the troops using command lines?
players get the same challenge that they have to code
is coding game loading for you kali?
whoever gets it in the fastest time / shorted chars wins
oh ok and what is this based on? just minecraft/spigot? or is it random things?
Im pretty sure you were in one with us blitz
but i usually come last because i suck 🌚
Simple input/output algorithms
who joining
Yugi you are delusional xD
@prisma wave
Nah man I swear I saw you in the lobby once
@empty flint
I'm in
playing overwatch ew
you have 44 seconds KotlinClojureScalaGroovy Mitten
xD
I wrote all that by hand btw
I'm a god
😦
Left side shows the question
I'm in
nah dude I'm out
The "minimum number"?
Minimum number of bits john
do I have to improve the code they gave me or what?
you have to finish it
You have to write something to convert the input to the specified output
||Integer.toBinaryString(X).length()|| in this case.
For each number to process, the minimum number of bits required to code it. Do I literally have to print an answer?
yes
The question on the left
Or you can use the error stream to output it if you are stuck I guess
welp yeah I rly don't get what I have to do xD
You have to get the minimum number of bits that are required to represent the number in binary
kotlin but yeah it was X just don't bother anymore lol xD I left
Wait do I have to print an output for each number?
yeah I think so
Yes borz
Hey, Do you have a jar / maven to use the deluxechat api, because I need to use the api but I didn't buy the plugin?
alrighty im joining
Code Clash?
ye
Current one has 3 mins left
Frick
waiting for borz
Next one then
blitz left
wait
yea borz?
ok
I have never seen kali submit a serious result
yea it specifies to ||round up||
I have never seen kali submit a serious result
@lunar cypress i try my best 😦
most of the time
Man
I was struggling with that Math.ceil
ah rip
i couldnt remember how to round up
@prisma wave Me either ^^
That's why mine took so long
Finally made the profile repository for github, thoughts?
https://github.com/ipsk
Had the code in one of my plugins already xD
pretty clean
Finally made the profile repository for github, thoughts?
https://github.com/ipsk
Neat 👌
starting
Matt what's ipsk?
Basically a small version of a really old username ipsyko
nice
really?
but I don't get a time relief
nice
smh
ah
Oh yeah, that's cool
the functional solutions are actually clean af
I couldn't for the life of me figure out how to cast a long to an int
oh, Integer.valueOf has a radix as well
fml
lol rip
last one for me now
I think it's clojure time
In Kotlin is just Long#toInt
Also if you are in Java use Ints#tryParse over Integer#valueOf
matt you in?
Ints.tryParse is guava
Nah sorry my brain is already too fried
Yeah but i am assuming he's using spigot so it's there already
uhhh what do we do here?
I have no idea what to do, div by 2 then 3 then 5 then 3 again?
||No. of digits matter||
ah ty
xD
oh lol
I completed one in clojure!!!
gg
😎
still trying to figure it out
officially an expert at the language now
better than java
🙄
bm, ns = namespace but what does :genclass do?
it's the same amount of parens as kotlin would use
I DID IT
except cleaner
BE PROUD
nice
gj
oh shit im so stupid
@old wyvern it's for defining the .class that should be compiled
.length is a thing oops
idk if it's necessary or not
ah
it's not, but coc requires it
I see
classic
if you want to call it like a normal java main class you need it
val chars = n.toString().toCharArray()
var digits = 0
chars.forEach { digits++ }```
kek
ok I'm gonna look at the spoiler now
@ocean quartz why would you make that a final class? https://github.com/ipsk/MF-MSG/blob/master/src/main/java/me/mattstudios/mfmsg/base/Message.java
@onyx loom gross
20 lines of kotlin vs 12 of clojure
😦
🙃

oh god
@empty flint I don't see why anyone would want to extend it
@empty flint I don't see why anyone would want to extend it
@ocean quartz I would want to in order to add some other stuff I would need. Now I have to have it be a member and manage it instead of a parent class that just does the stuff it does in the background plus some other things
I don't see why you would restrict it to being final
this question gave me flashbacks to when I wrote poker in clojure
@empty flint I guess, i can make it non final in a second
I need help naming a class
that's always fun
I have a frontend and a backend and then this class, let's call it a bridge for now
the frontend and the backend both only see the bridge, they don't know that the other one exists
what do I call this bridge class?
Bridge
what kind of front and backend
But not descriptive enough
what kind of front and backend
@lunar cypress I mean I call them "front-" and "backend" but they are just a group of classes where the frontend handles commands and inventories and the backend handles the data storage and stuff
@lunar cypress The frontend might request something like the number of players using the plugin from the bridge. The bridge then tells the backend to fetch that information and forwards it to the frontend.
and why so complicated
The bridge gets a message from the bridge, does what it's told and then waits for the next message
why not just a regular api
and why so complicated
@lunar cypress Because I want it to a) be expandable and b) be usable on bungee and spigot
on bungee the backend would only be on the main bungee hub and on spigot it would be on the server itself
it's not supposed to make a difference to the frontend
And what exactly is the issue with an API then
just have multiple implementations of it
Well it is an API basically, only one internal to the plugin and thus not an API anymore

oh shit lol
smh