Skip to content

Commit

Permalink
πŸ‘€ readme: show off-by-one bugfix diff
Browse files Browse the repository at this point in the history
  • Loading branch information
cratelyn committed Nov 17, 2023
1 parent 9f4548e commit 4919f06
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,25 @@ brevity allows readers to see parallels at a function/type/module level, rather
**πŸ”Ž simple reviews**
cratelyn/j#3 is an example of a very simple bugfix, fixing an off-by-one error for the `i.` verb.
`git show` has an option `--word-diff-regex` that can be used to control what a "word" is in the
diff output. so `git show --word-diff-regex=.` is a way to see a per-character diff. looking at
that commit in this manner, we see...
```diff
/**monadic verbs*/impl A{
pub fn m_idot(self)->R<A>{let(a@A{m,n,..})=self;let gi=|i,j|a.get(i,j)?.try_into().map_err(E::from);
if let(1,1)=(m,n){let(m,n)=(1,gi(1,1)?);let(mut o)=A::new(1,n)?;
for(j)in(1..=n){o.set(1,j,{+(+}j{+-1)+}.try_into()?)?;}Ok(unsafe{o.finish()})}
else if let(1,2)=(m,n){let(m,n)=(gi(1,1)?,gi(1,2)?);
let(mut v)=0_u32;let(f)=move |_,_|{let(v_o)=v;v+=1;Ok(v_o)};A::new(m,n)?.init_with(f)}
else{bail!("i. {m}x{n} not supported")}}
```
you can run `git show fb72462 --oneline --word-diff-regex=.` if you would like to see this in a
local clone of this repository.
**todo...**
* example of a pull request / commit in this project; adverb support
Expand Down

0 comments on commit 4919f06

Please sign in to comment.