< Return to Video

Is Go for you? - GoSG

  • 0:05 - 0:07
    good evening again this is the first time
  • 0:07 - 0:11
    I'm seeing this okay I'm holding it up
  • 0:11 - 0:15
    this is a gopher Singapore edition so
  • 0:15 - 0:22
    gopher Merlion and the title of my talk
  • 0:22 - 0:25
    if I speak it quickly
  • 0:25 - 0:29
    oops stay
  • 0:29 - 0:32
    nvm it doesn't want to
  • 0:32 - 0:33
    title of my talk if you speak it quickly
  • 0:33 - 0:38
    is Go for you? That's a pun there.
  • 0:44 - 0:47
    All of us have limited mental capacity
  • 0:48 - 0:52
    budget some of us can keep more things
  • Not Synced
    limited mind budget
  • Not Synced
    in our mind some of us can keep less
  • Not Synced
    things in our mind but you know in all
  • Not Synced
    cases it's limited so what do you mean
  • Not Synced
    by mine budget if you know how to drive
  • Not Synced
    a car it's instinctive
  • Not Synced
    you still know you still need to know
  • Not Synced
    where you're going so that consumes
  • Not Synced
    energy and mine budget so the point I'm
  • Not Synced
    trying to ask is what are your current
  • Not Synced
    skills what you currently do today and
  • Not Synced
    what you want to do tomorrow so for
  • Not Synced
    example if I currently write stuff for
  • Not Synced
    the web
  • Not Synced
    typically web front-ends I know
  • Not Synced
    JavaScript quite well by definition but
  • Not Synced
    I want to write back-end stuff around
  • Not Synced
    the right back-end servers I want to
  • Not Synced
    write API service your look you know
  • Not Synced
    because you can write back-end stuff in
  • Not Synced
    JavaScript it's called no GS you still
  • Not Synced
    need to know about the rules of writing
  • Not Synced
    API servers you still need to learn
  • Not Synced
    about that domain but you don't have to
  • Not Synced
    learn a new language because learning
  • Not Synced
    new stuff consumes mine budget and it's
  • Not Synced
    difficult
  • Not Synced
    before coming to go I used to write in
  • Not Synced
    Java so I know Java quite well and I
  • Not Synced
    want to write web front-ends well you
  • Not Synced
    can write web front-ends in Java it's
  • Not Synced
    not impossible but it's like using that
  • Not Synced
    to pull out nails so the point I'm
  • Not Synced
    trying to say
  • Not Synced
    the final point I'm trying to make is
  • Not Synced
    you need to have the right tools so what
  • Not Synced
    is goal good for so hammer is good for
  • Not Synced
    hammering in stuff that cow hammer is
  • Not Synced
    not good for pulling out nails go is
  • Not Synced
    good for writing cloud services back-end
  • Not Synced
    service it's good for being well this is
  • Not Synced
    debatable but those people who have
  • Not Synced
    written in go think it's actually quite
  • Not Synced
    simple to read and understand it's good
  • Not Synced
    for having this thing funny thing called
  • Not Synced
    implicit interface satisfaction which
  • Not Synced
    I'll talk about in a while it's got
  • Not Synced
    fantastic concurrency and my favorite
  • Not Synced
    feature its Java done right it's
  • Not Synced
    cross-platform
  • Not Synced
    Sogo is somewhat familiar that's the
  • Not Synced
    first line hello will in go if you
  • Not Synced
    ignore the funny fmt in the capital case
  • Not Synced
    it's not a class print line it just goes
  • Not Synced
    way of denoting a public variable you
  • Not Synced
    see it's pretty much the same across
  • Not Synced
    many many different languages so goal is
  • Not Synced
    somewhat familiar and therefore somewhat
  • Not Synced
    easy to learn in fact go about design to
  • Not Synced
    be easy to learn anybody who comes from
  • Not Synced
    a Java environment or c-lite language
  • Not Synced
    will find go somewhat familiar go is
  • Not Synced
    definitely type safe I like to I like to
  • Not Synced
    put up this example do you think this
  • Not Synced
    come this program will run do you think
  • Not Synced
    this program will compile really compile
  • Not Synced
    it won't even compile let's try how many
  • Not Synced
    of you have run your presentations
  • Not Synced
    before I'm going to run the presentation
  • Not Synced
    and let's read their messages go error
  • Not Synced
    messages are not too bad actually
  • Not Synced
    so what it's done is taken this HTML fed
  • Not Synced
    it into a temporary file called compiled
  • Not Synced
    0 dot go and the compiler complained
  • Not Synced
    cannot use B type string in an integer
  • Not Synced
    for assignment can you do in JavaScript
  • Not Synced
    yes or no yes let's prove it and you put
  • Not Synced
    down a microphone
  • Not Synced
    so I is definitely okay thank you my
  • Not Synced
    anything so I is definitely an integer
  • Not Synced
    now I is a string
  • Not Synced
    javascript is bad truffles I'm starting
  • Not Synced
    a flame war here actually not true
  • Not Synced
    javascript is a pretty good language now
  • Not Synced
    in a godo so let's talk about go alright
  • Not Synced
    this one is not so obvious how strongly
  • Not Synced
    typesafe is go
  • Not Synced
    why type safety at all but let's let's
  • Not Synced
    look at this code and let's see whether
  • Not Synced
    it will compile at all
  • Not Synced
    I declare a type called mynum as an
  • Not Synced
    integer and over here I declare a
  • Not Synced
    variable I it's of type my num and I
  • Not Synced
    assign it the value two over here I
  • Not Synced
    assign a variable J of type int integer
  • Not Synced
    of value three can I assign I and J in
  • Not Synced
    Java cannot can in ogs definitely can
  • Not Synced
    bingo
  • Not Synced
    No let's see the error message some of
  • Not Synced
    you already guessed answer's no let's
  • Not Synced
    look at error message
  • Not Synced
    cannot use type J cannot use J type
  • Not Synced
    integer as type mine um so my num
  • Not Synced
    even though was derived from an integer
  • Not Synced
    is a separate typing goal so it is very
  • Not Synced
    very very strongly typed and this is
  • Not Synced
    very useful if you write big code if you
  • Not Synced
    write code that is shared with loads of
  • Not Synced
    programmers it's also very useful for
  • Not Synced
    code you have written years ago this is
  • Not Synced
    the equivalent of keeping everything in
  • Not Synced
    its right place and the right place for
  • Not Synced
    everything but there's always two sides
  • Not Synced
    to a coin keeping everything in the
  • Not Synced
    right place takes a lot of time a lot of
  • Not Synced
    bookkeeping nodejs
  • Not Synced
    allows you to throw things all the place
  • Not Synced
    a teenager's bedroom nodejs is like a
  • Not Synced
    teenager's bedroom go is like a
  • Not Synced
    well-kept well-groomed house so strong
  • Not Synced
    static typing allows you to catch most
  • Not Synced
    errors at compile time and the runtime
  • Not Synced
    is quite predictable in other words
  • Not Synced
    after compiling and you deploy
  • Not Synced
    production you can expect predictable
  • Not Synced
    performance but the flip side of it is
  • Not Synced
    if you are trying to throw a no-show to
  • Not Synced
    get a short script a language like
  • Not Synced
    nodejs Python or Ruby is much more
  • Not Synced
    appropriate so guess the message is what
  • Not Synced
    do you want to do what you already know
  • Not Synced
    and what you want to do in the future so
  • Not Synced
    decide whether you want to learn go let
  • Not Synced
    me try to convince you that go is worth
  • Not Synced
    learning so go has implicitly satisfied
  • Not Synced
    interfaces those come in from Java know
  • Not Synced
    about Java interfaces go tries to keep
  • Not Synced
    keeping a house in order
  • Not Synced
    static typing strong static typing more
  • Not Synced
    pleasant so over here I declare an
  • Not Synced
    interface type it's called one D fire
  • Not Synced
    and it's got one
  • Not Synced
    that in it called quantify and quantify
  • Not Synced
    it takes nothing and returns an integer
  • Not Synced
    so over here I declare another type my
  • Not Synced
    SDR or my string it's derived from type
  • Not Synced
    string and it also has a quantify method
  • Not Synced
    now how do I know there is a method this
  • Not Synced
    funny syntax which go created the way
  • Not Synced
    you read this line means quantify is a
  • Not Synced
    method of s of type my string which
  • Not Synced
    returns an integer that's how you read
  • Not Synced
    it so basically it's a matter of my
  • Not Synced
    string it says print that means printer
  • Not Synced
    screen quantifying s and was s its
  • Not Synced
    length of s it returns the length of s
  • Not Synced
    as the funny has a final value this is
  • Not Synced
    just a side effect you just print out
  • Not Synced
    the string now I declare another type
  • Not Synced
    called
  • Not Synced
    my int and it's derived from integer and
  • Not Synced
    to quantify this integer I did tell me
  • Not Synced
    whether it's positive negative or zero
  • Not Synced
    that simple code for that so let's cut
  • Not Synced
    to the chase
  • Not Synced
    well this code were let's go to line by
  • Not Synced
    line
  • Not Synced
    that's just a print statement this line
  • Not Synced
    is interesting
  • Not Synced
    oh by the way go has this funny reversed
  • Not Synced
    declaration syntax so a variable Q is of
  • Not Synced
    type quantifier that's why it means it
  • Not Synced
    is not quantifier is of type 2 it's the
  • Not Synced
    other way around so variable Q is of
  • Not Synced
    type quantifier so the quantifier has a
  • Not Synced
    quantified method Q equals my int 3 now
  • Not Synced
    that's another funny go Lang go language
  • Not Synced
    syntax all he's saying is victory and
  • Not Synced
    make it my it so I'm casting 3 to my end
  • Not Synced
    think of it like a constructor in Java
  • Not Synced
    so that's a constructor kind of thing
  • Not Synced
    print queue 25 so 3 is a numeric it's
  • Not Synced
    positive so should be 1 I guess so
  • Not Synced
    Q equals my string ABC and the length of
  • Not Synced
    ABC is 3 so we run this program the
  • Not Synced
    first one should be 1 the second one
  • Not Synced
    should be 3 let's check it out and sure
  • Not Synced
    enough it is 1 in 3 now
  • Not Synced
    let me edit my presentation and rerun it
  • Not Synced
    anybody learn how to edit your
  • Not Synced
    presentation and rerun it let's change
  • Not Synced
    this to a minus four let's editing my
  • Not Synced
    presentation this is written in go by
  • Not Synced
    the week
  • Not Synced
    real cool stuff and let's run it again
  • Not Synced
    so now it shows up as minus one can
  • Not Synced
    everybody at a backseater bottom rows
  • Not Synced
    good now no surprise if I change it to
  • Not Synced
    zero it should be zero let's run it and
  • Not Synced
    it shows up as zero if I change this to
  • Not Synced
    a four letter word maybe a five letter
  • Not Synced
    word it just returns the length of the
  • Not Synced
    string now I'm going to show you goes
  • Not Synced
    see you routes anybody know see here
  • Not Synced
    good what do you think will happen here
  • Not Synced
    0x20 a see that's a hexadecimal number
  • Not Synced
    what do you think what happened you
  • Not Synced
    volunteers shout out your answer really
  • Not Synced
    will one character well let's try it on
  • Not Synced
    quantifying euro 0x20 AC is the Unicode
  • Not Synced
    for Euro the Euro symbol and the Euro
  • Not Synced
    symbol is a single character string and
  • Not Synced
    it says 3 because the signal character
  • Not Synced
    string is actually an integer and it's
  • Not Synced
    of length 3 really confusing stuff but
  • Not Synced
    here are the things they will trip you
  • Not Synced
    up it's sea routes
  • Not Synced
    alright why is this useful why are these
  • Not Synced
    car interfaces useful now let's say I
  • Not Synced
    have another type call exam paper and
  • Not Synced
    exam paper you submitted it as Syrian
  • Not Synced
    Dom I shouldn't use Microsoft should use
  • Not Synced
    Google stuff anyway that's the URL for
  • Not Synced
    my exam paper submission and let's say
  • Not Synced
    exam paper is to create me quantify how
  • Not Synced
    do you test this car stuff it's
  • Not Synced
    difficult right it's gonna make a
  • Not Synced
    service call go out to the Internet
  • Not Synced
    grab the real exam paper and try to test
  • Not Synced
    it and that's not very predictable the
  • Not Synced
    internet connection may be down I may
  • Not Synced
    have changed my exam my exam submission
  • Not Synced
    but I can have fake exam paper to HTTP
  • Not Synced
    does not matter dot see you in the doc
  • Not Synced
    it never makes the internet call but
  • Not Synced
    fake exam paper because it
  • Not Synced
    satisfies quantify it works and it's
  • Not Synced
    great for testing so this is how I use
  • Not Synced
    interfaces all the time but this way of
  • Not Synced
    defining interfaces is very very useful
  • Not Synced
    because in Java or similar languages you
  • Not Synced
    must say this class implements this and
  • Not Synced
    you may find that the implements may be
  • Not Synced
    implements ABCD efg until Zach a very
  • Not Synced
    very long string of implements in go
  • Not Synced
    there is no implements cuit it's
  • Not Synced
    implicit implementation so long as it's
  • Not Synced
    got a quantifier method it works the
  • Not Synced
    most fantastic example of this is IO
  • Not Synced
    reader and IO writer you can print line
  • Not Synced
    to a database because it I all right I
  • Not Synced
    will read ok so that is the second
  • Not Synced
    reason why go is such a good language if
  • Not Synced
    I'm losing any of you if you want us any
  • Not Synced
    questions just shout out interrupt me
  • Not Synced
    yes
  • Not Synced
    so Java has if you have a functional
  • Not Synced
    interface yeah Java it onwards has
  • Not Synced
    function interfaces and the question is
  • Not Synced
    if you use the functional interface of
  • Not Synced
    Java you have this kind of capability
  • Not Synced
    sort of right and how is it different
  • Not Synced
    from the Java interface well I like to
  • Not Synced
    think go start the refers Java copied it
  • Not Synced
    but here that's actually a very good
  • Not Synced
    question
  • Not Synced
    go JavaScript and I'm sorry
  • Not Synced
    leave go office JavaScript nodejs Java
  • Not Synced
    Kotlin all the new modern languages if
  • Not Synced
    you hear one of the authors of go speak
  • Not Synced
    his name is Robert by interesting
  • Not Synced
    speaker he says all these languages are
  • Not Synced
    becoming more and more alike they're
  • Not Synced
    getting more and more features Java is
  • Not Synced
    getting functional features node.js is
  • Not Synced
    trying to get classes so all these
  • Not Synced
    languages are converging more or less
  • Not Synced
    the same language perhaps it differs
  • Not Synced
    slightly different syntax who is
  • Not Synced
    different go is very very limited I'd
  • Not Synced
    want to use this word but it is quite
  • Not Synced
    relevant limited stupid basic language
  • Not Synced
    it is designed so that anybody coming
  • Not Synced
    from a C language can look at it and
  • Not Synced
    solve kind of understand it it's
  • Not Synced
    designed so that you can write code that
  • Not Synced
    is efficient that compiles quickly and
  • Not Synced
    when you look at here five years later
  • Not Synced
    you can still understand it so goal is
  • Not Synced
    designed somewhat like Python what
  • Not Synced
    design Python was designed to be clear
  • Not Synced
    and easily readable so many people have
  • Not Synced
    actually come from Python to go
  • Not Synced
    why because Python is really slow global
  • Not Synced
    interpreter lock
  • Not Synced
    I came to go not from Python but from
  • Not Synced
    Ruby the rubies are fantastic language
  • Not Synced
    it makes developers like me who write in
  • Not Synced
    Ruby very happy it's a very very fun
  • Not Synced
    language but but but yes group global
  • Not Synced
    interpreter lock it's really slow but
  • Not Synced
    that wasn't my issue it was fast enough
  • Not Synced
    Ruby was fast enough for me but Ruby
  • Not Synced
    code because it was so fun to write when
  • Not Synced
    you look at it five years later what am
  • Not Synced
    I trying to write here go tries to
  • Not Synced
    circumvent that problem by anyway let's
  • Not Synced
    go to goes the feature which I want to
  • Not Synced
    talk about which is concurrency which is
  • Not Synced
    something which for a person new to
  • Not Synced
    programming finds it really hard and for
  • Not Synced
    person who does JavaScript finds it
  • Not Synced
    quite hard as well so over here I
  • Not Synced
    declare a function let's call plus and
  • Not Synced
    all it does for event however prints
  • Not Synced
    the plus sign that's all it does after
  • Not Synced
    one second it Blin prints another plus
  • Not Synced
    forever and ever
  • Not Synced
    here we have basically the same routine
  • Not Synced
    but it brings out a period brings out a
  • Not Synced
    dot okay
  • Not Synced
    most of us when we start out writing
  • Not Synced
    code we write code like this this this
  • Not Synced
    one compiled so
  • Not Synced
    let's run it like this this one compiled
  • Not Synced
    it all it's got some real error message
  • Not Synced
    about to execute select so I'm about to
  • Not Synced
    execute select fatal all goroutines are
  • Not Synced
    sleep deadlock which means there is
  • Not Synced
    something in NGO called a goroutine and
  • Not Synced
    his detected deadlock and its crash the
  • Not Synced
    program and it's exited so okay let's
  • Not Synced
    make the program work
  • Not Synced
    let's fix me ok let's run + let's run
  • Not Synced
    this program ok pluses are running but
  • Not Synced
    my aim is to run + and go at the same
  • Not Synced
    time concurrently so as a beginner
  • Not Synced
    programmer I would do that of course
  • Not Synced
    do you think that will never work
  • Not Synced
    no why
  • Not Synced
    a sequential execution plus is holding
  • Not Synced
    on to the CPU I just want to let go
  • Not Synced
    let's prove it yes plus is hogging the
  • Not Synced
    CPU doesn't want to let go it doesn't
  • Not Synced
    let go any time to run it all okay I am
  • Not Synced
    the creator I'm the right of this
  • Not Synced
    program now dot can run correct yeah
  • Not Synced
    don't runs by one go and plus and dot to
  • Not Synced
    run at the same time how do I do that
  • Not Synced
    anybody we got go experts here come on
  • Not Synced
    ah yes the goalkeeper do ah start a go
  • Not Synced
    routine let's do that
  • Not Synced
    I added three characters g/o and a space
  • Not Synced
    and I've turned a regular routine into a
  • Not Synced
    go routine in the routine that doesn't
  • Not Synced
    block let's prove it hey it doesn't
  • Not Synced
    block it works but hold on this part the
  • Not Synced
    code is not executing this particle
  • Not Synced
    which says about to execute select is
  • Not Synced
    not executing how do I get that to
  • Not Synced
    execute as well
  • Not Synced
    oh you guys are learning fast
  • Not Synced
    put another make dot a go routine so
  • Not Synced
    let's do that
  • Not Synced
    bang now there's something interesting
  • Not Synced
    here this comes from printing lying go
  • Not Synced
    concurrency this comes from about to
  • Not Synced
    execute select and then the pluses and
  • Not Synced
    dots what is actually happened here is
  • Not Synced
    the program ran put that into the
  • Not Synced
    background it's running independently in
  • Not Synced
    the background put that in a background
  • Not Synced
    that took a few hundred microseconds
  • Not Synced
    fraction of a millisecond so in a
  • Not Synced
    fraction of a millisecond or maybe a
  • Not Synced
    millisecond later the print line
  • Not Synced
    executed and I needed to put this select
  • Not Synced
    here select here select is a statement
  • Not Synced
    which actually tries to determine which
  • Not Synced
    grow routine is ready to run but if I
  • Not Synced
    remove that select if I remove the wait
  • Not Synced
    forever what do you think will happen
  • Not Synced
    the program would actually the program
  • Not Synced
    would terminate
  • Not Synced
    what happened to my goal routines if
  • Not Synced
    main terminates the core routines
  • Not Synced
    dominate let's prove that
  • Not Synced
    so no more select it's commented out and
  • Not Synced
    by the way the double slash if you've
  • Not Synced
    not figured it out its comment
  • Not Synced
    program exited no dots no plus so that's
  • Not Synced
    another feature of go
  • Not Synced
    it has garbage collected the goal
  • Not Synced
    routines goal is a garbage collector
  • Not Synced
    language with a very very very
  • Not Synced
    performant garbage collector those
  • Not Synced
    people coming from Java every now and
  • Not Synced
    then when the garbage collector collects
  • Not Synced
    garbage it stops the world the whole
  • Not Synced
    system stops go garbage collector used
  • Not Synced
    to be like that as well stop the world
  • Not Synced
    for a few hundred milliseconds the
  • Not Synced
    latest version or go stops the world for
  • Not Synced
    a few hundred microseconds so it doesn't
  • Not Synced
    really stop the world alright
  • Not Synced
    those people who know JavaScript will
  • Not Synced
    know no js' that's nothing new
  • Not Synced
    no Jas has concurrency as well so let's
  • Not Synced
    prove it I'll put it here
  • Not Synced
    f12 to get console
  • Not Synced
    so over here I've defined two JavaScript
  • Not Synced
    functions function plus and function dot
  • Not Synced
    and this is very JavaScript every 1000
  • Not Synced
    milliseconds lakh to the console a plus
  • Not Synced
    every 1000 milliseconds log to the
  • Not Synced
    console a - no - a dot so when I run
  • Not Synced
    that well pluses go on to pluses four
  • Not Synced
    pluses five pluses go on and on
  • Not Synced
    if I run dot if I can type
  • Not Synced
    now you got plus and dot's so javascript
  • Not Synced
    can do what go to us mind budget if you
  • Not Synced
    know JavaScript do you want to learn go
  • Not Synced
    okay was it the same sort of sort of the
  • Not Synced
    same what I just did in my in my web
  • Not Synced
    browser was I made use of a web worker
  • Not Synced
    which will consume this is roughly
  • Not Synced
    equivalent to one java thread which is
  • Not Synced
    roughly equivalent to one operating
  • Not Synced
    system-level thread so if my computer
  • Not Synced
    has four cores it can run four threats
  • Not Synced
    at the same time at the same time you
  • Not Synced
    can have many many threads like an when
  • Not Synced
    you run for them at the same time a go
  • Not Synced
    routine is not blind the JavaScript web
  • Not Synced
    worker know a goroutine well a million
  • Not Synced
    go routines can share one thread
  • Not Synced
    somebody actually did a demo a million
  • Not Synced
    go routine share one thread so it's a
  • Not Synced
    very simple very lightweight go routine
  • Not Synced
    almost does nothing but still a million
  • Not Synced
    go routines can say one thread and on a
  • Not Synced
    fork or machine you get four million go
  • Not Synced
    routines so the next point I'll make is
  • Not Synced
    ah after Java II guess guess who the
  • Not Synced
    coffee
  • Not Synced
    guess who do you copy the coffee go the
  • Not Synced
    ideas are very old the ideas are very
  • Not Synced
    very old right goroutine is actually not
  • Not Synced
    the correct word to use it's correct in
  • Not Synced
    go by it came from paper called
  • Not Synced
    concurrently concurrent sequential
  • Not Synced
    processes it's called co-routines
  • Not Synced
    spelled with a c' nobody paid attention
  • Not Synced
    to co-routines except for the line for a
  • Not Synced
    long long time
  • Not Synced
    right then goal came out and say
  • Not Synced
    co-routines are cool and I'm gonna brand
  • Not Synced
    them goroutines and then everybody
  • Not Synced
    started saying hmm Cortland once it as
  • Not Synced
    well
  • Not Synced
    Java wants it as well so all these
  • Not Synced
    languages are becoming known as the same
  • Not Synced
    language with different syntax they're
  • Not Synced
    getting features before coming to go yes
  • Not Synced
    Rudy as a Jordi no I programmed in Java
  • Not Synced
    and I was looking for better Java so I
  • Not Synced
    thought Scala is good
  • Not Synced
    Scala is an extremely powerful language
  • Not Synced
    don't get me wrong it can do everything
  • Not Synced
    you can write dsls domain-specific
  • Not Synced
    languages in Java it is so big that I
  • Not Synced
    can't read my code after one week I can
  • Not Synced
    be so undisciplined there I cannot read
  • Not Synced
    my own code after one week that is color
  • Not Synced
    anyway
  • Not Synced
    how good is gos concurrency that's
  • Not Synced
    that's another thing I want to highlight
  • Not Synced
    about goal is course concurrency good go
  • Not Synced
    is design the birthplace of goal was
  • Not Synced
    actually Google we are at its birthplace
  • Not Synced
    the organization not here but
  • Not Synced
    organization and goal was invented the
  • Not Synced
    story goes when you're trying to compile
  • Not Synced
    a big C++ program that big C++ program
  • Not Synced
    took about 40 minutes to compile they
  • Not Synced
    compile the equivalent program in go and
  • Not Synced
    it took less than a minute few seconds
  • Not Synced
    but compiled time is one thing how
  • Not Synced
    performin is it this is a whole web
  • Not Synced
    browser in go now those people working
  • Not Synced
    in no job no GSA say I can have Express
  • Not Synced
    and I can write a similarly short web
  • Not Synced
    browser in three lines or four lines or
  • Not Synced
    two lines
  • Not Synced
    let's besides the point the point is can
  • Not Synced
    no GS perform on my really crappy laptop
  • Not Synced
    11,000 requests per second with almost
  • Not Synced
    no optimization well go optimization
  • Not Synced
    compared with nginx same laptop running
  • Not Synced
    a static website all it does is serve
  • Not Synced
    hello well it came out with about the
  • Not Synced
    same 10,000 requests per second 11,000
  • Not Synced
    requests the second it's within the
  • Not Synced
    arrow pens right what I'm trying to say
  • Not Synced
    here is for beginner who knows nothing
  • Not Synced
    about OS tuning who knows nothing about
  • Not Synced
    concurrency you can write code that's
  • Not Synced
    production-ready
  • Not Synced
    as good as engineer
  • Not Synced
    so goal is designed for heavy-duty
  • Not Synced
    back-end service production-ready
  • Not Synced
    back-end service a really good really
  • Not Synced
    performant easy to read easy to extend
  • Not Synced
    back-end service and my favorite feature
  • Not Synced
    of all Java done right if you use pure
  • Not Synced
    go in other words you don't link against
  • Not Synced
    the C library you can link go against a
  • Not Synced
    CLI breathe that's called C go if we
  • Not Synced
    don't use Seco or use Windows specific
  • Not Synced
    dll's or Mac specific libraries you can
  • Not Synced
    all you need to do to cross compile the
  • Not Synced
    Gnostic oh you go enable equals zero
  • Not Synced
    turn off Seco specify an operating
  • Not Synced
    system windows I've got clients that
  • Not Synced
    insist on using Windows what they do no
  • Not Synced
    near windows old windows 386 windows now
  • Not Synced
    x64 go Buell hello well it generates an
  • Not Synced
    exe file a windows 386 exe file let's
  • Not Synced
    look at the complete list
  • Not Synced
    Hayek's
  • Not Synced
    Wow Android Darwyn what's dragonfly
  • Not Synced
    don't know what dragonfly is FreeBSD
  • Not Synced
    some funny always called illumos I don't
  • Not Synced
    know about it
  • Not Synced
    ah this is really really really
  • Not Synced
    interesting javascript was a web
  • Not Synced
    assembly yes cool can compile to the
  • Not Synced
    JavaScript web assembly binaries and
  • Not Synced
    these people are using it because they
  • Not Synced
    want to play games on the web browser
  • Not Synced
    and go a so performin they put a whole
  • Not Synced
    game engine in the web assembly with
  • Not Synced
    with physics and everything in there
  • Not Synced
    nice target before go is just another
  • Not Synced
    target it targets all these platforms my
  • Not Synced
    platform happens be Linux AMD 64 so
  • Not Synced
    let's go back another presentation
  • Not Synced
    if you won a coat download the whole
  • Not Synced
    presentation download its there soohyun
  • Not Synced
    github lots of other presentations there
  • Not Synced
    as well but this one is there and you
  • Not Synced
    can run your presentation like I ran my
  • Not Synced
    presentation thanks for listening thank
  • Not Synced
    you questions comments flamewars yes
  • Not Synced
    okay the question was usually
  • Not Synced
    machine-learning folks used something
  • Not Synced
    like Python and Python is a fantastic
  • Not Synced
    language for machine learning because
  • Not Synced
    Python was written by dude over in
  • Not Synced
    Russell my pronouncing that name all
  • Not Synced
    wrong
  • Not Synced
    he's a mathematics professor so before
  • Not Synced
    tensorflow came out you had numpy and
  • Not Synced
    Python was an absolutely great language
  • Not Synced
    in that area go is not it's not a
  • Not Synced
    machine language optimized language is
  • Not Synced
    the wrong tool to use go for machine
  • Not Synced
    language but go is very very good for
  • Not Synced
    data engineering before you can do
  • Not Synced
    machine learning you need to get your
  • Not Synced
    data in shape you need to clean your
  • Not Synced
    data so go has data flow libraries which
  • Not Synced
    can clean up massive amounts of data
  • Not Synced
    really quickly but not the actual
  • Not Synced
    machine learning itself any other
  • Not Synced
    questions comments reactions you like go
  • Not Synced
    is it worth learning yes okay my friend
  • Not Synced
    here has a difficult question for me he
  • Not Synced
    promised me a difficult question doesn't
  • Not Synced
    matter repeat your question yes
  • Not Synced
    [Music]
  • Not Synced
    okay okay I guess I guess you can
  • Not Synced
    summarize the question is summarized the
  • Not Synced
    question is can you share pine can you
  • Not Synced
    share memory effectively if you got
  • Not Synced
    sixty instances of the same thing can
  • Not Synced
    you share memory sort of kind of it will
  • Not Synced
    eat up it will be 60 times the memory
  • Not Synced
    okay
  • Not Synced
    so let's answer actually is a very very
  • Not Synced
    good question
  • Not Synced
    let me attack let me attack the first
  • Not Synced
    question first let me address the first
  • Not Synced
    question first go binaries can get
  • Not Synced
    pretty big pretty fast that hello world
  • Not Synced
    was about one to two megabytes why is it
  • Not Synced
    so big why is a hello world almost two
  • Not Synced
    megabytes
  • Not Synced
    yes when you write a Java class
  • Not Synced
    HelloWorld in Java class and the class
  • Not Synced
    file is a few hundred bytes a go
  • Not Synced
    executable is a few megabytes almost two
  • Not Synced
    megabytes but the Java file can run on
  • Not Synced
    its own you need the JVM which is 50
  • Not Synced
    megabytes or more the last time I
  • Not Synced
    checked the entire JVM for go the entire
  • Not Synced
    go runtime is embedded in the binary the
  • Not Synced
    entire go runtime the handles go
  • Not Synced
    routines the entire go runtime that does
  • Not Synced
    all this smart implicit interfaces
  • Not Synced
    entire go runtime that does strong
  • Not Synced
    static types is embedded in that one or
  • Not Synced
    two megabytes in the hello world so most
  • Not Synced
    go binaries are self-contained most HTTP
  • Not Synced
    is not self-contained but you can make
  • Not Synced
    it self-contained and can make a pure
  • Not Synced
    coding net HTTP or the net library
  • Not Synced
    actually makes use of the operating
  • Not Synced
    systems resolver library which means
  • Not Synced
    it's a time I'm a clear link library and
  • Not Synced
    many pure go operas don't like it so
  • Not Synced
    they turn off see go and you can produce
  • Not Synced
    a pure goal binary and that consumes
  • Not Synced
    maybe about five megabytes to eight
  • Not Synced
    megabytes the entire web browser
  • Not Synced
    resolver stack so that's why gold
  • Not Synced
    binaries can get big quite fast the
  • Not Synced
    entire docker binary was written in go
  • Not Synced
    and it's about fifty megabytes I think
  • Not Synced
    right so really really huge projects
  • Not Synced
    like docker kubernetes cube control cube
  • Not Synced
    CTL they win roughly tens of megabytes
  • Not Synced
    when you deploy a goal binary in a
  • Not Synced
    docker container I don't use Alpine
  • Not Synced
    because I guess I just used from scratch
  • Not Synced
    in docker terms from scratch means start
  • Not Synced
    with an empty container empty docker
  • Not Synced
    container and in my go binary is five
  • Not Synced
    megabytes my docker containers five
  • Not Synced
    megabytes really tiny docker containers
  • Not Synced
    so the mantra for goal is don't
  • Not Synced
    communicate by sharing memory right
  • Not Synced
    don't communicate by sharing memory
  • Not Synced
    share memory by communicating so
  • Not Synced
    everything in goal is independent and
  • Not Synced
    unshared non share you communicate
  • Not Synced
    across different processes using
  • Not Synced
    channels any other comments questions
  • Not Synced
    reactions if not I think Xiao Zhang yes
  • Not Synced
    yes I've used a patch a benchmark to
  • Not Synced
    test the let me repeat the question for
  • Not Synced
    the audience the question was is go now
  • Not Synced
    because that hello world was static
  • Not Synced
    content static web browsers everybody
  • Not Synced
    knows it's blazingly fast right any any
  • Not Synced
    person can write a fast static web
  • Not Synced
    browser the question was is go the right
  • Not Synced
    tool for IO intensive dynamic content
  • Not Synced
    and absolutely that's the purpose of
  • Not Synced
    goal it's designed to have very very
  • Not Synced
    fast io intensive stuff if if everything
  • Not Synced
    is compute intensive like video encoding
  • Not Synced
    go will not be very effective because
  • Not Synced
    the compute or CPU resource hungry
  • Not Synced
    process will grab the CPU but if it is
  • Not Synced
    IO intensive go is the perfect fit much
  • Not Synced
    much much better than no GS know GS
  • Not Synced
    rocked the world because it multiplexed
  • Not Synced
    a lot of i/o intensive process
  • Not Synced
    on two one thread go multiplex the same
  • Not Synced
    thing actually cause some copy no GS in
  • Not Synced
    their sense but knock not one trip on
  • Not Synced
    all available threads if you have a 64
  • Not Synced
    core CPU 64 processes can be called the
  • Not Synced
    task versus one process in no js' and
  • Not Synced
    yet that yes ok take two days
  • Not Synced
    I'll just because need ok
  • Not Synced
    go good for writing back in service
  • Not Synced
    . go is fantastic for writing back-end
  • Not Synced
    service second question is cool
  • Not Synced
    resource-hungry does go require a lot of
  • Not Synced
    resources like Java for example in the
  • Not Synced
    answer is no go is very very efficient
  • Not Synced
    next to see in terms of efficiency if C
  • Not Synced
    was the ghost and there is one it uses
  • Not Synced
    100% go would use maybe of 110% maybe
  • Not Synced
    hundred five percent so it is very very
  • Not Synced
    resource efficient thank you
  • Not Synced
    [Applause]
Title:
Is Go for you? - GoSG
Description:

Speaker: Siu Yin

Exploring why and if you should learn Go, covering Go's strengths: Strong static typing, implicitly satisfied interfaces & concurrency

Siu Yin is a regular GoSG speaker and runs his own MediaTech company using Golang.

Event Page: https://www.meetup.com/golangsg/events/266039423/

Produced by Engineers.SG
Recorded by:

more » « less
Video Language:
English
Duration:
45:38

English subtitles

Incomplete

Revisions