Chat:World/2020-06-23
Tim_McSim: Hello! :)
tanmaycodernovice: how can we reomove the last letter printed while using print('he',end=',') in a loop
AggYz: guys is C++ a low level language
Uljahn: Automaton2000: how do you use google search?
Automaton2000: don't feel like i should be aware of?
jacek: meow
WINWINWIN: Caturday?
ThienPro: https://www.codingame.com/clashofcode/clash/12665078ca4546f89c727f1f60e4627f1f3a0c9
Reksio: @AggYz: You can consider C++ low level language.
Reksio: comparing to C#/Java,Python, VB, etc.
Reksio: but it's an industry standard for many things same as other languages
jacek: for some even writing in direct 0 1 isnt low level enough
Uljahn: yes, compared to directly operating electric currents
tomatoes: http://nandgame.com
Astrobytes: https://xkcd.com/730/
WINWINWIN: https://www.codingame.com/contribute/view/507644dbe6bc6fc318eeaa25e26e48954355
WINWINWIN: Only 2 hours left on this one, to approve?
darkhorse64: Someone on the chat said yesterday that there are still boss/referee crashes. Although this is a nice game, it cannot be approved
Astrobytes: too much data being sent to the viewer, amongst other things
darkhorse64: I'll post it on the forum. The author should fix and resubmit. There is no reason not to approve a Go game.
Astrobytes: Yeah, don't know why the approval time limit is so short this time
darkhorse64: It has been around for quite some time. tric already made a bot
Astrobytes: I must admit I'd completely forgotten about it until last night
jacek: someone pmed but i closed. how to get back the window
Astrobytes: afaik you can't
WINWINWIN: the '/msg' thing?
Astrobytes: Yeah, if you remember the user you can do that
jacek: i dont :U
Astrobytes: Use your pony magic
WINWINWIN: He`ll probably message again
crystal_prince: hey guys
crystal_prince: anybody here knows how to delete the chat section
WINWINWIN: You cannot delete it crystal_prince
Uljahn: you can by editing css
Uljahn: .chat-wrapper {display: None !important}
Uljahn: i use Stylus plugin to customize page layouts
Uljahn: or you can add an adblock filter
Snef: Hello !
MatthieuGorisse: je suis le bergé vous etes les moutons ?
Snef: MatthieuGorisse you can stay on #fr
tanmaycodernovice: is it something wrong with the site? as it not showing those who have submit in a clash
tanmaycodernovice: or is it only me?
imbadpython: when people submit it says "pending"
imbadpython: and it takes about a minute to grade
jacek: not everyone share their code
tanmaycodernovice: for me it is not even showing pending now since last 2 days
tanmaycodernovice: jacek i'm not talking about sharing the code
tanmaycodernovice: input(6,4) output(210)
tanmaycodernovice: any relation
Astrobytes: Report it on the forum or the discord
Astrobytes: And, again, as I told you yesterday, stop asking people to solve your clashes for you
jacek: reverse mode? its obvious input(x,y) = ((6969 * x + 1337 * y) * 0) + 210
WINWINWIN: jack :P
Astrobytes: :P
tanmaycodernovice: nvm i've sloved irt
WINWINWIN: well done
tanmaycodernovice: astrobytes i wasn't actually asking for the code i was just asking for the rule lol
Astrobytes: ...
WINWINWIN: Yes... that is also not fair
tanmaycodernovice: okk then... again my bad
Astrobytes: You have a problem, you must solve it, then implement the solution in code. It's a two-fold exercise
tanmaycodernovice: can u guys help me with a problem
tanmaycodernovice: not a clash
WINWINWIN: Ok
tanmaycodernovice: when we use print('ge',end=',') in a loop then it also adds the elemnt at the last
tanmaycodernovice: how to avoid that
WINWINWIN: element in the last?
WINWINWIN: what is the element in the last?
tanmaycodernovice: suppose the loop runs 3 times then the output will be
imbadpython: you don't want the comma at the end
imbadpython: print(','.join(['he']*3))
WINWINWIN: or for shortest...:
chiragbansal24: you can do print('ge' + ',')
print in python has newline of its own by using end we are overriding that default newline with ,
Astrobytes: can you please encourage him to look up functions himself, he's just been asking for straight-up answers the past 2 days
WINWINWIN: print(*['he']*3,sep',')
imbadpython: ok tanmaycodernovice gtfo
WINWINWIN: :D
imbadpython: is it just me or clash of code grading suddenly sped up
imbadpython: or maybe for that problem the validation cases are the same as test cases?
imbadpython: cuz it instantly graded
WINWINWIN: There was some talk on the Discord on server about submission slowness being fixed.
tanmaycodernovice: imbadpython we're in the same clash lol
tanmaycodernovice: please share the code at the end
imbadpython: also okay thanks @win*3
imbadpython: there should be some hard clash of code
imbadpython: like fastest mode but hard implementation/easy puzzle difficulty
Astrobytes: Unfortunately CG have a policy of "no clash is too easy"
imbadpython: @RTTArmel are you reading chat
Snef: Astrobytes do you use inline keyword in c++ ?
Astrobytes: Yeah
jacek: only in pragma
WINWINWIN: Does it need to be used as a keyword or is the pragma enough?
jacek: compiler should inline things on his own
imbadpython: i feel like this 28 byte ruby solution will get rage at but my python is 45
imbadpython: inline compiler will do it for you
Snef: so there is no point inlining functio n?
Astrobytes: if you speciify in pragma it should do it for you
Astrobytes: Doesn't hurt to use it but don't think it's necessary
imbadpython: ^ usually compiler is smart enough
Snef: http://chat.codingame.com/pastebin/e1ff17ad-7a8e-4852-8d04-f2b533dbe67d
Snef: is it better to do copy paste N() and E() or the call will be inlined
jacek: profile *.*
imbadpython: you can try it on godbolt.org
Astrobytes: ^
imbadpython: look at the source code
imbadpython: also is A_K a bot does anyone know
imbadpython: "Given an array of size n, how many non-empty contiguous subsequences have a bitwise XOR equal to 0?"
imbadpython: so no triple for loop :(
imbadpython: also ye the submission server is fast af now
imbadpython: but it doesn't show result/pending?
noubhere: well at least I didn't use python :)
imbadpython: wrong channel oops
noubhere: oh no :D
high_head: from where should I start to learn c# faster?
imbadpython: find some project you already have/know/coded
imbadpython: translate into c#
imbadpython: google when you don't know
honeyst: what was your first project ?
imbadpython: my first project erh idk
imbadpython: just code some common algorithms
imbadpython: that's how i learned c++ at least
imbadpython: clash of code telling me to stop grinding clash of code by giving me captchas now
AntiSquid: the only redeeming thing about clash of code for those who don't like it :p
tutubalin: imbadpython i was there!
tutubalin: the most awkward was that after successfully going through captcha i found myself with bot opponents
imbadpython: grind leaderboard
imbadpython: is there any code where python is better than ruby
imbadpython: or can match it (same length)
imbadpython: like just the print vs puts is disadvantage lmfao
imbadpython: and input vs gets
Hjax: good morning
jacek: ohayou
Klin228: guys i have a problem with numbers using C. What should I do if numbers are smaller than long double can work with&
Hjax: smaller?
Hjax: oh with a float
Hjax: i see
Hjax: there are libraries that can do that for you, but i dont think you have access to any of them here
Hjax: so i guess youd have to write your own big float class
imbadpython: if big int just shift float until int and keep track of exponent
tomatoes: multiply them on some big number
Hjax: ^ that works
imbadpython: @Klim228 what you trying to do tho
imbadpython: if more specific there might be a better way
Hjax: why do we need such precise floating point numbers? a long double is pretty accurate
Hjax: oh imbadpython beat me to it
Hjax: to asking why he needed suck precise floats
Hjax: such*
imbadpython: i thought you asking me to beat you to it
Klin228: ive found the problem, it was my fault and now i need function like atof, but with long double in result. Do you kniw any? (_atold doesnt work)
TheSpiffiest: Poop. I got 30 characters on Code Golf, but it still says pending results.
TheSpiffiest: I think it might time out before it ends
imbadpython: til never be generous and use pythhon
imbadpython: use ruby and win :D
TheSpiffiest: yep :)
TheSpiffiest: I'm trying bash in code clash, because I think I'm a masochist
Uljahn: play stupid games, win stupid prizes, Automaton2000
Automaton2000: so if you want to have a small part of the referee
imbadpython: when this round ends ill send my codegolf code
imbadpython: i nneed help with code gol
Hjax: code golf is a weird skill
Hjax: because its not really applicable to much, and theres so many weird tricks you can do
imbadpython: can someone help me with this
imbadpython: http://chat.codingame.com/pastebin/4fc9e567-33ed-47f6-9477-6459ef57cc81
tanmaycodernovice: for i in range(1,n+1):
print([i,"Foo","Bar","FooBar"][(i%5==0) + (i%7==0)*2])
tanmaycodernovice: what type of print stement is this?
rak1507: it's just a normal one, but the trick is that it uses list indexing to pick which one to print
tanmaycodernovice: what should i type on google to get this type of case
WINWINWIN: Some guy writing code in bash...
WINWINWIN: try python -c
WINWINWIN: :P
Scarfield: rak alraedy answered it tanmaycodernovice, but test it. let n be 35
tanmaycodernovice: that code is already in python tho
tutubalin: tanmaycodernovice what is ["Foo","Bar","FooBar"][2]?
tutubalin: correction... what is [i, "Foo","Bar","FooBar"][2]?
zizo1337: tanmaycodernovice i%5==0 lets say that i is 5 it would return true and true is equal to 1
tutubalin: tanmaycodernovice second question is what is i%7 == 0
tutubalin: tanmaycodernovice and the last question is what is True*2?
Scarfield: thats too true.. badum ts
reCurse: tfw you casually find a massive bug in matrix multiplication code affecting all NNs you ever worked with
Astrobytes: Does it still work after fixing it?
reCurse: Who knows
Astrobytes: Best of luck
reCurse: Reading garbage memory is subtle noise
struct: How much do you think it affects? They still seem to be very strong.
reCurse: Well it's noise, NNs adapt well to it just perform less well
reCurse: Making it that much harder to find
reCurse: I deserve every bit of it for not writing unit test on math stuff
Scarfield: doesnt it only increase the training time, and not the performance though?
reCurse: No because every value you pass to it is slightly wrong
reCurse: Or very wrong if the garbage memory is exceptionally garbage
struct: Makes sense, at least you found it
reCurse: Thank god for nans
Scarfield: xD
Astrobytes: And you will write unit tests next time ofc
reCurse: Just like everyone starts backuping all the time after losing a hard drive
reCurse: Natural comes back
Astrobytes: :grin:
reCurse: It's very hard to spend spare time on this
dbdr: I seem to recall it's not the first time you found such bug, reCurse
reCurse: Case in point
jacek: he will never learn, unlike his NN
Astrobytes: Moar training required
reCurse: Ahh fuck I'm stupid
reCurse: Nevermind nothing to see
reCurse: Garbage * 0 = 0
reCurse: nan * 0 = nan
Zerp: in gitc is it guaranteed that there is a link between every factory? besides from a factory to itself?=
Astrobytes: lol
struct: I think so Zerp
dbdr: not a bug reCurse?
Zerp: btw is it overkill to implement djikstra in gitc`?
reCurse: I put nan as padding
reCurse: To spot bugs
Astrobytes: :D
reCurse: But what I found was already handled by multiplying by 0
reCurse: It just breaks for nan obviously
Astrobytes: Zerp: No, I don't think so
Astrobytes: Could probably use F-W too I think
Zerp: wait these algs just returns the shortest distance, and not the path itself?
Astrobytes: Depends how you implement it. You can modify either of them to reconstruct a path
Zerp: was thinking of storing the first vertex, that's on the shortest path
Uljahn: F-W should return both first vertices and distances
Zerp: really? from what i gathered it seems to just return an adjacency matrix where each is shortest distance
Zerp: https://www.youtube.com/watch?v=4OQeCuLYj-4
Uljahn: have you seen wiki pseudocode?
Uljahn: i guess those are two arrays dist and next
PatrickMcGinnisII: seriously https://www.codingame.com/share-replay/474184369
jacek: hm?
PatrickMcGinnisII: draw
jacek: well its possible
AmirZamfiratos: what is the ranking based on?
struct: Everything in the compete tab
eulerscheZahl: or Trueskill. the question is too generic
AmirZamfiratos: in the clashofcode i taught there is based on time but then i see sometimes it is on number of carachters
Astrobytes: There are 3 modes: shortest, fastest and revetrse
Astrobytes: *reverse
AmirZamfiratos: and the mode is decided random?
tobk: Hm, is there a way to see if an optimization solution timeouted or did not make it in the allotted number of turns in Search Race?
Astrobytes: You can choose if it's a private clash I believe AmirZamfiratos
struct: tobk only if you run it offline
tobk: (I mean in submission of course)
Astrobytes: Is it just me or has CG been almost exclusively about clashing for the past week
tobk: hm, too bad. already increased the buffer time to 10ms (out of 50)
Astrobytes: *CG chat
struct: well clashes get many people when there are streams
struct: Some people enjoy them
Astrobytes: Wasn't there something about a 35ms limit in SR? OR did that get sorted
tobk: says 50ms in the doc, but also says 1000ms for first turn, and it always timeouts when I use that, so those might be somewhat off
dbdr: Astrobytes: well, some Othello as well :)
Astrobytes: :D
PatrickMcGinnisII: I just submitted again in othello, looks like i might go up 7 places, I'm still not doing any depth
struct: What do you mean dbdr?
PatrickMcGinnisII: struct you relishing in being last?
dbdr: that was responding to "cg chat has been almost all about clash"
struct: ah ok, I thought there was timeout problem on othello
struct: Patrick I dont have time to create AI
struct: Also I enjoy more creating the games
PatrickMcGinnisII: I'm just happy i successfully used a spaceshipp operator. ;)
darkhorse64: struct is a reverse boss. The boss guards the top. He guards the bottom
struct: github ui changed :/
PatrickMcGinnisII: darkhorse64 <=> struct = 1
struct: What does <=> do patrick?
PatrickMcGinnisII: https://stackoverflow.com/questions/30365346/what-is-the-spaceship-operator-in-php-7
struct: Ah I see
PatrickMcGinnisII: i have concluded that no one in wood2 othello is doing anything really, including me
PatrickMcGinnisII: where is leiria, nvm googled it
Snef: PatrickMcGinnisII are you judging my bot N :(
Snef: ?*
jacek: who is leiria
PatrickMcGinnisII: where the creator of Othello lives apparently
jacek: i thought he was dead
PatrickMcGinnisII: ouch struct
jacek: ah
Snef: lol
PatrickMcGinnisII: Anyone in EU have a rental property they wanna trade for the summer?
PatrickMcGinnisII: I have a house here in FL, swap for like 2 months
jacek: during pandemia?
PatrickMcGinnisII: well Disney is gonna open back up July 15th
Voidsway: Should I buy Disney stock?
PatrickMcGinnisII: about 30 minutes away
PatrickMcGinnisII: legoland is here where i live
AggYz: they will still be making mostly losses
Voidsway: ;) Just a little sarcasm
AggYz: does anyone know python
PatrickMcGinnisII: ok, maybe a dumb idea ... whatever, I can make it happen tho. ;)
AggYz: guys how to add binary numbers in python
AggYz: not in the sense 1+1 = 10
PatrickMcGinnisII: https://www.zillow.com/homedetails/37-Coleman-Rd-Winter-Haven-FL-33880/47391506_zpid/
jacek: so adding digits separately?
jacek: split string into digits and add digits separately :?
jacek: liek in loop
AggYz: but is there a more efficient way?
jacek: ask python guys
AggYz: i tried turning into int ten adding
PatrickMcGinnisII: sounds like the (:*) discussion, btw i don't know python
AggYz: but then the prefix and suffix 0's get removed
tutubalin: tomatoes congratulations!
Astrobytes: uttt?
Hjax: yep
Hjax: rank 1 uttt
struct: oh nice he is first
struct: He doesnt have a book right?
Astrobytes: gg
Hjax: i would be very surprised if he had no book
Astrobytes: He said the other day, I just can't remember :/
struct: wtf he even has emojis
struct: on output
Astrobytes: Something about a heuristic (not the teccles one)
Hjax: hm hes printing out rollout statistics from the first move
struct: yeah
Hjax: so maybe no book, thats crazy
struct: I think he said he has no book
struct: Well you can still use the time
struct: to search
struct: even with book
Hjax: true, doesnt gain you a ton though
Hjax: guess it depends on how deep your book is
tutubalin: i'm pretty sure he's using one of Dostoevsky's books
tutubalin: they are very deep
Astrobytes: hahaha :D
Hjax: :P
Hjax: shoutout to google for helping me get that joke
jacek: he seems not using solver o.O
Hjax: what makes you say that
Hjax: doesnt he print a check mark when he has a forced win?
jacek: on the last move :?
struct: nah before that
struct: 5 turns only though
jacek: still i think hes bugged https://www.codingame.com/share-replay/474199650
jacek: he lost to a draw
struct: What turn is a draw?
struct: oh 49?
tutubalin: jacek -0.37 on turn 46. That means your chances to win were pretty high there
jacek: so i would draw if i didnt see it?
Uljahn: wth those rollout counts in the replay
Uljahn: that's not normal
jacek: work smarter not faster
Astrobytes: Do both = Profit;
Zerp: it really weirds me out that c sharp uses 2dArr[x,y] instead of 2dArr[x][y]
Zerp: isnt the latter more common?
Hjax: yeah because 2dArr is an array, and 2dArr[x] is also an array
Hjax: which means you can index into 2dArr[x]
Zerp: oh, haven't thought of it like that
Zerp: does this look like a correct implementation of floyd warshall? https://hastebin.com/ilagogiqen.c#
Zerp: i really dread debugging it if it doesnt just work first try
Uljahn: in python it's just one import :smirk:
Hjax: good old scipy
Uljahn: saves the time
Zerp: give me node.js so i can import a npm module with the solutions to every puzzle
Uljahn: you can ask for it on the forum :smirk:
Zerp: codegolf would be so dominated by node.js
Astrobytes: Stop moaning and See Sharp Zerp :P
Zerp: step 1: write solution step 2: upload solution as npm module step 3: import npm module in one line step 4: submit
Zerp: step 5: ??? step 6: profit
Scarfield: no profit without under pants
Zerp: going from c to js was bliss, going from js back to c# t.t
Astrobytes: Hi Gnomefield
Scarfield: :wave:
Zerp: you dont need to add any extra syntax to pass a 2darray to a function in c#, right?
Astrobytes: Same as a 1D array I believe
Astrobytes: My C# is limited however
Zerp: An object reference is required for the non-static field, method, or property
Astrobytes: like arr[,]
Zerp: i think it wants me to add the class infront the method
Astrobytes: I think
Astrobytes: or type[,] arr rather, btu you know what I mean
Zerp: i think doc says otherwise
Zerp: int[,] theArray = { { 1, 2 }, { 2, 3 }, { 3, 4 } }; Print2DArray(theArray);
Zerp: int[,] map = findPath(factoryDist, factoryCount);
Zerp: An object reference is required for the non-static field, method, or property 'Player.findPath(int[*,*], int)'csharp(CS0120)
Astrobytes: I was meaning like methodToPass2dArrTo(int[,] arr)
Astrobytes: Misunderstood perhaps
Zerp: oh right you have to declare type
Zerp: frick, my browser closed and i lost all my progress
Zerp: good thing i shared that warshall implementation on hastebin
Astrobytes: Zerp, always code in offline IDE
struct: I've been thinking about the chess
struct: My problem is that some people might enjoy normal chess too :/
Zerp: are you writting an engine?
struct: no, i would port it to CG
struct: so others can play
struct: multiplayer
struct: so you write a bot for it
struct: and fight other players bot
Zerp: oh man writing an engine sounds really daunting
Astrobytes: Yes for sure struct, both would be great in all honesty
Astrobytes: Good practice plus 960 is something different
struct: The game might be good for learning too
struct: lots of resources
Zerp: i wish there was a introductory ml puzzle. i heard there was one for python with tensor flow once, but it got removed
Astrobytes: Yeah was the number recognition one, and only for python2
Zerp: been wanting to learn ml for so long, but struggling to find some newbie friendly resources like stuff here on cg
Astrobytes: Brush up on your LA, calculus and stats and hit some tutorial sites I guess
struct: The upside if i ever port is that I dont need to do almost any change to port from normal chess to 960
struct: just need randomized start
Zerp: probably for the better than i haven't gotten around to it, because i've wanted to learn ml before i knew what classes and OOP was xd
Astrobytes: Yeah like we were saying before it's just a simple change
Astrobytes: Are your mathematics skills strong?
Zerp: just finished a LA course at uni
Zerp: so no need to brush up xD
Astrobytes: Well you should be good to start digging into the theory then
Zerp: when you say theory, what are you thinking about?
Astrobytes: With regards to general machine learning topics
Zerp: because i'd say i got a decent amount of "surface level" knowledge regarding stuff like monte carlo, GA, general concepts etc.
Zerp: what i feel i am missing is a resource to guide me through implementation through cg-like puzzles
Uljahn: there are ipython notebooks on coursera's Deep Learning, they're almost like playgrounds
Astrobytes: That's just search algorithms, there's a bit more to it than that!
Astrobytes: Yep, I've not delved in myself yet but as Uljahn says there're plenty courses out there with hands-on learning
Astrobytes: Then you can go to Kaggle or something after that to practice, depending what you want to achieve
Zerp: like this? https://www.coursera.org/lecture/neural-networks-deep-learning/quick-tour-of-jupyter-ipython-notebooks-ChN1T
Astrobytes: Gotta combine quite a few mathematical approaches for any ML stuff
Astrobytes: Stuff like that yeah. Give AntiSquid a shout when you see him, he's delving into it at the moment I believe, might give you some pointers
Astrobytes: (or references :smirk: )
Zerp: ty, i'll tell him you told me to bother him :wink:
Astrobytes: Ofc, hit up inoryy also for learning resources and epic knowledge.
Astrobytes: And everyone else on CG who's into ML ofc. Ask on the discord and you'll get more response if you word your questions carefully
Astrobytes: Hey Uljahn, do you pronounce "Uljahn" like "Oolyan" or "Uljan"?
Astrobytes: Or even 'Yoolyan'
Uljahn: dunno
Uljahn: that's nick isn't supposed to be pronounced
Uljahn: Oolyan could be close though
AnishaK: are there any games for beginners??
Uljahn: like coders strike back?
Uljahn: or clashes of code?
Uljahn: the site is for practice, you'd better learn the basics elsewhere
douglasmacb: we
ardozl: are the world
ardozl: we
ardozl: are the children
LelouchVC2: we are also gay
RadioControlledShoeFromAfar_a04: hi
Makwy: hi
ouroborus: Anyone know of list of uni assignments for learning data structures?
ouroborus: Specifically one geared towards c++