Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Spreading world by encouragement of cgo
Search
linyows
October 17, 2017
Technology
0
200
Spreading world by encouragement of cgo
Oct 17, 2017 @fukuoka.go#9 でお話しした資料です
linyows
October 17, 2017
Tweet
Share
More Decks by linyows
See All by linyows
奥が深いメールのシステム / The depth of Email system
linyows
3
350
IaCにおけるテスト考察 / Tests in IaC
linyows
2
360
リバースエンジニアリングとGoでSlackの認知負荷を下げる / Reducing cognitive load in Slack with Reverse-engineering and Go
linyows
2
240
透過型SMTPプロキシによる送信メールの可観測性向上 / Improved observability of outgoing emails with transparent smtp proxy
linyows
2
870
プロダクションで使うGo Pluginの利便性とパフォーマンス性 / Simplicity and Performance of Go plugin for Production
linyows
0
440
求められるソフトウェアエンジニア像とキャリア戦略 / Engineers and Career Strategies Required Now
linyows
2
430
CloudflareのCAPTCHAを使って ユーザ体験を下げず不正利用を排除する / Cloudflare's captcha case study that does not degrade ux
linyows
0
320
なぜNotionを使うのか2022 / Why use notion as our workspace in 2022
linyows
3
5.9k
Denoの仕組み / How deno works as TypeScript runtime
linyows
2
740
Other Decks in Technology
See All in Technology
Dive Deep in Cloud Run: Automatic Base Image update
aoto
PRO
0
900
AWS IAM Identity Center議論会 〜 認証認可結合モデルと認証認可分離モデル / 20240827-jawsug-arch-iam_identity_center
opelab
3
320
#Zenoh 完全に理解した 〜組込み純情篇〜
takasehideki
1
450
waitany と waitall を作った話
mrkn
0
110
React Aria で実現する次世代のアクセシビリティ
ryo_manba
4
580
RAGHack: Kickoff and RAG 101
pamelafox
0
220
AWS版GitHub?Amazon CodeCatalystの全体像をまとめてみた
oshanqq
1
3.2k
Estrategias de escalabilidade para projetos web
jessilyneh
1
160
手軽に始める? おうちサーバーのすゝめ
nyagasan
0
180
ことばをそろえる / Bridging the Terminology Gap
amaotone
5
1k
【Λ(らむだ)最近のアプデ情報 / RPALT20240904
lambda
0
160
日経電子版から始まった内製開発の現在地と向き合っている課題/inhouse
nishiuma
0
230
Featured
See All Featured
Pencils Down: Stop Designing & Start Developing
hursman
118
11k
Practical Orchestrator
shlominoach
185
10k
Docker and Python
trallard
39
3k
A Philosophy of Restraint
colly
202
16k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
41
6.4k
How to train your dragon (web standard)
notwaldorf
85
5.6k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
109
6.9k
[RailsConf 2023] Rails as a piece of cake
palkan
44
4.6k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
33
1.7k
Clear Off the Table
cherdarchuk
90
320k
Agile that works and the tools we love
rasmusluckow
327
20k
Embracing the Ebb and Flow
colly
83
4.4k
Transcript
5PNPIJTB0EB(.01FQBCP *OD 0DU ͻΖ͕Δ(P $(0ͷ͢͢Ί GVLVPLBHP
GVLVPLBHP (.0ϖύϘϓϦϯγύϧΤϯδχΞ খాԝ!MJOZPXT ٕज़෦ٕज़ج൫νʔϜ IUUQUPNPIJTBPEBDPN
GVLVPLBHP ࠷͍ۙͬͯΔ͜ͱ ▸ /VYUKTͱ&YQSFTTͰ443αʔϏε ▸ 5ZQF4DSJQUͰOPEFNPEVMFOQNJOTUBMMHNPQH ▸ /44NPEVMFΞϓϦ0$501"44
GVLVPLBHP MJOVYϢʔβͷ໊લղܾΛHJUIVCͷνʔϜίϥϘϨʔλͰߦ͏
GVLVPLBHP 82 1MFBTFVTFBOEHJWFTUBS IUUQTHJUIVCDPNMJOZPXTPDUPQBTT
GVLVPLBHP લճͷ͓͞Β͍ʢGVLVPLBHP ▸ (PWͰQMVHJOQBDLBHF͕Ճ͞Εͨ ▸ CVJMENPEFQMVHJOʹΑͬͯTPϑΝΠϧΛ࡞ ▸ ຊମ͔Β%ZOBNJDBMMZ-PBEFE ▸ ͜Ε·ͰͷPWFS31$ͷ6/*9EPNBJOTPDLFUͰΔΑΓγϯϓ
ϧͰखܰ
$(0ͬͯ·͔͢ʁ GVLVPLBHP
GVLVPLBHP $(0ͬͯ͜͏͍͏ͷ ▸ (PWҎલ͔Β͋Δ ▸ $ͷίʔυΛΠϯϙʔτͨ͠Γ(PͷίʔυΛ$ʹΤΫεϙʔτͰ͖Δ ▸ CVJMENPEFDTIBSFEͰCVJME͢ΔͱIͱTPΛग़ྗ ▸ ֤ݴޠͷ''*ϥΠϒϥϦ͔Β(Pͷίʔυ͕͑Δ
GVLVPLBHP package main /* #cgo pkg-config: onigmo #include <stdlib.h> #include
<string.h> #include <onigmo.h> */ import "C" import "fmt" fun main() { fmt.Println(Version()) // Output: 6.1.3 } func Version() string { return C.GoString(C.onig_version()) } package main // typedef int (*intFunc) (); // // int bridge_int_func(intFunc f) { // return f(); // } // // int fortytwo() { // return 42; // } import "C" import "fmt" func main() { f := C.intFunc(C.fortytwo) fmt.Println(int(C.bridge_int_func(f))) // Output: 42 }
GVLVPLBHP Կ͕خ͍͔͠ ▸ ߴ͍ύϑΥʔϚϯεΛཁ͢Δ෦ΛҠৡͰ͖Δ ▸ ͷߴ͍NJEEMFXBSFΛΈࠐΊΔ ▸ $ͷख़࿅͕ͯ͘ൺֱత҆શͳΞϓϦέʔγϣϯ͕࡞ΕΔ ▸ ྫ͑PQFOTTM
GGNQFH QIQ NSVCZ
GVLVPLBHP ؾΛ͚ͭΔͱ͜Ζ ▸ (PϙΠϯλϝϞϦͷڞ༗ʹϧʔϧ͕͋Δ ▸ ϙΠϯλͷϧʔϧҧΛಈతʹνΣοΫ͍ͯͯ͠Ϋϥογϡ͢Δ ▸ (0%(DHPDIFDL $VJOUQUS ▸
ͪΖΜ$ଆ($͞Εͳ͍͠$GSFF͠ͳ͍ͱϝϞϦϦʔΫ͢Δ ▸ εϨουηʔϑͰͳ͍ͷ͔ͬ͠ΓTZODNVUFY͢Δ ▸ $(0ʹॻ͍ͨ$ผϑΝΠϧ͔Βࢀরग़དྷͳ͍
$ͷϥούʔΛ࡞Δͱ٢ GVLVPLBHP
҆શΛࣺͯڈΕ $ଆͰͳΜͰग़དྷΔ GVLVPLBHP
GVLVPLBHP ͦ͏͍͑ʜ7VF͕ϦϦʔε ▸ NBUUOHPW TPOZWFWBM MB[ZUJHFSHPWʜ ▸ WVFTFSWFSSFOEFSFS͕"MU+BWB4DSJQU3VOUJNFΛαϙʔτ ▸ (Pͷ8FCαʔόͰWόΠϯσ
ΟϯάΛ͑WVFͰ443 Ͱ͖ͦ͏ͩ &$."4DSJQUͷQVSFHP࣮͋Γ·͕͢
GVLVPLBHP ·ͱΊ ▸ ָͯ͠ʁʁ৴པੑߴ͍طଘࢿ࢈ιϑτΣΞ͕͑Δ ▸ $ͷεΩϧ͕ෆཁͰͳ͍ͷͰຊԻΛݴ͏ͱ(PͰ͍݁ͤͨ͞ ▸ ͱ͍͑ɺࣗ༝ͷେ͖͍બ͕Ͱ͖Δͱ͍͏ͷϝϦοτ
͋Γ͕ͱ͏͍͟͝·ͨ͠ʂ GVLVPLBHP