Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

@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.

Slide 4

Slide 4 text

@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.

Slide 5

Slide 5 text

@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.

Slide 6

Slide 6 text

@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.

Slide 7

Slide 7 text

@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.

Slide 8

Slide 8 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 9

Slide 9 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

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

Slide 15

Slide 15 text

No content

Slide 16

Slide 16 text

Developers turn coffee into code …

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

@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:

Slide 22

Slide 22 text

@holly_cummins @hannotify #RedHat #InfoSupport Existing Rockstar implementations

Slide 23

Slide 23 text

@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

Slide 24

Slide 24 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

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

Slide 27

Slide 27 text

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

Slide 28

Slide 28 text

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

Slide 29

Slide 29 text

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

Slide 30

Slide 30 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 31

Slide 31 text

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

Slide 32

Slide 32 text

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

Slide 33

Slide 33 text

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

Slide 34

Slide 34 text

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

Slide 35

Slide 35 text

@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)

Slide 36

Slide 36 text

@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)

Slide 37

Slide 37 text

@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)

Slide 38

Slide 38 text

@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)

Slide 39

Slide 39 text

@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)

Slide 40

Slide 40 text

@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)

Slide 41

Slide 41 text

@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)

Slide 42

Slide 42 text

@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)

Slide 43

Slide 43 text

@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. …

Slide 44

Slide 44 text

@holly_cummins @hannotify #RedHat #InfoSupport RockStarBucks?

Slide 45

Slide 45 text

@holly_cummins @hannotify #RedHat #InfoSupport JEP Leppard?

Slide 46

Slide 46 text

@holly_cummins @hannotify #RedHat #InfoSupport Bon Jova.

Slide 47

Slide 47 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 48

Slide 48 text

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

Slide 49

Slide 49 text

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

Slide 50

Slide 50 text

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

Slide 51

Slide 51 text

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

Slide 52

Slide 52 text

@holly_cummins @hannotify #RedHat #InfoSupport syntax

Slide 53

Slide 53 text

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

Slide 54

Slide 54 text

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

Slide 55

Slide 55 text

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

Slide 56

Slide 56 text

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

Slide 57

Slide 57 text

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

Slide 58

Slide 58 text

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

Slide 59

Slide 59 text

@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

Slide 60

Slide 60 text

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

Slide 61

Slide 61 text

@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

Slide 62

Slide 62 text

@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

Slide 63

Slide 63 text

@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

Slide 64

Slide 64 text

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

Slide 65

Slide 65 text

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

Slide 66

Slide 66 text

@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”

Slide 67

Slide 67 text

@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”

Slide 68

Slide 68 text

@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

Slide 69

Slide 69 text

@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

Slide 70

Slide 70 text

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

Slide 71

Slide 71 text

@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

Slide 72

Slide 72 text

@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

Slide 73

Slide 73 text

@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

Slide 74

Slide 74 text

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

Slide 75

Slide 75 text

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

Slide 76

Slide 76 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 77

Slide 77 text

@holly_cummins @hannotify #RedHat #InfoSupport Why Quarkus?

Slide 78

Slide 78 text

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

Slide 79

Slide 79 text

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

Slide 80

Slide 80 text

@holly_cummins @hannotify #RedHat #InfoSupport Quarkus rocks.

Slide 81

Slide 81 text

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

Slide 82

Slide 82 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 83

Slide 83 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 84

Slide 84 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 85

Slide 85 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 86

Slide 86 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 87

Slide 87 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 88

Slide 88 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 89

Slide 89 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 90

Slide 90 text

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

Slide 91

Slide 91 text

@holly_cummins @hannotify #RedHat #InfoSupport Quarkus rocks

Slide 92

Slide 92 text

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

Slide 93

Slide 93 text

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

Slide 94

Slide 94 text

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

Slide 95

Slide 95 text

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

Slide 96

Slide 96 text

@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

Slide 97

Slide 97 text

@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

Slide 98

Slide 98 text

@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

Slide 99

Slide 99 text

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

Slide 100

Slide 100 text

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

Slide 101

Slide 101 text

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

Slide 102

Slide 102 text

@holly_cummins @hannotify #RedHat #InfoSupport Generating a grammar

Slide 103

Slide 103 text

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

Slide 104

Slide 104 text

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

Slide 105

Slide 105 text

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

Slide 106

Slide 106 text

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

Slide 107

Slide 107 text

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

Slide 108

Slide 108 text

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

Slide 109

Slide 109 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 110

Slide 110 text

@holly_cummins @hannotify #RedHat #InfoSupport document

Slide 111

Slide 111 text

@holly_cummins @hannotify #RedHat #InfoSupport document

Slide 112

Slide 112 text

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

Slide 113

Slide 113 text

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

Slide 114

Slide 114 text

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

Slide 115

Slide 115 text

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

Slide 116

Slide 116 text

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

Slide 117

Slide 117 text

@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

Slide 118

Slide 118 text

@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

Slide 119

Slide 119 text

@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

Slide 120

Slide 120 text

@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

Slide 121

Slide 121 text

@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

Slide 122

Slide 122 text

@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

Slide 123

Slide 123 text

@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

Slide 124

Slide 124 text

@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

Slide 125

Slide 125 text

@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

Slide 126

Slide 126 text

@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

Slide 127

Slide 127 text

@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

Slide 128

Slide 128 text

@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

Slide 129

Slide 129 text

@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

Slide 130

Slide 130 text

@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

Slide 131

Slide 131 text

@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

Slide 132

Slide 132 text

@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

Slide 133

Slide 133 text

@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

Slide 134

Slide 134 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 135

Slide 135 text

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

Slide 136

Slide 136 text

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

Slide 137

Slide 137 text

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

Slide 138

Slide 138 text

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

Slide 139

Slide 139 text

@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.

Slide 140

Slide 140 text

@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.

Slide 141

Slide 141 text

@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;

Slide 142

Slide 142 text

@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

Slide 143

Slide 143 text

@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

Slide 144

Slide 144 text

@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

Slide 145

Slide 145 text

@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

Slide 146

Slide 146 text

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

Slide 147

Slide 147 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 148

Slide 148 text

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

Slide 149

Slide 149 text

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

Slide 150

Slide 150 text

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

Slide 151

Slide 151 text

@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

Slide 152

Slide 152 text

@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

Slide 153

Slide 153 text

@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

Slide 154

Slide 154 text

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

Slide 155

Slide 155 text

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

Slide 156

Slide 156 text

@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

Slide 157

Slide 157 text

@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

Slide 158

Slide 158 text

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

Slide 159

Slide 159 text

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

Slide 160

Slide 160 text

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

Slide 161

Slide 161 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 162

Slide 162 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 163

Slide 163 text

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

Slide 164

Slide 164 text

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

Slide 165

Slide 165 text

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

Slide 166

Slide 166 text

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

Slide 167

Slide 167 text

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

Slide 168

Slide 168 text

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

Slide 169

Slide 169 text

@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/

Slide 170

Slide 170 text

@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.

Slide 171

Slide 171 text

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

Slide 172

Slide 172 text

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

Slide 173

Slide 173 text

@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!

Slide 174

Slide 174 text

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

Slide 175

Slide 175 text

@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

Slide 176

Slide 176 text

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

Slide 177

Slide 177 text

@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

Slide 178

Slide 178 text

@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.

Slide 179

Slide 179 text

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

Slide 180

Slide 180 text

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

Slide 181

Slide 181 text

@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.

Slide 182

Slide 182 text

@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

Slide 183

Slide 183 text

@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

Slide 184

Slide 184 text

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

Slide 185

Slide 185 text

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

Slide 186

Slide 186 text

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

Slide 187

Slide 187 text

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

Slide 188

Slide 188 text

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

Slide 189

Slide 189 text

@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?

Slide 190

Slide 190 text

@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.

Slide 191

Slide 191 text

@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.

Slide 192

Slide 192 text

@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.

Slide 193

Slide 193 text

@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!

Slide 194

Slide 194 text

@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.

Slide 195

Slide 195 text

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

Slide 196

Slide 196 text

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

Slide 197

Slide 197 text

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

Slide 198

Slide 198 text

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

Slide 199

Slide 199 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 200

Slide 200 text

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

Slide 201

Slide 201 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 202

Slide 202 text

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

Slide 203

Slide 203 text

@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

Slide 204

Slide 204 text

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

Slide 205

Slide 205 text

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

Slide 206

Slide 206 text

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

Slide 207

Slide 207 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 208

Slide 208 text

@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

Slide 209

Slide 209 text

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

Slide 210

Slide 210 text

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

Slide 211

Slide 211 text

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

Slide 212

Slide 212 text

@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

Slide 213

Slide 213 text

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

Slide 214

Slide 214 text

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

Slide 215

Slide 215 text

@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

Slide 216

Slide 216 text

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

Slide 217

Slide 217 text

@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

Slide 218

Slide 218 text

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

Slide 219

Slide 219 text

@holly_cummins @hannotify #RedHat #InfoSupport

Slide 220

Slide 220 text

@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

Slide 221

Slide 221 text

@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

Slide 222

Slide 222 text

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