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
DOT Indonesia
September 23, 2017
Programming
0
160
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
44
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
74
Investment & Financing - Arya (@DOT TechTalk, 20 April 2018)
dotindonesia
3
68
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
120
How to be a Great Mobile Developer - Agus (@Study Excursie UNIDA Gontor - March 2018)
dotindonesia
0
55
Rapid mobile development with React Native - Fahmi (@Study Excursie UNIDA Gontor - March 2018)
dotindonesia
0
44
Other Decks in Programming
See All in Programming
20250708_JAWS_opscdk
takuyay0ne
2
130
ご注文の差分はこちらですか? 〜 AWS CDK のいろいろな差分検出と安全なデプロイ
konokenj
3
580
猫と暮らす Google Nest Cam生活🐈 / WebRTC with Google Nest Cam
yutailang0119
0
170
テストから始めるAgentic Coding 〜Claude Codeと共に行うTDD〜 / Agentic Coding starts with testing
rkaga
15
5.6k
MDN Web Docs に日本語翻訳でコントリビュートしたくなる
ohmori_yusuke
1
130
Claude Code派?Gemini CLI派? みんなで比較LT会!_20250716
junholee
1
530
TypeScriptでDXを上げろ! Hono編
yusukebe
3
770
Model Pollution
hschwentner
1
160
AI駆動のマルチエージェントによる業務フロー自動化の設計と実践
h_okkah
0
230
ソフトウェア設計とAI技術の活用
masuda220
PRO
17
3.7k
MCPを使ってイベントソーシングのAIコーディングを効率化する / Streamlining Event Sourcing AI Coding with MCP
tomohisa
0
170
Vibe Codingの幻想を超えて-生成AIを現場で使えるようにするまでの泥臭い話.ai
fumiyakume
9
4.1k
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
The Invisible Side of Design
smashingmag
301
51k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
108
19k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
21
1.3k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
Building Applications with DynamoDB
mza
95
6.5k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
26k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
Faster Mobile Websites
deanohume
308
31k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
161
15k
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