Too-many-lists: images ...

Created on 14 Oct 2016  ยท  9Comments  ยท  Source: rust-unofficial/too-many-lists

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?

help wanted

Most helpful comment

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

All 9 comments

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.

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

ah, and no colors :-(

draw.io is fine then

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

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

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).

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Gankra picture Gankra  ยท  3Comments

ericye16 picture ericye16  ยท  10Comments

louy2 picture louy2  ยท  5Comments

wthrowe picture wthrowe  ยท  3Comments

nox picture nox  ยท  3Comments