Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Six things we learned implementing Rockstar on Quarkus

Six things we learned implementing Rockstar on Quarkus

Let’s run Rockstar programs on Quarkus! What could possibly go wrong?

Rockstar is an example of an “esoteric language,” designed to be interesting rather than intuitive, efficient or especially functional. Rockstar’s interesting feature is that its programs use the lyrical conventions of eighties rock ballads. Rockstar has been implemented in many languages, but not as a JVM language. This was clearly (clearly!) a gap that needed fixing, so Holly and Hanno have stepped in to make sure us JVM folks aren’t missing out. As a bonus, because “Bon Jova” is a JVM language, it can take advantage of Quarkus-y goodness. Along the way, a lot was learned about eighties music, classloaders, parsing, bytecode manipulation, and the important relationship between language style, syntax, and semantics.

There will be live coding, live singing and live guitar!

Holly Cummins

February 06, 2024
Tweet

More Decks by Holly Cummins

Other Decks in Programming

Transcript

  1. Six things we learned
    implementing
    Rockstar on Quarkus
    Hanno Embregts
    Holly Cummins

    View full-size slide

  2. @holly_cummins @hannotify #RedHat #InfoSupport
    Wanted: Rockstar developer

    View full-size slide

  3. @holly_cummins @hannotify #RedHat #InfoSupport
    Wanted: Rockstar developer
    Rockstar developer for PHP,
    Bootstrap, HTML 5, CS3
    Hello Everyone, We’re looking for a world-class
    developer to join up with our growing team, located
    across the world. We are growing fast in terms of
    revenue and projects, and need some help with
    development chops to take and run with things. About
    Us - We’re just a big ol’ smorgasbord of fun. We have
    a variety of client and in-house projects / companies
    that mostly run in the 6 to 7
    fi
    gure per year range, so
    you’ll always be working on something new, exciting,
    and mostly in spaces that are making a meaningful
    di
    ff
    erence in the world. Top Notch Ability to Figure
    Stu
    ff
    Out Above all else, you’ll need to be a problem
    solver. I don’t expect you to be a master at everything,
    but you will need to be able to
    fi
    gure out how to do
    something you don’t know how.

    View full-size slide

  4. @holly_cummins @hannotify #RedHat #InfoSupport
    Wanted: Rockstar developer
    Are you a rockstar developer?
    Are you an experienced developer looking for a new challenge and an opportunity to advance your skills and
    career in a great working environment?

    If you are an ambitious, self-starter able to thrive in a startup environment, we have the perfect job for you!

    We are looking for a competent programmer with PHP expertise who will be our
    fi
    rst in-house technology
    expert and play an integral role in setting the company’s overall development strategy.

    You will work directly under the founding team and will act as both a technology expert and consultant, making
    decisions that will impact the current and future state of our product.

    The perfect candidate will be familiar with PHP, Laravel, SQL, CSS, and have a general understanding of
    martech solutions.

    Who you are
    • By nature, a friendly, helpful human being

    • Must be comfortable with working in an existing code base

    • Able to read and understand existing code

    • Able to use good judgment when evaluating trade-o
    ff
    s between speed, quality, and cost

    • Able to debug and work backwards through code

    • Speaks and writes clearly and articulately

    • Must be end-user centric

    • Has a knack for thinking and developing in a future-proof manner

    • This is a full-time position
    Rockstar developer for PHP,
    Bootstrap, HTML 5, CS3
    Hello Everyone, We’re looking for a world-class
    developer to join up with our growing team, located
    across the world. We are growing fast in terms of
    revenue and projects, and need some help with
    development chops to take and run with things. About
    Us - We’re just a big ol’ smorgasbord of fun. We have
    a variety of client and in-house projects / companies
    that mostly run in the 6 to 7
    fi
    gure per year range, so
    you’ll always be working on something new, exciting,
    and mostly in spaces that are making a meaningful
    di
    ff
    erence in the world. Top Notch Ability to Figure
    Stu
    ff
    Out Above all else, you’ll need to be a problem
    solver. I don’t expect you to be a master at everything,
    but you will need to be able to
    fi
    gure out how to do
    something you don’t know how.

    View full-size slide

  5. @holly_cummins @hannotify #RedHat #InfoSupport
    Wanted: Rockstar developer
    Are you a rockstar developer?
    Are you an experienced developer looking for a new challenge and an opportunity to advance your skills and
    career in a great working environment?

    If you are an ambitious, self-starter able to thrive in a startup environment, we have the perfect job for you!

    We are looking for a competent programmer with PHP expertise who will be our
    fi
    rst in-house technology
    expert and play an integral role in setting the company’s overall development strategy.

    You will work directly under the founding team and will act as both a technology expert and consultant, making
    decisions that will impact the current and future state of our product.

    The perfect candidate will be familiar with PHP, Laravel, SQL, CSS, and have a general understanding of
    martech solutions.

    Who you are
    • By nature, a friendly, helpful human being

    • Must be comfortable with working in an existing code base

    • Able to read and understand existing code

    • Able to use good judgment when evaluating trade-o
    ff
    s between speed, quality, and cost

    • Able to debug and work backwards through code

    • Speaks and writes clearly and articulately

    • Must be end-user centric

    • Has a knack for thinking and developing in a future-proof manner

    • This is a full-time position
    Rockstar developer for PHP,
    Bootstrap, HTML 5, CS3
    Hello Everyone, We’re looking for a world-class
    developer to join up with our growing team, located
    across the world. We are growing fast in terms of
    revenue and projects, and need some help with
    development chops to take and run with things. About
    Us - We’re just a big ol’ smorgasbord of fun. We have
    a variety of client and in-house projects / companies
    that mostly run in the 6 to 7
    fi
    gure per year range, so
    you’ll always be working on something new, exciting,
    and mostly in spaces that are making a meaningful
    di
    ff
    erence in the world. Top Notch Ability to Figure
    Stu
    ff
    Out Above all else, you’ll need to be a problem
    solver. I don’t expect you to be a master at everything,
    but you will need to be able to
    fi
    gure out how to do
    something you don’t know how.
    Hiring: Rockstar developer
    We are looking for a rockstar developer to join us, starting towards the
    end of this month (Jul 2023).

    We are a software startup, and currently taking on agency-type work,
    building websites and web applications for other companies. We also
    have several products / services that we want to build. The developer
    will start out by helping with some of the client work, and then based
    on performance, may get to work on a product.

    We work primarily with Python, Django, DRF, Javascript, HTML, CSS,
    React, NextJS, Celery, Postgres, Redis, AWS, Git, Github, and more.

    View full-size slide

  6. @holly_cummins @hannotify #RedHat #InfoSupport
    Wanted: Rockstar developer
    Are you a rockstar developer?
    Are you an experienced developer looking for a new challenge and an opportunity to advance your skills and
    career in a great working environment?

    If you are an ambitious, self-starter able to thrive in a startup environment, we have the perfect job for you!

    We are looking for a competent programmer with PHP expertise who will be our
    fi
    rst in-house technology
    expert and play an integral role in setting the company’s overall development strategy.

    You will work directly under the founding team and will act as both a technology expert and consultant, making
    decisions that will impact the current and future state of our product.

    The perfect candidate will be familiar with PHP, Laravel, SQL, CSS, and have a general understanding of
    martech solutions.

    Who you are
    • By nature, a friendly, helpful human being

    • Must be comfortable with working in an existing code base

    • Able to read and understand existing code

    • Able to use good judgment when evaluating trade-o
    ff
    s between speed, quality, and cost

    • Able to debug and work backwards through code

    • Speaks and writes clearly and articulately

    • Must be end-user centric

    • Has a knack for thinking and developing in a future-proof manner

    • This is a full-time position
    Rockstar developer for PHP,
    Bootstrap, HTML 5, CS3
    Hello Everyone, We’re looking for a world-class
    developer to join up with our growing team, located
    across the world. We are growing fast in terms of
    revenue and projects, and need some help with
    development chops to take and run with things. About
    Us - We’re just a big ol’ smorgasbord of fun. We have
    a variety of client and in-house projects / companies
    that mostly run in the 6 to 7
    fi
    gure per year range, so
    you’ll always be working on something new, exciting,
    and mostly in spaces that are making a meaningful
    di
    ff
    erence in the world. Top Notch Ability to Figure
    Stu
    ff
    Out Above all else, you’ll need to be a problem
    solver. I don’t expect you to be a master at everything,
    but you will need to be able to
    fi
    gure out how to do
    something you don’t know how.
    Hiring: Rockstar developer
    We are looking for a rockstar developer to join us, starting towards the
    end of this month (Jul 2023).

    We are a software startup, and currently taking on agency-type work,
    building websites and web applications for other companies. We also
    have several products / services that we want to build. The developer
    will start out by helping with some of the client work, and then based
    on performance, may get to work on a product.

    We work primarily with Python, Django, DRF, Javascript, HTML, CSS,
    React, NextJS, Celery, Postgres, Redis, AWS, Git, Github, and more.

    Looking for a rockstar developer
    I'm looking for a rockstar developer to join me, starting maybe
    towards the end of this month (Jul 2023).

    I run a software startup, and currently we're taking on agency-
    type work, building websites and web applications for other
    companies. I also have several products / services that I want
    to build. The developer will be working with me personally,
    and will start out by helping me with some of the client work.

    We work primarily with Python, Django, DRF, Javascript,
    HTML, CSS, React, NextJS, Celery, Postgres, Redis, AWS,
    Git, Github, and more.

    View full-size slide

  7. @holly_cummins @hannotify #RedHat #InfoSupport
    Wanted: Rockstar developer
    Are you a rockstar developer?
    Are you an experienced developer looking for a new challenge and an opportunity to advance your skills and
    career in a great working environment?

    If you are an ambitious, self-starter able to thrive in a startup environment, we have the perfect job for you!

    We are looking for a competent programmer with PHP expertise who will be our
    fi
    rst in-house technology
    expert and play an integral role in setting the company’s overall development strategy.

    You will work directly under the founding team and will act as both a technology expert and consultant, making
    decisions that will impact the current and future state of our product.

    The perfect candidate will be familiar with PHP, Laravel, SQL, CSS, and have a general understanding of
    martech solutions.

    Who you are
    • By nature, a friendly, helpful human being

    • Must be comfortable with working in an existing code base

    • Able to read and understand existing code

    • Able to use good judgment when evaluating trade-o
    ff
    s between speed, quality, and cost

    • Able to debug and work backwards through code

    • Speaks and writes clearly and articulately

    • Must be end-user centric

    • Has a knack for thinking and developing in a future-proof manner

    • This is a full-time position
    Rockstar developer for PHP,
    Bootstrap, HTML 5, CS3
    Hello Everyone, We’re looking for a world-class
    developer to join up with our growing team, located
    across the world. We are growing fast in terms of
    revenue and projects, and need some help with
    development chops to take and run with things. About
    Us - We’re just a big ol’ smorgasbord of fun. We have
    a variety of client and in-house projects / companies
    that mostly run in the 6 to 7
    fi
    gure per year range, so
    you’ll always be working on something new, exciting,
    and mostly in spaces that are making a meaningful
    di
    ff
    erence in the world. Top Notch Ability to Figure
    Stu
    ff
    Out Above all else, you’ll need to be a problem
    solver. I don’t expect you to be a master at everything,
    but you will need to be able to
    fi
    gure out how to do
    something you don’t know how.
    Hiring: Rockstar developer
    We are looking for a rockstar developer to join us, starting towards the
    end of this month (Jul 2023).

    We are a software startup, and currently taking on agency-type work,
    building websites and web applications for other companies. We also
    have several products / services that we want to build. The developer
    will start out by helping with some of the client work, and then based
    on performance, may get to work on a product.

    We work primarily with Python, Django, DRF, Javascript, HTML, CSS,
    React, NextJS, Celery, Postgres, Redis, AWS, Git, Github, and more.

    Looking for a rockstar developer
    I'm looking for a rockstar developer to join me, starting maybe
    towards the end of this month (Jul 2023).

    I run a software startup, and currently we're taking on agency-
    type work, building websites and web applications for other
    companies. I also have several products / services that I want
    to build. The developer will be working with me personally,
    and will start out by helping me with some of the client work.

    We work primarily with Python, Django, DRF, Javascript,
    HTML, CSS, React, NextJS, Celery, Postgres, Redis, AWS,
    Git, Github, and more.

    Wanted: A rockstar developer for [redacted]
    Agencies often have a hard time competing with private-sector
    employers for top-notch IT talent, but this job might hold special
    appeal for the open-data crowd: The [redacted] team is hiring its
    own developer. This "IT specialist (applications software)" will join
    the small crew of dataphiles in the [redacted] department, where he
    or she will serve as an in-house software engineer, collaborate with
    outside developers, and serve as web architect for [redacted]. The
    technical underpinnings of [redacted], which launched in May 2009,
    have been largely built by contractors, but [redacted] has now
    decided to bring some coding capacity onto the permanent sta
    ff
    .
    Details of the job are posted on [redacted]. But would-be applicants
    had better hurry -- the application window closes on June 11.

    View full-size slide

  8. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  9. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  10. the creation story
    of Rockstar
    Images: DALL-E
    Dylan Beattie

    View full-size slide

  11. the creation story
    of Rockstar
    Images: DALL-E
    Wouldn’t it be fun
    to write a spec for a
    language called
    Rockstar?
    Dylan Beattie

    View full-size slide

  12. the creation story
    of Rockstar
    Images: DALL-E
    I have beer, so I
    now see the language
    should work like this,
    and …
    Wouldn’t it be fun
    to write a spec for a
    language called
    Rockstar?
    Dylan Beattie

    View full-size slide

  13. the creation story
    of Rockstar
    Images: DALL-E
    I have beer, so I
    now see the language
    should work like this,
    and …
    Wouldn’t it be fun
    to write a spec for a
    language called
    Rockstar?
    Dylan Beattie
    in Australia

    View full-size slide

  14. the creation story
    of Rockstar
    Images: DALL-E
    I have beer, so I
    now see the language
    should work like this,
    and …
    Wouldn’t it be fun
    to write a spec for a
    language called
    Rockstar?
    Dylan Beattie
    in Australia

    View full-size slide

  15. Developers turn coffee into code …

    View full-size slide

  16. Developers turn coffee into code …
    and beer into ridiculous language specs.

    View full-size slide

  17. @holly_cummins @hannotify #RedHat #InfoSupport
    Thanks to Dylan,
    you can become a
    certified rockstar developer
    Image: Dylan Beattie

    View full-size slide

  18. @holly_cummins @hannotify #RedHat #InfoSupport
    Rockstar is an “esoteric language”

    View full-size slide

  19. @holly_cummins @hannotify #RedHat #InfoSupport
    Brainfuck
    ++++++++++[>+++++++>+++++++++
    +>+++<<<-]>++.>+.+++++++
    ..+++.>++.<<++++++++++++++
    +.>.+++.------.--------.>+.
    Hello World:

    View full-size slide

  20. @holly_cummins @hannotify #RedHat #InfoSupport
    Chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken
    chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken
    chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken
    chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken
    chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken chicken
    chicken chicken chicken chicken chicken chicken
    Hello World:

    View full-size slide

  21. @holly_cummins @hannotify #RedHat #InfoSupport
    Existing Rockstar implementations

    View full-size slide

  22. @holly_cummins @hannotify #RedHat #InfoSupport
    Existing Rockstar implementations
    Satriani (interpreter written in JavaScript, and the official reference implementation)
    Rocky (interpreter written in Java)
    RockstarJava (interpreter written in Java)
    KaiserRuby (transpiler written in Ruby)
    Maiden (interpreter written in Rust)
    …and many more in different languages

    View full-size slide

  23. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  24. @holly_cummins @hannotify #RedHat #InfoSupport
    None of these are JVM languages.

    View full-size slide

  25. @holly_cummins @hannotify #RedHat #InfoSupport
    None of these are JVM languages.
    This is obviously a terrible gap.

    View full-size slide

  26. @holly_cummins @hannotify #RedHat #InfoSupport
    Why did we need another implementation?
    Because we could.

    View full-size slide

  27. @holly_cummins @hannotify #RedHat #InfoSupport
    Developers love reinventing things.

    View full-size slide

  28. @holly_cummins @hannotify #RedHat #InfoSupport
    What shall we call it?
    Naming things is the hardest problem in computer science.

    View full-size slide

  29. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  30. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?

    View full-size slide

  31. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?
    1. The Brew Fighters (The Foo Fighters)

    View full-size slide

  32. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?
    1. The Brew Fighters (The Foo Fighters)
    2. Cream Roasters (Cream)

    View full-size slide

  33. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?
    1. The Brew Fighters (The Foo Fighters)
    2. Cream Roasters (Cream)
    3. Java Leppard (Def Leppard)

    View full-size slide

  34. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?
    1. The Brew Fighters (The Foo Fighters)
    2. Cream Roasters (Cream)
    3. Java Leppard (Def Leppard)
    4. Guns 'N' Coffees (Guns N' Roses)

    View full-size slide

  35. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?
    1. The Brew Fighters (The Foo Fighters)
    2. Cream Roasters (Cream)
    3. Java Leppard (Def Leppard)
    4. Guns 'N' Coffees (Guns N' Roses)
    5. Black Sabbath Blend (Black Sabbath)

    View full-size slide

  36. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?
    1. The Brew Fighters (The Foo Fighters)
    2. Cream Roasters (Cream)
    3. Java Leppard (Def Leppard)
    4. Guns 'N' Coffees (Guns N' Roses)
    5. Black Sabbath Blend (Black Sabbath)
    6. The Mocha Crüe (Mötley Crüe)

    View full-size slide

  37. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?
    1. The Brew Fighters (The Foo Fighters)
    2. Cream Roasters (Cream)
    3. Java Leppard (Def Leppard)
    4. Guns 'N' Coffees (Guns N' Roses)
    5. Black Sabbath Blend (Black Sabbath)
    6. The Mocha Crüe (Mötley Crüe)
    7. Van Halentino (Van Halen)

    View full-size slide

  38. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?
    1. The Brew Fighters (The Foo Fighters)
    2. Cream Roasters (Cream)
    3. Java Leppard (Def Leppard)
    4. Guns 'N' Coffees (Guns N' Roses)
    5. Black Sabbath Blend (Black Sabbath)
    6. The Mocha Crüe (Mötley Crüe)
    7. Van Halentino (Van Halen)
    8. The Rolling Scones (The Rolling
    Stones)

    View full-size slide

  39. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?
    1. The Brew Fighters (The Foo Fighters)
    2. Cream Roasters (Cream)
    3. Java Leppard (Def Leppard)
    4. Guns 'N' Coffees (Guns N' Roses)
    5. Black Sabbath Blend (Black Sabbath)
    6. The Mocha Crüe (Mötley Crüe)
    7. Van Halentino (Van Halen)
    8. The Rolling Scones (The Rolling
    Stones)
    9. Grind Maiden (Iron Maiden)

    View full-size slide

  40. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?
    1. The Brew Fighters (The Foo Fighters)
    2. Cream Roasters (Cream)
    3. Java Leppard (Def Leppard)
    4. Guns 'N' Coffees (Guns N' Roses)
    5. Black Sabbath Blend (Black Sabbath)
    6. The Mocha Crüe (Mötley Crüe)
    7. Van Halentino (Van Halen)
    8. The Rolling Scones (The Rolling
    Stones)
    9. Grind Maiden (Iron Maiden)
    10. AC/Decaf (AC/DC)

    View full-size slide

  41. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?
    1. The Brew Fighters (The Foo Fighters)
    2. Cream Roasters (Cream)
    3. Java Leppard (Def Leppard)
    4. Guns 'N' Coffees (Guns N' Roses)
    5. Black Sabbath Blend (Black Sabbath)
    6. The Mocha Crüe (Mötley Crüe)
    7. Van Halentino (Van Halen)
    8. The Rolling Scones (The Rolling
    Stones)
    9. Grind Maiden (Iron Maiden)
    10. AC/Decaf (AC/DC)
    11. Dire Coffee-straits (Dire Straits)

    View full-size slide

  42. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?
    1. The Brew Fighters (The Foo Fighters)
    2. Cream Roasters (Cream)
    3. Java Leppard (Def Leppard)
    4. Guns 'N' Coffees (Guns N' Roses)
    5. Black Sabbath Blend (Black Sabbath)
    6. The Mocha Crüe (Mötley Crüe)
    7. Van Halentino (Van Halen)
    8. The Rolling Scones (The Rolling
    Stones)
    9. Grind Maiden (Iron Maiden)
    10. AC/Decaf (AC/DC)
    11. Dire Coffee-straits (Dire Straits)
    12. …

    View full-size slide

  43. @holly_cummins @hannotify #RedHat #InfoSupport
    RockStarBucks?

    View full-size slide

  44. @holly_cummins @hannotify #RedHat #InfoSupport
    JEP Leppard?

    View full-size slide

  45. @holly_cummins @hannotify #RedHat #InfoSupport
    Bon Jova.

    View full-size slide

  46. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  47. demo
    @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    Hello World

    View full-size slide

  48. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    Christine says hello world
    Say Christine

    View full-size slide

  49. @holly_cummins @hannotify #RedHat #InfoSupport
    School of Rock(star)

    View full-size slide

  50. @holly_cummins @hannotify #RedHat #InfoSupport
    Rule 1. If you can’t sing it, you can’t have it.

    View full-size slide

  51. @holly_cummins @hannotify #RedHat #InfoSupport
    syntax

    View full-size slide

  52. demo
    @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    Let’s Learn ROCKSTAR

    View full-size slide

  53. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    (This program prints "42")
    Comments

    View full-size slide

  54. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    (This program prints "42")
    …but comments are for the weak.
    (See Rule 1.)
    Comments

    View full-size slide

  55. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    Say "Hello world!"
    Output

    View full-size slide

  56. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    Say "Hello world!"
    …or ‘shout’, ‘whisper’
    Output

    View full-size slide

  57. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    Poetic string literals
    Christine says hello world
    Initialises Christine with “hello world”, no quotes needed

    View full-size slide

  58. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    (This program prints “42")
    The answer is sing it
    Shout the answer
    Poetic number literals
    Initialises the answer with 42, no quotes needed

    View full-size slide

  59. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    Many ways to say the same thing

    View full-size slide

  60. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    My dreams were ice. A life unfulfilled;
    wakin' everybody up, taking booze and pills
    Many ways to say the same thing

    View full-size slide

  61. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    My dreams were ice. A life unfulfilled;
    wakin' everybody up, taking booze and pills
    Many ways to say the same thing
    The tide is low. A ball flung-about, beach
    abandoned, no soiree beats the shore

    View full-size slide

  62. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    My dreams were ice. A life unfulfilled;
    wakin' everybody up, taking booze and pills
    Many ways to say the same thing
    (3.1415926535)
    The tide is low. A ball flung-about, beach
    abandoned, no soiree beats the shore

    View full-size slide

  63. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    Input
    Listen to your heart

    View full-size slide

  64. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    Input
    Initialises your heart with input from stdin
    Listen to your heart

    View full-size slide

  65. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    Conditionals
    If your heart is open
    Say “Love will find a way”
    Else say “Livin' on my own”

    View full-size slide

  66. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    Conditionals
    If your heart is equal to open…
    If your heart is open
    Say “Love will find a way”
    Else say “Livin' on my own”

    View full-size slide

  67. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    Loops
    The walls are high and mighty
    While the walls are nothing
    Knock the walls down

    View full-size slide

  68. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    Loops
    Decrement the walls from 436 until 0.
    The walls are high and mighty
    While the walls are nothing
    Knock the walls down

    View full-size slide

  69. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    Functions
    Mama wants power
    Send power times power

    View full-size slide

  70. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    Functions
    wants defines parameter(s), send returns a result.
    Mama wants power
    Send power times power

    View full-size slide

  71. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    Arrays
    Rock bands with 0, 1, 2
    While bands
    Let charge be pop bands
    Shout Mama taking charge

    View full-size slide

  72. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    Arrays
    Rock initialises an array; pop removes an element;
    taking separates function name from params
    Rock bands with 0, 1, 2
    While bands
    Let charge be pop bands
    Shout Mama taking charge

    View full-size slide

  73. @holly_cummins @hannotify #RedHat #InfoSupport
    Launching these is annoying.
    We can do better, right?

    View full-size slide

  74. @holly_cummins @hannotify #RedHat #InfoSupport
    We can use Quarkus.

    View full-size slide

  75. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  76. @holly_cummins @hannotify #RedHat #InfoSupport
    Why Quarkus?

    View full-size slide

  77. @holly_cummins @hannotify #RedHat #InfoSupport
    Why Quarkus?
    Quarkus rocks.

    View full-size slide

  78. @holly_cummins @hannotify #RedHat #InfoSupport
    Why Quarkus?
    Quarkus rocks.
    No, really. Quarkus rocks.

    View full-size slide

  79. @holly_cummins @hannotify #RedHat #InfoSupport
    Quarkus rocks.

    View full-size slide

  80. @holly_cummins @hannotify #RedHat #InfoSupport
    Quarkus rocks.
    2022
    Hanno
    (somewhere under there)
    Holly

    View full-size slide

  81. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  82. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  83. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  84. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  85. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  86. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  87. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  88. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  89. @holly_cummins @hannotify #RedHat #InfoSupport
    come see us for
    these stickers

    View full-size slide

  90. @holly_cummins @hannotify #RedHat #InfoSupport
    Quarkus rocks

    View full-size slide

  91. @holly_cummins @hannotify #RedHat #InfoSupport
    Live-coding
    Quarkus rocks

    View full-size slide

  92. @holly_cummins @hannotify #RedHat #InfoSupport
    Live-coding
    Native compilation
    Quarkus rocks

    View full-size slide

  93. @holly_cummins @hannotify #RedHat #InfoSupport
    Live-coding
    Native compilation
    Less boilerplate, more action
    Quarkus rocks

    View full-size slide

  94. @holly_cummins @hannotify #RedHat #InfoSupport
    Live-coding
    Native compilation
    Less boilerplate, more action
    Rockstar developers are not
    into that whole brevity thing.
    Quarkus rocks

    View full-size slide

  95. @holly_cummins @hannotify #RedHat #InfoSupport
    Live-coding
    Native compilation
    Less boilerplate, more action
    Dev UI
    Rockstar developers are not
    into that whole brevity thing.
    Quarkus rocks

    View full-size slide

  96. @holly_cummins @hannotify #RedHat #InfoSupport
    Live-coding
    Native compilation
    Less boilerplate, more action
    Dev UI
    Integration with Java libraries
    Rockstar developers are not
    into that whole brevity thing.
    Quarkus rocks

    View full-size slide

  97. @holly_cummins @hannotify #RedHat #InfoSupport
    Live-coding
    Native compilation
    Less boilerplate, more action
    Dev UI
    Integration with Java libraries
    Marketplace of extensions
    Rockstar developers are not
    into that whole brevity thing.
    Quarkus rocks

    View full-size slide

  98. @holly_cummins @hannotify #RedHat #InfoSupport
    Step 1. Write a JVM language.

    View full-size slide

  99. @holly_cummins @hannotify #RedHat #InfoSupport
    Step 1a. Write a parser.

    View full-size slide

  100. @holly_cummins @hannotify #RedHat #InfoSupport
    Step 1a. Don’t write a parser. Use Antlr.

    View full-size slide

  101. @holly_cummins @hannotify #RedHat #InfoSupport
    Generating a grammar

    View full-size slide

  102. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?

    View full-size slide

  103. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?
    THERE ARE NO PARENTHESES IN EXPRESSIONS IN
    ROCKSTAR

    View full-size slide

  104. @holly_cummins @hannotify #RedHat #InfoSupport
    Can the internet help?

    View full-size slide

  105. @holly_cummins @hannotify #RedHat #InfoSupport
    Can the internet help?

    View full-size slide

  106. learning
    @holly_cummins @hannotify #RedHat #InfoSupport
    Antlr is really useful (once you grok it)

    View full-size slide

  107. @holly_cummins @hannotify #RedHat #InfoSupport
    How does Antlr work?

    View full-size slide

  108. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  109. @holly_cummins @hannotify #RedHat #InfoSupport
    document

    View full-size slide

  110. @holly_cummins @hannotify #RedHat #InfoSupport
    document

    View full-size slide

  111. @holly_cummins @hannotify #RedHat #InfoSupport
    document
    output or actions

    View full-size slide

  112. @holly_cummins @hannotify #RedHat #InfoSupport
    document
    rockstar program
    output or actions

    View full-size slide

  113. @holly_cummins @hannotify #RedHat #InfoSupport
    document
    rockstar program
    output or actions
    bytecode
    generation
    bytecode

    View full-size slide

  114. @holly_cummins @hannotify #RedHat #InfoSupport
    document
    abstract syntax tree
    (AST)
    rockstar program
    output or actions
    bytecode
    generation
    bytecode

    View full-size slide

  115. @holly_cummins @hannotify #RedHat #InfoSupport
    document
    abstract syntax tree
    (AST)
    rockstar program
    output or actions
    bytecode
    generation
    bytecode

    View full-size slide

  116. @holly_cummins @hannotify #RedHat #InfoSupport
    tokens
    document
    abstract syntax tree
    (AST)
    rockstar program
    lexing
    output or actions
    tokens
    bytecode
    generation
    tokens tokens
    tokens tokens tokens
    tokens
    bytecode

    View full-size slide

  117. @holly_cummins @hannotify #RedHat #InfoSupport
    tokens
    document
    abstract syntax tree
    (AST)
    rockstar program
    reassemble (“parsing”)
    lexing
    output or actions
    tokens
    bytecode
    generation
    tokens tokens
    tokens tokens tokens
    tokens
    rules rules rules
    bytecode

    View full-size slide

  118. @holly_cummins @hannotify #RedHat #InfoSupport
    tokens
    document
    abstract syntax tree
    (AST)
    rockstar program
    reassemble (“parsing”)
    lexing
    output or actions
    tokens
    bytecode
    generation
    parse-time
    tokens tokens
    tokens tokens tokens
    tokens
    rules rules rules
    bytecode

    View full-size slide

  119. @holly_cummins @hannotify #RedHat #InfoSupport
    prep work
    tokens
    document
    abstract syntax tree
    (AST)
    rockstar program
    reassemble (“parsing”)
    lexing
    output or actions
    tokens
    bytecode
    generation
    parse-time
    tokens tokens
    tokens tokens tokens
    tokens
    rules rules rules
    bytecode

    View full-size slide

  120. @holly_cummins @hannotify #RedHat #InfoSupport
    antlr grammar
    prep work
    tokens
    document
    abstract syntax tree
    (AST)
    rockstar program
    reassemble (“parsing”)
    lexing
    output or actions
    tokens
    bytecode
    generation
    parse-time
    tokens tokens
    tokens tokens tokens
    tokens
    rules rules rules
    bytecode

    View full-size slide

  121. @holly_cummins @hannotify #RedHat #InfoSupport
    antlr grammar
    prep work
    defines
    tokens
    fragment de
    fi
    nitions
    document
    abstract syntax tree
    (AST)
    rockstar program
    reassemble (“parsing”)
    lexing
    output or actions
    tokens
    bytecode
    generation
    parse-time
    tokens tokens
    tokens tokens tokens
    tokens
    rules rules rules
    bytecode

    View full-size slide

  122. @holly_cummins @hannotify #RedHat #InfoSupport
    antlr grammar token de
    fi
    nitions
    prep work
    defines
    tokens
    fragment de
    fi
    nitions
    document
    abstract syntax tree
    (AST)
    rockstar program
    reassemble (“parsing”)
    lexing
    output or actions
    tokens
    bytecode
    generation
    parse-time
    tokens tokens
    tokens tokens tokens
    tokens
    rules rules rules
    bytecode

    View full-size slide

  123. @holly_cummins @hannotify #RedHat #InfoSupport
    antlr grammar token de
    fi
    nitions
    prep work
    rule de
    fi
    nitions
    defines
    tokens
    fragment de
    fi
    nitions
    document
    abstract syntax tree
    (AST)
    rockstar program
    reassemble (“parsing”)
    lexing
    output or actions
    tokens
    bytecode
    generation
    parse-time
    tokens tokens
    tokens tokens tokens
    tokens
    rules rules rules
    bytecode

    View full-size slide

  124. @holly_cummins @hannotify #RedHat #InfoSupport
    antlr grammar token de
    fi
    nitions
    prep work
    rule de
    fi
    nitions
    defines
    generates
    tokens
    fragment de
    fi
    nitions
    document
    abstract syntax tree
    (AST)
    rockstar program
    reassemble (“parsing”)
    lexing
    output or actions
    tokens
    bytecode
    generation
    parse-time
    tokens tokens
    tokens tokens tokens
    tokens
    rules rules rules
    bytecode

    View full-size slide

  125. @holly_cummins @hannotify #RedHat #InfoSupport
    antlr grammar token de
    fi
    nitions
    Java types
    prep work
    rule de
    fi
    nitions
    defines
    generates
    tokens
    fragment de
    fi
    nitions
    document
    abstract syntax tree
    (AST)
    rockstar program
    reassemble (“parsing”)
    lexing
    output or actions
    tokens
    bytecode
    generation
    parse-time
    tokens tokens
    tokens tokens tokens
    tokens
    rules rules rules
    bytecode

    View full-size slide

  126. @holly_cummins @hannotify #RedHat #InfoSupport
    antlr grammar token de
    fi
    nitions
    Java types
    AST listener
    interface
    prep work
    rule de
    fi
    nitions
    defines
    generates
    tokens
    fragment de
    fi
    nitions
    document
    abstract syntax tree
    (AST)
    rockstar program
    reassemble (“parsing”)
    lexing
    output or actions
    tokens
    bytecode
    generation
    parse-time
    tokens tokens
    tokens tokens tokens
    tokens
    rules rules rules
    bytecode

    View full-size slide

  127. @holly_cummins @hannotify #RedHat #InfoSupport
    antlr grammar token de
    fi
    nitions
    antlr
    Java types
    AST listener
    interface
    prep work
    rule de
    fi
    nitions
    defines
    generates
    tokens
    fragment de
    fi
    nitions
    document
    abstract syntax tree
    (AST)
    rockstar program
    reassemble (“parsing”)
    lexing
    output or actions
    tokens
    bytecode
    generation
    parse-time
    tokens tokens
    tokens tokens tokens
    tokens
    rules rules rules
    bytecode

    View full-size slide

  128. @holly_cummins @hannotify #RedHat #InfoSupport
    antlr grammar token de
    fi
    nitions
    antlr
    Java types
    AST listener
    interface
    prep work
    rule de
    fi
    nitions
    defines
    generates
    tokens
    fragment de
    fi
    nitions
    document
    abstract syntax tree
    (AST)
    rockstar program
    reassemble (“parsing”)
    lexing
    output or actions
    tokens
    bytecode
    generation
    parse-time
    tokens tokens
    tokens tokens tokens
    tokens
    rules rules rules
    bytecode
    your code

    View full-size slide

  129. @holly_cummins @hannotify #RedHat #InfoSupport
    antlr grammar token de
    fi
    nitions
    antlr
    Java types
    AST listener
    interface
    prep work
    type safe accessor
    to the result of
    parsing
    rule de
    fi
    nitions
    defines
    generates
    tokens
    fragment de
    fi
    nitions
    document
    abstract syntax tree
    (AST)
    rockstar program
    reassemble (“parsing”)
    lexing
    output or actions
    tokens
    bytecode
    generation
    parse-time
    tokens tokens
    tokens tokens tokens
    tokens
    rules rules rules
    bytecode
    your code

    View full-size slide

  130. @holly_cummins @hannotify #RedHat #InfoSupport
    antlr grammar token de
    fi
    nitions
    antlr
    Java types
    AST listener
    interface
    prep work
    type safe accessor
    to the result of
    parsing
    rule de
    fi
    nitions
    defines
    generates
    tokens
    fragment de
    fi
    nitions
    document
    abstract syntax tree
    (AST)
    rockstar program
    reassemble (“parsing”)
    lexing
    output or actions
    tokens
    your code
    bytecode
    generation
    parse-time
    tokens tokens
    tokens tokens tokens
    tokens
    rules rules rules
    bytecode
    your code

    View full-size slide

  131. @holly_cummins @hannotify #RedHat #InfoSupport
    antlr grammar token de
    fi
    nitions
    antlr
    Java types
    AST listener
    interface
    listener
    implementation
    prep work
    type safe accessor
    to the result of
    parsing
    rule de
    fi
    nitions
    defines
    generates
    tokens
    fragment de
    fi
    nitions
    document
    abstract syntax tree
    (AST)
    rockstar program
    reassemble (“parsing”)
    lexing
    output or actions
    tokens
    your code
    bytecode
    generation
    parse-time
    tokens tokens
    tokens tokens tokens
    tokens
    rules rules rules
    bytecode
    uses
    your code

    View full-size slide

  132. @holly_cummins @hannotify #RedHat #InfoSupport
    it took me a while to understand
    this bit was needed and what it
    might look like
    antlr grammar token de
    fi
    nitions
    antlr
    Java types
    AST listener
    interface
    listener
    implementation
    prep work
    type safe accessor
    to the result of
    parsing
    rule de
    fi
    nitions
    defines
    generates
    tokens
    fragment de
    fi
    nitions
    document
    abstract syntax tree
    (AST)
    rockstar program
    reassemble (“parsing”)
    lexing
    output or actions
    tokens
    your code
    bytecode
    generation
    parse-time
    tokens tokens
    tokens tokens tokens
    tokens
    rules rules rules
    bytecode
    uses
    your code

    View full-size slide

  133. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  134. @holly_cummins @hannotify #RedHat #InfoSupport
    If the document is a story…

    View full-size slide

  135. @holly_cummins @hannotify #RedHat #InfoSupport
    If the document is a story…

    View full-size slide

  136. @holly_cummins @hannotify #RedHat #InfoSupport
    If the document is a story…
    Fragments are like letters.

    View full-size slide

  137. @holly_cummins @hannotify #RedHat #InfoSupport
    If the document is a story…
    Fragments are like letters.
    Tokens are like words.

    View full-size slide

  138. @holly_cummins @hannotify #RedHat #InfoSupport
    If the document is a story…
    Fragments are like letters.
    Tokens are like words.
    Rules are like sentences and paragraphs.

    View full-size slide

  139. @holly_cummins @hannotify #RedHat #InfoSupport
    If the document is a story…
    Fragments are like letters.
    Tokens are like words.
    Rules are like sentences and paragraphs.

    View full-size slide

  140. @holly_cummins @hannotify #RedHat #InfoSupport
    fragment S: [Ss];
    CONSTANT_EMPTY: E M P T Y
    | | S I L E N T
    | | S I L E N C E;
    constant: CONSTANT_UNDEFINED
    | | CONSTANT_NULL
    | | CONSTANT_TRUE
    | | CONSTANT_FALSE
    | | CONSTANT_EMPTY;

    View full-size slide

  141. @holly_cummins @hannotify #RedHat #InfoSupport
    fragment S: [Ss];
    CONSTANT_EMPTY: E M P T Y
    | | S I L E N T
    | | S I L E N C E;
    constant: CONSTANT_UNDEFINED
    | | CONSTANT_NULL
    | | CONSTANT_TRUE
    | | CONSTANT_FALSE
    | | CONSTANT_EMPTY;
    fragment

    View full-size slide

  142. @holly_cummins @hannotify #RedHat #InfoSupport
    fragment S: [Ss];
    CONSTANT_EMPTY: E M P T Y
    | | S I L E N T
    | | S I L E N C E;
    constant: CONSTANT_UNDEFINED
    | | CONSTANT_NULL
    | | CONSTANT_TRUE
    | | CONSTANT_FALSE
    | | CONSTANT_EMPTY;
    fragment
    token

    View full-size slide

  143. @holly_cummins @hannotify #RedHat #InfoSupport
    fragment S: [Ss];
    CONSTANT_EMPTY: E M P T Y
    | | S I L E N T
    | | S I L E N C E;
    constant: CONSTANT_UNDEFINED
    | | CONSTANT_NULL
    | | CONSTANT_TRUE
    | | CONSTANT_FALSE
    | | CONSTANT_EMPTY;
    fragment
    token
    simple rule

    View full-size slide

  144. @holly_cummins @hannotify #RedHat #InfoSupport
    fragment S: [Ss];
    CONSTANT_EMPTY: E M P T Y
    | | S I L E N T
    | | S I L E N C E;
    constant: CONSTANT_UNDEFINED
    | | CONSTANT_NULL
    | | CONSTANT_TRUE
    | | CONSTANT_FALSE
    | | CONSTANT_EMPTY;
    fragment
    token
    simple rule
    regex-like syntax

    View full-size slide

  145. @holly_cummins @hannotify #RedHat #InfoSupport
    You’re going to need a debugger.

    View full-size slide

  146. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  147. @holly_cummins @hannotify #RedHat #InfoSupport
    public class BytecodeGenerator extends RockstarBaseListener
    {

    View full-size slide

  148. @holly_cummins @hannotify #RedHat #InfoSupport
    public class BytecodeGenerator extends RockstarBaseListener
    {
    Antlr generates this interface

    View full-size slide

  149. @holly_cummins @hannotify #RedHat #InfoSupport
    @Override
    public void enterProgram(Rockstar.ProgramContext ctx) {
    public class BytecodeGenerator extends RockstarBaseListener
    {
    Antlr generates this interface

    View full-size slide

  150. @holly_cummins @hannotify #RedHat #InfoSupport
    @Override
    public void enterProgram(Rockstar.ProgramContext ctx) {
    public class BytecodeGenerator extends RockstarBaseListener
    {
    one method for each rule
    Antlr generates this interface

    View full-size slide

  151. @holly_cummins @hannotify #RedHat #InfoSupport
    @Override
    public void enterProgram(Rockstar.ProgramContext ctx) {
    public class BytecodeGenerator extends RockstarBaseListener
    {
    one method for each rule
    Antlr generates this interface
    Antlr generates this type

    View full-size slide

  152. @holly_cummins @hannotify #RedHat #InfoSupport
    @Override
    public void enterProgram(Rockstar.ProgramContext ctx) {
    public class BytecodeGenerator extends RockstarBaseListener
    {
    one method for each rule
    Antlr generates this interface
    Antlr generates this type
    @Override
    public void enterStatement(Rockstar.StatementContext ctx) {
    Rules can nest

    View full-size slide

  153. @holly_cummins @hannotify #RedHat #InfoSupport
    Step 1b. Generate bytecode.

    View full-size slide

  154. learning
    @holly_cummins @hannotify #RedHat #InfoSupport
    Don’t be afraid to manipulate bytecode;
    maybe do be afraid of doing it
    with ASM.

    View full-size slide

  155. @holly_cummins @hannotify #RedHat #InfoSupport
    public class BytecodeGenerator implements Opcodes {
    public byte[] generateBytecode(String name) {
    ClassWriter cw = new ClassWriter(0);
    FieldVisitor fv;
    MethodVisitor mv;
    AnnotationVisitor av0;
    cw.visit(49,
    ACC_PUBLIC + ACC_SUPER,
    name,
    null,
    "java/lang/Object",
    null);
    cw.visitSource("Hello.java", null);
    {
    mv = cw.visitMethod(ACC_PUBLIC, "", "()V", null, null);
    mv.visitVarInsn(ALOAD, 0);
    mv.visitMethodInsn(INVOKESPECIAL,
    "java/lang/Object",
    "",
    "()V");
    mv.visitInsn(RETURN);
    mv.visitMaxs(1, 1);
    mv.visitEnd();
    }
    {

    Hello World in ASM

    View full-size slide

  156. @holly_cummins @hannotify #RedHat #InfoSupport
    package org.example;
    import org.objectweb.asm.AnnotationVisitor;
    import org.objectweb.asm.ClassWriter;
    import org.objectweb.asm.FieldVisitor;
    import org.objectweb.asm.MethodVisitor;
    import org.objectweb.asm.Opcodes;
    public class BytecodeGenerator implements Opcodes {
    public byte[] generateBytecode(String name) {
    ClassWriter cw = new ClassWriter(0);
    FieldVisitor fv;
    MethodVisitor mv;
    AnnotationVisitor av0;
    cw.visit(49,
    ACC_PUBLIC + ACC_SUPER,
    name,
    null,
    "java/lang/Object",
    null);
    cw.visitSource("Hello.java", null);
    {
    mv = cw.visitMethod(ACC_PUBLIC, "", "()V", null, null);
    mv.visitVarInsn(ALOAD, 0);
    mv.visitMethodInsn(INVOKESPECIAL,
    "java/lang/Object",
    "",
    "()V");
    mv.visitInsn(RETURN);
    mv.visitMaxs(1, 1);
    mv.visitEnd();
    }
    {
    mv = cw.visitMethod(ACC_PUBLIC + ACC_STATIC,
    "main",
    "([Ljava/lang/String;)V",
    null,
    null);
    mv.visitFieldInsn(GETSTATIC,
    "java/lang/System",
    "out",
    "Ljava/io/PrintStream;");
    mv.visitLdcInsn("Hello World");
    mv.visitMethodInsn(INVOKEVIRTUAL,
    "java/io/PrintStream",
    "println",
    "(Ljava/lang/String;)V");
    mv.visitInsn(RETURN);
    mv.visitMaxs(2, 1);
    mv.visitEnd();
    }
    cw.visitEnd();
    return cw.toByteArray();
    }
    }
    Hello World in ASM

    View full-size slide

  157. @holly_cummins @hannotify #RedHat #InfoSupport
    mv.visitInsn(ICONST_1)
    ASM has never made sense to me -
    here “visit” means “create” (obviously?)

    View full-size slide

  158. @holly_cummins @hannotify #RedHat #InfoSupport
    Gizmo
    a humanising layer on top of ASM

    View full-size slide

  159. @holly_cummins @hannotify #RedHat #InfoSupport
    Step 2. Write a Quarkus extension.

    View full-size slide

  160. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  161. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  162. demo
    @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    Compiling with Quarkus

    View full-size slide

  163. @holly_cummins @hannotify #RedHat #InfoSupport
    Yes, we did TDD with Rockstar.

    View full-size slide

  164. @holly_cummins @hannotify #RedHat #InfoSupport
    How do you write a Rockstar program?

    View full-size slide

  165. @holly_cummins @hannotify #RedHat #InfoSupport
    How do you write a Rockstar program?
    Red, Green, Refactor

    View full-size slide

  166. learning
    @holly_cummins @hannotify #RedHat #InfoSupport
    Quarkus extensions can be
    created easily, but adding
    support for an alternate
    language seems to be
    a rare use case

    View full-size slide

  167. @holly_cummins @hannotify #RedHat #InfoSupport
    Quarkus is a different way of building Java
    https://matheuscruz.dev/2024/01/12/developing-a-quarkus-extension/

    View full-size slide

  168. @holly_cummins @hannotify #RedHat #InfoSupport
    Quarkus is a different way of building Java
    It is both a framework and a build time augmentation toolkit.
    https://matheuscruz.dev/2024/01/12/developing-a-quarkus-extension/

    View full-size slide

  169. @holly_cummins @hannotify #RedHat #InfoSupport
    Quarkus is a different way of building Java
    It is both a framework and a build time augmentation toolkit.
    https://matheuscruz.dev/2024/01/12/developing-a-quarkus-extension/
    It focuses on developer experience and extensibility.

    View full-size slide

  170. @holly_cummins @hannotify #RedHat #InfoSupport
    Extensions exist to seamlessly integrate libraries into
    Quarkus’ architecture

    View full-size slide

  171. @holly_cummins @hannotify #RedHat #InfoSupport
    Extensions exist to seamlessly integrate libraries into
    Quarkus’ architecture
    Which basically means “do more things at build time”.

    View full-size slide

  172. @holly_cummins @hannotify #RedHat #InfoSupport
    Extensions exist to seamlessly integrate libraries into
    Quarkus’ architecture
    Which basically means “do more things at build time”.
    And there’s more!

    View full-size slide

  173. @holly_cummins @hannotify #RedHat #InfoSupport
    Writing a Quarkus extension is fairly
    straightforward
    https://quarkus.io/guides/building-my-first-extension

    View full-size slide

  174. @holly_cummins @hannotify #RedHat #InfoSupport
    Writing a Quarkus extension is fairly
    straightforward
    You can follow the “Building my first extension” guide.
    https://quarkus.io/guides/building-my-first-extension

    View full-size slide

  175. @holly_cummins @hannotify #RedHat #InfoSupport
    A Quarkus extension consists of two parts
    https://quarkus.io/guides/building-my-first-extension

    View full-size slide

  176. @holly_cummins @hannotify #RedHat #InfoSupport
    A Quarkus extension consists of two parts
    The runtime module, representing the capabilities
    that are exposed to the application’s developer.
    https://quarkus.io/guides/building-my-first-extension

    View full-size slide

  177. @holly_cummins @hannotify #RedHat #InfoSupport
    A Quarkus extension consists of two parts
    The runtime module, representing the capabilities
    that are exposed to the application’s developer.
    https://quarkus.io/guides/building-my-first-extension
    The deployment module, applying all Quarkus optimisations
    during the build, by describing capabilities as build items.

    View full-size slide

  178. @holly_cummins @hannotify #RedHat #InfoSupport
    So, let’s write an extension that compiles Rockstar programs to
    bytecode. Sounds easy enough, right?

    View full-size slide

  179. @holly_cummins @hannotify #RedHat #InfoSupport
    Let’s stand on the shoulders of giants.
    And draw inspiration from the existing support for Kotlin, Groovy & Scala.

    View full-size slide

  180. @holly_cummins @hannotify #RedHat #InfoSupport
    Let’s stand on the shoulders of giants.
    https://quarkus.io/extensions/io.quarkus/quarkus-kotlin
    And draw inspiration from the existing support for Kotlin, Groovy & Scala.

    View full-size slide

  181. @holly_cummins @hannotify #RedHat #InfoSupport
    Let’s stand on the shoulders of giants.
    https://quarkus.io/extensions/io.quarkus/quarkus-kotlin
    And draw inspiration from the existing support for Kotlin, Groovy & Scala.
    https://quarkus.io/extensions/io.quarkus/quarkus-groovy

    View full-size slide

  182. @holly_cummins @hannotify #RedHat #InfoSupport
    Let’s stand on the shoulders of giants.
    https://quarkus.io/extensions/io.quarkus/quarkus-kotlin
    And draw inspiration from the existing support for Kotlin, Groovy & Scala.
    https://quarkus.io/extensions/io.quarkus/quarkus-groovy
    https://quarkus.io/extensions/io.quarkus/quarkus-scala

    View full-size slide

  183. @holly_cummins @hannotify #RedHat #InfoSupport
    public interface CompilationProvider extends
    Closeable {
    Set handledExtensions();
    void compile(Set files, Context context);
    }

    View full-size slide

  184. demo
    @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    DEV UI

    View full-size slide

  185. @holly_cummins @hannotify #RedHat #InfoSupport
    Step 3. Solve problems with Rockstar.

    View full-size slide

  186. learning
    @holly_cummins @hannotify #RedHat #InfoSupport
    Programming is hard;
    trying to rhyme makes
    it harder

    View full-size slide

  187. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?

    View full-size slide

  188. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?
    Hanno:
    Hi, can you create a Rockstar program that demonstrates conditionals? And can you make it rhyme?

    View full-size slide

  189. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?
    Hanno:
    Hi, can you create a Rockstar program that demonstrates conditionals? And can you make it rhyme?
    ChatGPT:
    Sure, I can help you create a Rockstar program that rhymes and uses conditionals. Here it is.

    View full-size slide

  190. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?
    Hanno:
    Hi, can you create a Rockstar program that demonstrates conditionals? And can you make it rhyme?
    ChatGPT:
    Sure, I can help you create a Rockstar program that rhymes and uses conditionals. Here it is.

    Hanno:
    That program doesn’t rhyme.

    View full-size slide

  191. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?
    Hanno:
    Hi, can you create a Rockstar program that demonstrates conditionals? And can you make it rhyme?
    ChatGPT:
    Sure, I can help you create a Rockstar program that rhymes and uses conditionals. Here it is.

    Hanno:
    That program doesn’t rhyme.
    ChatGPT:
    My apologies for that oversight. Let me provide you with a corrected Rockstar program.

    View full-size slide

  192. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?
    Hanno:
    Hi, can you create a Rockstar program that demonstrates conditionals? And can you make it rhyme?
    ChatGPT:
    Sure, I can help you create a Rockstar program that rhymes and uses conditionals. Here it is.

    Hanno:
    That program doesn’t rhyme.
    ChatGPT:
    My apologies for that oversight. Let me provide you with a corrected Rockstar program.

    Hanno:
    Nice rhyming, but that program doesn’t compile!

    View full-size slide

  193. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?
    Hanno:
    Hi, can you create a Rockstar program that demonstrates conditionals? And can you make it rhyme?
    ChatGPT:
    Sure, I can help you create a Rockstar program that rhymes and uses conditionals. Here it is.

    Hanno:
    That program doesn’t rhyme.
    ChatGPT:
    My apologies for that oversight. Let me provide you with a corrected Rockstar program.

    Hanno:
    Nice rhyming, but that program doesn’t compile!
    ChatGPT:
    I appreciate your patience, apologies. Let me provide you with a corrected Rockstar program.

    View full-size slide

  194. learning
    @holly_cummins @hannotify #RedHat #InfoSupport
    AI isn’t taking our jobs just yet.

    View full-size slide

  195. @holly_cummins @hannotify #RedHat #InfoSupport
    Can AI help?

    View full-size slide

  196. @holly_cummins @hannotify #RedHat #InfoSupport
    AI is not very good at inventing interesting esoteric languages.

    View full-size slide

  197. @holly_cummins @hannotify #RedHat #InfoSupport
    AI is not very good at writing Antlr
    grammars for complex things.

    View full-size slide

  198. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  199. @holly_cummins @hannotify #RedHat #InfoSupport
    Step 4. Debugging.

    View full-size slide

  200. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  201. demo
    @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    1 Billion Row Challenge

    View full-size slide

  202. @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    (Steps: parse the file into rows, aggregate into towns, go through each town and aggregate, print output)
    (Utility function for rounding to one decimal place)
    doRound takes num
    let num be num * 10
    turn round num
    let num be num / 10
    return num
    (Step 1: Read lines from stdin and put them into a lines array)
    push lines (initialise the array)
    listen to stdin (listen to the input, which we choose to call stdin)
    while stdin
    push stdin into lines
    listen to stdin
    (Step 2: Sort the lines into an array of results for each station)
    push stations (initialise the array)
    push stationList (initialise the array outside the while scope)
    delimiter is ";"
    let line be pop lines
    while line
    split line into segments with delimiter
    let stationName be segments at 0
    let stationResults be stations at stationName
    if not stationResults
    push stationName into stationList (we only do this if first time we have seen this station)
    let temperature be segments at 1
    push temperature into stationResults (this always leaves us with a mysterious at element 0, and I don't know why)
    let stations at stationName be stationResults
    pop lines into line
    (Now sort the station names, using a bubble sort)
    i is 0
    let length be stationList (using an array in a scalar context gives its length)
    while i is less than length
    j is 0
    let maxj be length minus i
    while j is less than maxj
    let aa be stationList at j
    let bb be stationList at j + 1
    if aa is greater than bb
    let stationList at j be bb
    let stationList at j + 1 be aa
    build j up
    build i up
    (Now go through each station and aggregate the array; we cannot use a function very easily to iterate because pop removes elements)
    let name be pop stationList (we cannot iterate over the array of results since it is most like a map, with non-numeric indexes, so we iterate over the array of names)
    let results be "{"
    while name
    let readings be stations at name
    total is 0
    min is 300000
    max is -300000
    pop readings into temperature
    pop readings into temperature (do it again because there is a leading mysterious)
    count is 0
    while temperature
    cast temperature
    build count up
    if temperature is less than min
    let min be temperature
    if temperature is greater than max
    let max be temperature
    let total be total + temperature
    pop readings into temperature
    if count is greater than 0
    let mean be total over count
    let roundedMean be doRound taking mean
    let formatted be min + "/" + roundedMean + "/" + max
    let results be results plus name, "=" plus formatted
    if stationList at 0 (if this is not the last entry)
    let results be results plus ", "
    let name be pop stationList
    let results be results plus "}"
    #1BRC

    View full-size slide

  203. @holly_cummins @hannotify #RedHat #InfoSupport
    “We’re halfway there!
    [with billion row challenge]”

    View full-size slide

  204. @holly_cummins @hannotify #RedHat #InfoSupport
    “We’re halfway there!
    [with billion row challenge]”
    “I’m really-really halfway there!
    Working real soon now!

    View full-size slide

  205. learning
    @holly_cummins @hannotify #RedHat #InfoSupport
    Engineers are terrible at estimation.

    View full-size slide

  206. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  207. @holly_cummins @hannotify #RedHat #InfoSupport
    “Holly, this happens every time.
    Why didn’t you learn from the last
    demo you took on?”
    -Holly’s husband

    View full-size slide

  208. @holly_cummins @hannotify #RedHat #InfoSupport
    “Hanno, ben je nou nog
    steeds bezig? Je zou toch niet
    meer werken in het weekend?”
    -Hanno’s wife

    View full-size slide

  209. demo
    @holly_cummins @hannotify #RedHat #InfoSupport
    ((Livin’ on A Prayer)
    the final demo
    Implementation based on one by Martijn Zuidweg

    View full-size slide

  210. @holly_cummins @hannotify #RedHat #InfoSupport
    What good was any of this?

    View full-size slide

  211. @holly_cummins @hannotify #RedHat #InfoSupport
    • Interoperability with other JVM languages
    • Leverage existing JVM libraries, such as
    Apache utils and lang4j
    • Your code can be set to music

    View full-size slide

  212. @holly_cummins @hannotify #RedHat #InfoSupport
    Play is valuable.

    View full-size slide

  213. @holly_cummins @hannotify #RedHat #InfoSupport
    Happiness
    increases
    productivity
    https:/
    /hbr.org/2012/01/positive-intelligence

    View full-size slide

  214. @holly_cummins @hannotify #RedHat #InfoSupport
    Happiness
    increases
    productivity
    “Your brain at positive is
    31% more productive than
    your brain at negative,
    neutral or stressed. "
    https:/
    /hbr.org/2012/01/positive-intelligence

    View full-size slide

  215. @holly_cummins @hannotify #RedHat #InfoSupport
    Play increases productivity
    https://www2.warwick.ac.uk/fac/soc/economics/staff/eproto/
    workingpapers/happinessproductivity.pdf

    View full-size slide

  216. @holly_cummins @hannotify #RedHat #InfoSupport
    Play increases productivity
    "Individuals [who just watched a
    comedy video] have approximately
    12%
    greater productivity."
    https://www2.warwick.ac.uk/fac/soc/economics/staff/eproto/
    workingpapers/happinessproductivity.pdf

    View full-size slide

  217. @holly_cummins @hannotify #RedHat #InfoSupport
    Play turns into practicality.

    View full-size slide

  218. @holly_cummins @hannotify #RedHat #InfoSupport

    View full-size slide

  219. @holly_cummins @hannotify #RedHat #InfoSupport
    Recap:
    How to run anything
    on Quarkus
    1. Write a JVM Language
    1. Write an Antlr grammar
    2. Generate bytecode
    2. Write a Quarkus extension
    3. Write your programs
    4. Find all the coding mistakes you
    made

    View full-size slide

  220. @holly_cummins @hannotify #RedHat #InfoSupport
    … and what
    you’ll learn
    1. Antlr is really useful
    2. Friends don’t let friends use ASM
    3. Holly should work harder on the
    Quarkus extension documentation
    4. Making code rhyme is hard
    5. LLMs cannot answer all questions.
    6. Engineers are terrible at estimation

    View full-size slide

  221. @holly_cummins @hannotify #RedHat #InfoSupport
    🤘
    slides
    https://hollycummins.com/rockstar-jfokus/
    We got there!

    View full-size slide