Learn Groovy by implementing a Brainf**k interpreter! | Groovy Tutorial

Опубликовано: 19 Май 2020
на канале: Szymon Stepniak
2,062
80

Learn how to implement Brainf**k interpreter in Groovy ■ Groovy Tutorial ■ #groovylang

In this Groovy tutorial, I explain what the Brainfuck esoteric programming language is, how the program written in it gets interpreted, and how to write your own interpreter using Groovy, tail-recursive approach, and immutable data structures. I use a simple Gradle project with Groovy 3.0.3 and Spock Framework 2.0.M2 for unit tests. The test cases are already written, so I'm going to do something almost like test-driven development (TDD), where the unit tests are written first. I hope you will find it entertaining and useful :-)

⏱️ TIMESTAMPS:
------------------------------------------------------------
00:00 | Introduction
00:46 | Explaining Brainfuck syntax by example
04:19 | Starting implementing the interpreter
05:12 | Defining "step" recursive method
08:07 | Defining the termination condition of the step method
09:06 | Implementing "." instruction
10:46 | Implementing "+" instruction
14:08 | Implementing "-" instruction
15:08 | Implementing data pointer increment instruction
15:45 | Implementing data pointer decrement instruction
16:32 | Fixing unsigned byte overflow
18:56 | Implementing "," instruction
21:38 | Implementing "[" and "]" instructions
26:44 | Applying @TailRecursive optimization
29:13 | Analyzing the bytecode of @TailRecursvie method
31:04 | Running the interpreter as a Java program
32:27 | End screen

➡️ Get the source code from Github
https://github.com/wololock/groovy-br...

📺 WATCH NEXT:
Groovy DSL Quickstart »    • Groovy DSL scripts in 20 minutes for ...  

☕️ BUY ME A COFFEE (thanks in advance! 😀)
https://e.printstacktrace.blog/buy-me...

📧 JOIN MY NEWSLETTER
https://e.printstacktrace.blog/newsle...

🔥 MORE GROOVY TUTORIAL VIDEOS & RESOURCES:
------------------------------------------------------------
• Learn Groovy DSL in 20 minutes »    • Groovy DSL scripts in 20 minutes for ...  
• Groovy + GraalVM »    • Speed Up Groovy Script Execution 20x ...  
• Groovy Brainf**k Interpreter »    • Learn Groovy by implementing a Brainf...  
• Groovy Tutorial Playlist »    • Groovy Tutorial  
• Groovy Programmer Learning Kit » https://kit.co/wololock/groovy-progra...
• Groovy Cookbook blog posts series » https://e.printstacktrace.blog/groovy...

📷 CAMERA GEAR I USE:
------------------------------------------------------------
• My camera » https://e.printstacktrace.blog/gear/c...
• 25mm f1.7 lens » https://e.printstacktrace.blog/gear/l...
• Microphone » https://e.printstacktrace.blog/gear/m...
• LED lights » https://e.printstacktrace.blog/gear/l...
• Check my full kit » https://kit.co/wololock/my-youtube-st...

🛠️ TOOLS & SERVICES I USE TO:
------------------------------------------------------------
• design YouTube thumbnails (Canva) » https://e.printstacktrace.blog/canva?...
• improve my grammar skills (Grammarly) » https://e.printstacktrace.blog/gramma...
• develop mailing list (ConvertKit) » https://e.printstacktrace.blog/conver...
• listen to audiobooks (Audible, 30 days free trial) » https://e.printstacktrace.blog/audibl...
• read Kindle ebooks (Kindle Unlimited) » https://e.printstacktrace.blog/kindle...
• secure network connection with VPN (NordVPN) » https://e.printstacktrace.blog/nordvp...
• improve SEO on YouTube (VidIQ) » https://e.printstacktrace.blog/vidiq?...
• host WordPress websites (Bluehost) » https://e.printstacktrace.blog/blueho...

❤️ SUPPORT MY WORK
------------------------------------------------------------
• Github Sponsors » https://github.com/sponsors/wololock
• Open Collective » https://opencollective.com/eprintstac...
• Other options » https://e.printstacktrace.blog/suppor...

👋 STAY IN TOUCH:
------------------------------------------------------------
• Blog » https://e.printstacktrace.blog
• Twitter »   / wololock  
• LinkedIn »   / szymon-st%c4%99pniak-9a0b1630  
• Github » https://github.com/wololock

✉️ CONTACT:
For all subscribers, please use this email: [email protected]
For business inquires only, please use this email: [email protected]

DISCLAIMER: Some of the links above are affiliate links. If you decide to click that link and subsequently make a purchase, I will get a small percentage from your purchase. Using the affiliate link does not affect the final price of the product. The commission I earn comes at no additional cost to you. Thank you for supporting my channel so I can continue to provide you with free content on a regular basis!

And remember - it's all about helping YOU to become a better software developer! Thanks!

#eprintstacktrace #szymonstepniak


Смотрите видео Learn Groovy by implementing a Brainf**k interpreter! | Groovy Tutorial онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Szymon Stepniak 19 Май 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 2,062 раз и оно понравилось 80 людям.