• Stars
    star
    883
  • Rank 51,702 (Top 2 %)
  • Language
    Rust
  • License
    GNU General Publi...
  • Created over 4 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Debugger for Sed: demystify and debug your sed scripts, from comfort of your terminal.

Desed

Demystify and debug your sed scripts, from comfort of your terminal.

desed usage example

Desed is a command line tool with beautiful TUI that provides users with comfortable interface and practical debugger, used to step through complex sed scripts.

Some of the notable features include:

  • Preview variable values, both of them!
  • See how will a substitute command affect pattern space before it runs
  • Step through sed script - both forward and backwards!
  • Place breakpoints and examine program state
  • Hot reload and see what changes as you edit source code
  • Its name is a palindrome

Install

Alpine Linux

aports/testing/desed

Arch Linux

Via AUR: desed-git or desed as stable version.

DragonFly BSD

pkg install desed

Fedora

dnf install desed

FreeBSD

pkg install desed

Void Linux

xbps-install -S desed

Source

git clone https://github.com/soptikha2/desed
cd desed
cargo install --path .
cp "desed.1" "$(manpath | cut -d':' -f1)/man1"

Cargo

cargo install desed

Precompiled binaries

See releases.

Dependencies:

Development: rust, cargo (>= 1.38.0)

Runtime: sed (GNU version, >= 4.6) (desed works on BSD if you installed gsed)

Controls

  • Mouse scroll to scroll through source code, click on line to toggle breakpoint
  • j, k, g, G, just as in Vim. Prefixing with numbers works too.
  • b to toggle breakpoint (prefix with number to toggle breakpoint on target line)
  • s to step forward, a to step backwards
  • r to run to next breakpoint or end of script, R to do the same but backwards
  • l to instantly reload code and continue debugging in the exactly same place as before
  • q to quit

FAQ

How does it work?

GNU sed actually provides pretty useful debugging interface, try it yourself with --debug flag. However the interface is not interactive and I wanted something closer to traditional debugger. I've written something here.

Does it really work?

Depends. Sed actually doesn't tell me which line number is it currently executing, so I have to emulate parts of sed to guess that. Which might not be bulletproof. But it certainly worked good enough to debug tetris without issues.

Why sed??

Sed is the perfect programming language, especially for graph problems. It's plain and simple and doesn't clutter your screen with useless identifiers like if, for, while, or int. Furthermore since it doesn't have things like numbers, it's very simple to use.

But why?

I wanted to program in sed but it lacked good tooling up to this point, so I had to do something about it.

Why?

Because it's the standard stream editor for filtering and transforming text. And someone wrote tetris in it!

What is the roadmap for future updates?

I would like to introduce syntax highlighting and add this tool to standard repositories of all major distributions.

Is this a joke?

I thought it was. But apparently it's actually useful for some people.

Other projects

  • video summarizer, a tool and browser extensions that determines if people in video are currently talking or not, and speeds up the video accordingly. Great for long lecture videos for skipping time spent writing on a whiteboard.

More Repositories

1

video-summarizer

Summarizes videos into much shorter videos. Ideal for long lecture videos.
Rust
110
star
2

aidungeon2-cli

CLI and library for AI Dungeon 2. Command line client.
Rust
13
star
3

Evolution

Evolution is program that shows possibilities of genetic programming. Evolution was created for "Junior Tech University", which is project of czech college ČVUT.
C#
7
star
4

bachelors-thesis

Bachelor's thesis: developing symbolic execution for Rlang using Chef and S2E
Dockerfile
5
star
5

archlinux-dotfiles

Archlinux i3 dotfiles
Vim Script
4
star
6

bakalari

Dart library for accessing czech school system Bakaláři
Dart
3
star
7

shifra

TypeScript
3
star
8

crapi-csharp-wrapper

C# wrapper for CR API. Can be used to get information from Clash Royale universe, for example players, clans, decks, recent battles, tournaments, clan chest and much more!
C#
3
star
9

soptik-article-generator

Soptik, the Article Generator. Produces static HTTP webpage from custom flavour of markdown.
CSS
3
star
10

fitcvut-furik

FUd Risrč & InženýrinK department
HTML
2
star
11

prenoc-web

Website for prenoc.cz
HTML
2
star
12

gnulib-2020

Patched version of GNU lib that corrects date to never exceed 2020 again.
C
2
star
13

studocu-unblocker

Remove studocu paywall and unblur materials that require you to sign up for their premium account. Firefox extension
JavaScript
1
star
14

wikipedia-link-analyzer

Analyze destination of wikipedia article links. Do all articles lead to Hitler in <=6 jumps? Does following topmost always link to philosophy?
Rust
1
star
15

fiks-cpu

Python
1
star
16

automan

Automatically generate shell autocomplete from man pages. No more digging through man pages, everything is in your shell!
1
star
17

diffeek

Mime-type aware diff
C++
1
star
18

FindYourWay

FindYourWay is WinForms app that shows some of possibilities of Genetic Algorithms. Entities have to adapt to get thru obstacles, they have to learn on their own
C#
1
star
19

chef-simple-interpreter

Simple interpreter to test dslab Chef capabilities
C++
1
star
20

fit-ctu-free-room-finder

Python
1
star