« first day (1365 days earlier)      last day (901 days later) » 

5:36 PM
Anyone know what's up with this? (for codegolf.stackexchange.com/questions/90042/…)
 
 
5 hours later…
10:07 PM
I've only been at this since yesterday, but Brachylog seems inconsistent with how much it returns for 'all possibilities'. To be fair, so is Prolog.
 
By all possibilities, you mean ? I think it just finds the result of every possible choice, within the normal Prolog framework of choice points, so if the issue is with CLP(FD) then... yeah
...on a probably related topic, I thought I had a different way to golf it down but it times out on TIO, and when I try to run it locally it gives me infinite zeroes, so I hope it's because somehow one of the small changes I have locally messes it up and not because it's broken entirely by virtue of being run locally
 
I'm having trouble understanding the implementations of findall and unique, but I would have thought unique would be in terms of findall.
 
I can't quite tell what it's doing either, but the reason that superscripted isn't in terms of is because it finds however many unique solutions, rather than the unique solutions out of however many solutions
It could do something like superscriptless does, but I'm not sure it would work as well in this case, because I'm not sure how it works at all
 
10:33 PM
(I'm going to fall back on my procedural language intuition here, which is probably flawed.) If ᶠ with superscript applies the call_nth/2 helper metapredicate with 'nth' being successive numbers up to the superscript, then ᵘ could be implemented by the same mechanism, but with a slightly different helper predicate, let's say call_nth_unique/2, which uses a version of the goal that recurses to exclude any call_nth_unique/2 resultss for lesser values of n.
 
...yeah, it is strange that they have such different structures
 
Actually, it might be doing what I outlined: github.com/JCumin/Brachylog/blob/…
X must be the next unique result, and A the previous results.
 
I just stare at that and think "man, I should really sit down and try to put comments in that some day" lol
 
Prolog has a way of messing with my mind. It's like trying to grok Scheme continuations.
Not knowing what most of the identifiers are doesn't help.
 
10:43 PM
There's something to be said for descriptive comments.
 

« first day (1365 days earlier)      last day (901 days later) »