Preface
- A Comment on Licenses
- Running Gerbil Scheme on macOS and Linux
- History and Background to the Gerbil Scheme Project
- Core Gerbil Toolkits Used in this Book: :std/net/request and :std/text/json
- Suppressing or Fixing Compilation Warning Messages on macOS
Setting Up Gerbil Scheme Development Environment
- Emacs Configuration
Google Gemini API
- Example Code
- Example Output
Ollama
- Example Code
- Install Ollama and Pull a Model to Experiment With
- Example Output
- Tool/Function Calling with Ollama
- Defining Tools: example_tools.ss
- The Agent Loop: use_tools.ss
- Tool Calling Example Output
- Building Your Own Tools
OpenAI API
- Example Code
- Example Output
Inexpensive and Fast LLM Inference Using the Groq Service
- Structure of Project and Build Instructions
- groq_inference.ss Utility
- Example scripts: kimi2.ss and gpt-oss-120b.ss
Wikidata API Using SPARQL Queries
- Example Code
- Example Output
Code for Natural Language Processing (NLP)
- Structure of Project and Build Instructions
- Top Level Project Code
- Other Source Files
- Test Run:
- Building and Running the Command Line Tool
Gerbil Scheme FFI Example Using the C Language Raptor RDF Library
- Implementation of a FFI Bridge Library for Raptor
- Test Code
- Build System
Complete FFI Example: C Language Wrapper for Rasqal SPARQL Library and Sord RDF Datastore Library
- Library Selection
- Overview of the Project Structure and Build System
- Implementation of the C Language Wrapper
- A Gerbil Scheme Shim to Call The C Language Wrapper Code
- Gerbil Scheme Main Program for this Example
- Example Output
WebKit Applications - macOS Only
- Architecture Overview
- Prerequisites and Building
- Project Structure
- The C Shim
- Gambit FFI Bindings
- The Bridge: JS to Scheme Communication
- High-Level API
- Example 1: Hello World
- Example 2: Counter App with Bridge
- Example 3: Markdown File Viewer
- The Build System
- Comparing Common Lisp and Gerbil Versions
- API Reference Summary
- Key Takeaways
A Simple In-Memory RDF Store and Query Language in Gerbil Scheme
- Introduction to RDF and the Goal of This Chapter
- Data Model: Triples and the Store
- Parsing SPARQL Queries
- Query Evaluation: Pattern Matching and Joining
- Gerbil RDF Implementation
- Running the Demo and Using the Code
- Summary and Further Directions
Introduction To Writing Command Line Utilities
- Overview of the Command Line Utilities Project Structure and Build System
- Simple Structure for Command Line Utilities
- A More Flexible Structure for Command Line Utilities
- Wrap Up for Writing Command Line Utilities in Gerbil Scheme and Notes On User Built Libraries
Command Line Applications For NLP
- Re-using the NLP Library For a Command Line Utility to Identify Categories or Topics in Input Text
- Using OpenAI’s GPT-5 model To Summarize Input Text
