Chat:World/2021-02-01

From CG community
Jump to navigation Jump to search

Zenoscave: struct only if it's empty?

struct: I think so zeno

Zenoscave: Does anyone have a good design pattern for generic MCTS? I hate recoding it for each game

Zenoscave: but the templating types get convoluted for me

Zenoscave: just like a TYpe interface or UML would be awesome...

struct: I dont have any generic code for CG I think

Severed: just an FYI: removing the lines that said to capture center square if available improved the outcome. constantly taking center square in the games basically handed the main center square to the opponent

jacek: hm? well you shouldnt give center to your opponent easily

Q12: Can I somehow reach my code in SOPRA STERIA CODING CHALLENGE and keep coding?

Q12: after the contest is over or because it is sort of a private one I can't?

Default avatar.png Carsonfanboy: u can copy it with strg c

Default avatar.png Carsonfanboy: before the contest stops

Default avatar.png Carsonfanboy: and than paste it in

Q12: it has already been over, is there some other way?

Default avatar.png Carsonfanboy: i dont know that was just the first thing i thought about

Default avatar.png Carsonfanboy: sr<

Default avatar.png Carsonfanboy: sry*

TheSpiffiest: grrr, frsutrating. Clash times were the same to the second, but I'm 2nd place. :P

Carsonfanboy: uh that sux

lopidav: TheSpiffiest show me the results page

TheSpiffiest: https://www.codingame.com/clashofcode/clash/report/1571467b91ef6b6cf4cbfa6186b75120f77c809

TheSpiffiest: It was probably just subsecond

TheSpiffiest: I haven't seen how ties are resolved and I imagine at computer accuracy there isn't one.

TheSpiffiest: It's more of a formatting issue I'm guessing

lopidav: good result! DP Amar is 9th in clash rankings and you tied with him, pretty cool.

lopidav: about formatting: I would recommend filling a bug report

TheSpiffiest: Should I bother? I think it would be only if there is a tie display sub second accuracy

TheSpiffiest: where do I submit bugreports? In the feedback on the clash or elsewhere?

TheSpiffiest: Also how can I see clash rankings?

Default avatar.png Mr.intro: you mean leaderboard ?

TheSpiffiest: Oh - I found it

TheSpiffiest: I didn't know clicking on ranking gave you a breakdown of the various things making up the score

lopidav: clash leaderboard is separate tho

lopidav: and COOL BOIS™ like me use scripts to display clash rank on a codingamer card so we don't have to go to the ranking page all the time

lopidav: wow, tm is so big

lopidav: testing™℠©℗Ⓤ

lopidav: ®

lopidav: ok, so tm c r is big and black while everything else is normal. Is this a font thing?

AntiSquid: what to dodge hard clashes or ?

AntiSquid: lol

Default avatar.png geriatric1927: dogecoin becoming stonks

AntiSquid: went down and fluctuates at low levels only, not even worth a gamble right now (NOT FINANCIAL ADVICE MEME DISCLAIMER)

AntiSquid: oh 0.04 maybe now it goes somewhere ... w/e

AntiSquid: nope nvm ... forgot 0.04 is the current upper limit

Default avatar.png UndisclosedSausage_f45: how best will you recommend investing in dogecoins now?

jacek: thats question for reBless

Rockstar555: hii

Rockstar555: what discussion was going

AntiSquid: i recommend to do your own research since it's probably your money you want to invest lol UndisclosedSausage_f45

Default avatar.png UndisclosedSausage_f45: :weary:

Default avatar.png geriatric1927: Hehe

Default avatar.png geriatric1927: Perl masterrace

Default avatar.png geriatric1927: Some person didn't remove an extra blank space in shortest

Default avatar.png geriatric1927: Pity :(

Default avatar.png geriatric1927: He had 11 bytes in perl, I barely knew anything about perl but I managed to square the number and print it to the shell

Default avatar.png geriatric1927: And I removed the extra blank space which the person forgot to remove

Default avatar.png geriatric1927: Cheeky win :)

Default avatar.png Rocky[KGF]: hey

Default avatar.png Rocky[KGF]: why u paste this here

Default avatar.png geriatric1927: Paste what?

Default avatar.png Rocky[KGF]: upper line

Default avatar.png Rocky[KGF]: u will be ban

AntiSquid: what are you talking about ?

jacek: oO

Default avatar.png Rocky[KGF]: What jacek

Default avatar.png Mr.intro: :o

KiwiTae: so much testosterone in the air so angry lool

AntiSquid: how's it going kiwi

KiwiTae: AntiSquid not bad :) getting used to my new job

Default avatar.png Rocky[KGF]: nice

Default avatar.png Rocky[KGF]: i have a problem that i am better than boss but i am not getting to next league CSB

jacek: so youre not better than other top players

Default avatar.png Rocky[KGF]: noo

Default avatar.png Rocky[KGF]: my rank is 1

Default avatar.png Rocky[KGF]: jacek

jacek: you have less points than boss?

jacek: i think the rank on the top doesnt include boss in leaderboard

Uljahn: wait until your submit is at 100%, and even after that the promotion isn't instant, there should be a cooldown specified at the top of the league's leaderboard

Default avatar.png Rocky[KGF]: okk

StepBack13: $GME?

Default avatar.png Rocky[KGF]: What is this StepBack13

Default avatar.png Rocky[KGF]: use english only

StepBack13: GameStop, it's a stock that appears to have great $ potential

jacek: oh my

AntiSquid: lol

AntiSquid: yes GME after you do your research, then sure it's great

AntiSquid: also buy the dip or wait for it, GME is at 300+ now, not very affordable

AntiSquid: StepBack13 https://www.reddit.com/r/MartinShkreli/comments/l9p2dz/shkreli_on_gme_131/?utm_source=share&utm_medium=web2x&context=3

Default avatar.png SKP6207: https://www.codingame.com/clashofcode/clash/1571767d5fb27091fb66e5a116fb08a9161c80b

AntiSquid: #clash for clash code spam links

tobk: Are Escape "Sessions" private to folks I invited, or can anyone see them? Is there a way to cancel them?

Default avatar.png DJMadKnight_6e63: yo

Default avatar.png ThePhantomCarpet_ce27: hello men

Default avatar.png ThePhantomCarpet_ce27: how are you today

Default avatar.png DJMadKnight_6e63: no you again

Default avatar.png DJMadKnight_6e63: oh shit here we go again

BlaiseEbuth: Guys :eyes:

Default avatar.png DJMadKnight_6e63: oh no u

Default avatar.png ThePhantomCarpet_ce27: mdrrr

Default avatar.png DJMadKnight_6e63: hereee johnny

Default avatar.png ThePhantomCarpet_ce27: Pourquoi jsuis ban du fr j'ai pas compris là ?

Default avatar.png ThePhantomCarpet_ce27: abus de pouvoir

Default avatar.png DJMadKnight_6e63: car tu est juste a coté de moi

BlaiseEbuth: English here

Default avatar.png ThePhantomCarpet_ce27: okay

Default avatar.png DJMadKnight_6e63: because you are just next to me

BlaiseEbuth: ThePhantomCarpet_ce27 you were just kicked

AntiSquid: ya please english, feel free to chat random stuff, but please get an avatar (not a rule, but a polite request)

Default avatar.png ThePhantomCarpet_ce27: ???

Default avatar.png DJMadKnight_6e63: flemme

AntiSquid: kick means you can press F5 and rejoin chat

AntiSquid: but watch your back

Default avatar.png DJMadKnight_6e63: oe mais moi la je suis méga banni

BlaiseEbuth: Now yes

AntiSquid: lol that nickname

BlaiseEbuth: ^^

Westicles: Did the cache in MKs brain finally break?

AntiSquid: i wouldn't have banned ... you killed meme potential .

BlaiseEbuth: isn't it a CG-Generated name ?

AntiSquid: what are the chances of that being a coincidence? the stars have aligned !

BlaiseEbuth: \o/

AntiSquid: it was the second comming of mad knights and you banned him

AntiSquid: you should feel bad .

BlaiseEbuth: I prefer think I saved the humanity...

KiwiTae: :joy:

struct: Could they not add a minimum account time to be allowed to chat?

BlaiseEbuth: There is one. A sort of. You can't see chat before lvl3. Or 2 ?

struct: yeah but lvl doesnt really do a good job

BlaiseEbuth: But it's pretty fast to reach...

Scarfield: Also trolls can just copy paste code to reach that lvl, account age wouldnt hurt

Westicles: The OG disapprove of the newcomers and their goals. Isn't that the fundamental problem here lately?

Uljahn: i guess the chat is accessible with an external client at any level

struct: I dont have any problem against newcomers

Scarfield: i dont think anyone disapproves newcomers, but trolls can be a problem

struct: But do you think the "newcomers" you see in chat everyday trolling add anything to the site?

Default avatar.png Basisprime: Blaise pourquoi tu ma banni :sob:

Scarfield: ^ the lvl issue and no account age right here sigh

BlaiseEbuth: English here Basisprime

Default avatar.png Basisprime: sorry my bad

Default avatar.png Basisprime: so why did you banned me ?:sob:

BlaiseEbuth: Should I really explain ? :expressionless:

Default avatar.png Basisprime: yes i don't understand why

Uljahn: have you been given a warning?

Default avatar.png FalbertTheGnome: he's been banned from the french chat

Uljahn: without warnings? for doing nothing abusive?

Default avatar.png FalbertTheGnome: he said a bad word

Westicles: All he wanted was to be social, talk about clashes, and explore job opportunities. Poor guy

Uljahn: understandable, have a nice day

[CG]Thibaud: (and spammed the chat)

reCurse: Always the same script, act like an idiot, then act all innocent and say what's wrong I did nothing bad forgive me. Must be the cheat code in school or something.

reCurse: Then usually followed by the optional step of insults when you deny.

Scarfield: Does anyone know what approaches have been used for the 960chess so far?

reCurse: According to tric track's record (hehe), probably some advanced minimax bot

Scarfield: rgr, cant really decide if i should try MCTS, EPT or minimax first, but nice contribution :)

Ornitro: Hi everyone, I have a problem with the last test of the first (easy) Chuck Norris Game : http://chat.codingame.com/pastebin/03aa074f-37f6-4b0f-a5bd-137e9d24c625

reCurse: Thanks

reCurse: Minimax has been the cornerstone of chess AI for decades you'll find a huge amount of information

reCurse: MCTS will be challenging to deal with shallow traps, it's been completely neglected in chess until alphazero came along

kovi: i will try...mcts (what a surprise)

Scarfield: xD

Scarfield: yea, but i usually go into a problem blind, then look into what others have done, and why its better to do that xD

reCurse: Search exhaustiveness is a nice property in chess

reCurse: Even in checkers I still have to sometimes deal with mcts being blind to obvious tactics, so I can only imagine in chess...

Scarfield: that is why im thinking of doing EPT, at least it should be less blind i assume

reCurse: I say mcts but it's actually anything best-first

struct: Well, I think you must do ept

struct: No way it will be good with normal mcts

struct: Will be almost as good as random

struct: on chess

struct: at least with cg constraints

reCurse: Having a best-first not missing any shallow tactics is hard

Scarfield: i will just eval my queen with a low score, and find all the queen sacrifices :p

reCurse: Naturally

Scarfield: btw, its only the very first turn that has 1000ms right? not the first turn of 2nd game as well

struct: Only first turn, before last print where you choose settings

struct: So no player gets an advantage

kovi: oh, wait. before chess let me escape!

Scarfield: ok ty

reCurse: Yeah you can't use the first second to precompute anything specific to the game, would make pairing difficult

kovi: hmm

Scarfield: ooh, i was just intending to reuse my tree with "flipped" players. I missed that, even though you said it pretty clearly xD

kovi: metagame of what to precompute for white to ensure win, black to keep draw, or both

kovi: anyway...no escape for now instead im redoing bt. now the improved mcts (+solver) works ok (top20). time to add heuristics

Scarfield: :muscle:

AntiSquid: i don't understand how pre-computing stuff on first turn leads to an unfair advantage, both sides can do it no?

Default avatar.png owent3877: hello im back

jacek: making bot for chess and people are thinking about mcts...

jacek: 5 years ago there was no other option for chess

Default avatar.png Angecide: no other option than mcts?

jacek: than minimax

hpa: why though? wasn't it well known then?

jacek: it was, but pure mcts does poorly in chess-like games with many traps

jacek: it was like this: minimax for chess, mcts for go/hex/havannah

linjoehan: yeah MCTS in chess does poorly mainly because in many cases there are 30 possible moves but only one really makes sense

linjoehan: maybe MCTS will work if you direct the random rollouts

linjoehan: has anyone tried the excape missions yet?

Katespizer: what's the name of this problem? "from string s you can remove none, any or all of the letters, the order of letters have to be preserved. Output all possible strings" I've seen problem like this like 3 times, how it's called? or what to seek for

Default avatar.png TheUNkilled: I also have a weird bug

Default avatar.png TheUNkilled: On my local IDE the program works normally

Default avatar.png TheUNkilled: But here it throws an index string out of range?

Default avatar.png TheUNkilled: Even if i manually checked with print and it's not out of range???

MSmits: :bug:

BlaiseEbuth: :butterfly:

jacek: :pony:

jacek: :(

struct: 3/100

Scarfield: :cat:

Default avatar.png alopikon: :unicorn:

struct: Its monday and no news about new update :(

MSmits: what update?

struct: new cg feature I think

MSmits: mysterious

DomiKo: there are news ;)

struct: where?

kovi: mail

struct: oh I didnt check

kovi: no escape...

kovi: or is there?

struct: I have those emails blocked I guess

struct: ...

struct: Is there any link?

jacek: oh, new puzzle of the week

DomiKo: small group got info

jacek: a puzzle :unuamused:

struct: (╯°□°)╯︵ ┻━┻

BlaiseEbuth: Elitism I say !

MSmits: who is small group?

struct: 5% of the 5%?

BlaiseEbuth: Not me and it's not acceptable !

MSmits: you're not small enough BlaiseEbuth

Astrobytes: Didn't get anything. Was wondering what the references to 'escapes' were earlier

struct: ^

BlaiseEbuth: Are you saying I'm fat ? :rage:

MSmits: nahhh

Astrobytes: Maybe it's 5% of the 95%

MSmits: i was saying you're tall, like a basketball player

jacek: "just prepared for winter"

BlaiseEbuth: Oh ! :flushed:

BlaiseEbuth: A group of totally randomly-choose players (But who will not criticize too hard) :3

jacek: no escaping then

struct: from the title it seems like an ARG puzzle

jacek: argh

BlaiseEbuth: ^

Astrobytes: Well, guess we'll see it when we see it.

Astrobytes: Or not, if it gets a negative response I suppose.

BlaiseEbuth: As if the community's opinion have any importance... :smirk:

Astrobytes: Do I detect a hint of salt... :thinking:

MSmits: oh so it was supposed to be a secret playtest and it got leaked immediately?

Astrobytes: No, it got emailed to some people and they asked about it in chat.

Astrobytes: Well, 2 or 3 of them at least

Astrobytes: And T said on discord to perhaps expect something on Monday about it

MSmits: ah

jacek: which monday

BlaiseEbuth: Tibo said on discord that "you will have some news" today. But it seems we're not all included in the "you"

Astrobytes: "You might hear more about it starting next Monday !"

Astrobytes: so *starting

struct: monday is still not over

BlaiseEbuth: But only a little group of you

Astrobytes: But perhaps it's a phased thing

MSmits: or a moebius thing

Astrobytes: Starting today

Astrobytes: lol

darkhorse64: In plain English, "might" denote something unlikely

Default avatar.png Lisker5006: wassup programmersss

Default avatar.png Mikasa_Ackerman: I'm noob

jacek: hm?

Westicles: /join fr

Westicles: hm

Westicles: /join ru

KiwiTae: OnOn

struct: if you put a space it wont owrk

struct: work*

Westicles: ya

therealbeef: anyone else got that email about coding escape?

TBali: #metoo

therealbeef: tried it yet?

jacek: oO

TBali: only the tutorial - invited some coop players, but it takes time to find the time

struct: :(

therealbeef: was a bit afraid of that too

therealbeef: you have to play at the same time as the others?

TBali: it seems so. wouldn't work the idea otherwise

reCurse: So what is it

TBali: not sure I am allowed to reveal. It seems like a closed beta. But happy to invite you in DM

TBali: asked for feedback, might need polish, etc. and only 2 games revealed yet out of several

jacek: need polish? here i am

TBali: :)

TBali: And I thought jokes about Hungarians being hungry is lame... _)

TBali: :)

Westicles: Is it XP or CP?

jacek: you should invade Turkey then

TBali: Idea is interesting. But aimed NOT at hardcore competitive coders

reCurse: Well yeah no kidding

reCurse: Starting to put the pieces together though

Westicles: heh heh, the cranky old guys don't like team play? who would have thought it :P

reCurse: Rather ironic, more that I did too much of it

therealbeef: it's not tied to codingame account at the moment; it needs a new account apparently

reCurse: With strangers on internet

reCurse: I'm entirely done with that

TBali: it seems more like "coop with your real-life friends, calssmates, etc"

TBali: no strangers

TBali: no matchmaking

TBali: I am allowed to invite <20 more people. Some spot went to RL colleagues/friends. Happy to share the link in DM for some, if interested

struct: you can invite people not in beta?

TBali: yes

struct: sure ill take it

TBali: went

Astrobytes: I'll be giving that a miss then.

BlaiseEbuth: Meh. You will tell me.

Westicles: If it gives XP, you all will do it. You've been conditioned so

struct: completed the tutorial too

Astrobytes: Nope. I refuse to do the clash path on the quest map.

struct: Not much to tell

Astrobytes: What it is might be a reasonable start :P

TBali: we have to try out one of the real games to see how it really goes

struct: sure TBali if you want create one and pm me the link

Astrobytes: Cooperative solving?

TBali: Hey you were giving that a miss then. :-)


Astrobytes: I reserve the right to ask questions.

TBali: Okay, struct and myself will have a trial run tommorrow 9PM CET. Happy to have few people to join. Min number of players 2, recommneded 3-5. Duration 60-90mins

TBali: DM me if interested

struct: the 60 minutes seems a bit high, but i dont know what to expect

TBali: we will crack it in 30 :-)

struct: I was going for 15

Astrobytes: I'll join casually

Scarfield: I am interested, but not in the escape ;)

struct: astro we must get top 5%

Westicles: stream it?

TBali: Astrobytes, "do or do not, there is no try"

Astrobytes: I will do it casually.

Scarfield: AstroTries

TBali: stream LOL so that you all laugh us

BlaiseEbuth: And ScarFails

Astrobytes: AstroChillsInTheChairAndJudgesSilently

Scarfield: xD

MaxTheorum: anyone got the link to the new thing? accidentaly deleted the mail

BlaiseEbuth: fat chance

Scarfield: riiight

MaxTheorum: honestly, its a weird thing in mac big sur accidentaly deleted instantly gone

MaxTheorum: already made an account

MaxTheorum: or is there any way I could approach staff or anything?

BlaiseEbuth: Discretly

Westicles: I usually approach staff from the flank

Astrobytes: No shit lol

BlaiseEbuth: You drop from the roof

jacek: nice rank in bt, kovi

kovi: thx jacek

kovi: probably it has more valid heuristics, i just started

kovi: (more than uttt)

kovi: hmm, how msmits is so low on bt?

jacek: hes noob, thats why

lopidav: Did Alice delete their account?

lopidav: not allice wait

Westicles: Allis, yep last week

Astrobytes: Yeah, what was that about

lopidav: How can I contact them? I have a script that they partly made and I want to publish it

MetehanBayraktar: in c++ if I initialize two variable like this --> int s{0}; first time I've seen s{0} what does it do ? if anyone can help it , would be awesome

MetehanBayraktar: one variable sorry

therealbeef: s is initialized as 0

Astrobytes: lopidav: not at all unless they're on the discord under the same name?

therealbeef: same as auto s = int{0}; or just auto s{0};

lopidav: Astrobytes, thanks for the idea. Doesn't look like this method works tho.

Westicles: You could ask on zapakh stream, maybe somebody on there knows him

lopidav: there are also two other deleted account in CoC top 20.

Westicles: Or velcoro, I think they were buddies

MSmits: lol kovi, i suck at bt so far. I tried a mcts but it doesnt work very well

MSmits: will get back to it eventually

lopidav: Westicles it kinda feels like stalking. They probably have a reason for deletion

Westicles: might not have been voluntary...

BlaiseEbuth: Yeah, missclick happen

lopidav: with two other deleted accounts looks like some drama took place here

BlaiseEbuth: Or he just deleted all his accounts at the same time... :thinking:

lopidav: eh, speculation is not fun when it's more like an accusation

jacek: nyoro~n

MSmits: j'accuse!

BlaiseEbuth: :grin:

Westicles: that line is my intellectual property :P

BlaiseEbuth: Do you his royalties to Zola ?

BlaiseEbuth: *pay

MSmits: :tm:

struct: anyone knows how we can use libraries on godbolt?

struct: I click the libraries button but I dont think its working properly

struct: ok got it working

jacek: :duck:

**Lanthanum267 msg

**Lanthanum267 slaps Lanthanum267 around a bit with a large fishbot

Lanthanum267: (╯°□°)╯︵ ┻━┻

Manchi_o6o7: http://chat.codingame.com/pastebin/35d251fa-dfdf-4fbc-ba5b-99e8866b2290

Manchi_o6o7: if someone can explain me this output :/

struct: the 2nd number causes overflow

struct: you create array of shorts

struct: And are assigning values bigger than short

struct: and then you are passing the short array as an int array

ZarthaxX: *tobo tobo*

ZarthaxX: he knows

struct: hi ZarthaxX

ZarthaxX: hey mah man

struct: is it holiday season on uni now?

Skynse: Is there a way to block people on this platform?

struct: Skynse you mean block pms?

ZarthaxX: struct aye

struct: how long?

ZarthaxX: but im studying for a final exam, as i have 3 pending

struct: its 4th year right?

ZarthaxX: still less than 2 months left

ZarthaxX: 4th year of official career, but i have done 4 years already

ZarthaxX: the first one is just for entry

struct: nice, early congrats

ZarthaxX: next year i "could" technically finish

ZarthaxX: i gotta do a thesis idk how im gonna start :P

Skynse: struct not pms but like, people who follow you

Skynse: some profile pictures are sketchy lmao

Skynse: my mind comes up with all sorts of scenarios

struct: I dont think there is any way to block

struct: Gl on it ZarthaxX

ZarthaxX: thanks :) idk wtf im gonna do

ZarthaxX: maybe some AI thing? :P

struct: If you like it

struct: rank 1 csb

ZarthaxX: i think i need to find a mentor and director and they kind of give you the topic

ZarthaxX: i think

struct: you cant suggest?

ZarthaxX: i really dont know hehe, didnt talk with people about that

Manchi_o6o7: http://chat.codingame.com/pastebin/dee023ce-e40b-40e1-840d-f1111284888a

Manchi_o6o7: if someone can explain this to me...

ZarthaxX: what's that

Manchi_o6o7: I need just the explanation of the output

Manchi_o6o7: what is the sizeof( structure)

struct: 16 bytes

struct: A size of a pointer is 8 bytes though

struct: You can just do sizeof(T)

struct: to get size of the struct

struct: sizeof(T*) = 8

ZackGabri: are the test servers lagging or something? my tests are taking too long and returning status -1

typingm: Having the same issue.

struct: it fixes in 10-15 minutes

struct: servers always have problems at this time

struct: leaderboard update

ZackGabri: oh ok then

Default avatar.png Vynom: time to go bed for me then xD

Papaver: Ah! Thanks for the explanation :)

Manchi_o6o7: how is the size of a structure calculated*

Manchi_o6o7: ?

struct: its based on the data inside the structure

Manchi_o6o7: here I have 2 chars

struct: no

struct: you have a char and a pointer

Manchi_o6o7: aren't they the same size

struct: a pointer is 8 bytes

struct: a char is 1 byte

Manchi_o6o7: really?

struct: 1 + 8 = 16 bytes

Manchi_o6o7: every pointer

struct: because 7 bytes are padded

struct: I think so

Manchi_o6o7: the padding goes always to the exponent of 2?

ZarthaxX: the padding makes the struct a multiple of biggest data

ZarthaxX: u can avoid the padding

ZarthaxX: putting some directive to the struct

Manchi_o6o7: I need to write an exam, so I need to calculate it by brain

struct: not sure if the exam requires to calculate padding

ZarthaxX: lol

struct: to you should check

Manchi_o6o7: I think so

struct: typedef struct t {char c;char d; int b; } T; typedef struct t {char c; int b; char d;} T;

struct: are those the same size?

ZarthaxX: the order may affect

struct: yeah

struct: I wanted to explain him

Manchi_o6o7: no, they are not

struct: why not?

Manchi_o6o7: I am trying to figure it out

Manchi_o6o7: in the second example, padding is given from both sides

Manchi_o6o7: so it becomes 4 4 4

Manchi_o6o7: in the first it should be 1 4 4

Manchi_o6o7: but it prints eight :/

struct: first i.e: 1 byte -> 1 byte -> 2-> padding -> 4 bytes

struct: first i.e: 1 byte -> 1 byte -> 2 padding -> 4 bytes

Manchi_o6o7: why is the padding 2?

struct: ZarthaxX help

Manchi_o6o7: sorry guys

struct: ah wait I remember

struct: So on 64 bit compiler

struct: you can read up to 8 bytes

struct: so it becomes

ZarthaxX: what?

struct: char a [1 byte] char b[1 byte] int d[4 bytes]

struct: then you pad 2 at end

struct: ok

struct: im not explaining well

struct: ZarthaxX explain this

Manchi_o6o7: hahahahhahaha

Manchi_o6o7: I am trying to figure it out

Manchi_o6o7: it is confusing me

struct: https://i.stack.imgur.com/oDZce.png

ZarthaxX: i was gonna say just paste a link :P

ZarthaxX: it's just some defined rule, nothing to understand

struct: yeah I guess

struct: and i worded it poorly

struct: Manchi_o6o7 check https://www.youtube.com/watch?v=aROgtACPjjg

Default avatar.png Angelburgie22: Anyone else feeling this thing laggy, or is it just my laptop?

struct: not your laptop

struct: is the site

struct: should fix soon

Manchi_o6o7: I will check the video

Default avatar.png Angelburgie22: K, thx

Daiim: It was the daily update

Daiim: *save*

Manchi_o6o7: I understood the padding thing

Manchi_o6o7: but why the structure is 8 bytes, but the pointer to the structure 4 bytes...

struct: Depends on the architecture

struct: if the compiler is 32 bits then a pointer is 4 bytes

Manchi_o6o7: 64 = 8 bytes

struct: yes

Manchi_o6o7: is it same for an int

Manchi_o6o7: float etc.

Manchi_o6o7: it is

Manchi_o6o7: thank you very much

struct: np

Manchi_o6o7: ~!i if someone could explain this

Manchi_o6o7: " ~! " bitwise not is understandable

struct: 0 becomes 1

struct: 1 becomes 0

Manchi_o6o7: but ! ?

struct: the ! operator?

Manchi_o6o7: yes

struct: return !false;

struct: returns true

struct: and return !true

struct: returns false

Default avatar.png vesuwiusz: ! is negation operator

Manchi_o6o7: what does it return if I have ~!number

icecream17: !number

Manchi_o6o7: what does it look for

icecream17: what language is this

struct: if number is 0

Manchi_o6o7: C

struct: it comes 1

struct: else it becomes 0

Default avatar.png vesuwiusz: https://stackoverflow.com/questions/21037870/negation-of-a-number

Manchi_o6o7: if I have the number 36, as an int

icecream17: ~!0 becomes ~1 becomes 0

Default avatar.png alopikon: not of a number but the same sign(if it is signed number)

struct: !36 = 0

icecream17: ~! (not 0) become ~0 becomes 1

Manchi_o6o7: what would it printf out

icecream17: ~!0 becomes ~1 becomes 0 ~! (not 0) become ~0 becomes 1

icecream17: ~! (not 0) = 1

struct: ~! its two operators

icecream17: that kinda reminds me of for (x = 10; x --> 1;) // x goes to 1

Manchi_o6o7: http://chat.codingame.com/pastebin/c994fa9d-9d95-4b27-b436-474bb33fc20f

Manchi_o6o7: can someone explain me this behaviour...

Manchi_o6o7: how is it at the end 130 ( 82 hex)

Manchi_o6o7: and what happens with the signs