This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:- use_module(library(prolog_codewalk)). | |
:- meta_predicate findrefs(:). | |
:- thread_local hit/1. | |
findrefs(To) :- | |
resolve(To, Target), | |
prolog_walk_code( | |
[ module_class([user]), | |
infer_meta_predicates(true), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
swish: | |
image: swipl/swish | |
ports: | |
- "3050:3050" | |
volumes: | |
- socket-volume:/rserve | |
- /home/jan/data/swish:/data | |
depends_on: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% This program reproduces a performance problem with incremental tabling. | |
:- import incr_asserta/1 from increval. | |
%:- dynamic facts/1 as incremental,abstract(0). | |
:- dynamic facts/1 as incremental. | |
add_facts(N) :- | |
randset(N, 10 000 000, S), | |
forall(member(X, S), incr_asserta(facts(X))). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:- module(http_statefull_server, | |
[ server/0 | |
]). | |
:- use_module(library(http/http_server)). | |
:- use_module(library(http/http_session)). | |
:- use_module(library(broadcast)). | |
:- use_module(library(modules)). | |
:- use_module(library(debug)). | |
:- http_handler(root(.), http_redirect(moved, root(home)), []). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:- module(fork_client, | |
[ fork_client/2, | |
stop_client/1, | |
run_in_client/2 | |
]). | |
:- use_module(library(socket)). | |
fork_client(Address, Stream) :- | |
tcp_connect(Address, Stream, []). |