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. @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.
  2. @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.
  3. @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.
  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. 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.
  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. 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.
  6. the creation story of Rockstar Images: DALL-E Wouldn’t it be

    fun to write a spec for a language called Rockstar? Dylan Beattie
  7. 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
  8. 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
  9. 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
  10. @holly_cummins @hannotify #RedHat #InfoSupport Thanks to Dylan, you can become

    a certified rockstar developer Image: Dylan Beattie
  11. @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:
  12. @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
  13. @holly_cummins @hannotify #RedHat #InfoSupport What shall we call it? Naming

    things is the hardest problem in computer science.
  14. @holly_cummins @hannotify #RedHat #InfoSupport Can AI help? 1. The Brew

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

    Fighters (The Foo Fighters) 2. Cream Roasters (Cream) 3. Java Leppard (Def Leppard)
  16. @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)
  17. @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)
  18. @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)
  19. @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)
  20. @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)
  21. @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)
  22. @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)
  23. @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)
  24. @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. …
  25. @holly_cummins @hannotify #RedHat #InfoSupport ((Livin’ on A Prayer) (This program

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

    literals Christine says hello world Initialises Christine with “hello world”, no quotes needed
  27. @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
  28. @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
  29. @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
  30. @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
  31. @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”
  32. @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”
  33. @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
  34. @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
  35. @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
  36. @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
  37. @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
  38. @holly_cummins @hannotify #RedHat #InfoSupport Live-coding Native compilation Less boilerplate, more

    action Rockstar developers are not into that whole brevity thing. Quarkus rocks
  39. @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
  40. @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
  41. @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
  42. @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
  43. @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
  44. @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
  45. @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
  46. @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
  47. @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
  48. @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
  49. @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
  50. @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
  51. @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
  52. @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
  53. @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
  54. @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
  55. @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
  56. @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
  57. @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
  58. @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
  59. @holly_cummins @hannotify #RedHat #InfoSupport If the document is a story…

    Fragments are like letters. Tokens are like words.
  60. @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.
  61. @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.
  62. @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;
  63. @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
  64. @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
  65. @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
  66. @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
  67. @holly_cummins @hannotify #RedHat #InfoSupport @Override public void enterProgram(Rockstar.ProgramContext ctx) {

    public class BytecodeGenerator extends RockstarBaseListener { Antlr generates this interface
  68. @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
  69. @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
  70. @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
  71. @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, "<init>", "()V", null, null); mv.visitVarInsn(ALOAD, 0); mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V"); mv.visitInsn(RETURN); mv.visitMaxs(1, 1); mv.visitEnd(); } { … Hello World in ASM
  72. @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, "<init>", "()V", null, null); mv.visitVarInsn(ALOAD, 0); mv.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()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
  73. 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
  74. @holly_cummins @hannotify #RedHat #InfoSupport Quarkus is a different way of

    building Java https://matheuscruz.dev/2024/01/12/developing-a-quarkus-extension/
  75. @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/
  76. @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.
  77. @holly_cummins @hannotify #RedHat #InfoSupport Extensions exist to seamlessly integrate libraries

    into Quarkus’ architecture Which basically means “do more things at build time”.
  78. @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!
  79. @holly_cummins @hannotify #RedHat #InfoSupport Writing a Quarkus extension is fairly

    straightforward https://quarkus.io/guides/building-my-first-extension
  80. @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
  81. @holly_cummins @hannotify #RedHat #InfoSupport A Quarkus extension consists of two

    parts https://quarkus.io/guides/building-my-first-extension
  82. @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
  83. @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.
  84. @holly_cummins @hannotify #RedHat #InfoSupport So, let’s write an extension that

    compiles Rockstar programs to bytecode. Sounds easy enough, right?
  85. @holly_cummins @hannotify #RedHat #InfoSupport Let’s stand on the shoulders of

    giants. And draw inspiration from the existing support for Kotlin, Groovy & Scala.
  86. @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.
  87. @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
  88. @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
  89. @holly_cummins @hannotify #RedHat #InfoSupport public interface CompilationProvider extends Closeable {

    Set<String> handledExtensions(); void compile(Set<File> files, Context context); }
  90. @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?
  91. @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. <program that doesn’t even rhyme>
  92. @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. <program that doesn’t even rhyme> Hanno: That program doesn’t rhyme.
  93. @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. <program that doesn’t even rhyme> Hanno: That program doesn’t rhyme. ChatGPT: My apologies for that oversight. Let me provide you with a corrected Rockstar program. <program that rhymes but doesn’t compile>
  94. @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. <program that doesn’t even rhyme> Hanno: That program doesn’t rhyme. ChatGPT: My apologies for that oversight. Let me provide you with a corrected Rockstar program. <program that rhymes but doesn’t compile> Hanno: Nice rhyming, but that program doesn’t compile!
  95. @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. <program that doesn’t even rhyme> Hanno: That program doesn’t rhyme. ChatGPT: My apologies for that oversight. Let me provide you with a corrected Rockstar program. <program that rhymes but doesn’t compile> Hanno: Nice rhyming, but that program doesn’t compile! ChatGPT: I appreciate your patience, apologies. Let me provide you with a corrected Rockstar program. <program that rhymes but still doesn’t compile>
  96. @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
  97. @holly_cummins @hannotify #RedHat #InfoSupport “We’re halfway there! [with billion row

    challenge]” “I’m really-really halfway there! Working real soon now!
  98. @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
  99. @holly_cummins @hannotify #RedHat #InfoSupport “Hanno, ben je nou nog steeds

    bezig? Je zou toch niet meer werken in het weekend?” -Hanno’s wife
  100. demo @holly_cummins @hannotify #RedHat #InfoSupport ((Livin’ on A Prayer) the

    final demo Implementation based on one by Martijn Zuidweg
  101. @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
  102. @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
  103. @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
  104. @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
  105. @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