News for hackers. Stuff that matters.
Re:TDD from the Factorio Team by oats on Friday June 18, 2021 @09:44AM (#27550205)
Is this not almost how logic programming (prolog, etc.) works? You tell the language some things which are true, and then it'll be able to infer answers to "questions" you ask:

https://wiki.c2.com/?LogicProgramming

Re:TDD from the Factorio Team by victorNicollet on Friday June 18, 2021 @11:32AM (#27551416)
Let's say we work on the "reverse list" function. A few tests I could write are that the following clauses are true:

    rev([1], [1])
    rev([1, 2, 3], [3, 2, 1])
And maybe also that the following clauses are false:

    rev([1, 2], [1, 2])
    rev([], [1])
    rev([1, 1], [1])
Is Prolog able to infer, from the above, that rev([4, 5], [5, 4]) ? Or to synthesize the general form rev([H|T],R) :- rev(T, RT), concat(RT,[H],R) ?
Re:TDD from the Factorio Team by ffhhj on Friday June 18, 2021 @04:26PM (#27554611)
Sounds like NN training that could be achievable. The problem comes with unit testing, because the minimal testable unit could be more complex than a function.
Re:TDD from the Factorio Team by iamwil on Friday June 18, 2021 @11:31AM (#27551404)
Yeah. I've often seen TDD where you act both as the logic programmer writing the tests and the imperative programmer writing the implementation.
Re:TDD from the Factorio Team by JohnHaugeland on Friday June 18, 2021 @09:46AM (#27550233)
No. Not even a little bit.
Re:TDD from the Factorio Team by oats on Friday June 18, 2021 @10:24AM (#27550644)
Could... could you enlighten me please?