Sign inSign up

t2fn/pascal-claude-abliterated

By t2fn

•Updated about 1 month ago

Pascal Compiler (fpc) + Object Pascal support, optimized for Pascal development token efficiency

Image
Machine learning & AI
Developer tools
0

838

t2fn/pascal-claude-abliterated repository overview

⁠pascal-claude-abliterated — Free Pascal Development Stack with gdb and valgrind

Cost savings: use the tweakcc reduced system prompt + specialized Pascal tools for the best results. A default Claude Code prompt injects 30K+ characters per turn — that's $90/MTurn on Sonnet and $150 on Opus for tokens you never read. The tweakcc thinkingVerbs and ablated prompts trim this to ~10K, saving up to 90% on cached reads and ~$4.50/hour in input for a coding session at 100 requests/hour.

Drop Pascal source files into a container and ask Claude to compile, debug, lint, cross-compile, and ship them. This image combines Claude Code (abliterated) with the Free Pascal Compiler, gdb debugger, valgrind profiler, and all build tools — a complete Pascal development workstation for disconnected enterprise environments.

⁠What It Does

This container is a focused Pascal development environment. Mount whatever Pascal projects, academic exercises, or embedded systems code you want to work on, start the container, and Claude automatically gets:

  • fpc — Free Pascal Compiler 3.2.x (Standard/Extended/Object Pascal + Delphi-compatible mode)
  • ppuasm — P-code unit assembler for low-level optimization
  • gdb — Full-screen TUI debugger with Pascal source-level debugging support
  • valgrind — Memory leak detection, heapcheck, cachegrind profiling
  • make/cmake — Build automation for multi-file and mixed-language projects
  • Runtime libraries — libgfortran (for Fortran interop), openssl, zlib, bzip2
  • Abliterated Claude — lean ~10K system prompt, 200+ skills, subagent support, and low token cost

No configuration, no setup. Give it Pascal source files (.pas) and ask Claude to compile, lint, debug, and ship.

⁠Why This Container?

⁠Pascal development without the workstation

Building Object Pascal applications typically means installing Free Pascal Compiler (fpc), setting up GDB for debugging, configuring make/cmake build systems, and installing valgrind for memory analysis. This container bundles it all and makes it accessible to Claude via a single prompt.

Without this containerWith pascal-claude-abliterated
Install fpc, gdb, make, cmake separatelydocker run — everything is ready
Compile Pascal with correct unit search pathsClaude knows Free Pascal's module system automatically
Run Object Pascal class hierarchies and interfacesAsk Claude — it compiles and links multi-file projects correctly
One tool per terminal sessionfpc, gdb, valgrind, make all available simultaneously
Manual cross-compilation configurationPre-configured for standard x86_64, ARM, MIPS targets
⁠What Claude can do

The container works with any Pascal project under /workdir:

  • Object Pascal programs — compile and run .pas files with fpc's Object Pascal mode
  • Delphi-compatible code — use Delphi syntax features (classes, interfaces, exceptions)
  • Unit compilation — build multi-file projects with uses clauses automatically linked
  • Cross-compilation — target ARM, MIPS, or other architectures with -Fu unit paths
  • Debugging — step through Pascal source in GDB with variable inspection and breakpoints
  • Memory analysis — run valgrind to detect leaks in long-running embedded applications
  • Build automation — use make/cmake for complex multi-module projects

⁠Toolkit

⁠Pascal Compiler Tools
ComponentSourceDescription
fpc (Free Pascal Compiler)freepascal.orgANSI/ISO standard Pascal compiler with Object Pascal and Delphi compatibility modes
ppuasmbundled with fpcP-code unit assembler for low-level optimization
gdbrockylinux.devFull-screen TUI debugger with native Pascal source-level debugging support
valgrindvalgrind.orgMemory leak detection, heapcheck, cachegrind profiling
⁠Build and Runtime Tools
ComponentSourceDescription
makerockylinux.devBuild automation for Makefile-based Pascal projects
cmakecmake.orgMulti-language CMake builds for complex Pascal/C/Fortran projects
libgfortrangcc.gnu.orgFortran runtime library for Pascal-Fortran interop
opensslopenssl.orgTLS/SSL encryption libraries
zlibzlib.netCompression library for data serialization
⁠Why this container is better suited for development

Prompt Claude to use standard Pascal linting practices. You can say "use the pascal skill to compile hello.pas with fpc, debug it with gdb, and run valgrind" and Claude will apply Pascal-specific compilation rules, break tasks down properly, and verify each segment works.

Directed skills improve code quality and resilience. With abliterated Claude and directed skills:

  • Ask Claude to build: "compile the unit module.pas and link it with main.pas using fpc -Fu" — Claude compiles with correct flags and links units automatically
  • Break tasks down: instead of a monolithic Pascal refactor, Claude splits the work into subagent tasks — each unit gets compiled and tested independently before integration
  • Ensure memory safety: Claude runs valgrind to verify no leaks in long-running embedded applications
  • Debug systematically: Claude uses gdb TUI mode to step through Pascal source with variable inspection
  • Avoid overcorrection: the ablated system prompt avoids the "STRICTLY PROHIBITED" trap that causes Claude to overzealously fix style at the expense of Delphi compatibility

Say "use the pascal skill to..." to directly task Claude with Pascal-specific skills — fpc compilation, GDB debugging, valgrind profiling, and make/cmake build automation.

⁠Usage

# First, navigate to your project directory.
# cd $HOME/git/my-project

# Compile and run Pascal with Claude and fpc working together
docker run -u $(id -u):$(id -g) -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/pascal-claude-abliterated:latest

# Or with podman:
podman run -u $(id -u):$(id -g) --userns=keep-id \
    -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/pascal-claude-abliterated:latest

# Then send a prompt:
# "compile hello.pas with fpc, debug it, and run the result"

# Run in privileged mode (for full device access):
docker run --privileged -u $(id -u):$(id -g) -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/pascal-claude-abliterated:latest

# Or with podman (no --privileged needed, use --device):
podman run -u $(id -u):$(id -g) --userns=keep-id \
    --device=/dev/pts:/dev/pts \
    -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/pascal-claude-abliterated:latest

# With Ollama for local LLM integration
docker run -u $(id -u):$(id -g) -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/pascal-claude-abliterated:latest

# Claude-tools development shell — start an interactive /bin/bash session with claude-tools available on $PATH
docker run -u $(id -u):$(id -g) -e ANTHROPIC_API_KEY=sk-... \
    -v "$PWD:/workdir:rw" \
    t2fn/pascal-claude-abliterated:latest /bin/bash

# Then send a prompt:
# "compile and run hello.pas, then debug it with gdb"

Claude connects to the fpc compiler, calls fpc -Fu. hello.pas, traces unit dependencies, runs valgrind for memory checks, and returns a natural-language report — all from one prompt.

⁠Cost Savings with tweakcc

This container runs on claude-abliterated:rocky10, which uses the tweakcc (tweakcc-fixed) reduced system prompt to cut ~67% off daily-flow prompts — from ~30K to ~10K characters. For Pascal development, this means:

  • Focused tools, focused rules — Pascal-specific rules (fpc flags, unit paths) are loaded on-demand, not every turn
  • tweakcc thinkingVerbs — 207 safe movement-only verbs reduce cognitive drift on every turn
  • Cost-per-hour comparison: ~$4.50/hour savings on input tokens alone for a typical 100-request/hour session
  • Better output — fewer contradictory always-on rules means less "overcorrection" waste on each turn

"Claude" and "Claude Code" are registered trademarks of Anthropic, PBC. This project uses the name "Claude" in a nominative (descriptive) sense — it identifies the Anthropic product (Claude Code) that this project is built to work with, consistent with the nominative fair use doctrine. The use is necessary: a third-party project cannot refer to "Claude Code" without using the mark itself.

This project is not affiliated with, endorsed by, or sponsored by Anthropic, PBC. The name "pascal-claude-abliterated" is a third-party project name where:

  • "pascal" — descriptive reference to the Pascal programming language (nominative fair use)
  • "claude" — descriptive reference to Anthropic's Claude Code (nominative fair use)
  • "abliterated" — coined portmanteau ("ablation" + "obliteration") representing the reduction of system prompt bloat

The project uses both "Pascal" and "Claude" to describe what it works with, not who it is from.

All other trademarks belong to their respective owners. No implication of endorsement is made by the use of these marks.

ContainerPurposeHub
asm-claude-abliterated⁠Cross-architecture assembly dev stackHub⁠
gcc-claude-abliterated⁠C/C++ development with GCC + valgrindHub⁠
golang-claude-abliterated⁠Go development with gopls + golangci-lintHub⁠
python-claude-abliterated⁠Python linting with ruff + mypyHub⁠
rust-claude-abliterated⁠Rust dev with clippy + cargoHub⁠
java-claude-abliterated⁠Java/Spring Boot with Maven + GradleHub⁠
typescript-claude-abliterated⁠TypeScript dev with biome + eslintHub⁠
ada-claude-abliterated⁠Ada development (GNAT via alr, AUnit testing)Hub⁠
cobol-claude-abliterated⁠COBOL compilation for mainframe modernizationHub⁠
fortran-claude-abliterated⁠Fortran HPC with BLAS/LAPACK math libsHub⁠
julia-claude-abliterated⁠Julia scientific computing and IJulia notebooksHub⁠
apache-claude-abliterated⁠Apache Spark + Pig big data processingHub⁠
hdl-claude-abliterated⁠FPGA/ASIC HDL dev (iverilog, ghdl, verilator)Hub⁠
pascal-claude-abliterated⁠Pascal compilation with Free Pascal Compiler + gdb + valgrindThis image

⁠Open Source

Source code and suggestions/issues/pull requests can be made at:

https://github.com/t2fn/claude-abliterated⁠

Tag summary

Content type

Image

Digest

sha256:a2111b4ff…

Size

502.3 MB

Last updated

about 1 month ago

docker pull t2fn/pascal-claude-abliterated