Skip to content

Latest commit

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

INTERCALsky

License: MIT

An AT Protocol / Bluesky client where every request is blessed, classified, scored for politeness, and validated by real INTERCAL programs compiled on demand.

Posted to Bluesky. With ACCEPTABLE politeness. PLEASE.


What is INTERCAL

INTERCAL was created in 1972 as a parody of programming languages. It was designed to be as difficult and annoying to use as possible. The compiler counts how many times you say PLEASE. Too few PLEASEs and it refuses to compile:

ICL079I PROGRAMMER IS INSUFFICIENTLY POLITE

Too many PLEASEs and it also refuses:

ICL099I PROGRAMMER IS OVERLY POLITE

The valid range is between one PLEASE per five statements and one per three. This is load-bearing politeness. The bureaucracy is structural.


Design rule

Ada decides. INTERCAL comments, blesses, validates, classifies, scores politeness, and abstains.

Ada makes the HTTP calls. INTERCAL annotates every operation with appropriate ceremony and reluctance. Every request is scored for politeness. Every response is blessed. Every error is rewritten with dignity.


What INTERCAL actually does here

Every incoming request is processed by score_politeness.i before anything else happens. Requests that score TOO_RUDE or TOO_POLITE are rejected with an error rewritten by rewrite_error.i.

Accepted requests are then:

  • Blessed by bless_request.i
  • Classified by classify_request.i
  • Commented on by operation-specific programs (login_commentary.i, comment_timeline.i)
  • Validated by validate_post.i before posting

All INTERCAL programs are compiled by ick on first invocation and cached. The PLEASE ratios are calibrated to land in the acceptable window.


The INTERCAL programs

ProgramOutput
score_politeness.iACCEPTABLE
bless_request.ithe request has been acknowledged with insufficient but acceptable groveling
classify_request.iadministratively regrettable but permissible
login_commentary.iauthentication has proceeded with ceremonial reluctance
validate_post.iALLOW
rewrite_error.iINTERCALsky regrets the administrative unpleasantness
comment_timeline.ithe timeline has been delivered with inadequate ceremony
ping_pong.ipong, if you insist
about.iINTERCALsky regrets to inform you that it is operational
abstain_posting.iposting has been abstained from
reinstate_posting.iposting has been reinstated
apologize.iINTERCALsky sincerely regrets the inconvenience, such as it is

Extended command syntax

INTERCALsky accepts both JSON ops and INTERCAL-style command aliases:

INTERCAL aliasEquivalent op
WRITE IN CREDENTIALSlogin
READ OUT TIMELINEgetTimeline
IGNORE POSTcreatePost
ABSTAIN FROM POSTINGabstain from all further posts
REINSTATE POSTINGreinstate posting

Stack

Your JSON line
→ Ada: parse and route
→ INTERCAL: score politeness
→ INTERCAL: bless request
→ INTERCAL: classify / validate / comment
→ Ada: call bsky.social XRPC via libcurl
→ Ada: return JSON with blessing, classification, politeness score

Prerequisites

  • gprbuild and GNAT (Ada compiler)
  • libcurl-dev
  • ick (C-INTERCAL compiler): apt install intercal

Build

cd ada
gprbuild -P intercalsky_core.gpr -f

Run

cd /path/to/intercalsky
printf'{"op":"ping","params":{}}\n'| ./ada/bin/main

Example response:

{
"ok": true,
"result": {
"response": "pong, if you insist",
"blessing": "the request has been acknowledged with insufficient but acceptable groveling",
"politeness": "ACCEPTABLE"
}
}

Login and post:

printf'{"op":"login","params":{"identifier":"you.bsky.social","password":"your-password"}}\n'| ./ada/bin/main
printf'{"op":"createPost","params":{"text":"Posted with ACCEPTABLE politeness. PLEASE."}}\n'| ./ada/bin/main

INTERCAL runtime notes

ick must run from the same directory as the source file. The run script handles this. If ick is not found, the bridge falls back to hardcoded responses with the correct tone.

The PLEASE ratio in each program is approximately 1-in-4, placing it safely within the acceptable window. The compiler has been consulted on this matter and has, with ceremonial reluctance, agreed.


Part of the Former Lab AT Protocol client series

  • Fortransky — Fortran
  • Assemblersky — x86 Assembly
  • Cobolsky — COBOL [NON-PUBLIC - RELEASE SOON]
  • Adatalksky — Ada + Pharo Smalltalk [NON-PUBLIC - RELEASE SOON]
  • Malbolgesky — Malbolge [NON-PUBLIC - HELL RELEASED SOON]
  • INTERCALsky — INTERCAL ← you are here

Each one is a proof that the AT Protocol works regardless of what's on the other end.


Ada carries the packets. INTERCAL carries the meaning.

About

AT Protocol client where every request is blessed, classified, and scored for politeness by real INTERCAL programs. Ada carries the packets. INTERCAL carries the meaning

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages