Skip to content

Instantly share code, notes, and snippets.

View LamentConfiguration's full-sized avatar

LamentConfiguration

View GitHub Profile
[20:30] <pilne> like, with lisp and scheme, it's hard to understand a lot withoutat
least a decent understanding how how things are put together with cons cells, but
with prolog it's terms and unification all the way down so far
[20:42] <White_Flame> well, prolog lists are cons cells and still have all the exact
issues with traversing, sharing, "dotted values" etc
@LamentConfiguration
LamentConfiguration / 03_03.pl
Created March 30, 2020 20:36
predicate naming
basicpart(rim).
basicpart(spoke).
basicpart(rearframe).
basicpart(handles).
basicpart(gears).
basicpart(bolt).
basicpart(nut).
basicpart(fork).
assembly(bike, [wheel, wheel, frame]).
islist([A|B]):-islist(B).
islist([]).
weak_islist([]).
weak_islist([_|_]).
Left recursion:
This arises when a rules causes the invocation of a goal that is essentially equivalent
to the original goal that caused the rule to be used.
This will recurse infinitely
person(adam).
person(X):-person(Y), mother(X,Y).
?-person(X).
This works (according to the book, either fails or something, but doesn't recurse infinitely)
PS D:\Misc\programming\raku\repos\testing\Inline-Perl5> make
gcc -Wall p5helper.c -s -L"D:\berrybrew\5.30.1_64\perl\lib\CORE" -L"D:\berrybrew\5.30.1_64\c\lib" "D:\berrybrew\5.30.1_64\perl\lib\CORE\libperl530.a" "D:\berrybrew\5.30.1_64\c\x86_64-w64-mingw32\lib\libmoldname.a" "D:\berrybrew\5.30.1_64\c\x86_64-w64-mingw32\lib\libkernel32.a" "D:\berrybrew\5.30.1_64\c\x86_64-w64-mingw32\lib\libuser32.a" "D:\berrybrew\5.30.1_64\c\x86_64-w64-mingw32\lib\libgdi32.a" "D:\berrybrew\5.30.1_64\c\x86_64-w64-mingw32\lib\libwinspool.a" "D:\berrybrew\5.30.1_64\c\x86_64-w64-mingw32\lib\libcomdlg32.a" "D:\berrybrew\5.30.1_64\c\x86_64-w64-mingw32\lib\libadvapi32.a" "D:\berrybrew\5.30.1_64\c\x86_64-w64-mingw32\lib\libshell32.a" "D:\berrybrew\5.30.1_64\c\x86_64-w64-mingw32\lib\libole32.a" "D:\berrybrew\5.30.1_64\c\x86_64-w64-mingw32\lib\liboleaut32.a" "D:\berrybrew\5.30.1_64\c\x86_64-w64-mingw32\lib\libnetapi32.a" "D:\berrybrew\5.30.1_64\c\x86_64-w64-mingw32\lib\libuuid.a" "D:\berrybrew\5.30.1_64\c\x86_64-w64-mingw32\lib\libws2
PS D:\Misc\programming\raku\repos\testing\Inline-Perl5> raku .\install-dist.p6
The spawned command 'make' exited unsuccessfully (exit code: 1, signal: 0)
in block at .\install-dist.p6 line 175
in sub build at .\install-dist.p6 line 163
in sub MAIN at .\install-dist.p6 line 121
in block <unit> at .\install-dist.p6 line 69
PS D:\Misc\programming\raku\repos\rosetta> zef --verbose install Inline::Perl5
===> Searching for: Inline::Perl5
===> Found: Inline::Perl5:ver<0.44>:auth<github:niner> [via Zef::Repository::LocalCache]
===> Searching for missing dependencies: Distribution::Builder::MakeFromJSON:ver<0.6+>
===> Found dependencies: Distribution::Builder::MakeFromJSON:ver<0.6>:auth<github:niner> [via Zef::Repository::LocalCache]
===> Searching for missing dependencies: System::Query
===> Found dependencies: System::Query:ver<0.1.4>:auth<github:tony-o> [via Zef::Repository::LocalCache]
===> Building: Inline::Perl5:ver<0.44>:auth<github:niner>
[Inline::Perl5] Command: C:\rakudo\bin\perl6.exe -IC:\Users\pilne\.zef\store\Distribution-Builder-MakeFromJSON-0.6.tar.gz\Distribution-Builder-MakeFromJSON-0.6 -IC:\Users\pilne\.zef\store\p6-warthog.git\f06ffee092a546dec9647a23318b4611de5a4adb -MMONKEY-SEE-NO-EVAL -e exit((require ::(q|Distribution::Builder::MakeFromJSON|)).new(:meta(EVAL($*IN.slurp(:close)))).build(q|C:\Users\pilne\.zef\stor