=============== LIBRARY RULES =============== From library maintainers: - Always use proper Logtalk syntax for object-oriented predicates and messages - Follow Logtalk's file naming conventions: .lgt extension for source files - Use loader.lgt files for proper dependency management - Place tests in tests.lgt files in the same directory as the code - Use tester.lgt files to run tests - Use a settings.lgt file for project/library configuration (e.g., library aliases, scratch directories, verbosity) - Indent using tabs - Use snake_case for object, protocol, category, and predicate names - Use CamelCase for variable names - Prefer explicit public/1, protected/1, and private/1 declarations for predicates - Use info/2 and mode/2 directives for predicate documentation and mode declarations ### Load Example and Library Files Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/bricks/NOTES.md Load the 'bricks' example and its associated library files. This is the initial setup step required before running other commands in the example. ```logtalk logtalk_load(bricks(loader)). ``` -------------------------------- ### Load Example and Library Files Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/lpa/timetables/NOTES.md Start by loading the main example file and any required library files. ```logtalk logtalk_load(lpa_timetables(loader)). ``` -------------------------------- ### Load Blackboard Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/threads/blackboard/NOTES.md Load the blackboard example and its required library files. This is the initial setup step for the example. ```logtalk logtalk_load(blackboard(loader)). ``` -------------------------------- ### Load Prototypes Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/prototypes/NOTES.md Load the example code for the prototypes demonstration. This is the initial setup step for running the example. ```logtalk logtalk_load(prototypes(loader)). ``` -------------------------------- ### Load Multifile Example and Library Files Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/multifile/NOTES.md This command loads the multifile example and any necessary library files. Ensure the multifile library is correctly installed and accessible. ```logtalk logtalk_load(multifile(loader)). ``` -------------------------------- ### Load Example Directory Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/instmethods/NOTES.md Load the 'instmethods' example directory using the logtalk_load/1 built-in predicate. This is the initial setup step for the example. ```logtalk logtalk_load(instmethods(loader)). ``` -------------------------------- ### Load the lambdas example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/lambdas/NOTES.md Start by loading the 'lambdas' example module. ```logtalk logtalk_load(lambdas(loader)). ``` -------------------------------- ### Load FFT Example and Libraries Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/threads/fft/NOTES.md Start by loading the example and all required library files for the FFT multi-threading solution. ```logtalk logtalk_load(fft(loader)). ``` -------------------------------- ### Load Example and Library Files Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/relations/NOTES.md Load the example and its required library files using this command. This is typically done at the start of an example session. ```logtalk logtalk_load(relations(loader)). ``` -------------------------------- ### Load Metapredicates Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/metapredicates/NOTES.md Loads the metapredicates example and its required library files. This is the initial setup step for running the examples. ```logtalk logtalk_load(metapredicates(loader)). ``` -------------------------------- ### Start Slow Print Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/threads/sync/NOTES.md Start the 'slow_print' example. This should preferably be run from the top-level interpreter, not as a notebook. ```logtalk (current_object(jupyter) -> true; slow_print::start). ``` -------------------------------- ### Install and Start Memcached on Linux (RHEL/Fedora) Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/handbook/libraries/memcached.html Instructions for installing and starting the Memcached server on RHEL/Fedora-based Linux systems. ```bash sudo dnf install memcached sudo systemctl start memcached ``` -------------------------------- ### Start Logtalk with Initialization Goal Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/handbook/userman/programming.html Example command to start Logtalk with GNU Prolog, initializing it by consulting a setup file that configures parallel Logtalk processes. ```bash $ gplgt --init-goal "consult('parallel_logtalk_processes_setup.pl')" ``` -------------------------------- ### Load and Run the Hello World Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/hello_world/NOTES.md Load the 'hello_world' example by calling its loader file. This will execute the example and display any output messages. ```logtalk logtalk_load(hello_world(loader)). ``` -------------------------------- ### Load JPL Example Loader Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/jpl/NOTES.md Start by loading the example using this command. ```logtalk logtalk_load(jpl(loader)). ``` -------------------------------- ### Load Example and Library Files Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/blocks/NOTES.md This command loads the necessary 'blocks' example files and any required library dependencies. Ensure this is executed before proceeding with other example steps. ```logtalk logtalk_load(blocks(loader)). ``` -------------------------------- ### Install and Start Memcached on macOS Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/handbook/libraries/memcached.html Instructions for installing and starting the Memcached server on macOS using Homebrew. ```bash brew install memcached memcached -d ``` -------------------------------- ### Load Example Data Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/books/NOTES.md Load the 'books' example by executing this command. This sets up the necessary data and logic for the subsequent examples. ```logtalk logtalk_load(books(loader)). ``` -------------------------------- ### Load Profiling Example and Libraries Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/profiling/NOTES.md Loads the profiling example and its required library files. This is the initial setup step. ```logtalk logtalk_load(profiling(loader)). ``` -------------------------------- ### Install and Start Memcached on Linux (Debian/Ubuntu) Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/handbook/libraries/memcached.html Instructions for installing and starting the Memcached server on Debian/Ubuntu-based Linux systems. ```bash sudo apt-get install memcached sudo systemctl start memcached ``` -------------------------------- ### Load Laptops Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/laptops/NOTES.md Loads the 'laptops' example, including its loader file. This is the initial step to run the example. ```logtalk logtalk_load(laptops(loader)). ``` -------------------------------- ### Load Delegates Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/delegates/NOTES.md Load the example code for the delegation pattern. This is a setup step before running delegation queries. ```logtalk logtalk_load(delegates(loader)). ``` -------------------------------- ### Load Example and Ports Profiler Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/defaulty/NOTES.md Load the 'defaulty' example and the 'ports_profiler' tool. This is a prerequisite for profiling the example. ```logtalk logtalk_load(defaulty(loader)). ``` -------------------------------- ### Load the Instvars Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/instvars/NOTES.md Load the example by executing this command. ```logtalk logtalk_load(instvars(loader)). ``` -------------------------------- ### Load Synchronization Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/threads/sync/NOTES.md Load the synchronization example module. This is a prerequisite for running the other examples in this folder. ```logtalk logtalk_load(sync(loader)). ``` -------------------------------- ### Load Example and Library Files Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/shapes/ch/NOTES.md Load the 'shapes_ch' example and its associated library files using this command. This is a prerequisite for running the example queries. ```logtalk logtalk_load(shapes_ch(loader)). ``` -------------------------------- ### Load Proxy Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/proxies/NOTES.md Loads the 'proxies' example, specifically the 'loader' file. This is the initial step to set up and use the proxy objects defined in the example. ```logtalk logtalk_load(proxies(loader)). ``` -------------------------------- ### Load the Multi-threading Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/threads/functions/NOTES.md Load the example by querying the loader file. ```logtalk logtalk_load(functions(loader)). ``` -------------------------------- ### Load Fluents Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/engines/fluents/NOTES.md Load the fluents example by executing this Logtalk command. This sets up the necessary components for the fluent examples. ```logtalk logtalk_load(fluents(loader)). ``` -------------------------------- ### Load Hooks Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/hooks/NOTES.md Load the example by executing this command. This will set up the necessary hooks and configurations. ```logtalk logtalk_load(hooks(loader)). ``` -------------------------------- ### Load Example Files Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/diamonds/NOTES.md Load the main loader file for the diamonds example. ```logtalk logtalk_load(diamonds(loader)). ``` -------------------------------- ### Load the Sums Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/engines/sums/NOTES.md Load the 'sums' example by executing this directive. Ensure the Logtalk environment is set up correctly to find the example files. ```logtalk logtalk_load(sums(loader)). ``` -------------------------------- ### Load Expansion Example Loader Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/expansion/NOTES.md Load the main loader for the expansion examples. This is typically the first step to run the provided examples. ```logtalk logtalk_load(expansion(loader)). ``` -------------------------------- ### Load Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/engines/interactors/NOTES.md Load the interactors example by executing this command. ```logtalk logtalk_load(interactors(loader)). ``` -------------------------------- ### Load Miscellaneous Example Loader Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/miscellaneous/NOTES.md Load the 'miscellaneous' example suite and its required library files using this command. This is a prerequisite for running other examples in this section. ```logtalk logtalk_load(miscellaneous(loader)). ``` -------------------------------- ### Load Example and Library Files Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/roots/NOTES.md Load the 'roots' example and its required library files using this command. ```logtalk logtalk_load(roots(loader)). ``` -------------------------------- ### Load the lo-planner Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/lo/planner/NOTES.md This command loads the 'lo_planner' example, making its planning capabilities available for use. Ensure this is executed before attempting to plan. ```logtalk logtalk_load(lo_planner(loader)). ``` -------------------------------- ### Load Example File Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/roles/NOTES.md Load the 'roles' example file to begin exploring the concepts. This is the initial step before running other queries. ```logtalk logtalk_load(roles(loader)). ``` -------------------------------- ### Load mtbatch Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/threads/mtbatch/NOTES.md Loads the mtbatch example, which is necessary before running any benchmarks. ```logtalk logtalk_load(mtbatch(loader)). ``` -------------------------------- ### Load Example Files Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/classmethods/NOTES.md Load the 'classmethods' example files using this command. Ensure the 'loader' file is specified. ```logtalk logtalk_load(classmethods(loader)). ``` -------------------------------- ### Load Coinduction Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/coinduction/NOTES.md Start by loading the coinduction example using this Logtalk directive. ```logtalk logtalk_load(coinduction(loader)). ``` -------------------------------- ### Load Integration2D Examples Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/threads/integration2d/NOTES.md Load the necessary integration2D library for examples. ```logtalk logtalk_load(integration2d(loader)). ``` -------------------------------- ### Load Planets Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/planets/NOTES.md Load the 'planets' example by executing this command. This sets up the necessary objects and categories for the demonstration. ```logtalk logtalk_load(planets(loader)). ``` -------------------------------- ### Load Reflection Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/reflection/NOTES.md Load the entire reflection example by executing this directive. ```logtalk logtalk_load(reflection(loader)). ``` -------------------------------- ### Load the example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/threads/team/NOTES.md Execute this command to load the 'team' example, which includes the necessary files for the synchronous concurrency task. ```logtalk logtalk_load(team(loader)). ``` -------------------------------- ### setup/0 Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/apis/index.html Performs setup operations. ```APIDOC ## setup/0 ### Description Performs setup operations. ### Method N/A (Predicate) ### Parameters (No parameters) ### Request Example ```logtalk setup. ``` ### Response #### Success Response (No specific success response details provided) #### Response Example (No specific response example provided) ``` -------------------------------- ### Load Example and Required Libraries Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/threads/philosophers/NOTES.md Execute this command to load the dining philosophers example and its necessary library files. ```logtalk logtalk_load(philosophers(loader)). ``` -------------------------------- ### Start Logtalk with ECLiPSe (Windows PowerShell) Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/handbook/userman/programming.html Example command to start Logtalk using ECLiPSe as the backend on Windows with PowerShell. ```powershell PS\> eclipselgt.ps1 ... ``` -------------------------------- ### Load Example Files Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/includes/NOTES.md This command loads the 'includes' example, which is necessary to run the subsequent tests. ```logtalk logtalk_load(includes(loader)). ``` -------------------------------- ### Load the checkpoint example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/threads/checkpoint/NOTES.md Load the checkpoint synchronization example by calling this directive. Ensure the path is correct for your Logtalk installation. ```logtalk logtalk_load(checkpoint(loader)). ``` -------------------------------- ### setup/0 Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/apis/lgtunit_0.html Sets up the testing environment before test execution. Defaults to `true`. ```APIDOC ## setup/0 ### Description Setup environment before running the test set. Defaults to the goal `true`. ### Method `setup/0` ### Mode and number of proofs `setup` - `zero_or_one` ``` -------------------------------- ### Start Logtalk with GNU Prolog (POSIX) Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/handbook/userman/programming.html Example command to start Logtalk using GNU Prolog as the backend on a POSIX system. ```bash $ gplgt ... ``` -------------------------------- ### Load Hailstone Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/hailstone/NOTES.md Load the hailstone example module using this directive. Ensure the module is correctly installed or accessible in your Logtalk environment. ```logtalk logtalk_load(hailstone(loader)). ``` -------------------------------- ### Get Predicate Property Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/handbook/userman/predicates.html Retrieve properties of visible predicates, considering their scope declarations. This example shows how to get properties for public predicates. ```prolog bar::predicate_property(foo(_), Property). ``` -------------------------------- ### Get Pack Directory Prefix Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/handbook/devtools/packs.html Query the 'packs::prefix/1' predicate to get the directory where installed packs are located. This can be used to run the 'logtalk_tester' script. ```logtalk | ?- packs::prefix(Directory). ``` -------------------------------- ### Load the XPCE Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/xpce/NOTES.md Execute this command to load the entire XPCE example, including necessary interfaces and the application code. ```logtalk logtalk_load(xpce(loader)). ``` -------------------------------- ### Load ebench example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/engines/ebench/NOTES.md Load the ebench example suite. This typically includes necessary predicates and configurations for benchmarking. ```logtalk logtalk_load(ebench(loader)). ``` -------------------------------- ### Save Installed Packs and Registries to a File Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/handbook/devtools/packs.html Use the `packs::save/1-2` predicate to save the current virtual environment setup, including installed packs and their registries, into a specified file. ```logtalk | ?- packs::save('requirements.lgt'). ``` -------------------------------- ### Load Example and Library Files Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/lpa/faults/NOTES.md Load the main example and any necessary library files to set up the fault diagnosis environment. ```logtalk logtalk_load(lpa_faults(loader)). ``` -------------------------------- ### Get Wall Time Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/apis/osp_0.html Retrieves the wall clock time elapsed since the start of the process. ```APIDOC ## wall_time/1 ### Description Retrieves the wall clock time elapsed since the start of the process. ### Predicate `wall_time(WallTime)` ### Parameters - **WallTime** (variable) - Output: The wall clock time in seconds. ### Response Example ```json { "example": "wall_time(5.678)" } ``` ``` -------------------------------- ### Retrieve Pack README Path Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/handbook/devtools/packs.html Get the file system path to the `README.md` file of an installed pack. ```prolog | ?- packs::readme(lflat, Path). ``` -------------------------------- ### Get pack metadata Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/handbook/devtools/packs.html Enumerate installed packs and retrieve their metadata. Missing optional metadata is normalized to 'none'. ```prolog packs::pack_metadata(Registry, Pack, Version, Metadata). ``` -------------------------------- ### Restrict Pack Updates to Stable Versions Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/handbook/devtools/packs.html Example of using the 'status/1' option to ensure pack updates only install stable versions. ```prolog install(pack_id, [status([stable])]). update(pack_id, [status([stable])]). ``` -------------------------------- ### Load Example and Library Files Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/threads/sorting/NOTES.md Loads the sorting example and its required library files. This is a prerequisite for running the sorting algorithms. ```logtalk logtalk_load(sorting(loader)). ``` -------------------------------- ### Query Logtalk Flag Value Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/handbook/userman/programming.html Use current_logtalk_flag/2 to retrieve the current value of a Logtalk flag. This example shows how to get the value for unknown_entities. ```logtalk ?- current_logtalk_flag(unknown_entities, Value). ``` -------------------------------- ### Run the checkpoint example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/threads/checkpoint/NOTES.md Execute the checkpoint synchronization example after loading it. This will initiate the multi-threading task and demonstrate the barrier synchronization. ```logtalk checkpoint::run. ``` -------------------------------- ### Generating Version 4 UUIDs Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/handbook/libraries/uuid.html Generates a version 4 UUID. Examples show how to get the UUID as an atom, a list of characters, or a list of character codes. ```APIDOC ## Generating Version 4 UUIDs To generate a UUID using a list of characters representation, use instead the `uuid/1` parametric object: | ?- uuid(chars)::uuid_v4(UUID). UUID = [d,'3',d,'3','3','5','1','3',-, '8','1',e,c,-,'4',d,'2','6',-, '9',f,'2','2',-,e,d,'9','5',e,'0','0',e,'1','5','7','0'] yes Similar to get a UUID using a list of character codes representation: | ?- uuid(codes)::uuid_v4(UUID). UUID = [102,97,52,54,57,98,100,50,45,51,57,54,51,45,52,97,100,55,45, 98,50,50,55,45,101,100,52,99,56,55,99,54,53,55,102,98] yes ``` -------------------------------- ### Load Searching Example and Library Files Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/searching/NOTES.md This command loads the 'searching' example and its associated library files. Ensure the 'searching' directory is accessible. ```logtalk logtalk_load(searching(loader)). ``` -------------------------------- ### Access Help Tool Main Help Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/handbook/devtools/help.html After loading the help tool, use the 'help::help' query to get started and access its main help information. ```logtalk | ?- help::help. ``` -------------------------------- ### Start MCP Server (With Options) Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/handbook/libraries/mcp_server.html Start the MCP server with options like `version` and `server_title`. No output or only a Prolog backend term input prompt should appear. ```Prolog | ?- mcp_server::start('my-server', my_tools, [version('2.0.0'), server_title('My Server')]). ``` -------------------------------- ### Fold Left Without Initial Value Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/metapredicates/NOTES.md Use fold_left_1/3 when there is no initial value and the first element of the list serves as the starting point for the accumulation. This example demonstrates summing elements. ```Logtalk meta::fold_left_1([X,Y,Z]>>(Z is X+Y), [1,2,3,4,5], R). ``` -------------------------------- ### Load Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/threads/nondet/NOTES.md Load the example by executing this directive. Ensure the 'nondet' library is accessible. ```logtalk logtalk_load(nondet(loader)). ``` -------------------------------- ### Define object initialization goal Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/handbook/refman/directives/initialization_1.html When used within an object, this directive defines a goal to be called after the object is successfully loaded. The example shows printing a debug message with the starting date. ```logtalk :- object(log). :- initialization(start_date). start_date :- os::date_time(Year, Month, Day, _, _, _, _), logtalk::print_message(debug, my_app, 'Starting date: ~d-~d-~d~n'+[Year,Month,Day]). :- end_object. ``` -------------------------------- ### MCP Client Configuration Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/birds_mcp/NOTES.md Configure an MCP client to connect to the bird identification server. Ensure LOGTALKHOME and LOGTALKUSER environment variables are set correctly for your Logtalk installation, especially on macOS. ```json { "mcpServers": { "my-server": { "command": "swilgt", "args": [ "-q", "-g", "logtalk_load(birds_mcp(server))", "-t", "halt" ], "env": { "LOGTALKHOME": "/usr/local/share/logtalk", "LOGTALKUSER": "/Users/jdoe/logtalk" } } } } ``` -------------------------------- ### Start Computer Using Facade Interface (default components) Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/design_patterns/structural/facade/NOTES.md Initiate the computer startup sequence using the simplified interface provided by the facade. This version uses default components. ```logtalk computer_facade::start. ``` -------------------------------- ### Load Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/assign_parameters/NOTES.md This command loads the 'assign_parameters' example, including necessary categories and objects. ```logtalk logtalk_load(assign_parameters(loader)). ``` -------------------------------- ### Get pack property Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/handbook/devtools/packs.html Retrieve specific metadata properties for a pack. Supported properties include name, description, license, home, source_url, checksum, dependencies, portability, directory, pinned, installed, and loaded. ```prolog packs::pack_property(local_1_d, foo, Version, license(License)). ``` -------------------------------- ### Load Logtalk Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/mi/NOTES.md Load the 'mi' example by executing this command. It's the initial step to run the multi-inheritance demonstrations. ```logtalk logtalk_load(mi(loader)). ``` -------------------------------- ### Get Julian Number, Week, and Day-of-Year from Date Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/apis/iso8601_0.html This example demonstrates how to obtain the Julian number, week information (week number and year), and day-of-year for a specific date. It also confirms the day of the week. ```logtalk date(JD,2004,2,29,7,Week,DoY) ``` -------------------------------- ### Load Points Example and Library Files Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/points/NOTES.md This command loads the main 'points' example and any necessary library files required for its execution. Ensure this is run before interacting with the point objects. ```logtalk logtalk_load(points(loader)). ``` -------------------------------- ### Get Missing Date Data for 60th Day of 2004 Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/apis/iso8601_0.html This example retrieves unspecified date components (month, day, day-of-week, week) for the 60th calendar day of the year 2004. The Julian number is also not specified. ```logtalk date(_,2004,Month,Day,DoW,Week,60) ``` -------------------------------- ### Create and Activate Virtual Environment with Packs Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/handbook/devtools/packs.html Use `lgtenv` to create a virtual environment and install specified packs. This example creates a directory `~/my_venv`, enables pack support, and then changes into that directory, activating the environment via direnv. ```bash $ lgtenv -d ~/my_venv -c -p logtalk_packs $ cd ~/my_venv direnv: loading ~/my_venv/.envrc direnv: export +LOGTALKPACKS ``` -------------------------------- ### Get Formatted Git Commit Log Source: https://github.com/logtalkdotorg/logtalk3/blob/master/docs/handbook/libraries/git.html Use `commit_log/3` to access `git log` output with custom formatting. The first argument is the directory, the second is the desired format string, and the third is the output variable. Example uses `--oneline -n 1 --pretty=format:` options. ```logtalk git::commit_log('/Users/pmoura/logtalk3', '%h%n%B', Output), write(Output), nl. ``` -------------------------------- ### Load the 'now_you_see_me' Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/now_you_see_me/NOTES.md Load the example by calling the `logtalk_load/1` built-in predicate with the example's loader. ```logtalk logtalk_load(now_you_see_me(loader)). ``` -------------------------------- ### Load Emetas Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/engines/emetas/NOTES.md Load the 'emetas' example module. This is a prerequisite for running the subsequent meta-predicate examples. ```logtalk logtalk_load(emetas(loader)). ``` -------------------------------- ### Load Example and Required Libraries Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/threads/buckets/NOTES.md Load the 'buckets' example and its associated libraries. This is a prerequisite for running the atomic updates task. ```logtalk logtalk_load(buckets(loader)). ``` -------------------------------- ### Load Benchmarks Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/bench/NOTES.md Load the entire benchmarks example suite using this command. ```logtalk logtalk_load(bench(loader)). ``` -------------------------------- ### Load Logtalk Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/operators/NOTES.md Loads the 'operators' example, specifically the 'loader' component. This is a prerequisite for running other examples in this section. ```logtalk logtalk_load(operators(loader)). ``` -------------------------------- ### Load Slideshow Example Source: https://github.com/logtalkdotorg/logtalk3/blob/master/examples/slides/NOTES.md Execute this command to load the necessary components for the slideshow example. ```logtalk logtalk_load(slides(loader)). ```