#zinc

/

      • errordeveloper has quit
      • c0170 joined the channel
      • c0170
        :P
      • bgamari: you around ?
      • thestinger commneted on 741 PR in rust RFC : Is @wycats claim that I lack technical rigour in my arguments and coding based on an inferiority complex?
      • :D:D
      • errordeveloper joined the channel
      • errordeveloper joined the channel
      • errordeveloper has left the channel
      • errordeveloper joined the channel
      • errordeveloper has left the channel
      • farcaller
        I've been coding swift for a few hours now
      • I must say that given shitty docs and cryptic errors, that make me think of C++ and templates, rust looks really good in comparison
      • at least slicing is *trivial* in rust
      • c0170
        what are u coding ?
      • farcaller
        was just trying to do something more complex than a hello world
      • failed miserably :)
      • c0170
        how to initialize an array in the structure to just default - 0? can't figure out the syntax.. got struct with an array [u8; 8]
      • farcaller
        [0; 8]
      • bgamari
        c0170, I am
      • struct Hello { dummy: [u8; 8] }
      • fn main() { unsafe { let h: Hello = init(); } }
      • works for me
      • alternatively even uninit would be sufficient
      • given that your C library will likely initialize the structure anyways
      • farcaller
        well, uninit is ok
      • but why not just use [0;8]
      • ? :)
      • bgamari
        heh, fair point
      • although in the case that you want to keep the code generic in the struct size, init/uninit is a bit easier
      • farcaller
        yup
      • c0170 has quit