Logic Programming in Go - Walter Schulze

Discover the ins and outs of building a logic programming language in Go, from unification to concurrency, and explore its applications in math, video games, and more.

Key takeaways
  • Logic Programming in Go: Walter Schulze’s talk on building a logic programming language in Go, starting from scratch.
  • Unification Algorithm: Unification is used to match logic expressions, allowing variables to be replaced with values.
  • Go Routine Chaos: concurrency can lead to chaos when dealing with too many go routines, as seen in the example.
  • Logic Programming is not just for Erlang and Prolog: Logic programming has applications beyond Erlang and Prolog, and can be used in math and even video games.
  • Conjo: Conjo is a monadic bind operation in the logic programming language, allowing for easy creation and composition of logic expressions.
  • Exist-O: Exist-O is used to denote the existence of a variable or value.
  • Con-CAT: Con-CAT is a function that takes two variables and returns a new variable representing the concatenation of the two original variables.
  • Regular Expressions: Regular expressions can be used as a query to match strings in the logic programming language.
  • Naughty Variables: Naughty variables allow for the creation of multiple values for a single variable.
  • State Management: State management is a key concept in logic programming, where variables can have multiple values and must be managed through unification.
  • Deep Equal Function: A deep equal function can be written using the logic programming language, allowing for the comparison of complex data structures.
  • Efficient Code Rewriting: Efficient code rewriting is a key concept in logic programming, allowing for the efficient creation and combination of logic expressions.
  • Concurrency in Go: Concurrency can be used in Go to parallelize tasks and improve performance.