From CG community
Jump to navigation Jump to search

Default avatar.png BlindKing: Hello, does anyone on here feel like explaining how I can use trig to solve Mars Lander 2?

Default avatar.png BlindKing: in Java.

MadKnight: why not, Automaton2000 ?

Automaton2000: i still have a chance to play against me

Denshire: ugh trying to make a basic algorithm and then finding out you need trigonometry:triumph: what is an arccosine anyway

MadKnight: Denshire which game are u playing ?

Denshire: code v zombies

MadKnight: and what kind of trigonometry? what exactly ?

Denshire: trying to think of something original, with danger levels and all

Denshire: just trying to figure out the location the player will be in after making a move towards a human

Denshire: i honestly don't know how

Denshire: trig might be the only answer

Denshire: i'm trying to make a triangle, with the actual movement as hypotenuse, then find an angle and use that to find the x and y

Denshire: is this even a good idea? i might have ignored everything related to trig in highschool

MadKnight: u need to take vector from player to target, divide it by its length, and then multiply by player's speed

Denshire: oh

Denshire: thanks for the tip

Denshire: (might have also ignored everything related to vectors in highschool but the internet will help me)

MadKnight: they're pretty simple

Denshire: yeah, i know, but it's 11pm and my brain can't handle it

Denshire: i'll probably come back to this tomorrow

Denshire: but what would be the speed exactly? just the distance moved every turn?

Denshire: oh

Denshire: wait

Denshire: i just read what you wrote again and now i actually understand everything

Denshire: it's more simple than I thought at first

Denshire: well, thanks a lot, actually! But i'm still gonna try and restore my nonexistent sleep schedule first

MadKnight: okay cya

Denshire: g'night:sleepy:

Default avatar.png AnsarDauletbayev: Hello everybody, have some cod of this . I can t understand and can t find it in google. Thank you

Default avatar.png wenyue: ?

Default avatar.png AnsarDauletbayev: i just start to learn python and can t understand how to make cod for this

MadKnight: code* AnsarDauletbayev

Default avatar.png AnsarDauletbayev: ok sorry) my english is not good =)

Default avatar.png wenyue: Chinese?

Default avatar.png RuiY: Yes, hands up! I'm new here, hello

MadKnight: no he's not, wenyue

Default avatar.png HardikPoudel: anyone plays fall guys?

Default avatar.png HardikPoudel: ive no teammates

MadKnight: don't they have discord HardikPoudel ?

jacek: you seem so active lately

MadKnight: because i'm back

MadKnight: shouldn't i be, jacek ?

jacek: lets ask Automaton2000

Automaton2000: i would not be a good idea

DaNinja: :grin:

Default avatar.png sugam: bruh anybody recently added from islington?

jacek: ?

Astrobytes: I think he's referring to the university that the guy who's doing the unofficial contest goes to

Default avatar.png sugam: I could not solve the simplest problem lol it's taking time to get used to

uvBoss: just do a few puzzles u will get used to it

uvBoss: @sugam

Default avatar.png sugam: what are the prerequisites to start doing AI challenges?

uvBoss: u can start using if statements

uvBoss: and slowly work your way towards algorithms

uvBoss: if its your first time

Default avatar.png sugam: yes my first time on this site

uvBoss: i started with if statements and then somehow i transitioned to algorithms

uvBoss: xD

Default avatar.png sugam: how to debug

uvBoss: which lang?

Default avatar.png sugam: java

uvBoss: To debug: System.err.println("Debug messages...");

Default avatar.png sugam: debug the logical errors

uvBoss: wdym?

uvBoss: just print out variables using the above method

Default avatar.png sugam: yeah, I found out that I can actually print on the console and test my code

uvBoss: yea

Default avatar.png sugam: how to get codin point

Default avatar.png UndisclosedBeastAndHisDog_820d: hi guys

Uljahn: sugam: play games in Compete section

Default avatar.png sugam: thanks Uljahn

Zenoscave: Did they remove the level 3 req for chat?

Default avatar.png sugam: I'm level 5 btw

Zenoscave: no, not you, sorry! the UndisclosedBeastAndHisDog_820d

Zenoscave: is level 1

Uljahn: maybe through external client

Zenoscave: makes sense. can't really stop jabber

Default avatar.png sugam: wow you guys are pro damn.

Zenoscave: why do you think that? I'm not really pro...

Uljahn: im not even a coder

Zenoscave: yeah you're a cat.

Zenoscave: right Uljahn

Uljahn: pewpew

Zenoscave: pewpew

Uljahn: i mean yes

Zenoscave: I understood

Default avatar.png sugam: ranking 43rd

Zenoscave: ranking is a bad metric. doesn't really tell much beyond like the top 15-20

Zenoscave: there is such a large gap

Default avatar.png sugam: I'm just getting started

Zenoscave: well keep with it! :)

Default avatar.png sugam: It is starting to look less intimidating

Default avatar.png sugam: can i follow you two?

Uljahn: sure

Zenoscave: go for it

Default avatar.png sugam: thanks

Uljahn: there is no need to be intimidated, you can code for fun and learn things at your own pace, solve puzzles and look through others' solutions or play multiplayers and aim for top-1k, then top-500 etc.

Default avatar.png sugam: Actually our college is having some kind of competition or something and they asked me to join in this site. ngl I'm starting to like it.

uvBoss: have you joined the discord?

Default avatar.png sugam: yes

uvBoss: kk

Collector_Nishant: is someone from this clash online to hear me

Default avatar.png rivancic: Hello. I am about to leave but I want to return and continue. Is there a way to save the code in Coders Strike Back?

Default avatar.png rivancic: Or you have to copy paste it and store somewhere locally?

MadKnight: it saves when u play

Uljahn: click play or submit

Default avatar.png wenyue: :grinning:

Default avatar.png wenyue: :grinning:

Default avatar.png wenyue: I think it's so difficult here

Default avatar.png wenyue: My foundation is too bad

Default avatar.png w-kosse: Hi! Bit new, is there a way to measure performance of one solution vs another?

reCurse: Use a high resolution timer

Hjax: if you mean in a multi, theres brutaltester

Default avatar.png w-kosse: more like general things, execution times, cpu & memory use etc

Default avatar.png w-kosse: but coding someting in myself is probably a good way to go as well

Hjax: ah then i defer to recurse's answer

Default avatar.png w-kosse: i'll look into it, thnx!

Hjax: i would say that execution speed is almost never a concern when you are starting out

Hjax: if you are running out of time its much more likely that you have an infinite loop or some bug

Default avatar.png w-kosse: haha it's not a concern, just a curiosity, what route would work better

Hjax: do some puzzles, when you get comfortable enough with the site maybe try a multi that looks fun

Default avatar.png w-kosse: will do, looks fun so far! thnx for the input :smiley:

sunksuperset370: 'elo

Default avatar.png HexObEe: hello

Gloryness: Hi

Default avatar.png HexObEe: Just discovered this website today.

Default avatar.png HexObEe: Wow. Wish i had found it sooner

Gloryness: I've only been using it for 2 days but I've known it for ages

Default avatar.png HexObEe: :grinning:

Default avatar.png HexObEe: So far seems like a great place for practice (and for fun)

Hjax: its a lot of fun

Hjax: especially contests

sunksuperset370: 'elo

DinuBrat: HI

Gloryness: everyone on my clash got 0% because of this glitch

PlungeDominick: I think it was just a bad clash :(

DinuBrat: @Ru

Hjax: you already said that

Hjax: oh scroll

Hjax: the chat box needs a "new messages below" box

sunksuperset370: i think i might need help here

Hjax: whats up

sunksuperset370: i am in fast mode

sunksuperset370: here me code


sunksuperset370: :sweat_smile:

Hjax: im not sure what you are going for there

sunksuperset370: ?

Hjax: i dont know what that code is supposed to do

sunksuperset370: what i am going for right now is that i am trying to look for S

Hjax: it looks like it returns 1 if S isnt the empty string, and prints 0 otherwise

sunksuperset370: then i am creating a while loop until there is no more S

Hjax: your loop doesnt change S though

Hjax: and why is there a return statement in there

PlungeDominick: s is given

Hjax: yes, but you want to loop through S i assume

Hjax: which means you probably want to change S each iteration

Hjax: otherwise you just loop forever

sunksuperset370: oh wait right i forgot

sunksuperset370: i needed to subtract s by one too

sunksuperset370: thx

PlungeDominick: Damn true I wasn't even reading it properly


sunksuperset370: this don't work either

PlungeDominick: I was trying to figure out this reverse

sunksuperset370: time out

sunksuperset370: ed

Hjax: why is there a return statement in your loop

sunksuperset370: so i can extract the i from the loop to log it

Hjax: thats.... not how that works

sunksuperset370: ooooookkkkkkk

sunksuperset370: would you like to help

Hjax: i is already available outside of your loop

Hjax: you dont need to do anything special

sunksuperset370: but the return shouldn't do anything

sunksuperset370: than

Hjax: the return quits out of your main method so you never reach the console log

sunksuperset370: so that is the reason i wan't getting an answer

sunksuperset370: right?

Hjax: thats a reason, i still dont know what this code does, i dont think it does what you want it to do

sunksuperset370: ok

sunksuperset370: i mean it has been a long time since i was last on the site

sunksuperset370: or coding

Default avatar.png w-kosse: i is already in your scope, your loop doesn't need to return it, just set it, returning it will quit the loop

sunksuperset370: ok

sunksuperset370: i am in a shortest mode now and i want to know how this works

sunksuperset370: i don't know anything about binary

sunksuperset370: the example given is 15 => 1111 and the output will be 4

sunksuperset370: 'ello??

Hjax: so whats the goal? count the number of 1s in the binary representation?

sunksuperset370: yes

sunksuperset370: input 15 output 4

sunksuperset370: that is the example

sunksuperset370: 10 mins left

Hjax: i cant give you the answer, thats cheating :P i can just answer general questions

sunksuperset370: nono

sunksuperset370: nonono

sunksuperset370: i am not asking for the answer

sunksuperset370: i am asking how does binary work

sunksuperset370: how to convert a number to binary

Default avatar.png HexObEe: Hint: you can experiment with the input number given. 1+2+4+8 are the values for binary 1111

sunksuperset370: i think i might get it

Hjax: yeah binary is just base 2, so each place in the number is a power of 2

Default avatar.png HexObEe: yeah

Hjax: 1 is 1, 2 is 10, 3 is 11, four is 100, five is 101

Hjax: etc

sunksuperset370: actually i think you are mutiplying by 2 there

sunksuperset370: ?

sunksuperset370: ??????????

Hjax: yes that is how powers of 2 work

sunksuperset370: hjax i don't get it

Default avatar.png HexObEe: :D

sunksuperset370: 2 *2 is 4

sunksuperset370: not 10

Hjax: 2 in decimal is 10 in binary

Hjax: 1 * 2^1 + 0 * 2^0 = 2

sunksuperset370: 2 in decimal?

sunksuperset370: sorry got to go

sunksuperset370: bye

Default avatar.png HexObEe: yup

Astrobytes: that went well

Hjax: i tried

Astrobytes: :D

Default avatar.png HexObEe: problem left hanging :D

Hjax: explaining a new concept just by typing is hard lol

Hjax: maybe i should have told him to google it

Astrobytes: Yeah, usually easier tbh

Default avatar.png HexObEe: googling should be your first go-to

Default avatar.png w-kosse: well you did a pretty good job either way, haha

Astrobytes: then they should ask questions after

Astrobytes: and yeah, admirable effort :)

Hjax: were you lurking that whole time astro

Astrobytes: Something tells me he wasn't gonna get it regardless

Astrobytes: And yeah :P

Hjax: :P

Hjax: btw are you going to play the unofficial contest?

Astrobytes: I signed up, so hopefully yeah (depending on time + what it is)

Hjax: yay :D

Hjax: contests are great motivation for me to play a multi

Astrobytes: Even if I don't like it I'll probably try to do something at least

Astrobytes: Yeah, it does motivate you somewhat

Hjax: i did pretty well in the last unofficial one

Astrobytes: I remember :)

Hjax: has Nerchio been around recently? i wonder if he will play again

Astrobytes: Was wondering about him the other day, I haven't seen him

sunksuperset370: ok me back

sunksuperset370: sorry i am in school

Astrobytes: Then again, I've been absent a lot recently

Hjax: maybe focus on your classes sunksuperset370 ;)

Astrobytes: Especially if it's mathematics ;)

sunksuperset370: i was free before

sunksuperset370: now i am in mathematics

sunksuperset370: right now

sunksuperset370: i am going to work now

sunksuperset370: bellwork

Astrobytes: Pay attention and get good!

sunksuperset370: nono

sunksuperset370: i am good at math

sunksuperset370: just not coding

Default avatar.png HexObEe: cries in calculus

Astrobytes: Counting in binary is math

sunksuperset370: bye

sunksuperset370: for 5 mins

sunksuperset370: hulo me back

sunksuperset370: ok that was not 5 mins sorry

sunksuperset370: but me done with bellwork

sunksuperset370: 'ello????????????????????????

sunksuperset370: :disappointed:

sunksuperset370: :confused:

Astrobytes: OK, 1 more thing to work on: patience ;)


sunksuperset370: oh sorry

sunksuperset370: i was feeling lonely

sunksuperset370: so now what i do

sunksuperset370: ?

Astrobytes: You tell me

sunksuperset370: i need to know how binary work

Astrobytes: Google it :)

sunksuperset370: i was about to say i don't go for google as a source

Astrobytes: It's fun to learn, I promise

sunksuperset370: wait wait

sunksuperset370: i need to listen to the teacher or i will get in trouble

sunksuperset370: i know it is but google is not really the best of the sources

sunksuperset370: it gives us links but not the answer

Default avatar.png HexObEe: follow the links

Astrobytes: Use your common sense

sunksuperset370: i know but i like to learn from actual people aswering the question

Default avatar.png HexObEe: google is just a framework for you to use

sunksuperset370: ?

PlungeDominick: I'm crying, I sat there for like 6 minutes wondering how he had 5 less characters than realized how I could save like 15 with only a minute left

PlungeDominick: then

Krantt: When are the rankings updated?

eulerscheZahl: in about 8 hours if you are referring to the global leaderboard

Krantt: Oki ty

Default avatar.png INJECTOR_PRO: join the clash asap

Astrobytes: I shall not.

jacek: ask Automaton2000

Automaton2000: i guess i should try to have a big impact

Logiman09: Hi

Zm4j: Hi

Logiman09: Is it bad that Clash of code is hard for me..?

Zm4j: nah

Astrobytes: You can always do more puzzles instead

Logiman09: @Astrobytes I just cant code

Astrobytes: CG isn't the best place if you're just starting out in all honesty

Logiman09: I've started a little bit but like it's hard for me...I can't understand it...

Astrobytes: As in, you need to know the basics first, CG won't teach you

itzblinkzy: go to freecodecamp or soemthing

itzblinkzy: and then when you know the basics and all that you can come back

itzblinkzy: and maybe you'll be able to do a decent amount of the clashes

itzblinkzy: but they are still very hard

Astrobytes: Or try both side-by-side, depends on your learning style

Astrobytes: And I would recommend starting with easy puzzles over clashes, to begin with

Logiman09: mk... TY

Logiman09: :grinning:

jacek: any idea what game will be in the minicontest?

Default avatar.png JBM: tvc

jacek: i doubt it

jacek: no fow

Default avatar.png JBM: damn

Default avatar.png JBM: hey i can minicontest i i want to

Default avatar.png JBM: was thinking of first week of oct

jacek: with blackjack and hookers

Default avatar.png JBM: with t-shirts

jacek: tvc t-shirts?

Default avatar.png JBM: yup

Default avatar.png JBM: i already designed the rest of the paraphernalia

Default avatar.png JBM: just got the t-shirts left

Astrobytes: naked troll t-shirts!

Default avatar.png JBM: naaaaw

Default avatar.png JBM: naked troll is just the briefs

Default avatar.png JBM: mmm dunno how to share pix from there

Astrobytes: Removable velcro pants

Default avatar.png JBM: just a sec

Default avatar.png JBM: oh, imgur doesn't want me anymore

Default avatar.png JBM: what's left

Astrobytes: donno, I always use imgur


Default avatar.png JBM: that still exists

jacek: lets find out

Zm4j: how can i fix problem, if my test cases are green, but submit ones fail, and i cant see those cases

Default avatar.png JBM:

Astrobytes: :rofl:

Default avatar.png JBM: inspired by some suggestion on #Fr

Astrobytes: Utterly brilliant

Default avatar.png JBM: so that's 3rd prize

Astrobytes: Zm4j - if it's a puzzle you can do custom testcases. The validators are different from the testcases

Default avatar.png JBM: 1st and 2nd regular t-shirts (that actually say "winner " and "runner-up" if i manage to)

Default avatar.png JBM: facemasks if people want to support the operation and create more t-shirts to give out to language winners

Astrobytes: TvC Inc.

Default avatar.png JBM: lol

Hjax: i wonder if they will pick a community multi

Hjax: thats the real way to get one basically no one has played

Default avatar.png JBM: or pick one who'll get out just then O:-)

Hjax: the last unofficial contest had a most improved leaderboard

eulerscheZahl: or launch your own alternative unofficial contest if you don't like the choice

Default avatar.png JBM: yeah tell me about it

Hjax: lol

Default avatar.png JBM: like, seriously, tell me about it

Default avatar.png JBM: why did he need a separte leaderboard

Default avatar.png JBM: what's wrong with cg's?

Default avatar.png JBM: do i need to make one too?

Hjax: ? it was good

Default avatar.png JBM: i'm not debating that

Default avatar.png JBM: i'm more in "what's the point" territory

Hjax: fun!

Default avatar.png JBM: ok

Default avatar.png JBM: so i need one too

Hjax: makes the contest feel more real

Hjax: because you can see a leaderboard of just people playing the contest

Astrobytes: It was to account for existing players in the multi, so he had a most improved placement metric to try and keep the competitive aspect alive

Hjax: yeah, otherwise recurs e could have just typed his name into the form, logged off for the entirely of the contest, and still won

Hjax: which isnt very exciting

jacek: so the game should be uttt

Hjax: im hoping its fantastic bits

Hjax: that one looks fun

eulerscheZahl: that one looks interesting to me

Scarfield: there is going to be an unofficial contest?

Astrobytes: nice, my CTF skills are sadly lacking :/

Astrobytes: Oh hey EcksDee

Astrobytes: :P

Astrobytes: And yes

Default avatar.png JBM: i've heard about those ctf contests

Default avatar.png JBM: and still can't figure out from the outside what it's all about

Astrobytes: Capturing flags :P

Scarfield: lol

Scarfield: and hey, where do i sign up for it? :)



Default avatar.png JBM: so, quake?

Astrobytes: JBM: capturing 'flags' via various cybersecurity-related methods

Default avatar.png Shakerica: Oh..God...I feel so nubish I'm the only one ?

Astrobytes: (in brief)

Default avatar.png JBM: you're giving me the same impenetrable outside description as tge rest

Default avatar.png JBM: yes, capture flags, yes, security, but no general understanding at all

RoboStac: it's basically a hacking competition and when you hack the system you get a 'flag' to prove you've done it

Default avatar.png JBM: so the flag is given to all who do?

RoboStac: depends on the contest

Astrobytes: You might have to penetrate a server, hunt down some file, to get access to somewhere else, find info hidden steganographically or something etc etc

Default avatar.png JBM: sounds like "not-CTF" at all

RoboStac: yeah, it's not really ctf in any way

Default avatar.png JBM: don't get me wrong, sounds like fun

Default avatar.png JBM: but that's not AT ALL what i picture as ctf

RoboStac: at least in the gaming sense

Astrobytes: The 'flags' are just goals really

Astrobytes: Yeah I mean it's not exactly Counterstrike

Default avatar.png JBM: or just plain old quakemod-ctf

RoboStac: I think it comes from more organised versions where you'd have two teams and they'd both be trying to hack each other

Astrobytes: ^

Default avatar.png JBM: i heard about something like that too

Default avatar.png JBM: (just not (that i recall) limited to 2)

RoboStac: but now it's just a general hacking contest

Default avatar.png JBM: haclking as in penetration?

Astrobytes: Yeah it's kind of blown up into all sorts of themes and categories these days

RoboStac: can be exploiting services, reverse engineering binaries, breaking crypto etc

Astrobytes: JBM:

Default avatar.png JBM: yea hcould really be fun

Default avatar.png JBM: i enjoyed the overthewire series a lot

Default avatar.png JBM: i suppose there's similarities

Astrobytes: Yes, absolutely

Astrobytes: Anyways, I'm out for tonight. Take care all

Default avatar.png JBM: gn8

Default avatar.png JBM: wait, that doesn't work in en

Default avatar.png JBM: just gn then

Astrobytes: :D

Astrobytes: I still get it

Default avatar.png JBM: ^^

Default avatar.png JBM: note to self: find a more peculiar way of wishing a good night

jacek: let the Luna visit your dreams

Default avatar.png JBM: who's that

jacek: the Princess of lucid dreaming

Default avatar.png JBM: lost.

Default avatar.png JBM: oh mlp?

Default avatar.png JBM: took more than the first page of binging

jacek: should do banging instead

Default avatar.png JBM: let's try it

Default avatar.png JBM: mmm it won't let me websearch

AntiSquid: what tv show are you talking about?

Default avatar.png JBM: sorry, fresh out of jokes

jacek: your small horse

Uljahn: unity is sorcery

Default avatar.png JBM: discord is?

Default avatar.png Amadrobus: First time here, so basically, this site teach you how to create code that is un-maintainable ?

Default avatar.png JBM: no, you'll have to exercise that on your own

Default avatar.png Amadrobus: Not easily read, basically, when you work for a company, your code act as a chain ?

Default avatar.png Amadrobus: Sorry, but if company use this site for interview, like I am about to do, it kind of set the expectations.

Default avatar.png JBM: yeah it's kind of separate

Default avatar.png JBM: but not quite

Default avatar.png Amadrobus: The only thing I saw is people spending 7-8 minutes, writing a line, that is clever to solve a simple problem.

But it is understandable with about the same amount of brain power that was used to create that line, but in a professional context, when you got 20 of those lines, it become a major barrier of entry for anyone who is newly onboarded in that company.

Default avatar.png JBM: you saw people here code?

Default avatar.png Amadrobus: I did some clash, you can see the result.

Default avatar.png JBM: no thank you

Default avatar.png JBM: clashing is...

Default avatar.png JBM: i wish i could say "really not what the cg tests are all about"

Default avatar.png JBM: but they're really not different enough

Default avatar.png JBM: just consider clashes are live competitions

Default avatar.png JBM: whereas tests are kind of live, but not too competitive

Default avatar.png Amadrobus: It fine to showoff, it can collapse a company when the programer leave.

Default avatar.png JBM: i have a slightly different view

Default avatar.png JBM: then again i'm not sure if you're talking gamified interviews or clashes

Schwase: classic puzzles are an art and the bots are really impressive

Laminator: I had an interview today where I was able to talk about my clash of codes ranking as one of my projects. Thanks everyone for making this possible by mostly losing to me

Schwase: good save

Schwase: i thought i was gonna have to jump into a private clash against you haha

Schwase: that would be kind of fun actually

Schwase: as long as there is no code golf

Laminator: haha ya I'll have a better chance with code golf. I'm not saying I'm not the best by any means. But I think I've done good enough to discuss it during an interview.

Laminator: too many nots****

Schwase: thats good!

Schwase: was just joking around too haha

Schwase: you do know that CG uses bots to fill up clash lobbies right?

Laminator: Yeah, I figured the same weird profiles that left half the time were bots lol

Schwase: all are level 7

Laminator: I guess I should be thanking them separately

Schwase: just an easy way to figure it out

Schwase: dude that french one matthieu is actually nuts

Schwase: his fastest times are insane clips

Schwase: usually beats me out by seconds

Schwase: but im always amazed by it

Laminator: I don't think I've ever lose to one unless I couldn't solve the problem

Schwase: yikes

Schwase: i dont know what i missed in that one

Laminator: FR. 100% on test cases. You can bet I submitted a review.

Schwase: someone did score 100%

MadKnight: is 100% even possible, Automaton2000 ?

Automaton2000: it's hard to find a way to save your code and i'll be happy with the result

Default avatar.png Justin123: I got 100 but honestly I think my code was wrong

Laminator: I second that thought

Laminator: hahaha jkjk

Ceeb: Hello, i have make a contribution and it was approved, but i got only 3 votes up and i need to get a contribution with at least 5 votes up, can you help me to reach it ?


Default avatar.png Gv:

Laminator: Man that one was rough