SWI-Prolog has its own package manager (
prolog_pack). Available packages are listed here:
I was looking for a way to write lambda expressions in Prolog and found
lambda
pack on that list. To install/use the package, I rebuilt my swi-prolog to have archive.pl availbale.
- Install libarchive-devel (I use openSUSE with zypper, change the command according to your environment)
$ sudo zypper install libarchive-devel
- Fetch the git repository (Or get the source from the official page)
$ git clone git://www.swi-prolog.org/home/pl/git/pl.git
- Follow the instructions in the repository
- To download configuration files, submodules and documentations. Do
prepare
first.
$ cd pl
$ ./prepare
configure
, make
and make_install
in the src directory
$ cd src
$ ./configure
$ make
$ make install
configure
, make
and make_install
in the packages directory
$ cd ../packages
$ ./configure
$ make
$ make install
Make sure that after you do configure
, you have HAVE_ARCHIVE_H 1
in config.h
$ grep 'HAVE_ARCHIVE_H' config.h
#define HAVE_ARCHIVE_H 1
- That's it. Now you can start swi-prolog and install packages.
$ swipl
Welcome to SWI-Prolog (Multi-threaded, 64 bits, Version 6.4.1-98-g56aab30)
Copyright (c) 1990-2013 University of Amsterdam, VU Amsterdam
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to redistribute it under certain conditions.
Please visit http://www.swi-prolog.org for details.
For help, use ?- help(Topic). or ?- apropos(Word).
?- pack_install(lambda).
After you install the package, you just declare to use it.
?- use_module(library(lambda)).
?- maplist(\X^(X>3), [1]).
false.
?- maplist(\X^(X>3), [4]).
true.
Install SWI-Prolog with libarchive on Mac
Installing SWI-Prolog is even easier on Mac OS X if you're using
homebrew. But you need to manually add
libarchive
to its dependencies if you want to use the package manager with the help of archive.pl.
- Edit the formula for swi-prolog
- Open the formula
$ brew edit swi-prolog
- Add
libarchive
as its dependency
require 'formula'
class SwiProlog < Formula
...
depends_on 'libarchive' # add this line
depends_on 'readline'
depends_on 'gmp'
- Install SWI-Prolog
$ brew install swi-prolog
- That's it. Now you can move on to
4
to install packages.
Most slot bonuses allow you to play for free only a particular choice of slot machines. All information about what games are a part of} every 우리카지노 provide are included in the terms and situations. This game doesn't function a progressive jackpot, so you do not really need to wager the max every time you spin. Slot machine payouts are proportional to what you wager in the game.
ReplyDelete