#go-nuts

/

      • nano-
        echlebek: unions :)
      • echlebek
        type Union struct { // all the things }
      • nano-
      • echlebek
        o_O
      • Tv`
        unions are via unsafe.Pointer. more things to not do when learning Go ;)
      • nano-
        I usually explore new languages by implementing the xmms2 protocol as I've worked so much with it and writing a client library exposes you to all sorts of fun parts of a language.
      • Tv`
        xmms source is all weird, news at 11
      • nano-
        I think you're thinking of xmms1 source. xmms2 has overall very fine C code.
      • Tv`
        nano-: that's a tagged union, go has those. we call them interfaces.
      • nano-
        Thanks, all possible google terms are well appreciated. I'll dig around and see what I can conjure.
      • Tv`
        nano-: protip: don't assume source for an implementation of protocol will look similar across languages
      • lungaro
        xmms2 is activly developed?
      • nano-
        I don't.
      • crgimenes joined the channel
      • zomble is now known as grumble
      • lungaro: yes, for some values of activly, we usually merge stuff at FOSDEM once a year, babies killed the team :D
      • lungaro
        hehe
      • nano-
        Steady progress forever at least.
      • polyrob joined the channel
      • eljimmy
        pulling my hair out here, does anyone know how to call a method on a field in a template?
      • Tv`
        eljimmy: the same ol {{.Foo.Bar.Baz}} way
      • crgimenes has quit
      • theCole joined the channel
      • robot-beethoven joined the channel
      • eljimmy
        i keep getting "can't evaluate field String"
      • eljimmy has quit
      • eljimmy joined the channel
      • sametsisartenep has quit
      • not sure if my last message got through but "can't evaluate field String". it keeps trying to evaluate my method calls as fields
      • klow joined the channel
      • mohae_
        eljimmy: share code
      • minimarcel joined the channel
      • ra21vi has quit
      • lungaro
        eljimmy, the act of writing a small test case to share might be enough to figure out why its not working by yourself
      • mup has quit
      • Pisuke has quit
      • eljimmy
      • mup joined the channel
      • Pisuke joined the channel
      • rockx012` joined the channel
      • sadbox joined the channel
      • F41L joined the channel
      • mohae_
        that's not enough to be useful, but look at https://golang.org/pkg/html/template/#Template....
      • eljimmy
        well, i mean, the syntax is apparently .Field.Method but it is being interpreted by the template engine as .Field.Field
      • fixl_ joined the channel
      • isd has quit
      • tvw has quit
      • matp has quit
      • MerlinDMC has quit
      • doomlord has quit
      • ayonix has quit
      • tvw joined the channel
      • TFKyle has quit
      • Mer|inDMC joined the channel
      • klim has quit
      • does the template not call the String() method when you use .Field?
      • bjz has quit
      • rockx0123 has quit
      • Term1nal has quit
      • bjz joined the channel
      • Tv`
        eljimmy: u.String calling u.String isn't the smartest idea
      • GringoChapin has quit
      • ayonix joined the channel
      • i could explain to you why, but first i would have to explain to you why
      • eljimmy
        fair enough but honestly man im literally just trying to print out the damn url right now.
      • and can't for the life of me figure out how to do that
      • DLSteve joined the channel
      • Tv`
        write simpler code
      • communicate your problem
      • eljimmy
        i just added that String method in now
      • mmm.... alright, lemme make it simpler i guess.
      • lungaro
        your example is a mess
      • mexisme joined the channel
      • Tv`
        eljimmy: the whole point of rubber duck debugging is that most of the time the mere act of expressing your problem clearly resolves it
      • eljimmy
        no doubt
      • mexisme joined the channel
      • Somix has quit
      • mexisme2 joined the channel
      • squallstter has quit
      • x7C3 has quit
      • x7C3 joined the channel
      • realisation joined the channel
      • realisation has quit
      • echlebek
        quack :v
      • sz0 has quit
      • e14 joined the channel
      • Kol has quit
      • isd joined the channel
      • realisation joined the channel
      • GreenJello joined the channel
      • Kol joined the channel
      • e14 has quit
      • eljimmy
        i made an example to show my problem but the example works fine lol
      • eljimmy slowly lowers his forehead to his desk
      • F41L has quit
      • Nilium
        So it appears that docker has somehow created a tar file that only OS X understands... bsdtar and gnu tar both hate it.
      • anonymuse joined the channel
      • GNU tar hates it because it has symlinks that can't be resolved, which is dumb and it should just create the symlinks, and bsdtar is coughing up something about pathnames and locales
      • mohae_
        I'm not a fan of symlinks in tar
      • Nilium
        I don't have much of a choice since I'm merging some docker images
      • kuroneko
        the woes of tar
      • echosystm
        what's the difference between func (blah *Blah) x and func (blah Blah) x ?
      • Petter has quit
      • Blah being a struct
      • kuroneko
        the least portable/standard, standard archive format. >_>
      • mohae_
        what's the difference between a value receiver and a pointer receiver?
      • echlebek
        echosystm: the latter example has a pointer argument.
      • mohae_
        echlebek: well the former
      • echlebek
        err.
      • yes. the former.
      • and it's a receiver.
      • >_<
      • Time to go home apparently! Goodnight!
      • Nilium
        kuroneko: And yet somehow ubiquitous
      • black13 joined the channel
      • mohae_
      • kuroneko
        Nilium: because everybody has a version of it!
      • black13
        an interface can have a function but its not fleshed out correct?
      • mohae_
        because tapes were ubiquitous?
      • echlebek
        yes, thank you mohae_
      • mohae_
        echlebek: oops, I meant echosystm
      • echlebek
        :)
      • mohae_
        echlebek: I know you know already ;)
      • echlebek
        Hey, I might have gotten by with just functions up until now.
      • Nilium
        OK, found a way to make bsdtar happy: set LANG to C.UTF-8
      • kuroneko
        tar portability hasn't been a huge problem in recent years since everybody just seems to ship gnutar in one form or another.
      • Nilium
        Which I'm assuming means "just assume it's utf-8" since it's got the C in it
      • ewhal4 has quit
      • dkj0208 joined the channel
      • kuroneko
        Kinda. It says it's UTF-8 without a specific locale
      • Nilium
        Works for me.
      • My locale is "this is going right back in a tar file once I'm done extracting it"
      • kuroneko
        Locale screws with locale aware sorting/ordering
      • Nilium
        Also known as "this is pain"
      • kuroneko
        which irked me horribly when gnu ls decided that it'll use locale-aware sorting for file lists.
      • Nilium
        It's frustrating that all I want out of this is the dumbest possible extraction of files to the system and it keeps trying to be smart
      • It wants locales but all I want is for it to just say "this is the binary string I'm using"
      • kuroneko
        yup, that's what C is for.
      • Nilium
        GNU wants symlinks that actually go somewhere, I want it to shut the hell up and create them anyway
      • bemasher
        submit a patch for a "don't be smart" flag
      • Nilium slams his face into a wall
      • kuroneko
        I figure the 'C' locale really just means "the programmer knew best - don't mess with it"
      • mexisme joined the channel
      • Nilium
        There, after much pain, the build passes in Linux
      • ewhal4 joined the channel
      • mexisme2 joined the channel
      • _cyril_ has quit
      • black13
        "build" sounds like a kidney stone
      • kuroneko
        but yeah, handling of things like filesystem filename encoding/character sets is one of the tar incompatibilites. up there with long path names, device nodes, and a few other things that generally cause havoc when you switch tar implementation.
      • wildjim joined the channel