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
Hack Lang : an Introduction @ FB DevC Malang Me...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
DOT Indonesia
September 23, 2017
Programming
0
170
Hack Lang : an Introduction @ FB DevC Malang Meetup 2017
A short introduction to Hack programming language and it's HVVM.
Another technology from Facebook.
DOT Indonesia
September 23, 2017
Tweet
Share
More Decks by DOT Indonesia
See All by DOT Indonesia
Agile Testing To Support Short Cycle Development (@DOT TechTalk, 18 Januari 2019)
dotindonesia
0
110
How to be Agile (@DOT TechTalk, 11 Januari 2019)
dotindonesia
1
49
Build an Awesome CI/CD with Jenkins - Samsul (@PHP User Group Meetup, 17 September 2018)
dotindonesia
0
130
Mockup API to IMPROVE Team Collaboration - Toni (@DOT TechTalk, 10 Agustus 2018)
dotindonesia
0
82
Investment & Financing - Arya (@DOT TechTalk, 20 April 2018)
dotindonesia
3
69
Introduction to Docker Container - Samsul Ma'arif (@DILO Malang - 12 March 2018)
dotindonesia
0
170
Company Overview - DOT Indonesia (@Study Excursie UNIDA Gontor - March 2018)
dotindonesia
0
130
How to be a Great Mobile Developer - Agus (@Study Excursie UNIDA Gontor - March 2018)
dotindonesia
0
57
Rapid mobile development with React Native - Fahmi (@Study Excursie UNIDA Gontor - March 2018)
dotindonesia
0
47
Other Decks in Programming
See All in Programming
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
5
770
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
220
組織で育むオブザーバビリティ
ryota_hnk
0
180
CSC307 Lecture 06
javiergs
PRO
0
690
AI時代のキャリアプラン「技術の引力」からの脱出と「問い」へのいざない / tech-gravity
minodriven
21
7.4k
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
310
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
290
Oxlint JS plugins
kazupon
1
980
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
今から始めるClaude Code超入門
448jp
8
9k
Oxlintはいいぞ
yug1224
5
1.4k
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
730
Featured
See All Featured
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
67
From π to Pie charts
rasagy
0
120
Chasing Engaging Ingredients in Design
codingconduct
0
110
Odyssey Design
rkendrick25
PRO
1
500
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
78
Statistics for Hackers
jakevdp
799
230k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
57
50k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
420
Mind Mapping
helmedeiros
PRO
0
89
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Transcript
Hack Lang : an Introduction by Ardi Imawan @ FB
DevC Malang Meetup 2017
What is Hack?
When you hit facebook.com, or you pull out your phone
and get a notification, or basically any interaction that you have with Facebook servers, these servers running hack code Julien Verlague –Facebook Engineer
Hack A gradually typed language for HHVM
2 Basic Type of Programming Languages 1. Statically Typed •
Java, C#, C++, etc • Steps: • Write code • Check the type • Run correctly Gradually Typed • Hack • You can decide to use which method 2. Dynamically Typed • Javascript, Python, PERL, PHP • Steps: • Write code • Run directly • Ups, something wrong..
Let’s try your first code • http://hacklang.org/
HHVM : The runtime for Hack Hip-Hop Virtual Machine
HHVM : Just In Time Compiler PHP Hack Hip-hop Byte
Code (HHBC) X86-64 machine code PHP Zend Opcode EXECUTE Compile (JIT) Interprate
Fast Iteration Cycle • Type checker is a daemon (run
in background)
Features
Type Checker Something wrong You may need to change this
code Or this one…
Error Messages Something wrong You may need to change this
code Or this one… Do you remember of Java/C#/C++ ?
Async / Await You can interrupt this process I want
to wait this async process
Async / Await
Async / Await What are you thinking now? C# or
NodeJS? :D
Nullable It can be NULL
Nullable It can be NULL Now, kotlin or swift? :D
Spaghetti Code : Rendering UI React Native PHP
XHP Define custom component Without escaping Use other component Handle
as a object
All in One
Hack Types • Nullable: ?string • Tuples: (int, bool, Object)
• Closures: (function(int): int) • Generics: A<T>, foo<T> (T $x): T{ } • Constraints: foo<T as A> (T $x) : T • Co/contravariance: interface X<+T1, -T2>
Thanks
References • https://www.youtube.com/watch?v=eDz8IbGsVrc • https://docs.hhvm.com