ohgotcha

A user named 'ohgotcha' is working towards some kind of live boundary environment, most likely using HPI-SWA squeak projects as an entry point. Eventually some meld of babylonian programming, gilad's shaperank, ungar's korz, bricken's distinction networks. discord , deepseek , chatgpt , dmx

– TODO: Introduction: Acknowledge the user's interest and the provided context.

The user is interested in a meld of Babylonian programming, Gilad's ShapeRank, Ungar's Korz, and Bricken's distinction networks.

We have been provided with a detailed response that breaks down each concept and suggests an architecture and spikes. Our task is to use the provided information to generate a helpful response to the user. We note that the user's handle is 'ohgotcha', but we don't have a public profile for them. We are to provide a structured plan and offer to draft a Squeak package skeleton.

## Clarifying the Core Concepts Let me add some technical color: - **Babylonian Programming (HPI-SWA)**: This is indeed about "live examples as first-class citizens." The key insight is treating concrete execution traces as tangible artifacts that can be edited and re-integrated into the running system. The [HPI group's work](https://www.hpi.uni-potsdam.de/hirschfeld/publications/media/RauchReinRamsonLinckeHirschfeld_2019_BabylonianStyleProgrammingDesignAndImplementationOfAGeneralPurposeEditorIntegratingLiveExamplesIntoSourceCode.pdf) shows how to maintain bidirectional relationships between examples and code. - **ShapeRank (Gilad Bracha)**: This appears to be Bracha's take on rank polymorphism (APL-style operations that automatically generalize across dimensions) combined with reactive streams. The connection to his [Newspeak language](https://newspeaklanguage.org/) is crucial - Newspeak runs in Squeak and provides the modularity foundations. - **Korz (David Ungar)**: Korz implements "subject-oriented programming" where behavior varies implicitly based on computational context. Ungar's [paper](https://dl.acm.org/doi/10.1145/2661136.2661147) shows how to make context switching seamless and compositional. - **Distinction Networks (William Bricken)**: These are graph-based representations where computation emerges from making distinctions. Bricken's [work](https://wbricken.com/pdfs/01bm/05arch/01dnets/04distinction-networks.pdf) provides a mathematical foundation for boundary mathematics that could underpin your "live boundary environment." ## Enhanced Implementation Strategy ### 1. Start with HPI-SWA Tooling The HPI group provides several ready-made components: - **Moldable Development Tools**: Context-sensitive inspectors and debuggers - **Squot**: Object-centric versioning that preserves execution context - **TruffleSqueak**: Your bridge to high-performance polyglot execution ### 2. Layered Architecture Refinement ``` ┌─────────────────────────────────────────────────────────────┐ │ Boundary UI Layer │ │ (Godot-Squeak / Web / Native Morphs) │ └─────────────────────────────────────────────────────────────┘ ┌─────────────────────────────────────────────────────────────┐ │ Semantic Projection Layer │ │ (D-net rewrites + Korz context dispatch) │ └─────────────────────────────────────────────────────────────┘ ┌─────────────────────────────────────────────────────────────┐ │ Reactive Computation Layer │ │ (ShapeRank arrays + Babylonian examples) │ └─────────────────────────────────────────────────────────────┘ ┌─────────────────────────────────────────────────────────────┐ │ Foundation Layer │ │ (Squeak + TruffleSqueak + HPI-SWA tools) │ └─────────────────────────────────────────────────────────────┘ ``` ### 3. Concrete Package Structure ```smalltalk "Create this package structure in your Squeak image" LiveBoundary-Core LiveBoundary-Examples "Babylonian instrumentation" LiveBoundance-ShapeArrays "Rank-polymorphic collections" LiveBoundary-Context "Korz-style implicit context" LiveBoundary-Distinctions "Bricken D-net implementation" LiveBoundary-UI "Boundary object inspectors" LiveBoundary-Demos "Integration examples" ``` ### 4. First Integration Spike Here's a concrete starting point for Spike A + B integration: ```smalltalk "In LiveBoundary-Demos package" Object subclass: #LBDemoPerson instanceVariableNames: 'name age interests' classVariableNames: '' package: 'LiveBoundary-Demos' LBDemoPerson >> asShapeArray "Convert to rank-1 ShapeArray for reactive processing" ^ LBShapeArray with: { self name. self age. self interests } "Babylonian example embedded as class method" LBDemoPerson class >> exampleOhgotcha <example> | person | person := self new name: 'ohgotcha'; age: (Date today year - 2020); interests: #(squeak liveProgramming boundaryObjects). ^ person "Context-aware inspector method" LBDemoPerson >> inspectWithContext: aLBContext <korz: #inspector> ^ aLBContext currentView render: self ``` ## Additional Research Threads You might also explore: - **Katherine Ye's work on Penrose**: Domain-specific visualization languages that could complement your boundary objects - **Jonathan Edwards' Subtext/Dataism**: Direct manipulation of program execution - **The Glamorrous Toolkit**: Moldable development environment that shares your philosophical foundations ## Next Steps Recommendation 1. **Set up HPI-SWA Squeak**: Clone [their image](https://github.com/hpi-swa/squeak) which comes with Babylonian tooling pre-installed 2. **Run your first Babylonian example**: Use their example annotations on a simple domain object 3. **Prototype ShapeArray**: Implement the core rank-polymorphic operations in pure Smalltalk first 4. **Wire to existing inspector**: Modify Squeak's inspector to use Korz-style context dispatch The beauty of this approach is that each layer can be developed incrementally while providing immediate value. The Babylonian examples give you concrete traction while the more abstract distinction networks can evolve gradually. Would you like me to elaborate on any of these layers or help you set up the initial Squeak environment?