#dev-general
1 messages · Page 221 of 1
top notch
Yes
mfToolkit
well that's the biggest lie I've ever told myself. And I did it a lot of times. still doing it
But doesnt minecraft plugin already create a good plugin.yml
:what:
It’s fine
That’s a sin
I'm a sin
can we play some clashofcode or whatever that is called?#
someone make a game please.
absolutely
@hot hull make a game
Not on pc anymore, and it's broken for mobile so
😦
that's sad
I'm just going to lose against EM
lol
Matt is on phone as well 😦
smh
What's sad is it's 6pm and I'm already lying in bed
@static zealot
@light venture
i stg we need to have an official tournament of this some time
?
clash of code
...
Why ping me?
join clash of code
i cant code '-'
oh god
and?
better for me bcz I won't lose
lmao
@pallid gale join us lol
xD
bet elara isn't in this
@ocean quartz
sadly not ☹️
🙂
i can’t join not at home
smh
Is that a challenge? Gonna join and play it on my phone
good
xD
sorry
LOL
why not
lol
Oh need to login, nvm
😦
@everyone
The 'everyone' mention is disabled so you can't annoy people.
dont care
Fun fact, Barry is a great dev, it coded itself into existence
dont make ppl shit themselves
lol no
oh fuck
xd
Lmao
wait
efefury me vs u
do I just make
yes
do I just print from end to start?
neither
xD
i cant code either
reverse it
chose language here https://i.imgur.com/QBf9j5q.png
no
...
you did 0%
you need to code here
what they give you here https://i.imgur.com/vN2TU7R.png
you could chose the language
you want
multiple tests
to make sure you don't just print the answer lol
ah
You get an input string and then you have to print it I believe
u passed?
accordingly
few
another W for haskell
ha i still got 3 chances!
lol
it has to work for every possibility, you can't just print out the answers
i think it does some extra tests to make sure you don't just do that
Let me join next one
good
It’s a debacle that em wins

@prisma wave you guys still playin?
ye
yep
6 minutes left
link?
wait in kotlin, replace replaces just the first or all values?
first
link hex
we need a bot for this
cc @pallid gale
clash of barry
😳
wait
replace does replace all
replaceFirst
replaces first
think I got it
yep
it works
not the prettiest and smalest
but it works
Haskell
haskell
yea not size
but nah
lol
well I was going to ask if they count messages
as well and spaces and new lines
xD
jesus
yugi just joined
lol
nice
yea
yeah lol
I rly need to go back thru all methods and stuff
kotlin has functions for every damn thing
kotlin has a crap ton of extension functions for things like this
🙂
look its a wild @onyx loom
nah 💯
@onyx loom
😦
join we said
playing ps4
understandable have a great day
ye I'm so excited for a game I'll never play 😦
berlin airport was started 20 years ago
but maybe cyberpunk has too 🤔
😦
jesus christ its so dark outside
i cant even print hello world in python
print("Hello World")
well I can't go out
@onyx loom https://img.bristermitten.me/17-20-30.png how could you say no to this?
o
ok fine
thank you
Were you asymptomatic?
@prisma wave
ill have a couple games seems as tho im waiting for my friend to come back
cute
yes
😏
my whole family was. just my mom had some problems
but not bad
and got better very fast
hello!
its all we needed
haskell time
Y'all boutta get recked
k
ooo
pretty sure it doesn't im afraid
Yea keyboard input on mobile doesn't work at all
lots of checks by the looks of it
no its not. I just can't do it for some reason they don't allow for lloop
3 minutes and I can't get my for to work xD
i just got a stack overflow i think 
It was a simple question, y'all just stupid
smh
I know you are but what am I 😎
Elara worse than Haskell confirmed?
@prisma wave what the fuck is this
ey
clutch
||my $a=$n,$b=$d;my $temp;while($a!=0){$temp = $a;$a=$b%$a;$b=$temp;}my $r=($n/$b). "/" .($d/$b);print $r;||
readable

no idea what I did but it didn't work lol https://i.imgur.com/R360Ryr.png
yea we tried similar things blitz
well it did tell me
that I can't use for or while
that I can only use expressions
Haskell of course
It's pretty clean when it's not minified
another round? XD
@obtuse gale Almost 7 pm
Do 1 without me
if thats my first haskell encounter, i dont wanna see anymore of it
Np
smh
Dont make me do it
I spent like 2 minutes removing all the spaces and this is what I get
No appreciation
wait for me
pls no
@heady birch join
ing
Am I in?
yes
Good
gtg
welp
oh no
what in the
ye I think this is just you guys. I ain't got a clue what's happening there
wait a minute
nvm
I got it
it swaps chars or whatever i got bored
Why can’t we have lambdas for single public abstract methods from abstract classes
java is good
Presumably because they could have constructors
And most of the time they would
So it would be pointless to add support when you could only use it in very specific scenarios
the question is why would you make an abstract class with just one abstract method
^
Why not (:
Because there's only disadvantage to it
Might anyone know how to add essentials api to a project? (Gradle)
Same as you would add any other dependency
You'll get rekt
I played with randoms and I got 3 chinese dudes who completely obliterated the challenge
exactly
they're like
professionals
someone has their actual photo as a profile picture 😱
You're fucked if that's the case
@hot hull You tell me what I am adding then lol
@lavish notch The dependency is on their gh
I still think lambas of abstract classes would be awesome when it’s applicable
elara will support this
kind of
and by that i mean elara doesnt have abstract classes
Get rekt losers
my pleasure
there is also another language which does not have abstract classes
known as haskell
Couldn't match expected type ‘[Int]’ with actual type ‘IO [Int]’
i no longer like haskell
3 hours of sleep + programming
oOMPa loompa
Don't sleep deprive and code, kids
Laughs in being a lazy piece of shit
yeah i've seen them mentioned many times
no idea what it is
replicateM seems to be a monad
IO is a monad as well
scary
words cannot express how much pain I felt trying to get a list of user inputs that weren't IO Strings
and apparently it's impossible
:fingerclojuremoon:
ClashOfCode certifications comin? 😂
Thibaud needs to stop writing me emails
give me your email and I'll write you an email as well.
even cleaner: https://paste.helpch.at/wohacufelu
Judgement on this is what I trully need https://paste.helpch.at/piwebufemi.java
even more cleaner https://paste.helpch.at/tavefirago.cs
Leave Topfu.

think about having -2245/4096 MB Memory
Isnt using both @NotNull and @Contract with that contract reduntant? @hot hull
No it doesnt
It does, shut up
Choose 1, not both
Many people would argue with that
Like?
Contract is good if the return may vary else nullary notations is nice
Also the you might want to clone the list so the contract applies
the default one
ah nvm its immutable
nein
What list
wdym what list
frost what did you use to send it async?
an async scheduler
what list
its handled sequentially in the other thread right?
the message list BM
It shouldn't, but it does lol
It'll just get added to the packet queue afaik
Might be fixed on newer versions, but this is for 1.8 so..
🥶
You can't respond with that, your 4head is still on 1.8 aswell
but I don't have contract annotations everywhere so...
I used my first kotlin contract the other day though
It was cool
Gonna call the cops on you for doing bussiness illegally
smh
internal fun CommandSender.mustBePlayer() {
contract {
returns() implies (this@mustBePlayer is Player)
}
if (this !is Player) {
throw CommandRequirementNotSatisfiedException(Errors.MustBePlayer)
}
}
``` hot
CommandRequirementNotSatisfiedException
I don't like this at all
returns() implies (this@mustBePlayer is Player)
👍
why is it, that I get an error when I add ```json
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongodb-driver-sync</artifactId>
<version>${mongodb-driver-sync.version}</version>
</dependency>
Please use a paste service to share configs, errors, code and long logs.
• HelpChat Paste
skript ?
Leave.
Wut
@obtuse gale It really isn't
You don’t create direct injections because that would lead to a long arg constructor
You're probs a dude who puts all your shit in like 3 classes at most
A lot of people who come here are beginners who mostly use static instances being passed around
bruh what
With your logic, that'd be the only reasonable way of passing shit around
Frosty you clearly don't understand what he's saying
teaching a person the SOLID principles and to pass the proper instances, especially when they dont properly understand OOP is not an easy task
if you want to do that
go right ahead
Go through the chat history on #development
Lemmo, I do.. what I'm saying is, as Conclure mentioned, by his logic your constructor would be massive if you passed only what you needed
Have a look at what people come with
I mean the constructor wouldn't be that big and if it is you clearly have a design flaw
but yes ideally you'd only pass what you need. I agree with Yugi though on that the people here don't even understand OOP so it's hard to take "big" steps and hence why people give more easy solutions
class Bomp {
private Object obj, obj1, obj2, obj3;
Bomp(Object obj, Object obj1, Object obj2, Object obj3) {
this.obj = obj;
this.obj1 = obj1
//etc
}
}```
@obtuse gale I think it’s very obvious your explicit design has some flaws. I’d rather use getters and have 1 providing class bootstrapping all the necessary instances which you need to pass around.
Change my mind
What are you talking about
let's keep this civil alright
Calm down
I honestly am so confused as to what you're on about, you do you 
fr
class Bomp {
private Object obj, obj1, obj2, obj3;
Bomp(Object obj, Object obj1, Object obj2, Object obj3) {
this.obj = obj;
this.obj1 = obj1
//etc
}
}```
If you’re bound with this design, keep it in that way I won’t touch your code atleast
could you elaborate on why you dislike this
since when is 4 objects a big constructor?
And clearly if a class has so many dependencies it clearly isn't following SRP
That’s why you should be using 1 providing class for your dependencies not injecting them all explicitly
What is?
but why would you give so many redundant objects to an object
It’s an example
Hes right about Dependency Inversion @steel heart
If I want you to make a screwdriver, and I provide you with screwdriver parts but also car parts and airplane parts
isn't that like really useless
not rly
Im pretty sure the point of the example in the faq was just to lower the entry point for new people who are very common in that channel
Anyway I don’t have time for someone who wants to inject everything explicitly
yeah exactly
I've tried explaining it before to people and they didn't understand lol
^
Oh right I see
Show us the good practice then
let's just have you guys agree to disagree before this turns badly
I missed the start of conversation but prefer
class TheClass {
public TheClass(final Server server, final Logger logger) {
}
}```
Over passing a Plugin
I’d pass plugin
yeah those are just examples though prob
Actually Bomp it depends when you’d explicitly inject it and implicitly inject it with a container class
Like Niall brought up, JavaPlugin would be a good example
This
For instance
well yeah the main plugin class
For argument sake you’d probably inject your main plugin class rather then each instance contained in it by itself explicitly
It would be pretty stupid explicitly injecting all stuff let’s for instance say you want to access the plugin manager, server, logger, what not etc.
You wouldn’t put all those things in your constructor.
Your constructor would be fucking wide if you would realize
Exactly
if you're still bickering about that faq, bear in mind it's intended for beginners who only know static
But apparently that’s what your argument is all about
Sure it might be a bad practice, but it's a simple example sooo
Exactly
you must be new
Good luck with that lol
To the discord
Most of the beginners we have here will ask how to make variables
nah not the discord but the mc community lol
^
Biggest problem is that people try to learn Bukkit/spigot before java
I think if you need this many that the constructor gets this big class is probably handling too much by itself
You can't teach proper code structure before they know what a constructor is
True in a sense but I won’t split up my project into 1 class per method
😂
Isn’t it like 101% functional
yes
I retract my statement
People change
lol
Mobile ain’t working with that
it'll be fine
its been a while
F
A
R
G
A
^^
EA Sports
Timmit games
The Glorious Elara
F is a modular, compiled, numeric programming language, designed for scientific programming and scientific computation. F was developed as a modern Fortran, thus making it a subset of Fortran 95. It combines both numerical and data abstraction features from these languages. F is also backwards compatible with Fortran 77, allowing calls to Fortra...
everyone be like "OOP bad FP good" and "FP is too difficult!!" and elara be like "hi"
🙂
Coming out in the fall of 3020
F*
anyone else joining this "clash of code" game
Non type-variable argument in the constraint: Num (t1 -> t2)
(Use FlexibleContexts to permit this)
• When checking the inferred type
it :: forall t1 t2. (Num t1, Num (t1 -> t2)) => t2
classic mistake
bruh therres no way im getting anywhere near winning with this little people
and with these people
someone bad join pls
@ frosty
any
Any Bomp
you can choose
Oh it’s like binary search
you got 36 seconds
good luck typing code on mobile
ok
imma slow this whole game down
i've said it before but we need to have a helpchat clash of code tournament at some point
😬
python or kotlin wins
yes!
"can YOU design the NEW ecloud 2?"
ok
ok ive got working code now to make it small
oh it doesnt always work rip
its like 9 lines long as well lol
haskell has let me down
bruh the final test in the only one failiung
mine works thats all i care about
lol
its like triple the size of urs but its fine
main = do
str <- getLine
print (length (filter (\x -> x `elem` "aeiouAEIOU") str))
return ()
nice
bm join
ah
^
Indeed what is this
bruh if we have bob and ericas how the fuck to we get jack
who the fucks jack
and who invited him
These variables are confusing the shit out of me
xD
So assembly or Haskell or clojure?
all of them at once
Asseleraskellojure

ez
nice
My code is atleast clean smh
it at least works forsty
Fucking disgusting
System.err.println("$rb $cb $re $ce")
println("${(rb+re)/2} ${(cb+ce)/2}")
'forsty'
I'm dissapointed AJ
do yugi's
Btw
start
ffs again
shortest 🙄
aHHH
How many bits of memory do you need to create int ? And what about long ? Enter two numbers separated by one space!
😏
what do they need
"Yellow ${var} Lore"
Is this the same as
"Yellow "+var+" Lore"
I typed
1280
and 160
bruh what the fuck is this lmao
ooh
i cba to do this
same
np
if we all fail do we all win
yes
hopefully
Oh yea it's length
how tf frosty in front
Doesn't say how many chars you got for me
probs why kek
i should of just had one sysout
ez 1st
is byte smaller than char ?
What a small char difference BM :kek:
ikr
@normal talon i might be wrong here, but it depends. ASCII is usually 1 byte, the same as byte but with unicode it's 2 bytes i think
so i think on modern systems yes, char is bigger
ah okey thanks
AHHHH
@ me when you finish
dont
how tf am i meant to know thi
shut up bish @onyx loom
Am I dumb or? import java.awt.Color;
I assume I'm dumb
fr
once I’m done with docdex might work on a coc api
OO
bruh what am I missing here

afaik there is a chrome extension
thx frcsty
:))
bruh whyd you all do it weird ways
fun main() {
val input = Scanner(System.`in`)
val col = Color.decode(input.nextLine())
println(col.red)
println(col.green)
println(col.blue)
}```
its just hex tho 🤷♂️
I'm dumb so 🤷♂️
i mean you helped me get it lol
huh
@prisma wave show code
Mine didn't work
Mine still best :))
frosty literally told me how to do it lol
Converted and wrapped in Color to unwrap
^
I just scrolled down the suggestion list of Color til i found something that looked right
Yugi, I told you, I'm dumb
welp
another? Or we waiting on BM
Color.decode
If there are enough people we can do another
There's like 4 of us no?
let's go bishes
This man removed shortest :kek:
Yea got sick of it
the f
Everyone just dead I see
indeed
yup
Look at these fuckers not even finish in time
i feel like im just dumb with this lol ive got no clue why this isnt wokring
do it plz
bro tf
Exception in thread "main" java.util.NoSuchElementException: No line found
at java.base/java.util.Scanner.nextLine on line 1651
at AnswerKt.main on line 15```
is the same as yours lmao, I thought that I have to sort them alphabetically and by length lmao
oh lol
didn't read the first line where it says what you have to do ..
remove the check after N @obtuse gale
I was confused as first cause I was always missing the last line, took me a min to figure out why
there is an if for a new line
I have that
yes, remove it
Yugi dead?
.
ok i timed out
fun main(args : Array<String>) {
val input = Scanner(System.`in`)
val N = input.nextInt()
val sb = StringBuilder()
var a = true
for (i in 0 until N) {
val line = input.nextLine()
if(a){
a = false
println(line)
}else{
sb.append(line + "\n")
}
}
println(sb.toString())
}``` Thats what i was tryna do lmao
bruh what
the a was just me forgetting the % 2 == 0 thing
Java wins again 
Imperative kotlin code always looks so horrible
yo bm i found the changelog for 5.0.0
oh cool
they're adding better kotlin support
oh also ditching cglib
cg?
That's good
Why is that good
cglib is really old
The kotlin stuff doesn't seem too significant, Multibindings always worked fine for me anyway
^
Hmm only thing is that guice is making my jar fat
Arguably worth it
idk
hopefully it does, don't want guice getting bigger
pretty much everything uses asm
Is it better than mixin?
Oh lol
Why ?
don't they have completely different purposes though
it's not
Well what makes it bad?
Thought it was pretty solid and powerful
I just feel that mixins should be a language feature, and not implemented at runtime
it just feels wrong
Oh well I guess
I might need to reevaluate my opinion on mixin tbh
that's less of a criticism of mixin and more of a criticism of java
I mean as far as I can tell there are use cases where you simply don't get around messing with bytecode at runtime
and if mixin makes that easier for you in some situations, well, good
Hmm yeah, what are the alternatives if I don’t want to use mixins? Byte buddy?
And asm or what it’s called
Well I can’t change final fields without bytecode manipulation?
yes you can
And extend package private classes?
good that bytecode manipulation is supported by java
so you are literally building on the language
Wait does the change final field thing works for constants as well?
yes
pretty sure you can change final shit with just the reflection api
otherwise, look into unsafe
Ah yeah ofc
no not always
oh?
constants such as strings primitives and even enums I think can never be changed
also changing field modifiers doesn'T work anymore
by reflection*?
oh because they get inlined?
yes
ah didn't know that
#772310219590074398 "It's quite dificult to explain" "budget: 10$"
But a normal object constant would be changeable
and in the newer versions you can't use reflection on the reflection classes themselves anymore
well in that case, look into unsafe if that's the kinda thing you want to do conclure
I would go as far to argue that bytecode manipulation is less hacky then messing with unsupported reflection
^
Unsafe is even worse
Yeah the clue's in the name
Except that
Unsafe is your absolute last resort
I mean generally you can say "if I need to use unsafe, then I probably need to reevaluate my idea"
Indeed
the only case I'm aware of where unsafe is somewhat warranted, is in object mapping
Ah well then
but even then, it's not necessary
it is not, no
Shouldn't be
gson is just fine without unsafe
Beans have no arg constructors
Yeah I've never needed to use unsafe for anything other than messing around
if you want to mess with memory addresses you know also have the foreign memory api which is officially supported
The method max(Collection<? extends T>, Comparator<? super T>) in the type Collections is not applicable for the arguments (Collection<capture#1-of ? extends Map.Entry<OfflinePlayer,V>>, Comparator<capture#2-of ? super Map.Entry<OfflinePlayer,V>>)
Someone help ? 
What are you trying to do?
@quiet depot https://paste.helpch.at/piwebufemi.java
I want to get out the offline topbidder, https://www.spigotmc.org/threads/storagewars-plugin.473965/
https://paste.helpch.at/nucubohewa.java Here is my entire class
@hot hull doesn't commandsender have a method for sending multiple messages?




