Language-oriented programming in Racket A cultural anthropology - - PowerPoint PPT Presentation

language oriented programming in racket
SMART_READER_LITE
LIVE PREVIEW

Language-oriented programming in Racket A cultural anthropology - - PowerPoint PPT Presentation

Language-oriented programming in Racket A cultural anthropology Jesse Alama jesse@lisp.sh 1 WTF is language-oriented programming?! 2 WTF is language-oriented programming?! I kinda-sorta know. 3 WTF is language-oriented


slide-1
SLIDE 1

Language-oriented programming in Racket

—A cultural anthropology—

Jesse Alama jesse@lisp.sh

1

slide-2
SLIDE 2

WTF is “language-oriented programming”?!

2

slide-3
SLIDE 3

WTF is “language-oriented programming”?!

I kinda-sorta know.

3

slide-4
SLIDE 4

WTF is “language-oriented programming”?!

I kinda-sorta know. There are some canonical resources.

4

slide-5
SLIDE 5

WTF is “language-oriented programming”?!

I kinda-sorta know. There are some canonical resources. But I’m just one Racket programmer.

5

slide-6
SLIDE 6

WTF is “language-oriented programming”?!

I kinda-sorta know. There are some canonical resources. But I’m just one Racket programmer. How does the idea play out in practice among other Racketeers?

6

slide-7
SLIDE 7

Survey: Question 1

Can you point to an example or two of your own work that best exemplifies what you consider to be LOP? Even if you haven’t made your own language, but work within (or teach) something other than “full-on” Racket, feel free to mention it.

7

slide-8
SLIDE 8

Survey: Question 2

If you’ve made your own language, what was your motivation? Did you just want to experiment? Was there some pain that you faced that a new language could alleviate?

8

slide-9
SLIDE 9

Survey: Question 3

What about an example or two of LOP in the work of others that you find impressive or inspiring (not even necessarily from the Racket world)?

9

slide-10
SLIDE 10

Survey: Question 4

Can you identify an “aha!” moment or two when your understanding of LOP evolved?

10

slide-11
SLIDE 11

Survey: Question 5

Is there a book, paper, video, course, or any other material, that you would recommend to Racket newcomers to help unlock LOP? How did you yourself get started with that idea?

11

slide-12
SLIDE 12

Survey: Question 6

If you’ve made you own language, do you recall whether there were moments where you hesitated before going down that path? Or, once you were on that path, were there stumbling blocks hindered your progress? If you’ve not made your own language but have considered it, what uncertainties do you face?

12

slide-13
SLIDE 13

Survey: Question 7

The technicalities and mechanics that go into making your

  • wn language can be difficult compared to other

“everyday” ideas in computer science: lexing, parsing, macros, phase separation, evaluation, semantics. Do you find some of these ideas easier to appreciate (and execute

  • n) than others?

13

slide-14
SLIDE 14

Survey: Question 8

What’s your experience talking with others outside the Racket world about Racket and its language-oriented philosophy? Do you find that there are frequently recurring sticking points, misunderstandings, or other obstacles in discussions about “make your own language”?

14

slide-15
SLIDE 15

Survey: Question 9

Can you of situations where “make your own language” is definitely not an appropriate way to tackle a problem? Have you yourself made your own language only to realize later that it adds little value, or was over-engineering? When do you decide to make a language as opposed to just making a library?

15

slide-16
SLIDE 16

The Responses

  • Surveyed people by looking through the official PLT list,

list of people participating in previous RacketCons, etc.

  • Responses came in from 30 Racket developers.
  • I made an ebook out of it. It weighs 315 pages.

16

slide-17
SLIDE 17

LOP Groups

  • enthusiastic embracers

17

slide-18
SLIDE 18

LOP Groups

  • enthusiastic embracers
  • jaded professionals

18

slide-19
SLIDE 19

LOP Groups

  • enthusiastic embracers
  • jaded professionals
  • fellow travelers

19

slide-20
SLIDE 20

LOP Groups

  • enthusiastic embracers
  • jaded professionals
  • fellow travelers
  • “mere” users

20

slide-21
SLIDE 21

LOP Groups

  • enthusiastic embracers
  • jaded professionals
  • fellow travelers
  • “mere” users
  • would-like-to-ers

21

slide-22
SLIDE 22

LOP inside Racket

  • Racket itself is a large-scale example
  • A new #lang
  • Using a metalanguage (e.g., s-exp)
  • Reader hacking
  • Racket + macros (no #lang)
  • Interpreter that evaluates S-expressions

22

slide-23
SLIDE 23

LOP outside Racket

  • Ward’s language-oriented programming (1994)
  • Spoofax
  • MPS (JetBrains)
  • Macros & macro-like features in other Lisps & non-Lisp

languages

  • Embedded DSLs in Haskell, JavaScript, etc.

23

slide-24
SLIDE 24

Our Problems

24

slide-25
SLIDE 25

Rough path ahead

Racket smoothes the path for making a language.

25

slide-26
SLIDE 26

Rough path ahead

Racket smoothes the path for making a language. BUT:

26

slide-27
SLIDE 27

Rough path ahead

Racket smoothes the path for making a language. BUT: The “API” is still a a bit hard, even for experienced Racketeers.

27

slide-28
SLIDE 28

Evangelism

Promoting Racket is hard

28

slide-29
SLIDE 29

Surface syntax!

  • Even some Racketeers don’t especially like the

parentheses.

  • Others work as long as possible with S-expressions.
  • When selling Racket to others, surface syntax might be

crucial.

29

slide-30
SLIDE 30

Recurring themes

  • Beautiful Racket
  • Racket Summer School
  • Teaching languages
  • Racket itself as an examplar of LOP
  • Exemplary languages: Scribble, Typed Racket, Hackett,

Turnstile, Redex

30

slide-31
SLIDE 31

The stars of the show

Eli Barzilay Annaia Berry Jörgen Brandt Matthew Butterick Ngugyen Linh Chi Christos Dimoulas Joel Dueck

31

slide-32
SLIDE 32

The stars of the show

Kathi Fisler Matthew Flatt Spencer Florence Stephen Foster Tony Garnock-Jones Panicz Godek Ben Greenman

32

slide-33
SLIDE 33

More stars!

Eric Griffis Andrew Gwozdziewycz William Hatch Shriram Krishnamurthi Jay McCarthy Darren Newton Pavel Panchekha

33

slide-34
SLIDE 34

More stars!!

Daniel Prager Praghakar Ragde Michael Sperber Vincent St-Amour Asumu Takikawa Éric Tanter Emina Torlak

34

slide-35
SLIDE 35

Final stars

Jesse Tov Jon Zeppieri

35

slide-36
SLIDE 36

Final stars

Jesse Tov Jon Zeppieri YOU?

36