too-many-lists icon indicating copy to clipboard operation
too-many-lists copied to clipboard

images ...

Open kontrafiktion opened this issue 9 years ago • 9 comments

Would you be interested in some images (boxes and lines) that might make some concepts/problems clearer. E.g. it took me quite a while to grok:

pub fn pop(&mut self) -> Option<i32> {
    match mem::replace(&mut self.head, Link::Empty) {
        Link::Empty => None,
        Link::More(node) => {
            self.head = node.next;
            Some(node.elem)
        }
    }
}

So I created pop_move2 2

If you are interested, I would create some more. For the one above, I have used draw.io, so it should be possible to edit them collaboratively, or do you know a better tool?

kontrafiktion avatar Oct 14 '16 13:10 kontrafiktion

Yes, such images would be nice to have!

Generally I use graphviz or LaTeX for this, so that the source can be committed in-tree as well.

Manishearth avatar Oct 15 '16 06:10 Manishearth

The source of draw.io files can be committed (but is unreadable). I wouldn't know how to create nice/clear layouts graphviz and I wouldn't even want to start using LaTeX. Alternatively, I could offer UniCode Images like this (using MonoDraw):

┌─────────────────────┐         ┌─────────────────────┐
│        Node         │         │        Node         │
│        next:◆───────┼────────▷│        next:        │
│      elem: 31       │         │      elem: 31       │
└─────────────────────┘         └─────────────────────┘

but they are (visually) max bigger less nice than a SVG/PNG created with draw.io

kontrafiktion avatar Oct 15 '16 08:10 kontrafiktion

ah, and no colors :-(

kontrafiktion avatar Oct 15 '16 08:10 kontrafiktion

draw.io is fine then

Manishearth avatar Oct 15 '16 08:10 Manishearth

rustbook does not seem to support images. I just created a simple Makefile that invokes rustbook and copies to the "book" folder.

You can find the current work in progress here: https://github.com/kontrafiktion/too-many-lists/tree/some-images

btw: To be able to build on my machine (OS X) with rustup/multirust, I have to invoke rustbook like this:

DYLD_LIBRARY_PATH=${HOME}/.multirust/toolchains/nightly-x86_64-apple-darwin/lib rustbook

kontrafiktion avatar Oct 15 '16 20:10 kontrafiktion

I'm surprised it doesn't handle images, we should add support for that. cc @steveklabnik @GuillaumeGomez

Manishearth avatar Oct 16 '16 03:10 Manishearth

Rustbook is going to die off sometime, you should port this to mdbook instead, IMHO. It's what I'm using for the next version of the book, and plan on porting all the other in-tree books over when that ships.

"Port" shouldn't be too tough, they're very similar. Just try to run it on this source, I bet it'll Just Work

On Oct 15, 2016, 23:52 -0400, Manish Goregaokar [email protected], wrote:

I'm surprised it doesn't handle images, we should add support for that. cc @steveklabnik (https://github.com/steveklabnik) @GuillaumeGomez (https://github.com/GuillaumeGomez)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub (https://github.com/rust-unofficial/too-many-lists/issues/59#issuecomment-254025829), or mute the thread (https://github.com/notifications/unsubscribe-auth/AABsis0Cxuv_BgQfqQuTpw68ozZHkVWeks5q0Z-VgaJpZM4KXAC1).

steveklabnik avatar Oct 16 '16 16:10 steveklabnik

I created an experimental branch (https://github.com/kontrafiktion/too-many-lists/tree/mdbook-migration) that contains a preliminary migration.

If you want to do the migration again, here is the list of things I did:

  1. replace the "%" in the first line of each document by a "#"
  2. move all the files to a directory "src"
  3. create a book.json file with the title etc.
  4. add README.md to the SUMMARY.md

the only "issue" I found: mdbook does not support meta "title" information per page. It will use the "title" from the book.json.

To simplify a future the real migration I created a very simple script "convert-2-mdbook" The only thing I did by hand was the addition of README.md to SUMMARY.md

lgtm

kontrafiktion avatar Oct 19 '16 20:10 kontrafiktion

save for https://github.com/rust-unofficial/too-many-lists/issues/64, we are now on mdbook.

edunham avatar Nov 22 '16 18:11 edunham