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
45
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
75
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
45
Other Decks in Programming
See All in Programming
ファインディ株式会社におけるMCP活用とサービス開発
starfish719
0
1.9k
Flutter with Dart MCP: All You Need - 박제창 2025 I/O Extended Busan
itsmedreamwalker
0
150
250830 IaCの選定~AWS SAMのLambdaをECSに乗り換えたときの備忘録~
east_takumi
0
400
私の後悔をAWS DMSで解決した話
hiramax
4
210
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
3
310
ProxyによるWindow間RPC機構の構築
syumai
3
1.2k
「手軽で便利」に潜む罠。 Popover API を WCAG 2.2の視点で安全に使うには
taitotnk
0
870
AI時代のUIはどこへ行く?
yusukebe
18
9k
testingを眺める
matumoto
1
140
RDoc meets YARD
okuramasafumi
4
170
MCPとデザインシステムに立脚したデザインと実装の融合
yukukotani
4
1.4k
Tool Catalog Agent for Bedrock AgentCore Gateway
licux
7
2.5k
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
580
Facilitating Awesome Meetings
lara
55
6.5k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
Speed Design
sergeychernyshev
32
1.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.6k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.1k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
GraphQLの誤解/rethinking-graphql
sonatard
72
11k
Reflections from 52 weeks, 52 projects
jeffersonlam
352
21k
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