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
ergo
Search
Romain François
July 05, 2018
Programming
0
270
ergo
Talk about ergo at the rencontres R 2018
Romain François
July 05, 2018
Tweet
Share
More Decks by Romain François
See All by Romain François
dplyr 1.0.0 / Paris R-addicts
romainfrancois
0
250
dplyr 1.0.0
romainfrancois
1
1.2k
dplyr episode 9, summarise() of the vctrs
romainfrancois
0
990
dplyr episode 9: summarise() of the vctrs
romainfrancois
0
340
n() cool #dplyr things
romainfrancois
2
2.9k
dance
romainfrancois
0
270
rap and splice girls
romainfrancois
0
360
rap
romainfrancois
0
100
arrow + ergo
romainfrancois
0
360
Other Decks in Programming
See All in Programming
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
3
490
NPOでのDevinの活用
codeforeveryone
0
850
Railsアプリケーションと パフォーマンスチューニング ー 秒間5万リクエストの モバイルオーダーシステムを支える事例 ー Rubyセミナー 大阪
falcon8823
5
1.1k
すべてのコンテキストを、 ユーザー価値に変える
applism118
3
1.3k
ISUCON研修おかわり会 講義スライド
arfes0e2b3c
1
450
0626 Findy Product Manager LT Night_高田スライド_speaker deck用
mana_takada
0
180
ペアプロ × 生成AI 現場での実践と課題について / generative-ai-in-pair-programming
codmoninc
2
18k
RailsGirls IZUMO スポンサーLT
16bitidol
0
190
코딩 에이전트 체크리스트: Claude Code ver.
nacyot
0
530
システム成長を止めない!本番無停止テーブル移行の全貌
sakawe_ee
1
210
20250628_非エンジニアがバイブコーディングしてみた
ponponmikankan
0
700
「テストは愚直&&網羅的に書くほどよい」という誤解 / Test Smarter, Not Harder
munetoshi
0
180
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
524
40k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
A Modern Web Designer's Workflow
chriscoyier
695
190k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
130
19k
Making Projects Easy
brettharned
116
6.3k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
The Pragmatic Product Professional
lauravandoore
35
6.7k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.3k
Facilitating Awesome Meetings
lara
54
6.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
Transcript
ergo
[email protected]
@romain_francois http://bit.ly/ergo-rr2018
None
None
•Open source •Google •Simple •Fast enough
https://www.docker.com
https://bookdown.org/yihui/blogdown/
https://www.rstudio.com/products/connect/
example
package main import "fmt" func fahrenheit(celcius float64) float64 { return
celcius * 1.8 + 32 } func main() { var freezing float64 = fahrenheit(0.0) boiling := fahrenheit(100.0) fmt.Printf("Water freezes at %4.2f F\n", freezing) fmt.Printf("Water boils at %4.2f F\n", boiling) }
package main import "fmt" func fahrenheit(celcius float64) float64 { return
celcius * 1.8 + 32 } func main() { var freezing float64 = fahrenheit(0.0) boiling := fahrenheit(100.0) fmt.Printf("Water freezes at %4.2f F\n", freezing) fmt.Printf("Water boils at %4.2f F\n", boiling) }
$ go run fahrenheit.go Water freezes at 32.00 F Water
boils at 212.00 F
research
bit.ly/ergorigin purrple.cat/tags/go/
bit.ly/ergorigin purrple.cat/tags/go/
None
http://bit.ly/grrr-join
wttr.in/Rennes
library(rvest) library(glue) library(fahrenheit) library(tibble) library(dplyr) temperature <- function(where = "Rennes"){
glue("https://wttr.in/{where}") %>% read_html() %>% html_node("span:nth-child(3)") %>% html_text() %>% as.numeric() } temperature("Rennes") %>% tibble(celcius = .) %>% mutate(fahrenheit = fahrenheit(celcius)) #> # A tibble: 1 x 2 #> celcius fahrenheit #> <dbl> <dbl> #> 1 19 66.2 #' Created on 2018-07-05 by the [reprex package](http://reprex.tidyverse.org) (v0.2.0).
romain@purrplex ~/git/rstats-go/rencontresr2018/fahrenheit $ tree . !"" DESCRIPTION !"" NAMESPACE !""
R # $"" fahrenheit.R !"" fahrenheit.Rproj !"" man $"" src !"" Makevars !"" fahrenheit.h !"" fahrenheit.so $"" go $"" src !"" fahrenheit # $"" fahrenheit.go $"" main !"" main.c $"" main.go 7 directories, 10 files fahrenheit main } }
package fahrenheit func Fahrenheit(celcius float64) float64 { return celcius *
1.8 + 32 } src/go/src/fahrenheit/fahrenheit.go
package main import "C" import "fahrenheit" //export Fahrenheit func Fahrenheit(x
float64) float64 { return fahrenheit.Fahrenheit(x) ; } func main() {} src/go/src/main/main.go
#include <R.h> #include <Rinternals.h> #include "_cgo_export.h" SEXP _fahrenheit(SEXP x){ return
Rf_ScalarReal(Fahrenheit(REAL(x)[0]); } src/go/src/main/main.c
#' @useDynLib fahrenheit #' @export fahrenheit <- function(celcius) { .Call("_fahrenheit",
celcius, PACKAGE = "fahrenheit" ) } R/fahrenheit.R
.PHONY: go CGO_CFLAGS = "$(ALL_CPPFLAGS)" CGO_LDFLAGS = "$(PKG_LIBS) $(SHLIB_LIBADD) $(LIBR)"
GOPATH = $(CURDIR)/go go: CGO_CFLAGS=$(CGO_CFLAGS) CGO_LDFLAGS=$(CGO_LDFLAGS) \ GOPATH=$(GOPATH) /usr/local/go/bin/go \ build -o $(SHLIB) -x -buildmode=c-shared main src/Makevars
future
None
None
None
ergo
[email protected]
@romain_francois http://bit.ly/ergo-rr2018