MCPcopy Index your code
hub / github.com/deadpixi/rope

github.com/deadpixi/rope @v0.1.3

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.3 ↗ · + Follow
43 symbols 177 edges 3 files 20 documented · 47% updated 3y ago★ 89
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Ropes in Go

A value-oriented, immutable, functional rope in Go.

Introduction

This module provides an implementation of the rope data structure in Go. Ropes allow for the efficient manipulation of long strings of text.

The rope structure implemented by this module is immutable, value-oriented, and immutable.

There is no way to modify an existing rope: all operations on a rope return a new rope.

One notable use case that this makes particularly nice is undo/redo: simply keep the old versions of the rope around.

Example

A simple example:


    rope := NewString("hello")
    rope = rope.AppendString(", world!")
    fmt.Printf("The value of the rope is: %v\n", rope.String())

Documentation

Documentation is included inline and is also available at https://pkg.go.dev/github.com/deadpixi/rope

License

rope - a persistent rope data structure Copyright (C) 2022 Rob King

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Core symbols most depended-on inside this repo

NewString
called by 23
rope.go
String
called by 16
rope.go
AppendString
called by 8
rope.go
Append
called by 7
rope.go
isBalanced
called by 6
rope.go
Length
called by 5
rope.go
Slice
called by 5
rope.go
isLeaf
called by 5
rope.go

Shape

Method 21
Function 20
Struct 2

Languages

Go100%

Modules by API surface

rope.go23 symbols
rope_test.go14 symbols
rope_reader.go6 symbols

For agents

$ claude mcp add rope \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact