Chat:World/2021-11-24
Thorcode: def digital_root(n): http://chat.codingame.com/pastebin/f8cd974f-fe3b-48c4-8393-efb0f3d55d77
Thorcode: how could I do this
Thorcode: return 0 if n==0 if n % 9 == 0 9 else (n % 9)
Thorcode: if n==0:return 0 else:return 9 if n%9==0 else n % 9
Thorcode: done
Schwase: yo finished CGFunge Prime. LOVED that puzzle so much, cant wait to improve my solution
Wontonimo: :tada: congrats! :tada:
Wontonimo: I've not started that one
AzerSD: coding at 5am ;)
eulerscheZahl: glad to hear Schwase :)
NoahW: so... has anyone here gotten a job from this website?
Thorcode: not me
Mortis_666: hi
Thorcode: hi
MASTER123: :grinning:
Thorcode: HI master123
MASTER123: hi
TimothyAlexisVass: I already had work NoahW
NoahW: TimothyAlexisVass sharing is caring
TimothyAlexisVass: NoahW I think you can get work through here by talking to people. I told someone I was looking for work and he said he could hook me up.
MikeNinja102coder: can an 11 year old work?
TimothyAlexisVass: You're asking this in a world where 170 million children are slaves? :\
Thorcode: how can I find comunity puzzle
MikeNinja102coder: Not like that,I mean like work as a scripter AND GET PAID
BlaiseVonEbuthIV: UK hey... Wrong country dude.
NoahW: I probably would not want to use code an 11 year old wrote for anything serious ngl
MikeNinja102coder: I am serious
BlaiseVonEbuthIV: I wouldn't use the code a lot of people wrote, no matter if they're adults or not...
NoahW: I am serious as well, at 11 years old you have 4-7 more years worth of core education before most would consider you ready for an entry-level job.
It would also violate child labor laws in pretty much every country
Thorcode: why my code could not buy item in botter of the galaxy
Thorcode:
if gold>=item_cost:print("BUY"+item_name)
BlaiseVonEbuthIV: Because your code is poor
NoahW: Thorcode: Did you need a space between "BUY" and item_name? Just use a comma instead of plus
MikeNinja102coder: But it doesn't make sense, I've done a job before
Thorcode: nothing happend
Thorcode: A hero can purchase an item with the BUY item_name command.
Thorcode: I type exact what it say
Thorcode: probably bro
ZXC01: overhere say there is no '_'btw item and name
Thorcode: bruh
Thorcode: try that
BlaiseVonEbuthIV: -_-
Thorcode: blaise could you help me with that
NoahW: Thorcode: what programming language are you using?
Thorcode: python
NoahW: copy and paste your code to pastebin.com
Uljahn: use debug output [solved]
ZXC01: try make them on diff lines
Thorcode: after a while I don't know how to debug
Thorcode: I tried
ZXC01: print("Debug messages...", file=sys.stderr, flush=True)
ZXC01: put the thing in Debug messages
Uljahn: or make a function like this: def debug(*args, **kwargs): print(*args, **kwargs, file=sys.stderr, flush=True)
Thorcode: use debug is hard
Uljahn: but it's beneficial for learning
Thorcode: yep
Thorcode: ?
DialFrost: wat does debug do
DialFrost: cuz i havent used it bfr
NoahW: CodinGame says I'm better than 99% of python programmers :sunglasses:
Thorcode: ok
Thorcode: nice
Overbed: i just completed my first clash of code yess
Overbed: it was just private clash so the difficulty is a whole lot lower but ive been struggling for weeks to trying to understand python and finally i get some work done :sunglasses:
Master_Yi: Yenidena
Master_Yi: Do you know the Turkish song by Ragga Oktay called Yenidena
Master_Yi: https://www.youtube.com/watch?v=RsQ_09ys1nU&ab_channel=MuzikPlay
Uljahn: DialFrost: it gives you possibility to inspect variables
DialFrost: uhhh ok
Uljahn: in programming you shouldn't rely on guessing
derjack: no?
derjack: then monte carlo methods are a fraud
BartholomewIII: DialFrost moreover, a debugger allows you to pause your program at *breakpoints*, inspect variables, step through the code one line at a time, and depending on the debugger, changes values and replay code. It's much more convenient than spamming print statements throughout your program that you have to clean up later.
333e8: sorry it's my cat ... have a great day :)
DialFrost: lol
21stCenturyPeon: Also, it's useful when your code is buggered.
Uljahn: some people tend to blame everything but their code being bugged though :smirk:
Uljahn: many such cases
Dasun_Thathsara: hi
Jerrasterix: hi Dasun_Thathsara
Jerrasterix: nothing much !!!
Jerrasterix: how about you ??
pat_vik: I just discovered this website yesterday
derjack: :+1:
C26_1: @all, does cryptography has some thing called string_input and string_key
C26_1: https://www.codingame.com/contribute/view/7686bf48766109a9439251e59ec5010f57e3
C26_1: Go to this link to know what is string_input and string_key that I've talked about
C26_1: SImple def: string_key is a string to made password and therefore protect and encrypt a string_input
struct: Usually is salt + hash algorithm
derjack: its password + salt. sometimes hmac-hash is used
derjack: look for pbkdf2 to read more on it
pat_vik: students here? or doing job?
derjack: job, but not ai in job
Almin5k: nigger
Almin5k: .
Almin5k: NOT ME
pat_vik: Cool, where u working @derjack?
localpoubelle: how hard are codingame evaluations
localpoubelle: interviewer gave me one
TimothyAlexisVass: They're easy
TimothyAlexisVass: like clashes
GER-NaN: unless you cant code....
yuenhy: what do you guys think of mthree? is it worth the low pay
Spaghetti_Code: I heard about mthree, is it truly low pay?
yuenhy: people on the internet seems to say so
yuenhy: not from us so i dont know how low that is
localpoubelle: Thank you Timothy
yuenhy: an allowance during training, 6 months review for the next 24 months
yuenhy: rumor has it their commission is close to 50%
GER-NaN: 65k is very low for New York, but if you get commissions then maybe that compensates...
yuenhy: ah sorry i mean 50% of the salary of the company (that youre assigned to) goes to mthree
yuenhy: guess it is quite low then
yuenhy: better of applying directly to the partner companies
struct: 50% seems extremely high
Ben...: im not good at coding
Aderner: practice is a good way :D
Ben...: oke
Aderner: and search sites like stackoverflow
Aderner: if you stuck on something
Ben...: do you like badboyhalo
Ben...: plz respond
Ben...: ?
Uljahn: we don't like spammers here
Ben...: f u
Ben...: that was my freind
Ben...: im sorry
Thorcode: Search in this site geekforgeek.com, I learned a lot from that site
BlaiseVonEbuthIV: I'll said it only one time: Don't spam me starz-]. Don't even dm me.
Uljahn: Automaton2000: get a life
Automaton2000: most of them are bits
BlaiseVonEbuthIV: "I'll said" -_-
eulerscheZahl: I'll have said
GER-NaN: Is it common for Timeout to occur when you Submit, but when you send Game params to IDE, it doesnt time out?
BlaiseVonEbuthIV: Welcome on cg...
eulerscheZahl: is your own bot deterministic? is your opponent?
eulerscheZahl: might be some randomness involved so you don't trigger the same corner case. or you just get close to the time limit and get unlucky in that one match
GER-NaN: Cant say about apponent, but thats a good point, any random will change things between runs
eulerscheZahl: what I usually do: print all input to stderr, then copy that turn input to test offline
Uljahn: also games can be executed on different CPUs
Ben...: o
BinarySearch: students here? or doing job?
**eulerscheZahl is employed
Uljahn: plenty of both i guess
**BlaiseVonEbuthIV is rich and don't need a job.
BinarySearch: Cool, I just discovered this website today
Uljahn: welcome, so much to explore here
eulerscheZahl: BlaiseVonEbuthIV doesn't need grammar either
BlaiseVonEbuthIV: German grammar-nazi heh?
BinarySearch: @Uljahn @eulerscheZahl You guys have an impressive profile. How long have you been here?
eulerscheZahl: a bit over 5 years for me
eulerscheZahl: uljahn even longer
BlaiseVonEbuthIV: kids
eulerscheZahl: how about you BlaiseVonEbuthIV? 1 month?
BlaiseVonEbuthIV: Already? :o
BinarySearch: You guys must be into competitive programming, right?
DirkieDurky: Yup
BlaiseVonEbuthIV: 5%...
eulerscheZahl: mostly into the longer rounds with 1 or 2 weeks duration
eulerscheZahl: i'm too inconsistent in the 2-3h ones
Schwase: I did a coding competition in high school where you all go into a room and we literally just TANKED it. It was for internships at Lockheed Martin
BinarySearch: you do codeforces?
eulerscheZahl: not much https://codeforces.com/profile/eulerscheZahl
eulerscheZahl: mostly their unrated marathon rounds with prizes for grabs
BinarySearch: How about leetcode?
eulerscheZahl: their contests are in the middle of the night for me
BlaiseVonEbuthIV: Ya ya. Good toad. You'll get a fly
BinarySearch: Are you a student? Maybe I should dm, is there an option?:sweat_smile:
BlaiseVonEbuthIV: dm :scream:
Schwase: Fun fact, frogs eat turtles
BlaiseVonEbuthIV: French eat frogs
Adam798: Hello ! Does anyone know what is the "Budding examiner" achievement ?
Adam798: I can read that is says "Participate 3 times in the ranking of puzzle solutions." but i'm not sure what it means
eulerscheZahl: step 1: solve a puzzle
eulerscheZahl: step 2: click on "view other solutions" or whatever it is called
Schwase: ^
eulerscheZahl: before you can see them, it shows you 2 solutions and you shall click which one is better
Adam798: did the first two steps multiple times but never saw the last. Is it for all puzzles ?
Schwase: maybe they have to be published solutions?
Schwase: maybe go to the most commonly solved puzzles?
Schwase: or its an out dated achievement possibly?
Uljahn: no, it's kinda very newish
Adam798: I can see a lot of published solutions for many puzzles and I can upvote or downvote but it does nothing
Adam798: It's not very important but I was curious.
5DN1L: Not that page
5DN1L: You don't leave the IDE page
Schwase: it matters to me lowkey too im looking for my daily dose of dopamine
5DN1L: Click Results on the left of the IDE page
Schwase: thank you
Schwase: cool
Adam798: Oh ok I see it now, never clicked on that link ! thanks
5DN1L: Then "Learn from best coders"
Schwase: i am now learning from the best coder, i bow in the presence of 5DN1L
Adam798: +1
5DN1L: It's kind of pointless because it says you have to rank first before accessing the top solutions. while actually you can access the top solutions elsewhere (as Adam798 did) without performing any ranking at all lol
Schwase: yeah and i feel like the upvoting doesnt really take place
eulerscheZahl: Uljahn check discord in case you haven't seen it already. struct too
Adam798: I just came back to codingame (did not play in 3-4 years) and was used to look at other solutions the old way I guess !!
Uljahn: done
Adam798: I also get notifications that are 3 years old !!
5DN1L: Adam798 same here. i never access the top solutions from where I described except for getting the achievement :joy:
Adam798: :stuck_out_tongue_closed_eyes:
eulerscheZahl: are you Amurushkin Adam798?
eulerscheZahl: the profile pic looks familiar
eulerscheZahl: wait no, amurushkin is someone else
eulerscheZahl: but i've seen that profile pic still
eulerscheZahl: the nick on the other hand doesn't ring a bell
Adam798: Well its really a picture of me when I was a kid so if someone else is using it they stole it !! And I haven't change my nick
eulerscheZahl: then just my bad memory i suppose
eulerscheZahl: i remember half of you after all those years
Adam798: I was not really in the chat at that time, but I battled good in "ghost in the cell" contest, finished 20th maybe you "saw" me there I believe you did great on that contest.
eulerscheZahl: that sounds possible. I finished 6th so I surely must have seen you
Westicles: uh oh, what's up on the discord mod channel?
[CG]Thibaud: about the review of solutions, when we implemented it, we used the previous upvotes to initialiaze the new system. I wanted to double check how new "votes" impacted the ranking of solutions
[CG]Thibaud: welcome back Adam798 . I have fond memories of GiTC
struct: will check euler
Westicles: it's a big change, but I think the time is right
Adam798: [CG]Thibaud thanks! I really love GiTC too !
jacek: and how long it still will be GiTC eh
tsbtsb: i am struggeling to make a meaningfull graph in Ghost in the cell (using python) tips?
Uljahn: use scipy
Uljahn: i mean it has Floyd-Warshall for you, also check contest feedbacks on the forum
tsbtsb: thanks - googled scipy and think this will do the trick
struct: Westicles mods got a raise
Uljahn: and vacations enlargement
jacek: 100% raise?
Schwase: yo sounds like my job, my pay gets doubled every week
Wontonimo: I'd be happy with getting my pay doubled every 7 years
Westicles: hmmm
eulerscheZahl: and extra mods to intimidate other users even more
Westicles: I'm afraid Wontonimo is too gentle to be a mod. Don't know if he is up for the :hammer:
eulerscheZahl: he can do some cleanup while the rest of us is sleeping
Westicles: absolutely, that is needed for sure
eulerscheZahl: quick instruction: type "/kick username" to kick. /ban for ban that easy
eulerscheZahl: you can't kick or ban other mods
Westicles: Zorg might be another good choice
Wontonimo: thanks
Wontonimo: i can't imagine using ban with what i've seen
struct: I cant imagine using kick, you can have mine
Wontonimo: perhaps it's because the other mods are doing a great job taking out the trash
eulerscheZahl: usually when I want to take action, someone else has done it seconds before
Westicles: every ban means a new subscriber 5 minutes later. it is good for the numbers
Wontonimo: lol
Wontonimo: :wave:
eulerscheZahl: you intimidated a new user Wontonimo :D
Wontonimo: it was a very intimidating wave. I'll have to not shake it so violently next time
jacek: try particle next time
Ben...: e
Ben...: hi im in grade 6
Wontonimo: hey, you are using Hecker image from Beluga. Nice
Wontonimo: don't hack me
Ben...: ok
AntiSquid: too late to ban Wontonimo now :(
eulerscheZahl: maybe not. wait until the chat dies and he loses the badge again
Wontonimo: :O
eulerscheZahl: not even kidding, happened a few times
Wontonimo: maybe i should replace the bolt on my head with a CG mod badge
Westicles: just add the d on your name
Wontonimo: nope, it's stuck
Wontonimo: may be Wontonimo(d)
eulerscheZahl: no () in the name
eulerscheZahl: only []_
Wontonimo: because arrays are allowed but functions are not
eulerscheZahl: no script injection
AntiSquid: make it capital D to pass for a D-lang supporter
Westicles: ban for making D jokes
Aifos: Is it possible to fight versus a specific player AI (from contact list or not) on Mad Pod Racing game or any other AI game ?
5DN1L: Yes, it's possible
eulerscheZahl: you can only select top1000 within your own league or below
Ben...: wut dose that mean
Schwase: I'm curious about contribution editing/commenting etiquette, if someone makes a choice that is not consistent with the syntax typically used, can I go ahead and edit the problem?
Schwase: Here's the contribution I'm looking at: https://www.codingame.com/contribute/view/75090ec33702f258c09b3482dbb6765209d9
eulerscheZahl: as there are 100000 bots in the arena, you have a 1% chance if fighting your friends that way
Schwase: I now realize why I'm wrong about changing the contribution in the way I had in my, but im still curious if its ever okay to make a change that would not change the problem but just make the syntax more typical
eulerscheZahl: there is no written rule about it Schwase. personally i think you should give the author a chance first and just mention it in the comments (generally speaking) for very minor things like typos go ahead
Ben...: the only thing that i can do is use scratch
eulerscheZahl: whenever it can possibly break existing solutions: tell the author when it's pending. don't, when it's approved
eulerscheZahl: and for SDK contributions: just don't, the author might not notice your change and undo it on a later upload by accident you can also mess up badly on an approved contribution (opening new leagues, clearing the leaderboard for an optim)
Schwase: does changing the statement break exist solutions / remove solutions? I was reading something (I think you had said it on CG Funge Primes) about that breaking in the past?
eulerscheZahl: CGFunge Prime is an SDK contribution, very different
Schwase: gotcha
Ben...: hello im in grade 6
eulerscheZahl: breaking solutions in context of classic puzzles: changing the input format so that the parsing will fail
eulerscheZahl: hi, I would be in grade 24 but they didn't want to teach me that long
Westicles: so of the clash guys edit to make snippets bold, I usually change them back for mine
Westicles: *some
eulerscheZahl: i'm conservative about editing unless something really bothers me. e.g. a list of numbers given like "1 2 3 4 " (trailing whitespace)
eulerscheZahl: that even makes some default codes crash
Wontonimo: hey Ben... you may really like and learn a lot by watching "The Coding Train" on youtube
Wontonimo: I've really enjoyed it
BlaiseVonEbuthIV: Oh. You finally evolved in Wontonimod.
Wontonimo: this is not even my final form
BlaiseVonEbuthIV: I hope so... -_- (For you)
Wontonimo: well, after the holidays my form is probably going to be +2Kg, so yeah
5DN1L: Final form may be [CG]Wontonimo?
BlaiseVonEbuthIV: Naa. Wontrollnimo incoming. Just let him some time to get jaded and disgusted.
BlaiseVonEbuthIV: I'll be looking. :popcorn:
Wontonimo: I went through my jaded and disgusted period in life in my late 30's early 40's. Not promising it won't happen again, but here's hoping it wont
BlaiseVonEbuthIV: Just about cg, not you whole life, don't worry.
5DN1L: BlaiseVonEbuthIV got jaded and decides to remain at Level 3 for ever?
BlaiseVonEbuthIV: Just have more interesting things to do than reaching back lvl30+ on a new account each time [CG]Thing feel the need to show he's the boss...
localpoubelle: I did well at my codingame test!
localpoubelle: I hope I get the job
5DN1L: I see BlaiseVonEbuthIV
5DN1L: Good luck! localpoubelle
BlaiseVonEbuthIV: What a nick...
localpoubelle: Oh well I hope they don't see it
localpoubelle: Forgot about this
BlaiseVonEbuthIV: I don't think you use your account to get the test.
BlaiseVonEbuthIV: *take
Wontonimo: just change it now
Wontonimo: it's super easy
localpoubelle: No need I have another account
Wontonimo: top right dropdown, pick profile, then click on your profile name
Braincell: https://www.codingame.com/clashofcode/clash/2085552bfa5f0ceb1959515ddccc997518f51ea
Wontonimo: please paste clash of code to #CoC
Wontonimo: not here
Wontonimo: (is that the right channel?)
localpoubelle: I was looking at your website BlaiseVonEbuthIV, I noticed you made a tool called CGppMerger. I had been looking for such a tool for some time! You are a blessing.
BlaiseVonEbuthIV: #clash I guess Wontonimo
BlaiseVonEbuthIV: A blessing? Me? :innocent:
localpoubelle: Your website has a great design
BlaiseVonEbuthIV: While you don't try it on small devices. :p
localpoubelle: You should change the href of the top left text
localpoubelle: And remove the www.
localpoubelle: It's causing an error
BlaiseVonEbuthIV: Adding mediaquerries is on my todo list since centuries.
BlaiseVonEbuthIV: Hm? Which one?
localpoubelle: On top of the image
localpoubelle: BLAISE'S UNRELIABLE BOOK OF KNOWLEDGE
BlaiseVonEbuthIV: Oh right. I migrated it recently, and now I have only the bubok.tech certificate while I had the www. too before.
BlaiseVonEbuthIV: Thx
localpoubelle: I have no idea what's the use of www and how certificates work but no problem :D
BlaiseVonEbuthIV: Fixed.
jacek: unreliable opening book?
struct: ah yes I forgot to tell wontonimo
struct: if you see opening books you ban them
struct: !
Westicles: tomorrow we celebrate sailing away from the awful europeans who wanted us to marry our cousins like they do
mman777: what is a good score for certification
struct: whats that day called Westicles?
AntiSquid: Westicles what ? lol
AntiSquid: struct thanksgiving
Westicles: yes, that's the one
AntiSquid: how can you celebrate when you can't afford turkey anymore due to bidenflation ? can you even afford the fuel to go to the shop to buy it ?
AntiSquid: and you dare talk about europeans, please
Westicles: we can just go out and shoot a turkey with our many wonderful guns
AntiSquid: make sure you report your boating accident afterwards
Westicles: that one went over my head... did trump shoot somebody?
eulerscheZahl: because Americans think that turkeys live in the water? i don't get it either
BlaiseVonEbuthIV: Isn't thanksgiving more about natives who kindly welcomed you before you start to stole their lands, kill them, rape them and park them in small reserves? :thinking:
AntiSquid: google: gun boating accidents
jacek: i know when thanksgiving is thanks to a one week break in us tv shows :f
AntiSquid: anyway good point blaise, Westicles give them their country back!
Westicles: oh, haven't you heard? the figured out the so-called native americans were a bunch of europeans who actually killed off the guys who were there before
Westicles: *they
AntiSquid: no, that's a first
AntiSquid: heard they came from asia during last ice age ... or something along those lines
AntiSquid: the vikings went over there before columbus Westicles ... they met with the natives too
Westicles: Yeah, it is all very sad. Thank goodness we were able to set things right
AntiSquid: united viking states would have been better :thinking:
GER-NaN: damn, code is too long... Anyone know a good c# minifier thats online? The top few in google dont work well
eulerscheZahl: you exceeded the 100k char limit?
GER-NaN: yup, i have tons of lib classes, that auto combine into 1 file for CG submission
swagzzbtw: ok idk how to code at all lol
GER-NaN: I have big library project with lots of helper classes, then I combine those library classes with my CG code so I can submit as 1 file.
AntiSquid: swagzzbtw start somewhere else
AntiSquid: something like intro to coding
AntiSquid: but you have to use the forbidden google magic
swagzzbtw: what do i search up
AntiSquid: you need to figure out the correct incantation yourself
jacek: kree java!
swagzzbtw: i dont have word magic
swagzzbtw: i just came on this site from yt
swagzzbtw: to cure my boredom'
AntiSquid: https://lmgtfy.app/?q=you+just+need+to+search+for+beginner+study+material
swagzzbtw: i feel like thats a virus lol
AntiSquid: unplug your modem, i promise that will keep you safe from viruses
swagzzbtw: i mean i coded a roblox game
AntiSquid: why would i link a virus in chat? would have private messaged it to you instead so nobody sees it ...
jacek: :thinking:
GamingGnawer: It's ALIIIIIVE
GamingGnawer: what game though?
GamingGnawer: welcome!
Huarck: wonder if it will help improving my skills!
Huarck: Is there a forum for this game /
GamingGnawer: It's not very educational in and of itself but if you have some idea what you're doing (or can use google) I think it's good practice and fun
GamingGnawer: https://www.codingame.com/forum
GamingGnawer: yes and also a discord (bug button near top of this chat)
GamingGnawer: big*
Wontonimo: better than for
Wontonimo: if there is a game in particular
Wontonimo: that you want to see a forum of
Wontonimo: then click on the discussion tab
Wontonimo: for example https://www.codingame.com/multiplayer/bot-programming/tron-battle
Wontonimo: there are three tabs : details , leaderboard , and Discussion
TechnoBot: huh
Nat1022: can someone look over a code challenge code for me
Wontonimo: :wave:
Wontonimo: hey UZUHAMA, looks like you are from the great white north
UZUHAMA: Is this an actual person?
Wontonimo: yessss... are you an actual person?
Wontonimo: maybe i shuld spel things worse and use mor punctuation!!!
UZUHAMA: haha
Wontonimo: y does everyone ask if i'm an actual person *sigh
UZUHAMA: Hmm
UZUHAMA: I don't know I just faced too many bots
UZUHAMA: And every bots did :wave: to me
Wontonimo: what brought a Canuk like you to a chat board like this?
UZUHAMA: Oh Canucks? haha
Wontonimo: i'll remember the wave thing. thanks. now thatyou mention it, there is a relationship eh
UZUHAMA: Well, I like coding
Wontonimo: that's good, because this isn't a cooking channel
UZUHAMA: haha
UZUHAMA: So I guess
UZUHAMA: You're an actual programmer
Wontonimo: yeah, i am. proud to say so. how about you, how much coding have you done?
UZUHAMA: Well, since I'm a baby programmer, I have many questions I want to ask you
Wontonimo: what do you mean baby? how many weeks or months have you been at it?
UZUHAMA: DID YOU REALLY STUDY THAT MANY PROGRAMMING LANGUAGES
UZUHAMA: oh um
Wontonimo: how many?
UZUHAMA: Actually it's been few years
UZUHAMA: But I started coding when I was like, 13 or something
UZUHAMA: And well
UZUHAMA: I don't remember anything from back then
Wontonimo: oh, on my profile. no, i just learnt enough of each to complete a challenge
UZUHAMA: Oh ok
Wontonimo: in my day job I code Python, Java, and Typescript
UZUHAMA: Typescript?
UZUHAMA: Oh
UZUHAMA: JavaScript with types
Wontonimo: yeah, it is Javascript with a wraper
UZUHAMA: I see
Wontonimo: would you like a recommendation of a puzzle to try?
UZUHAMA: Well yeah sure
UZUHAMA: Java is my main I guess..?
Wontonimo: if you tell me about the last thing you've coded I can probably find something close so it is a good match
UZUHAMA: I haven't coded in a while...
UZUHAMA: After I finished my online course few months ago
UZUHAMA: Hmm let me think of one
Wontonimo: nice, what was in the course?
UZUHAMA: Um
UZUHAMA: Basics of basics of programming
UZUHAMA: Then quiet advanced Java
UZUHAMA: (My brain meltdown after thread or something)
Wontonimo: threads are so cool
Wontonimo: come back to that after a while. you'll love it once you've mastered other things
UZUHAMA: Yeah I guess
UZUHAMA: I like Java
Wontonimo: there is this thing called a producer-consumer pattern which is a fantastic use of threads
UZUHAMA: It was my first language to actually study that far
UZUHAMA: Oh no...
Wontonimo: and Java has a lot of really great support for threading
UZUHAMA: Synchronizations are killing me
UZUHAMA: I barely understood about it
UZUHAMA: But still finished the course so :)
Wontonimo: if you hang around here a while and actually show an interest in learning, I'd be happy to tell you about synchronization like in a month or so and I'm sure I could de-mystify it in 1 hour
Wontonimo: anyway ... sounds like you got past variables, functions, and loops
UZUHAMA: Well that's pretty basic stuff
UZUHAMA: So yep
Wontonimo: try this
Wontonimo: https://www.codingame.com/training/easy/tictactoe
Wontonimo: and ... if I can suggest using bitboarding it would make this puzzle SO MUCH EASIER
UZUHAMA: bitboarding?
UZUHAMA: I think I kinda understand about it
UZUHAMA: Just Googled it up
Wontonimo: want an example?
UZUHAMA: ...and this was the last project in Java
UZUHAMA: Example, sure
UZUHAMA: Oh, another thing that caused me a headache was the "bit", too
UZUHAMA: Modifying bits were terrifying
Wontonimo: oh oh ! I'd love to explain it
UZUHAMA: Yeah, sure
UZUHAMA: Um
UZUHAMA: Should we move somewhere else?
UZUHAMA: Because it's a global channel, so you know
Wontonimo: if we do it here then if someone is interested or has another idea then they can join
UZUHAMA: Oh yeah
Wontonimo: i'm NOT going to solve tic tac toe
Wontonimo: just share ideas
UZUHAMA: Ok
Wontonimo: so, one way to store the game state is with an array. let's say we have 1 array for player A and 1 array for player B
Wontonimo: it could be a [3][3] array or a [9] array
UZUHAMA: Oh, mutidimensional arrays...
Wontonimo: but let's stick with [9]
UZUHAMA: Ok
Wontonimo: there are 9 spots on a tictactoe board, so we need a size of [9]
Wontonimo: and for each player we will store if they own that square or not
Wontonimo: simple right?
UZUHAMA: yea
UZUHAMA: Please keep going
Wontonimo: cool, so we could represent that a player has the last three squares like so 000,000,111
Wontonimo: or the first three like so 111,000,000
Wontonimo: or all the corners like 101,000,101
UZUHAMA: So the first "row"s and things like that
UZUHAMA: I see
Wontonimo: now ... if you squint your eyes and look real hard ... it looks suspiciously like .... drum roll
Wontonimo: binary
Wontonimo: 9 bits, 1 or 0
Wontonimo: so, you can store that in a 2byte slot in memory
Wontonimo: like a java int base type
UZUHAMA: My heart rate is going up, palms sweaty
UZUHAMA: But please keep going
Wontonimo: okay, in a lot of programming languages we write binary like so 0b000000111 // would be last 3
Wontonimo: 0b111000000 // would be first 3
UZUHAMA: ok
Wontonimo: now, lets say you have a list of all the winning possible moves like
UZUHAMA: But wait
Wontonimo: 0b000000111, http://chat.codingame.com/pastebin/388f6b20-dcc9-4a7d-a1ff-9308b745ad5e
Wontonimo: go on
UZUHAMA: How does binary format work..?
Wontonimo: ah, it is a number in base 2
UZUHAMA: The very beginning number representing whether the number is positive or negative?
UZUHAMA: No wait...
Wontonimo: 1 in binary = 1 in decimal 10 in binary = 2 in decimal 100 in binary = 4 in decimal
UZUHAMA: I understand that
UZUHAMA: But my byte is in
UZUHAMA: 00000000
UZUHAMA: Binary is in
UZUHAMA: 0b000000000
UZUHAMA: ?
Wontonimo: hmm ... the "0b" at the beginning just denotes that what comes after is in binary so that
Wontonimo: int x = 111; // this is 111 in decimal int y = 0b111; // this is 7 in decimal
UZUHAMA: Ooooooh
UZUHAMA: Ooooooooooooooooh
UZUHAMA: I got it
Wontonimo: super
Wontonimo: now comes the 'magic'
UZUHAMA: I'm ready
Wontonimo: but to fully appreciate the magic i have to start by asking you a question. Using an array like [9], how would you check if someone has 3 in a row along the bottom of the tic tac toe board ?
UZUHAMA: Well
UZUHAMA: By checking last three elements in the array
UZUHAMA: Which will be
UZUHAMA: array[6] == array[7] == array[8]
UZUHAMA: Something like that..?
Wontonimo: == 1
Wontonimo: yeah
UZUHAMA: 1, yeah
UZUHAMA: I almost forgot about empty space
Wontonimo: so, that is 3 array look ups and 3 equality checks
UZUHAMA: yep
Wontonimo: the array look ups may require a few clock cycles each
Wontonimo: so, maybe something like 3*2+3 clock cycles
Wontonimo: okay, here is the magic
UZUHAMA: Clock cycles..?
UZUHAMA: Um
Wontonimo: operations of the CPU
Wontonimo: the main cost of a program
UZUHAMA: Oh
UZUHAMA: Ok
Wontonimo: okay, so here is the magic
UZUHAMA: :no_mouth:
Wontonimo: if the players data is instead stored as binary
Wontonimo: and say they have the current ownership 0b10100110
Wontonimo: we can check if they own all of the bottom row 0b000000111
UZUHAMA: uh huh
Wontonimo: by using the binary and operation like so playerA & 0b000000111
Wontonimo: which would result in
Wontonimo: 0b000000110
Wontonimo: because it is only what is in common
Wontonimo: so the full test is
Wontonimo: playerA & 0b000000111 == 0b000000111
Wontonimo: this is only 2 operaions
UZUHAMA: Oh
Wontonimo: not 9
UZUHAMA: More efficient
Wontonimo: furthermore ... and this is super important
Wontonimo: the bottleneck of modern computers isn't usually the CPU. It is moving data from RAM to the CPU and back
Wontonimo: so the less data you have to move, the faster your program will be
UZUHAMA: Oh, really?
UZUHAMA: I knew that RAM was super important
Wontonimo: instead of storing [9] elements for the board, you need only 2 words (which is technically 4 elements)
Wontonimo: 2 bytes per word
Wontonimo: 2 words = 4 bytes total for our bitboard solution
UZUHAMA: Each element = one byte ?
Wontonimo: it could be. it really depends on what you store in each element. but let's just assume you just store something small and simple like a boolean or small int
UZUHAMA: Ok
UZUHAMA: But each int would be stored as 00001010 format, right?
UZUHAMA: um
Wontonimo: right
Wontonimo: okay, so i've babbled on about bitboards
UZUHAMA: Yep
Wontonimo: give the tictactoe https://www.codingame.com/training/easy/tictactoe puzzle a try
Wontonimo: you don't need to do it with bitboards. it only needs arrays
Wontonimo: what is cool is that once you solve it you can see other peoples solutions and learn from them
UZUHAMA: Ok
UZUHAMA: I'll try my best
UZUHAMA: Are you here everyday?
Wontonimo: most days around this time
Wontonimo: until i get a life
GamingGnawer: how do you use the chat pastebin?
Wontonimo: pretty easy. if you paste way too much in one go or it has too many special characters, a pastebin link will automatically be generated
Wontonimo: don't paste solutions
GamingGnawer: that's clever
Wontonimo: hey Astrobytes
Wontonimo: hey jayluckii , what language are you using for ghost in the cell ?
jayluckii: python 3
Wontonimo: i'm dumb, yeah you already told me that
Wontonimo: okay, so what happens when you run the default code ?
Astrobytes: hey Wontonimo, just realised I left this open, on my way to bed lol, congrats on mod promotion, well deserved brother! :tada:
Wontonimo: thanks ! :D :D
jayluckii: i start off winning and then they start winning and then get to 100
jayluckii: 1000
jayluckii: what does mod do?
Wontonimo: can kick people who are naughty
jayluckii: online daters?
Wontonimo: back to ghost in the cell
jayluckii: yuh
Wontonimo: when i run the default code my bot just loses
Astrobytes: lol on that note, I bid you goodnight Wontonimo :D
Wontonimo: gn Astrobytes !
jayluckii: same
jayluckii: wait wdym like theres only one tturn?
Wontonimo: who said that?
jayluckii: said waht?
Wontonimo: "wait wdym like theres only one tturn?"
jayluckii: i said that
Wontonimo: lol
jayluckii: so waht i do
Wontonimo: you are given all the info for all the entities
jayluckii: uh
Wontonimo: perhaps make an array of factories to start
Wontonimo: and for you move,
Wontonimo: send some troops from one of your factories to one of the enemies
Wontonimo: you can make an array of factories like so
Wontonimo: factories = []
jayluckii: and put a number?
Wontonimo: then use arg_1 to arg_5 to populate the data for the factories like so
jayluckii: so factories= [arg_1]
Wontonimo: factories.append( {
'player' : arg_1, 'cyborgs' : arg_2 } )
Wontonimo: but only do that if entityType == "FACTORY"
Wontonimo: ignore the troops for now
Thorcode: oh you guy are talking about ghost in the cell
jayluckii: yub
Wontonimo: yeah!
Thorcode: i used to like that game
jayluckii: yuh*
Wontonimo: you can get a list of all your factories like so
Thorcode: Congrat wontonimo
Thorcode: for being mod
Wontonimo: my_facts = [ x for x in factories if x['player'] == 1 ]
Wontonimo: HEY, THANKS Thorcode ! I really appreciate it
Wontonimo: thanks for noticing
Thorcode: I just realize it
Wontonimo: and you can get a list of all enemies similarly but instead of "== 1" you use "!= 1"
Wontonimo: then you could randomly select one of your factories and one of the enemy factories (or just for first, whatever) and send units
Thorcode: else print("inc")
Wontonimo: what do you think jayluckii ?
**antiwonto I don't think jay is listening to you anymore
jayluckii: i am
jayluckii: just confused
jayluckii: it seems easy but i just idek
Wontonimo: have you tried what i've suggested yet?
Wontonimo: not really doing anything with it, just pasting it in into the right place ?
jayluckii: trying to figure out the right place lol
Wontonimo: oh
Wontonimo: okay
Wontonimo: first paste one of the lines that you are trying to figure out where to put it
Wontonimo: then lets discuss where
jayluckii: i put the factpries append stuff under # Any valid action, such as "WAIT" or "MOVE source destination cyborgs"
print("WAIT")
Thorcode: or we could make a ghost in the cell channel
jayluckii: or put it under the game loop stuff
omarbenmegdoul: Anyone done job interviews on this platform? Got sent a link ahead of an interview, wondering if there's anything I should know ahead of time
omarbenmegdoul: er, technical tests not job interviews
jayluckii: how would you do that thor?
Thorcode: to save the discusion
jayluckii: hm?
Thorcode: Hey jay I know how to win gosh in the cell ez
jayluckii: interested go on
Thorcode: while 1:
print("MSG"+"I am the winner")
Thorcode: you will win
Thorcode: trust me
Mundgus: omarbenmegdoul, it is mostly same as a certification
Wontonimo: such a troll thor
Thorcode: no
omarbenmegdoul: Ah I see, I've done one of those for react/js actually
Thorcode: it help me win
omarbenmegdoul: i'm rusty though lol
Wontonimo: the factories append goes right after getting the info for the factory while in the loop
Thorcode: why don't you try that wontonimo
jayluckii: i lost still
Thorcode: no
Thorcode: you don't have luck
Mundgus: I mean a codingame certification
Mundgus: If you go to your profile and choose a language you can see it
Wontonimo: maybe start on something a little easier. this game requires you to save a lot of game state
Wontonimo: and the recall it and sort it
jayluckii: whats easie
jayluckii: r
Thorcode: change the + to ,
Wontonimo: https://www.codingame.com/training/easy
Thorcode: it will help you win
Wontonimo: https://www.codingame.com/training/easy/the-descent
jayluckii: i made a google doc named ghost in the cell wonton info and put all the stuff you recommendeed
Thorcode: while 1: print("MSG","I am the winner")
Thorcode: this is the best code
Thorcode: it will help you reach legend if you are lucky
jayluckii: wonton hes trolling rii?
Wontonimo: yes
Thorcode: no I reach bronze with it
Thorcode: only that code
Thorcode: ok
**Thorcode say Thorcode lied
jayluckii: what do you think i should start with Mr.Wonton
Thorcode: mad pod race bro
jayluckii: fancy writing
Wontonimo: oh ... sorry jayluckii, i totally forgot about the connects between entities
Wontonimo: you need to store that also
jayluckii: i did map pod race
Thorcode: league
jayluckii: uh
Thorcode: what league bro
jayluckii: gotta check jit
Wontonimo: i really like line racing
Wontonimo: (tron)
Wontonimo: https://www.codingame.com/multiplayer/bot-programming/tron-battle
Thorcode: hey
jayluckii: woodd leuge 2
Wontonimo: pretty straight forward (pun intended)
Thorcode: have tron battle renamed
Wontonimo: yeah, got renamed to "Line Racing"
Thorcode: in tron I would like to go to center then flood all of my angle
Wontonimo: you only have 4 directions to travel
Thorcode: yep
Wontonimo: keep a map of what has happened
Thorcode: I know that
Wontonimo: i'm telling jayluckii
Thorcode: ok
jayluckii: so
jayluckii: like
Thorcode: hey jay
jayluckii: left right up and down
Thorcode: you could make your pod to bronze
Thorcode: it is simple
jayluckii: if i felt like it
Thorcode: or even gold
Wontonimo: it's not so simple Thorcode, don't be like that
Thorcode: no from wood to bronze it have instruction
Thorcode: just follow that to get to bronze
Wontonimo: link?
Thorcode: mad pod race
Thorcode: https://www.codingame.com/ide/puzzle/coders-strike-back
Wontonimo: to the instructions
Thorcode: the rules
Thorcode: it have all
Thorcode: even pesua
Wontonimo: to go from wood to bronze
Thorcode: yep
Thorcode: https://tcourreges.github.io/coders-strike-back
UZUHAMA: Hello guys
Wontonimo: no, we are talking about Tron (Line Racing) Thorcode
Wontonimo: hey UZUHAMA
Wontonimo: i'm not a bot
Thorcode: oh Tron is not that ez
UZUHAMA: hahaha
UZUHAMA: I'll be working on my project
Thorcode: I was talking about mad
Thorcode: bc jay only in woood 2 of that game
jayluckii: wonton
antiwonto: hey
Wontonimo: yeah?
Thorcode: hellow pokemon
UZUHAMA: Two wontons!
Thorcode: so I think that site could help him
Wontonimo: no. the other is an impostor
Thorcode: the pokemon
UZUHAMA: haha
jayluckii: uhm
jayluckii: hold on wonton\
Thorcode: the pokemon guy so cute
Thorcode: I challenge you guy to play this supper hard game: codecombat :joy:
jayluckii: whos pokemon guy
NoahW: You know, the coding challenge paradigm is kinda funny
NoahW: Like, do I write an interpreter for this, or should I just pass unsanitized inputs to the exec() function and call it a day?
UZUHAMA: I have no idea what you're saying :(
Wontonimo: what puzzle/multi are you talking about NoahW ?
NoahW: Dice probability calculator
antiwonto: 1:6
UZUHAMA: haha
NoahW: I suppose I could just hardcode the inputs, but what if there is an invalid input?
Wontonimo: the validators are different than the test cases
Wontonimo: hardcoding it is a sure way to fail
NoahW: well, I guess either way I gotta use regex
Wontonimo: interesting. i wonder if a recursive solution would work