~/talk

Scala js: getting the best of JavaScript and Scala

Talkat Devoxx Belgium 2017 · 2017-11-06..11-10· [javascript, scala]
slides:none on file

Scala.js compiles Scala to JavaScript and is used here to build a working memory pairs game backed by the Phaser JS library. The code shows iterative facade creation with @js.native and fallbacks to js.Dynamic where typing is impractical, uses Scala collections and shuffle, models UI logic with a sealed state hierarchy and pattern matching, drives timeouts with setTimeout, and proves the workflow is practical for browser or Node targets while retaining IDE autocomplete and type safety.

AI-written summary · about

  1. 0:00Introduction
  2. 0:36Scala GS
  3. 1:01Live coding session
  4. 1:39Simple memory game
  5. 2:30Show of hands
  6. 3:40Phaser
  7. 4:20Event Loop
  8. 5:00Class Declaration
  9. 5:38Preload Method
  10. 7:00Importing tools
  11. 8:00Translating the API
  12. 11:22State Manager
  13. 12:30Toit
  14. 14:20Preload
  15. 17:36Console
  16. 18:38Creating things
  17. 20:09Creating images
  18. 22:03Shuffle images
  19. 22:30Double loop
  20. 25:28Input processing
  21. 26:08Events
  22. 27:47Interact
  23. 28:11Game logic
  24. 28:46Cards
  25. 30:39Testing
  26. 31:22Declarations
  27. 31:40Abstract class
  28. 31:56Guess states
  29. 32:16Card class
  30. 33:02Abstract classes
  31. 33:28Interface
  32. 33:45Store State
  33. 34:06Pattern Matching
  34. 34:24Index
  35. 35:03NoGas
  36. 35:29One Card
  37. 35:49Two Cards
  38. 36:16Key Reuse
  39. 36:32Key
  40. 36:56Front
  41. 39:20Displaying score
  42. 41:11Untype
  43. 42:12Question time
  44. 43:25Add events
  45. 43:51Add index
  46. 44:21Check guest state
  47. 45:18Recompiling
  48. 46:01Thanks
  49. 46:23Source code
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.