We look at 8 different solutions to Exercism's Pig Latin exercise - exploring solutions using different approaches to pattern matching and regular expressions in Go, Kotlin, Scala, Prolog, AWK, JavaScript, C#. and Python
Kick back and enjoy 30mins of learning with Jeremy and Erik, then go solve the exercise in your favourite way on Exercism.
Solve the exercise at: https://exercism.org/exercises/pig-latin
Join #48in24 at: https://exercism.org/challenges/48in24
Featured solutions:
https://exercism.org/tracks/go/exerci...
https://exercism.org/tracks/kotlin/ex...
https://exercism.org/tracks/scala/exe...
https://exercism.org/tracks/prolog/ex...
https://exercism.org/tracks/awk/exerc...
https://exercism.org/tracks/awk/exerc...
https://exercism.org/tracks/javascrip...
https://exercism.org/tracks/python/ex...
Timestamps:
00:00:00 Introduction
00:01:13 Go: for loops and maps
00:09:43 Kotlin: rotate using special cases
00:18:57 Scala: rotate using pattern matching
00:23:30 Prolog: define relations and use unification
00:33:22 AWK: regex matches
00:37:27 JS: regex matches using pig latinified functions
00:40:43 C#: conditional regex replace
00:47:31 Python: single regex replace
00:44:37 Conclusion