• Stars
    star
    39
  • Rank 693,563 (Top 14 %)
  • Language
    Crystal
  • License
    MIT License
  • Created almost 9 years ago
  • Updated almost 4 years ago

Reviews

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

Repository Details

A Crystal sequence differencing implementation

crystal-diff

Crystal sequence differencing implementation.

Based on the algorithm proposed in "An O(NP) Sequence Comparision Algorithm" (Wu, 1989)

Build Status

Installation

Add this to your application's shard.yml:

dependencies:
  diff:
    github: MakeNowJust/crystal-diff

Usage

require "colorize"
require "../src/diff"

Diff.diff("hello world", "hello good-bye").each do |chunk|
  print chunk.data.colorize(
    chunk.append? ? :green : chunk.delete? ? :red : :dark_gray)
end
puts

result

Development

$ crystal spec

Contributing

  1. Fork it ( https://github.com/MakeNowJust/crystal-diff/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

More Repositories

1

quine

Quine Museum
Witcher Script
306
star
2

bashcached

memcached server built on bash + socat
Ruby
275
star
3

heredoc

Package heredoc provides the here-document with keeping indent.
Go
126
star
4

sushi-ware

🍣 "THE SUSHI-WARE LICENSE"
113
star
5

crustache

{{Mustache}} for Crystal 💎
Crystal
83
star
6

h.js

2KB JavaScript Syntax Highlighter
JavaScript
37
star
7

bf.jq

Brainfuck interpreter written in jq -- This is the proof that jq is turing-complete!
JSONiq
37
star
8

crake

CRystal mAKE library
Crystal
33
star
9

mdlog

Markdown on `console.log`
JavaScript
31
star
10

noir

NOIR - Syntax Highlight Library for Crystal
Crystal
29
star
11

hotkey

This library provides HotKey for Go Language on Windows.
Go
28
star
12

rerejs

Re-implementation of ECMA-262 (JavaScript) RegExp
TypeScript
27
star
13

kantan-regex-book

作って学ぶ正規表現エンジン
Ruby
21
star
14

govm

GoVM is the Version Manager of Go.
Python
21
star
15

redp

Red Phosphorus - Pattern Match Library for ES2015 Era
JavaScript
14
star
16

nyanpass-cli

(๑¯Δ¯๑) < nyanpass.comの非公式コマンドラインツールなのん
Shell
13
star
17

md.html

Markdown inside HTML
JavaScript
10
star
18

yuki-code

Yuki Code is monospaced font for programmers
TypeScript
10
star
19

lernen

an automata learning library written in Ruby
Ruby
10
star
20

tap

TAP (Test Anything Protocol) test framework for Crystal
Crystal
10
star
21

quine_advent_calendar_2014

Quine Advent Calendar 2014
JavaScript
10
star
22

rexml-css_selector

A REXML extension for supporting CSS selector.
Ruby
9
star
23

commlog

Commit Log as a Blog
8
star
24

8cc.cr

compile-time C compiler implemented as Crystal macros
Crystal
8
star
25

diary

makenowjust's diary
JavaScript
7
star
26

eff.js

One-Shot Algebric Effects on JavaScript Generators
JavaScript
7
star
27

tilt

TILT Is Loader of Template. It is generalized template engine interface.
Crystal
6
star
28

dali

Modern, Lightweight and Simple Generic Programming Library (i.e. shapeless alternative for Scala 2.13)
Scala
6
star
29

node-paiza-io

paiza.io API unofficial wrapper - you can run any language on Node.js!
JavaScript
5
star
30

mark-and-sweep-by-c

Mark & Sweep Implementation by C
C
4
star
31

carcin.vim

Vim plugin to provide utility functions for carc.in
Vim Script
4
star
32

serialport

serial port library for Crystal
Crystal
4
star
33

png

Ping Next Generation
Go
4
star
34

ecoji.rb

Ecoji implementation in Ruby
Ruby
4
star
35

AnalF_ck

淫夢プログラミング言語
D
3
star
36

amorphous

The most beautiful parser library
Crystal
3
star
37

bfa

Scala
3
star
38

plucid

Automatically exported from code.google.com/p/plucid
C
2
star
39

quine.codes

GitHub Pages of @MakeNowJust
JavaScript
2
star
40

dotfiles2

My dot files (version 2)
Shell
2
star
41

kemal-crustache-example

Simple wiki with kemal and crustache
Crystal
2
star
42

octocat-quine

The Octocat Quine - Let's propagate!
JavaScript
2
star
43

mutate-config

Mutate config files (~/.config/Mutate)
Python
2
star
44

bf2js

brainf*ck to javascript compiler
JavaScript
2
star
45

enumcase

enumcase checks every switch statement handles all const values of the type
Go
2
star
46

mpg321

The mpg321 wrapper for Node.js
JavaScript
2
star
47

eenext

EventEmitter for next generation, which is well-typed in TypeScript and supports Promise and AsyncIterator
TypeScript
2
star
48

dotfiles3

MakeNowJust's dotfiles version 3
Vim Script
1
star
49

dotfiles-old

My dotfiles
Shell
1
star
50

upload2

Ruby
1
star
51

react-promise

Promise as React Component
JavaScript
1
star
52

pendant

Small utility of accessor for Crystal
Crystal
1
star
53

crystal-grass

Crystal
1
star
54

bluesoul

bluesoul finds duplicate articles (e.g. the the) in comment text.
Go
1
star
55

bloem.js

Processing events and actions like Gardening in JavaScript.
JavaScript
1
star
56

yt321

Play audio from Youtube URL
JavaScript
1
star
57

scanver

Go
1
star
58

efi-quine

The Quine program run on UEFI without OS
C
1
star
59

cljinst

Clojure Installer
Shell
1
star
60

decks

MakeNowJust's slides here
JavaScript
1
star