#dev-general
1 messages ยท Page 90 of 1
what was the question tho?
yeah it usually is
I can't see it anymore so ask @jovial warren
it was basically calculate f(x) where f(x)=a*x+b
Why is u not done then yet smh
because I'm trash
๐ค
4 mins? was this shortest?
finally done
nvm no chars
Nah it was quickest lmao
I mean the round type
yeah it was quickest
alright getting another
girls
1 more layer clashin
I can't join ๐
girlsgei
why not KM
I gotta help cook dinner
lol
Maybe I'll try on mobile
Don't
what are u, a woman?
It's imposible
11.56
apparently waterfox isn't supported by this website lol
pfff
okay everyone ready or we still waiting?
and thats why google chrome >>>
OH I see we got Matt :>
idk how this works btw lol
waterfox is lightning fast though
so are these questions ez?
Gonna try it, i'm pretty bad at this though
easy
A mix
questions are ussually easy
i've never done something like this before
sometimes weird
How does this even work?
Well the instructions are usualy kek
@pallid gale quick join https://www.codingame.com/clashofcode/clash/1238161dfd05113475541e542307a846674de98
they're sometimes really simple, and sometimes you'll stare at it for like 10 minutes straight wondering wtf is going on @quiet depot
there are 3 types
if u know what ur doing, which u do, they shouldn't be too hard
1 sec
ok so im fucked
no im trying to leave
lol
Literally 0:00 lmao
oh god it seems so simple yet i have no clue without making this like 500000 lines
dewit
xD
Yugi you're an asshole
using python smh
same
Ey
python was built for this kinda stuff
Is there even a smexy java function for this?
public static String reverseCase(String text) {
char[] chars = text.toCharArray();
for (int i = 0; i < chars.length; i++) {
char c = chars[i];
if (Character.isUpperCase(c)) chars[i] = Character.toLowerCase(c);
else if (Character.isLowerCase(c)) chars[i] = Character.toUpperCase(c);
}
return new String(chars);
}
that's it in Java lol
HAHAHAHAHA
yikes
Is there even a smexy java function for this?
no there isn't lol
StringUtils
bruh im failing hard
if you can use that here, you have swapcase
StringUtils.swapCase("BrUh")
apache commons
not a built-in
it may have been added though
ya never know
but 25 chars in python is just a joke
BM share code
^^^
you should look at mine and Yugi's
lmao 551 characters
also 551 chars @obtuse gale ? did you forget to remove the comments?
yes lol
oh right
yeah so i was prob about right :)
ill be bullied
no you wont
show code
do it
@prisma wave show code
u can only improve by sharing code
kk bully me now
that isn't actually that bad tbh
wouldn't've used a StringBuilder though
ยฏ_(ใ)_/ยฏ
Its so weird not doing it in an IDE
Check my code
AHHh
I win when it comes to number of lines :))
Took me way too long damn
I already did that yesterday on cpp xD
lol who saw that coming
one line code
me with the most characters
I win when it comes to number of lines :))No you dont xD
Could've atleast gotten 42069
python is like cheating
That's why using mixed languages is kek when it comes to these kind of questions
once piggy gets done I'll launch a new one
Piggy fell asleep?
It's a kek way of saying lol
xD
wait so is it based off characters?
yes Aj
yes
Let's see if piggy can beat me
there are 3 types of rounds
@quiet depot You alive?
Fastest, Shortest and Reverse
Fastest = timed + proper questions
Reverse = timed + sample input and output given but no question
Shortest = least char count
alrighty
lol am i the only one left
Matt show your code pls
yeah piggy
@obtuse gale Ctrl+shift+a and search for scratch in IJ
just opens a scratch file then u can copy and paste back into the site
oo
ctrl+alt+shift+insert
fak
or that ye
System.out.println((java.nio.CharBuffer.wrap(chars).chars().mapToObj(i -> Character.isUpperCase(chars[i]) ? Character.toLowerCase(chars[i]) : Character.toUpperCase(chars[i])).map(c -> "" + c).collect(Collectors.joining())));```
that was where i got up to
welp
rip piggy
damn
Does it matter my scratch file is .kts instead of .kt lol?
no
the people with the fastest browsers will get in first lol
not really
Kali, how do I run the scratch file?
i'll try go faster this round guys
anyone else still joining?
Is there no way in this game so theres like multiple rounds per link?
would've finished way earlier if Arrays.stream supported stupid character arrays
Is there no way in this game so theres like multiple rounds per link?bot
Aj nope
Cheeze
i've got no clue lol
how does this mode work lol
Piggy..
This one is odd
idk frosty i just usually paste it into the site
Matt look at it again
just check the code is right and stuff
lol Yugi
I thought it was Sum - first element
wait how am I supposed to loop through the rest of the input lines?
xD
I know what it's doing I just can't get the input lines
Kali, I could've swore KM was running it somehow yesterday
Just solve it
get output from input?
oh lol
hm?
try to find by doing what can you reach the output
Don't overcomplicate
So the number on the right is the output lol
yes
and on the left is the input
yup
ok i still have no clue how to do this lol
Try thinking of diff operations on the input?
nah I can't do this
bruh
that's bullshit
what happened bardy?
wtf is this
look at my code
I can't get input as lines
idk how to loop over until there's no lines left
o
shut up
xD
I thought it was just add up all the values and take that total away from the first value
This one was ass, literally overcomplicated it by a lot
I thought it was just add up all the values and take that total away from the first valueYea I thought that first too
still no clue how to do it but
But then realized I didnt have to add it in the first place
then realized it was amount of input
xD
x=input()
print(input() for y in range(1,x-1))
```?

3
5
2
4
Here 3 means there will be 3 more input values and res would be 11
so
x=int(input())
print(input()+input() for a in range(0,x))
```?
no
wtf?
I actually don't know how to do this
python inputs work completely different to something like Java
Aj ded?
wait hold up
Failure
Found: 4....
Expected: 6``` REEE
x, y = input().split() actually WORKS?
how tf do i bring up the console on a scratch file
like so i can type number
20 SECS
Wondering the same thing
new one yugi
x=int(input())
b = 0;
for a in range(0,x):
x= x+b;
print(b)```
@jovial warren
He's cooking dinner
ah
more accurate then
I think everyone is in
start bardy
ayy
thats some of the easiest questions so far
This was an easy one
mhm
why didn't you just run Math.min(x,y) Yugi? xD
I'm dumb
meh
no diff
min returns the minimum of the 2
takes the min value of two values
does what it says on the tin lol
ternary was smaller to type out
true
When you rarely use any of these methods :c
stupid fucking game
Oh wow actually was the first
it wanted lowercase x, not capital x
tip for those who are still working on it
modulus
Fucking shitty template
I feel i might be doing things the hardest way possible
I spent 1min trynna see where that extra line is coming from..
And it was the default print out
python's duck typing gets annoying sometimes lol
share code aj
lol i literally added everything to a list for no reason
im so confused with why this doesnt work xD
Remove the last printout Yugi
also you could probably compress that if else in to a ternary in Java
Oh yeah AJ you had 2 loops to do the job of one xD
@jovial warren forced duck typing in a languages design is always a huge mistake.
@quiet depot it isn't in the shortest challenges lol
dammit
bardy, keep in mind, duck typing is a part of static typing
python just unnecessarily restricts you to duck typing only
Didn't know this one had character criteria
sneaky
would've had you if I'd put my print statement on the same line as my if
makes sense
Yeah
didn't know you could do that in python though
does this have lua?
probably
I'll be back a bit later
lua is trash
Didn't know this one had character criteriait says on top of problem statement
also Yugi you should try using the quote feature discord has lol
unless for some reason that's how discord is formatting your quotes
Could someone give me a hand setting up MySQL on my server? I am running on a Linux dedicated server and am struggling. (this is my first time using Linux)
Nice atleast I wasn't last
Last one for me
alright
o
boom
I don't get the point of this
My solution is dumb
as long as it works it's fine
^
bit like my monstrosity
wha
am failing hard
damn frosty with the 11%
frosty what did you do lol
Can someone humour me with what the fuck you're supposed to do?
Repeat the number N, N amount of times
share ur code
print a isosceles right triangle of the input value of side length of input
my strategy works best
xD
Aight i'll do one more xD
start Bardy
I did
Ugh another reverse one
r3kt
we are looking at the numbers :/
๐ ๐ฌ
Piggy, ew Imagine having to use Math.floor
imagine being a noob coder
easy
share bard
Piggy :c
Oof only me left now
I knew that was what it was doing the whole time I just didn't know how to do that in python lol
||basically you half the value, floor it, and add it to the original||
never ever experimented with it before that?
No
when did you start piggy?
when did all of us start?
i started experimenting with it in 2014
properly started the java train in like 2018
or 2017
probs 2018
I didn't even start playing Minecraft on the PC until 2016 lol
I started late
i started playing mc pc 2011
I started a couple of years ago
i started playing mc pc 2011
I was playing the xbox 360 edition until I got my PC in November 2016 lol
but I'm 15 so that was just kinda what everyone played back then
Piggy is 117 so that's late af for him
Java or any language in general?
any language
any language?
Damn
well, I started with HTML in 2016 but that doesn't count lol
lol
and I didn't know anything about HTML anyway
html is still a programming language
lol
I was just copying and pasting
Ugh this reverse ones
pretending to my school like I knew what I was doing lol
The website didn't recognize floor from Kotlin, had to use Math.floor
yes
yea lol i had that as well matt
dev role in here is the equivalent of a doctorate in software engineering
ofc xD
I was supposed to be rewriting a specific part of the old school website, took me at least two or three years and I didn't even finish it lol
PhD
dev role in here is the equivalent of a doctorate in software engineering
you wish
i'm serious bruh
Nah, it didn't recognize it
I can't get dev role yet since I don't have two active projects lol
lol this sounds like meths
test
Failure
Found: 0 2 4 6 8
Expected: Nothing
sorry what?
and if I print nothing it's the other way around
Same lol
Gnite
x,y=input().split()
for i in range(0,int(x)*2-2,int(y)):print(i,end=' ')
print(i)
that gives me what I said above
gn piggy
Oh did the server thing at least work
yeah i was kinda stupid about it
Did you push changes so I can continue to work on it?
the problem was that the server implementation wasn't actually getting it's handle instance
yea
it's not on ur fork
I'll pull yours
Mhmm
cuz there's two types of keyable
there's things like Server, which are singleton
then there's keyables like Player, which have to be frequently recreated
the problem is figuring out how to consistently cache the key functions for each type of keyable
Lmao what
i'm so confused
You logged in with discord
are you sure?
maybe your discord account is on your github profile?
it's taking my discord from my gh org
Perhaps it's your GitHub profile name
it can only read your email though?
there ya are
kinda funny
someone's probably gone on there and found that then
how did you get to that screen?
bardy share
look at it lol
where?
I give up
ah okay
dont even have that
What am I missing here?
Like, what should it be so it recognises the 3rd case
Shut uop
can't you just do result += " " or do strings not work like that lol
I'm dumb okay
very
Same
@topaz bay you gonna join us?
absolutely not
yup
Goddamn weeb @topaz bay
why the frick is there a border on the banner
This one is so confusing what
okay that challenge was literally simple
I'm having trouble is with the english here xD
I don't understand what it's supposed to do
@hot hull all you gotta do is check if x is in the bounds and then print the category
@ocean quartz print category when X is between the given interval F and T
...
||if (X >= F && X <= T) System.out.println(category);||
That's it for me boiz
jesus aj
Not rn tho, cause Imma yeet myself out the window soon
join in aj
what time is it for u
3.30AM
Not rn tho, cause Imma yeet myself out the window soon๐พ ๐ช ๐ช ๐น
im in bed now tho
What do you tell yourself when you're standing near a cliff?
:yeet:
anyone else?
alrighty
xD yea I missed that a lot of times yesterday
Aight i'm actually gonna head out now xD
one more? xD
Nah xD
Didnt you say that lik
1 more
xD oke ciao man
before i said i was gonna leave
Shhh
i feel like if u were to do this in a public lobby people would just take the piss and submit within the last second of the timer
it keeps telling me fucking unexpected EOF
xD
nah fuck this
next round bois
nah that last round was actual bullshit
Join mattt
Nah, i need to work on a few things xD
aj join @obtuse gale
this is my final round
alrighty
its 3.45AM
me first
dammit
||math.factorial(n)|| ez
this time its the final
right xD
xD
fun main(args : Array<String>) {
val input = Scanner(System.`in`)
val n = input.nextInt()
var round = 0
var str = ""
while(round < n){
str += n
println(str)
round++
}
}``` lol i feel like ive overcomplicated smthn
||for a in range(1,n+1):
print(a*str(n))
||xD
that took me way too long
i hate the way the website automatically adds args in the function when theyre not needed smh
anyone else joining?
YO
ayy @prisma wave
ayyyyy
๐๐
Boi is hereee
its 3.52 am
xD
@prisma wave I didn't have much time to do it but I made it and here's the result (working) what do you think ? :p
URLClassLoader classLoader = new URLClassLoader(new URL[]{mliUrl});
InputStream customConfig = classLoader.getResourceAsStream("default.yml");
File customConfigFile = new File("plugins/PlaceholderAPI/mli", "customConfig.yml");
try {
customConfigFile.mkdirs();
customConfigFile.createNewFile();
Files.copy(customConfig, Paths.get(customConfigFile.getPath()), StandardCopyOption.REPLACE_EXISTING);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}```
๐ค
You people are playing again, I see
wtf is this
@brave minnow iirc you don't need to make the file, and you probably shouldn't have REPLACE_EXISTING. but otherwise it's lovely (apart from being a massive hack)
read it
What is this
it's creating a default file because PAPI or spigot is messing with methods for what I want
@prisma wave it returns errors if I don't mkdirs() and createNewFile () D:
oh ok
and REPLACE_EXISTING is to be sure it is written in file ^^
REPLACE_EXISTING will overwrite any existing files
if someone modifies the config, REPLACE_EXISTING will overwrite the changes
yep that's exactly what I want as it is creating only if no files are existing
no fucking clue whatsoever
oh ofc it is
yeah that confused me
the precision confused me
since if it's .5 it doesn't round
EZ
mine is hideous
@brave minnow are you misunderstanding me? If the user makes changes to customConfig.yml, REPLACE_EXISTING will remove those changes
fair enough
perhaps it's an int, perhaps not
fair enough
done xD
@prisma wave you misunderstood either I'm copying this ONLY if the there is NO files in mli dir ^^
oh
a = "{:.1f}".format(a)
else:
a = str(int(a))
if (y_1 + y_2) % 2 != 0:
b = "{:.1f}".format(b)
else:
b = str(int(b))```
xD
then you shouldn't need REPLACE_EXISTING if you know there isn't an existing one
that's disgusting
those are the only cases when dealing with /2
:x
welp
another?
is it just us?
think so
๐ฆ
nah it ain't just you mate
BM, earlier you said you didn't watch GOT yet, did you watch 100?
@prisma wave not working without replace existing ๐คท
@hot hull i don't think so
Damn, you're missing out on a lot
A series called The 100
ez
https://mindyourdecisions.com/blog/2016/04/07/6-4-210-intelligence-test-explained/ that's where I figured it out from lol
lmao
If you have time, I recommend giving it a watch sometime
There's a season where it gets slightly boring, but then gets good again
Have you watched upload?
pretty simple actually lol
No clue what I'm looking at tho
||the capitalization is important||
the case seems simple
okay yeah that was ez
cheers for the hint BM ๐
np lol
still took some googling though
had to find out how to ||count the amount of lowercase characters in a string|| lol
imagine not using kotlin's ||Character.isLowerCase()||
||print(sum(1 for c in s if c.islower()))|| that's it in python lol
imagine not using kotlin's Character.isLowerCase()Thats from java
nooo spoilers
but in kotlin you can do ||c.isLowerCase()|| without a static method
ah
||S.toCharArray().filter{it.isLowerCase()}.count()||
I'm confused as to why Character.isUpperCase and inverting it, printed out 7 instead of 4 
you cant stream chars in java
you can
I meant in java
oh yeah
yea but then its a intstream
true
Yugi, I might watch that
What
into a vr afterlife
Also, only 3 more weeks of this shitty as school left ๐
Nice Frosty
s.chars().filter(c -> Character.isLowerCase((char) c)).count();``` should do it in java
My classes start in 10 days I think ๐
Rip you
my exams got sem exams got postponed for 1 month
obviously it won't be as easy but it helps me to get quicker at these things
and i got a mail today about reopeing after lockdown
I think they are going to call us back to uni in july
ffs
@hot hull u joining?
Nah
alrighty
also @prisma wave if I'm making a new gradle project do I untick the Java one and tick the Kotlin/JVM option?
@spring canyon @light leaf @gentle coyote are any of you up for coming rounds?
ugh
ig u only need the java one ticked if ur gonna write some classes in java, not sure
i was 1 character out with the regex
^
@jovial warren you don't need the java one unless you want to write java
which i hope would be 0
John join
yay
this is an interesting one
yeah
are any of you up for coming rounds?
Nah, I'm sorry. I have to mess around with mvc
I'm joining next round
awesome
oh dear
people like me gonna get roasted lol
there's literally no way I can beat python
xD
||n=int(input());c=input()
for i in input().split():print(c[int(i)-1],end="")||
you can't beat python at shortest
not unless it's a very simple problem
it's what the language was designed for
maybe
if it's a problem that Python doesn't have a built-in function for then you could have a chance
Python has built in stuff for basically everything though
Perhaps
It's gonna be close
also if this was based off of lines, python would lose almost all the time lol
julia?
It would be nice if you could use kotlin scripts
Without a main function
hm I might try julia
oh you can't?
lol
julia looks nice, I might learn it as well
Yeah I wish I could use regular clojure and not clojure with entry point too
sometimes as fast as c
as fast as C?
^
which is lowkey insane
how tf does a language become faster than C lol
I mean it compiles to native code
probably why
well its kind of comparitive
optimized vs what people write in c
pretty much
same case as java
damn kotlin lost ๐ฆ
๐
xD
and that's a microbenchmark
@spring canyon
how do you create modules in gradle? the same way you do in maven or what?
or are modules not DS
yeah it seems like it
why didn't creating a new module create main and test?
Sorry, I was too slow
because a module won't necessarily store code in java style
so what do I do?
make them yourself
just create the src directory manually?
ah okay
do I create the src directory and then main and test as modules or main and test as directories?
as directories
will they colour code correctly though?
also is it src/main/kotlin for kotlin source rather than src/main/java? because maven uses src/main/java for both I think
after a build?
also do I have to manually create these directories every time I create a new module?
gj
really?
https://img.bristermitten.me/19.51.33-2020.png LOOK AT THAT
L
๐
kotlin stay wonning
python bad
Ws all round
oh yeah
xD
ncr is overkill lol
lol
mine is O(n) yours is O(n!) I think
yes
fuckin hell
Imma try vbs for next shortest
