It’s done by “*” patterns, but updating seems to happen only periodically. I’ll check later today to see if the latest release is being installed. (It’s also possible that I messed things up with version numbering – I removed 0.9.2 and replaced it with 0.9.1 … I am a very incompetent sysadmin.)
[Note to self: need to update documentation at the pack how-to , for taking advantage of github release system.]
swi
April 8, 2020, 10:01pm
22
What I meant is this change:
- download('https://github.com/kamahen/edcg/releases/*.zip').
+ download('https://github.com/kamahen/edcg/archive/*.zip').
changing from releases
to archive
which will not be covered by the ‘*’ pattern, but may need a manual update from Jan.
Jan patiently explained the workflow to me (all these years of programming and I still fail at RTFMing). Everything seems to be updated now.
1 Like
I’ve upgraded pack(edcg)
to use plunit
and also have incorporated @EricGT ’s code for castor
and pollux
. Thanks!
1 Like
EricGT
April 9, 2020, 7:30pm
25
Thanks. While I have not had the time to look at the details for Paulo’s test for castor and pollux
I think his is better.
pmoura:
test(gemini_1) :- gemini::p(1, S0, S, _), S0 == S.
That test fails for me with SWI-Prolog (presumably it succeeds with logtalk but I haven’t verified that). I wonder why …
?- p(1, S0, S, _), writeln(['S0'=S0,'S'=S]).
q - Y: 2, P: _1014
r - Y: 2, P: _1014
[S0=_1010,S=_1012]
true.
pmoura
April 9, 2020, 8:23pm
27
You can run the Logtalk tests by either:
$ cd "$LOGTALKUSER/examples/edcgs"
$ logtalk_tester -p swi
or:
$ swilgt
?- {edcgs(tester)}.
All the tests in the Logtalk distribution (~6000) are run on every GitHub commit.
The problem was that this is not a correct hand-translation of q(_) -->> [].
:
q(Y,_,_,P) :-
format('q - Y: ~w, P: ~w~n',[Y,P]).
It should have been:
q(Y,S,S,P) :-
format('q - Y: ~w, P: ~w~n',[Y,P]).
But there’s no need to hand-translate to get the values. EDCG has a “/
” operator:
q(Y) -->>,
C0/castor/C,
P/pollux,
{ format('q - Y: ~w, C0: ~q, C: ~q, P: ~q~n',[Y,C0,C,P]) },
[ ]:castor. % Not needed.
I’ll update the examples and push a new version soon (for some definition of “soon” because I want to add a few more pedantic tests).
1 Like
EricGT
April 9, 2020, 9:33pm
29
Thanks.
I did the hand translations to help me learn how EDCG works. I was not expecting those to ever be made public much less make it into a GitHub repository. I only posted for those reading the post.
Buried in this link is a EDCG test of a difference list append.
I don’t particularly like the castor/pollux example, but whatever.
The code at your link doesn’t compile. I don’t have time to fix it; if you want to publish it, perhaps make a PR for https://github.com/kamahen/edcg ?
1 Like