なぜ検索しなかったのか

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Favorites, Groups & Events

    なぜ検索しなかったのか - Presentation Transcript

    1. tama @ YanoLab.LT
    2. Go?
    3. Big names! Robert C Pike Plan 9 Kenneth Thompson Unix Robert Griesemer V8, HotSpot etc... Plan 9, GCC, etc...
    4. Overviews • Launched by Google • R.I.P Noop? • System Programming • Server side? • Frustration with existing languages • Implement some useful ideas
    5. Go!
    6. Hello, World! package main import "fmt" func main() { fmt.Printf("Hello, n") }
    7. Interface • Duck typing • Method set • Not Java like interface • Flexible! • Add method to struct
    8. e.g. Interface // Apply this to any type implementing Sortable func Sort(data Sortable) { for i := 1; i < data.Len(); i++ { for j := i; j > 0 && data.Less(j, j-1); j-- { data.Swap(j, j-1); } } }
    9. type Sortable interface { Len() int; Less(i, j int) bool; Swap(i, j int); } type Array []int func (p Array) Len() int { return len(p); } func (p Array) Less(i, j int) bool { return p[i] < p[j]; } func (p Array) Swap(i, j int) { p[i], p[j] = p[j], p[i]; }
    10. Goroutine • Lightweight process • go keyword • Concurrently • Channel (CSP) • Communication between goroutines
    11. e.g. Goroutine func main() { ch := make(chan int); // Create a new channel. go generate(ch); // Start as a goroutine. for { // do something // fmt.Print(<-ch); } }
    12. e.g. Channel // Send the sequence 2, 3, 4, ... to channel 'ch'. func generate(ch chan int) { for i := 2; ; i++ { ch <- i // Send 'i' to channel 'ch'. } }
    13. Others • Garbage Collected • M&S, IBM’s Recycler in the future • Windows support • Patch welcome! but... • Multiple values • etc...
    14. Earthquake Problem Issue 9
    15. is here to stay! • Future works • Performance, Libraries, Tools, etc... • Go vs Go! • Going : Go is not Go! • Issue9 • http://issuenine.com/ :)

    + tama tamatama tama, 1 month ago

    custom

    278 views, 0 favs, 0 embeds more stats

    YanoLab.LT 04での発表資料

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 278
      • 278 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 0
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories