Chat:World/2021-04-04
ClashCode2501: I have learnt python but want to learn application
Thelegendkillers: Hola!!
Miki09: hi
Thelegendkillers: alguien habla español?
Thelegendkillers: oh soy el unico latino aquí?
pr0ti[-_]st: hi
pr0ti[-_]st: good puzzle
pr0ti[-_]st: I had to think
pr0ti[-_]st: :grinning:
Ordonnateur: I feel cheated making 100% on the week puzzle not managing the add between more than 2 values (case that need to be managed for the test case tho ^^').
JSboss: ne soy latino pero hablo poquito de la idioma
JSboss: oh that was a few hours ago nvm
BlaiseEbuth: Jet lag...
AntiSquid: is that a ban request ?
MSmits: you can't ban robin hood just because he is socialist. Be politically neutral!
DJ-ALOK: hey i created a contribution
DJ-ALOK: can anybody want to view it or no AntiSquid it is not a ban request
davilla: oh, I just commented. don't worry, it'll get noticed
Manchi_o6o7: someone who could help me with a scanf problem. It only reads my input once in a loop.
Manchi_o6o7: http://chat.codingame.com/pastebin/61c2b8aa-05f1-4e90-ab84-6a1ca0afa8cb
Greanleaf: link = 404?
davilla: I can't read what you posted, seems to be a problem
Manchi_o6o7: https://pastebin.com/Si3mZhVm
davilla: better, thanks
davilla: which puzzle is this for?
davilla: or can you describe the issue?
davilla: it looks to me like it should loop n times, you say it's not?
Manchi_o6o7: I found the mistake... It has nothing to do with scanf and the loop. The string gets 5 letters, so the array size should be defined to 6, because of the \0
Manchi_o6o7: I forgot it...
Manchi_o6o7: Sorry guys
davilla: no worries, good debugging
DJ-ALOK: what do you want in my contribution davilla
davilla: nothing, I was just making a comment about the math
HDnox: yo, anybody knows how the score of clash code is calculated ? ?
HDnox: nevermind
Mohamed_Kharrat: percentage solved first, time to solve second. as for the shortest mode its shortest first, time comes second
VizGhar: Hey guys. Long time no see :) any breaking (braking) changes since january?
Puru299792458: Hi
Puru299792458: only 95 characters :scream:
PatrickMcGinnisII: Happy Easter
VizGhar: :D happy easter for you too
VizGhar: hey Puru299792458 for shortest you have to change language... Go is nogo
Puru299792458: :sweat_smile:
VizGhar: I use kotlin by default, ruby for shortest, since i can google 15 minutes straight
Puru299792458: I got to learn ruby then :smiley:
AntiSquid: DJ-ALOK solve mine, i solve yours
AntiSquid: actually your's isn't visible lol can't test at all
AntiSquid: did he already get banned again? :D
Puru299792458: do we get banned also ?
Puru299792458: I'm using since start april, don't have much idea about it
AntiSquid: probably if you claim to be robin hood (the user)
Puru299792458: aah ..... :d
AntiSquid: he's special, you're not so my guess is no you don't get a ban
Puru299792458: I'm solving don't panic
Puru299792458: episode 1
Puru299792458: but its really panicking
AntiSquid: you can do it!
Scarfield: Stay calm And take the elevator
VizGhar: you got this
VizGhar: One way to solve the puzzle is to read forum first. or if you struggle
Manchi_o6o7: Is someone capable of helping me with binary files in C
DaNinja: fopen(path,"rb");
HDnox: clashCode: http://chat.codingame.com/pastebin/370e61df-4746-41e6-9200-8585af237c54
HDnox: http://chat.codingame.com/pastebin/a437b844-357d-4775-902c-edefe46a4602
BlaiseEbuth: #clash
HDnox: I don't get it
HDnox: #clash
BlaiseEbuth: Get what
VizGhar: click on it, maybe youll figure it out
HDnox: 2 4 6 : 12 1 3 5: -9 8 10 9 7: 2
HDnox: reverse mode in clash code
HDnox: what's the relation
BlaiseEbuth: If I give you the answer you gimme your points ?
LionMask: hii BlaiseEbuth
DaNinja: +even -odd
HDnox: I lost
HDnox: :p
HDnox: just I was wondering
HDnox: :p
BlaiseEbuth: DaNinja you stole my points ! :rage:
HDnox: thanks anyway ;)
DaNinja: $$$
BlaiseEbuth: Hi Robihood
BlaiseEbuth: +n
Another_option: I have a question, if I was classhing, can I return to the question and submit my new solution just to check if it works
Murat_Eroglu: you cant
BlaiseEbuth: Not on CG, but you can use https://eulerschezahl.herokuapp.com/codingame/puzzles/
BlaiseEbuth: Hello toad btw, and sry for the ping... :3
Scarfield: this doesnt ping i think(?) www.BlaiseEbuth.org
BlaiseEbuth: Of course it does.
BlaiseEbuth: Scarfield.org
BlaiseEbuth: I don't count the times I summoned euler on Fr... ^^
Scarfield: weird, was sure adding chars in beginning or end to a nick wouldnt ping them
shubhamGoswami: https://www.codingame.com/clashofcode/clash/1673867acb5a0756cd3dbd80f0683a255faaba0
Scarfield: i have called stru_ct: el struc_to to not ping him for ages xD
Scarfield: without the "_" obviously
BlaiseEbuth: You pinged him each time :3
Scarfield: so much for trying to not be annoying
FleshgodApocalypse: guys can i ask you something ?
FleshgodApocalypse: it's a problem
Darklord1234: i m noob can u help me guyz
djsapsan: you won't believe me. In chess i mate opponent with random moves!
ErrorRazor: https://how-to-properly-ask-a-question.surge.sh/
FleshgodApocalypse: You need to reconstruct a sentence by concatenating various inputs. To do so, you need to use this rule : http://chat.codingame.com/pastebin/4a369338-2c12-4761-b0ef-bff7b11bac67
AntiSquid: hi, is there anyone here who wants to ask question?
Scarfield: xD
ErrorRazor: Pastebin is broken :(
AntiSquid: k thanks that's all i wanted to know FleshgodApocalypse
Manchi_o6o7: Guys. How can I read one per one byte from a binary file, till EOF. In C :/
FleshgodApocalypse: it is forbbiden to ask here ?
Nanosplitter: (Just ask the question instead of asking to ask the question)
Manchi_o6o7: c=getc isn't working properly
AntiSquid: no, am i forbidden to ask who wants to ask?
AntiSquid: cool so we can be best friends then
Scarfield: no FleshgodApocalypse of course not, but just ask your question from the start, no need to ask for help without stating what you need help with :)
Puru299792458: :joy:
FleshgodApocalypse: it's just i am new here , and i don't know the rules quit well
Puru299792458: no rules i guess
Puru299792458: just ask questions and be kind :D
AntiSquid: Automaton2000 what are the rules of codingame ?
Automaton2000: time to learn new things
PatrickMcGinnisII: keep you questions under 32-bits please. :P
Nanosplitter: Good answer Automaton2000
Puru299792458: and only ascii characters :P
Automaton2000: oh yes i see it
AntiSquid: FleshgodApocalypse what's your question anyway? be specific
Manchi_o6o7: Can someone help me with this
Nanosplitter: Automaton2000 Can you help them with their general problem?
Automaton2000: Nanosplitter are you a girl?
Manchi_o6o7: https://pastebin.com/sBgpyU14
Nanosplitter: Oof
Scarfield: xD
AntiSquid: Darklord1234 what's your question Automaton2000 will help
Automaton2000: still i don't know anything about that
Manchi_o6o7: I commented the line. It only reads 4 bytes, not the whole binary file.
Nanosplitter: Hahaha
AntiSquid: doing free answer giveaway
AntiSquid: which puzzle is that Manchi_o6o7
Manchi_o6o7: it is not a puzzle
AntiSquid: ok what are you trying to achieve?
tarapitha: Manchi_0607, how do you call the getc?
Scarfield: line 33 lacks {} after if no(?)
AntiSquid: it's tucked in ^
AntiSquid: hidden
Manchi_o6o7: I am trying to read from a binary fail, the fails contains DEFGHKRKEKRK etc. Some string.
Manchi_o6o7: But it only return the four first chars
Manchi_o6o7: DEFG for example
FleshgodApocalypse: Antisquid thx m8,no need. now i think i've got the general idea behind what i was about to ask
PatrickMcGinnisII: Manchi_o6o7 check your file encoding. Open file in a hex editor, you'll prolly find a 0, which is reading as an EOF instead of an extended or non-UTF8 charset
PatrickMcGinnisII: Reading a single byte is kinda dumb, maybe think about a stream
Manchi_o6o7: i am trying to do it
Manchi_o6o7: with fread
AntiSquid: ifstream input( "C:\\Final.gif", fstream::binary );
AntiSquid: shouldn't it be something like that ?
Manchi_o6o7: but then I get just one character
AntiSquid: with fread put it in a while loop
AntiSquid: no ?
Manchi_o6o7: while(fread(&c,sizeof(c),1,in)){
printf("%c",c); }
Manchi_o6o7: like this :/
AntiSquid: oh right, sorry code is a bit ugly
Manchi_o6o7: I have no idea how to fix it. Because I don't know how mucb bytes I should read.
AntiSquid: https://www.tutorialspoint.com/eof-getc-and-feof-in-c i didn't use C that much see if this helps
Manchi_o6o7: still having trouble
tarapitha: Just an idea, could you try %02X instead of %c in printf?
tarapitha: Maybe the file contains something that blocks output.
Husoski: @manchi most C compilers for x86 have signed chars, so a 0xFF char reads as -1 when converted to int. That's the same as EOF. Use feof() to test for end of file
Husoski: Also, you can use fsetpos() and ftell() to find the length of a file you have opened for binary ('rb') access. https://en.cppreference.com/w/c/io
Husoski: oops make that fseek(), not fsetpos().
Manchi_o6o7: it constantly prints only four letters
Manchi_o6o7: I think it is a eof for some reason
PatrickMcGinnisII: test if the fread is successful instead
PatrickMcGinnisII: while(fread(&data,1,1,in) {}
Manchi_o6o7: data is type of char? same thing
Manchi_o6o7: only four bytes
PatrickMcGinnisII: you cast c to an int, which is correct when testing for an eof
PatrickMcGinnisII: cast c back to char when printing maybe printf("%c", (char)c);
Manchi_o6o7: it is definitely a probelm with some EOF
Manchi_o6o7: same thing
Manchi_o6o7: only first four letters
PatrickMcGinnisII: check the hex value of the 5th byte in the file you are trying to read...it's probably 0 or FF....extended codes for /0 /r /n, etc. are probably in the file... I'm no help, been 30 years since i fought with fgetc.
Manchi_o6o7: the problem is fwrite...
PatrickMcGinnisII: UTF encoded files can have 1 to 4 bytes long
Manchi_o6o7: it only writes the first four bytes
PatrickMcGinnisII: omg
PatrickMcGinnisII: that's not the line you commented
PatrickMcGinnisII: use sizeof(unos)
jacek: oO
PatrickMcGinnisII: sizeof(sifra) is always 4 bytes...it's a pointer
jacek: isnt pointer 8 bytes for 64bit systems
PatrickMcGinnisII: depends on compiler
Manchi_o6o7: it should be strlen....
Manchi_o6o7: It works finally guys
Manchi_o6o7: sizeof changed to strlen....
AntiSquid: i don't understand what you're doing a basic check for EOF should be enough
PatrickMcGinnisII: smh, i need a nap
JSboss: same
Puru299792458: anyone doing cp on cf
JerWhatIsCode: As a begginer, I'm curios how much I'm learning in the practice puzzles can benefit me in real-life. Same question with CoC.
solution.cpp: the coding knowledge and problem solving skills will benefit you in any area in the real world
VizGhar: but you won't need to compute factorial of n-th fibonacci number in real-life coding ;)
JerWhatIsCode: I understand there's obviously some degree of problem solving training, but all the CoC that focus on converting to ASC and hexadecimal to write strings backwars (or what not). Like, is this concepts actually implemented with a sort of frequency or it's more an arbitrary puzzle?
solution.cpp: No the puzzles are pretty arbitrary, the concepts such as loops & etc are used
Uljahn: CoCs are supposed to be solved in under 5 minutes just for fun, there is no much depth in it
JerWhatIsCode: Cool, thanks for all the inputs
Uljahn: you can try more mature tasks like multiplayer bot AI games or optimisations
JerWhatIsCode: I've currently got a dissertation to write so I'm momentarily alright with the simpler games, just was curious how much benefit I might be getting out of them.
JerWhatIsCode: I figured it was probably mostly problem solving exercises that were arbitrary but wanted to check what others thought
JSboss: IMO a big benefit of CoC is to branch out your knowledge of other languages through viewing how others complete the same tasks while optimizing different things (speed, shortness, insight)
CodeChamp101: I am eat food yes
CodeChamp101: thatssss what hessdd readdddds reds
JSboss: codechamp101 shh
Illedan: Please stop spamming
struct: grats on 1st place Illedan
Illedan: 7 days left
Illedan: But I'm happy :D
struct: sim is similar to csb right?
Illedan: yeah
struct: I might try it then
struct: NN?
Illedan: Nah
struct: ok
struct: I dont want to ask the search
struct: Just wanted to know if it was NN
Illedan: Wouldn't tell anyway :P
PhoenixDB: Bit late to throw my 2 cents into this, but for me one real world benefit of CoC and fibbonachi or factorial style questions is that they are also the sort of questions that will come up in a job interview
struct: Im sure there are some
tchar: yeah we all know how non real world job interviews are
therealbeef: first place in what illedan?
Illedan: https://www.codingame.com/ide/challenge/sofia-labs-coding-challenge
therealbeef: ah i never saw that one on the webpage
ZarthaxX: Illedan are you eligible for prize?
ZarthaxX: hi btw
OneToothMan: oops lol accidently closed the chatr
JSboss: hello world
PatrickMcGinnisII: huh, Sofia Labs Challenge, story is in California, but not open to U.S. coders, rofl
PatrickMcGinnisII: 3 player CSB w/ multiple boosts...okay
therealbeef: yeah, trying a lame port :P
PatrickMcGinnisII: no shield, shouldn't be hard
therealbeef: hadn't even built in shield yet ;-)
therealbeef: my csb bot is just a lame port of search race
orangesnowfox: ... my search race is just a lame port of my csb
therealbeef: that's why i beat you there ;)
orangesnowfox: lol
PatrickMcGinnisII: hmm, dunno where referee is ... it prolly has the bumping physics calculations
PatrickMcGinnisII: probably the same as csb
orangesnowfox: So... Via the power of chessprogramming wiki, and a longtime friend, my onitama now does depth 7, and this wins me... like, a few extra games
PatrickMcGinnisII: so, boosting your enemy off the best path might be a good idea
PatrickMcGinnisII: hmm, gtg, glhf...illed
struct: hi ZarthaxX
struct: Im also not sure if this time the prizes are for europe or only france
AntiSquid: oh varying number of boosts ...
struct: I wonder if this game needed mirror matches
struct: I havent played to know if the starting position of the pods has any impact
AntiSquid: oh damn a bit more headache porting my bot than i initially thought
therealbeef: you mean it's a port ;)
AntiSquid: no angle ?
therealbeef: nope
therealbeef: insta turn
AntiSquid: does angle not matter ?
struct: I think you can thrust any direction
struct: So no angle needed
AntiSquid: lol hm now i got to think it through a bit @_@
struct: why?
AntiSquid: because angles matter in csb
AntiSquid: now i need to remove stuff related to them
struct: -3vx ezpz
AntiSquid: this rare your company thing keep popping up @_@
AntiSquid: what rating should i give ?
AntiSquid: and it asks for a bio too now? i thought i had one
struct: rating?
AntiSquid: add a company to your profile i am sure you'll get a the request on the main page to rate it afterwards
struct: ah
struct: Maybe they use this information for cg work
AntiSquid: or to snitch you out if you say anything wrong ! :O
AntiSquid: /j
AntiSquid: because i already told them at my work what i wanted to tell them, snitching wouldn't matter
struct: When im not happy i usually just tell them
AntiSquid: ya depends, you can't always say what's on your mind at any company, depends on the people
struct: Do you know if the prizes are only eligible for French residents?
AntiSquid: no, but whatever ? i mean are you competing for prizes?
struct: no
struct: I see strong players
therealbeef: you can say whats on your mind at least once, guaranteed
struct: pb 4 is there so no chance for us
AntiSquid: top 3 = be super hardcore tryhard or stay out if you don't play for fun
AntiSquid: you can always call them and tell them any time if you care therealbeef :D
struct: time allowed is 100ms
struct: more than csb :D
AntiSquid: express your feelings and emotions in a passionate way
AntiSquid: is it 100ms for first turn too ?
struct: I think its 1000
struct: Havent checked
AntiSquid: i just wanted to do some random troll submit so not bothering with it anymore
AntiSquid: wait ! OMG ! Automaton2000 let's submit in D !!
Automaton2000: maybe i should look it up
AntiSquid: yes
struct: I wonder what is good in this gmae
struct: game*
struct: its very strange
struct: The instant direction changes
AntiSquid: ya now that i think about it, it might be slightly more complicated than csb
AntiSquid: i mean for csb your angle options are limited to -18 to 18
struct: Well there is no shield
struct: and only 1 pod
struct: So I dont think sooo
AntiSquid: so here you have a larger range to pick from
struct: so*
AntiSquid: 360 angles as opposed to 37
struct: 37*37
struct: Still
struct: I dont think its fair to compare them
struct: Completely different games
AntiSquid: no not completely different
AntiSquid: the similarities are HUGE
struct: I wonder how csb would be if it had these parameters
struct: Like no angle restrictions
struct: and more boosts
AntiSquid: and lazors
AntiSquid: oh max speed 100
DaNinja: wonder is the boost speed still 650?
therealbeef: i wonder if insta turn with max speed 200 would be more interesting
AntiSquid: the will of the D
AntiSquid: got my bot in there
AntiSquid: that's enough developing
AntiSquid: got to save energy for the official contest
struct: oh
struct: didnt see the new artwork
struct: Anyways I guess ill try this mini contest
struct: Havent been on cg much lately
therealbeef: antisquid your bots cant keep track of its next checkpoint it seems
therealbeef: *bot
AntiSquid: oh well
AntiSquid: submit a ticket
therealbeef: blame it on the D?
AntiSquid: will get my crew to fix it
struct: will probably just get added to the backlog
AntiSquid: ok fixt i think
AntiSquid: was because i just wrote up the entire thing in few seconds to submit some random crap, was aiming for last "nextcheckpoint" in the input :D
AntiSquid: doesn't change my rank lol .. you made me waste my time
Astrobytes: struct: can you resubmit Amazons to contribs please?
struct: done
Astrobytes: Ah thanks. I've not been around much either
Astrobytes: Not on chat at least
MattW92: pepehands, I was doing the asteroids weekly thing and had it all working up until the last one
why does it need floor to begin with, isn't it just essentually adding the difference between the initial position and second position to get the final position?
Astrobytes: Anyway, I suppose I should sleep. gn all
struct: gn
AntiSquid: gn
struct: im not sure why MattW92
AntiSquid: oh i thought you wrote that long text ... i confuse your avatar with the default one :blush:
Notter: How do you make the lightbulb appear?
MattW92: Ah, the problem itself is set up really weird
there's t1, t2 and t3 but the output is expecting each like at t3 so it's kinda of confusing
MattW92: t1, t2 and t3 as inputs and has t3 as an output too*
AntiSquid: she what?
TheRaz: hello fuckers
Nanosplitter: bruh