Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Go言語の紹介(かなり浅く浅く)(仮)
Search
HirokiKajiura
August 22, 2014
61
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Go言語の紹介(かなり浅く浅く)(仮)
HirokiKajiura
August 22, 2014
More Decks by HirokiKajiura
See All by HirokiKajiura
平成26年度卒業研究中間発表会第一回目
hirokikajiura
0
58
Featured
See All Featured
Game over? The fight for quality and originality in the time of robots
wayneb77
1
280
How to make the Groovebox
asonas
2
2.4k
How Software Deployment tools have changed in the past 20 years
geshan
1
34k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
ラッコキーワード サービス紹介資料
rakko
1
4.9M
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Technical Leadership for Architectural Decision Making
baasie
3
570
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
330
New Earth Scene 8
popppiees
4
2.6k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
690
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
Everyday Curiosity
cassininazir
0
320
Transcript
Goݴޠͷհʢ͔ͳΓઙ͘ઙ͘ʣ(Ծ) @a0symptote
ࣗݾհ ໊લ : ֿӜɹେى ྸ : 20 ॴଐ : Ѵߴઐ(དྷ͔ΒେֶՊ)
ڵຯ : ɹ ɹֶͰ͏ਤ(άϥϑ)ͷ࡞
ຊͷ༰
Goݴޠͬͯʁ Google ͕։ൃͯ͠Δݴޠ γϯϓϧͳߏจͰ͕͍ͷ͕ಛ ฒྻॲཧʹڧ͘ɼ؆୯ʹ࣮ग़དྷΔ webΞϓϦέʔγϣϯΛ࡞ΔͨΊͷϥΠϒϥϦ͕Ұഋ ࣈ۟ɾߏจղੳ༻ͷϥΠϒϥϦҰഋ Ϛείοτ͕ՄѪ͍ʂʂʂʂʂʂʂʂʂʂʂʂʂ ࢀߟจݙ :
http:/ /golang.jp
Կʹ͑Δʁ WebΞϓϦέʔγϣϯͷ࡞ ΠϯλϓϦλɾίϯύΠϥͷ։ൃ ܭࢉ etc…
Կʹ͑Δʁ WebΞϓϦέʔγϣϯͷ࡞ ΠϯλϓϦλɾίϯύΠϥͷ։ൃ ܭࢉ etc… ͋ Ε ɼ ଞ ͷ
ݴ ޠ Ͱ ྑ ͘ ͳ ͍……ʁ
͔֬ʹ
GoݴޠΛ͏ཧ༝ͬͯʁ Goݴޠ͕͖Ͱ͖Ͱͨ·Βͳ͍ ָʹฒྻॲཧΛར༻͍ͨ͠
GoݴޠΛ͏ཧ༝ͬͯʁ Goݴޠ͕͖Ͱ͖Ͱͨ·Βͳ͍ ָʹฒྻॲཧΛར༻͍ͨ͠ ී௨ͬͪ͜ʁ
ָʹฒྻॲཧ͢ΔͨΊ͚ͩʹ GoݴޠΛ͏ͷͪΐͬͱ……
ղܾࡦ ଞͷݴޠͰॻ͍ͨػೳΛ GoݴޠͰऔΓࠐΜͰ͓͏
औΓࠐΉͨΊͷํ๏
औΓࠐΉͨΊͷํ๏ cgoͱ͍͏πʔϧ͕Goݴޠʹ༻ҙ͞Ε͍ͯΔ
औΓࠐΉͨΊͷํ๏ cgoͱ͍͏πʔϧ͕Goݴޠʹ༻ҙ͞Ε͍ͯΔ ͓ΘΓ
͕͢͞ʹຯؾͳ͍ͷͰ…… ͲΜͳݴޠ͕͑·͔͢ʁ Question C/C++ Ada Fortran Java Objective-C/C++ Answer
͕͢͞ʹຯؾͳ͍ͷͰ…… ͲΜͳݴޠ͕͑·͔͢ʁ Question C/C++ Ada Fortran Java Objective-C/C++ Answer gccͰίϯύΠϧग़དྷΔݴޠͳΒԿͰ
࣮ࡍͷιʔεݟͯΈΑ͏ package main ! /* ! #include<math.h> int larger(int a,
int b){return (a > b) ? a : b;} ! */ ! ! import "C" import "fmt" ! func main() { fmt.Println(C.larger(1, 2)); fmt.Println(C.cos(30.0 * 3.14 / 180.0)); } ͜ͷίϝϯτͷதʹ Cݴޠͷιʔε ͜ͷΑ͏ʹҧײͳ ͘ݺͼग़ͤΔɽ ϥΠϒϥϦݺΔ
CݴޠҎ֎Ͱʁ package main /* #cgo CFLAGS: -x objective-c #cgo LDFLAGS:
-framework Foundation ! #import <Foundation/Foundation.h> #import <objc/Object.h> void fizzBuzz(int n) { for(int i = 1; i <= n; ++i) if(i % 15 == 0)NSLog(@"fizzbuzz\n"); else if(i % 5 == 0)NSLog(@"buzz\n"); else if(i % 3 == 0)NSLog(@"fizz\n"); elseNSLog(@"%d\n", i); } */ import "C" ! func main() { C.fizzBuzz(20) } gccʹೖ͍ͬͯΕɼCFLAGS͔Β ࢦఆͯ͠Εͳ͘։͚Δ ϩʔυ͍ͨ͠ϥΠϒϥϦಉ͡ ͘LDFLAGSͰࢦఆग़དྷΔ
ࠓճͷ·ͱΊ Goݴޠɼ͍ͬ͢͝Մೳੑʹ͋;ΕͯΔ ଞͷݴޠͷྑ͍ॴΛͭ·Έ৯͍ͯ͠ར༻Ͱ͖Δ Goݴޠࣗମ؆୯ʹฒྻॲཧ͕ग़དྷͨΓͱɼதʑݟॴ͕͋Δ ͜Ε͔Βൃల͍ͯ͘͠ͷͰɼظͯͬͯͯ͠Լ͍͞
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠