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
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
83
Investment & Financing - Arya (@DOT TechTalk, 20 April 2018)
dotindonesia
3
71
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
58
Rapid mobile development with React Native - Fahmi (@Study Excursie UNIDA Gontor - March 2018)
dotindonesia
0
48
Other Decks in Programming
See All in Programming
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
2
390
Laravel Nightwatchの裏側 - Laravel公式Observabilityツールを支える設計と実装
avosalmon
1
230
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
620
SourceGeneratorのマーカー属性問題について
htkym
0
220
[SF Ruby Feb'26] The Silicon Heel
palkan
0
130
安いハードウェアでVulkan
fadis
1
790
KagglerがMixSeekを触ってみた
morim
0
290
PHP 7.4でもOpenTelemetryゼロコード計装がしたい! / PHPerKaigi 2026
arthur1
1
400
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
530
LM Linkで(非力な!)ノートPCでローカルLLM
seosoft
0
190
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
550
The free-lunch guide to idea circularity
hollycummins
0
350
Featured
See All Featured
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
230
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
220
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
220
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
Test your architecture with Archunit
thirion
1
2.2k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
590
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
330
How to Talk to Developers About Accessibility
jct
2
160
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
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