Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

images ... #59

Open
kontrafiktion opened this issue Oct 14, 2016 · 9 comments
Open

images ... #59

kontrafiktion opened this issue Oct 14, 2016 · 9 comments

Comments

@kontrafiktion
Copy link
Contributor

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?

@Manishearth
Copy link
Collaborator

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.

@kontrafiktion
Copy link
Contributor Author

kontrafiktion commented Oct 15, 2016

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
Copy link
Contributor Author

ah, and no colors :-(

@Manishearth
Copy link
Collaborator

draw.io is fine then

@kontrafiktion
Copy link
Contributor Author

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

@Manishearth
Copy link
Collaborator

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

@steveklabnik
Copy link

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 notifications@github.com, 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 (#59 (comment)), or mute the thread (https://github.com/notifications/unsubscribe-auth/AABsis0Cxuv_BgQfqQuTpw68ozZHkVWeks5q0Z-VgaJpZM4KXAC1).

@kontrafiktion
Copy link
Contributor Author

kontrafiktion commented Oct 19, 2016

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

@edunham
Copy link
Member

edunham commented Nov 22, 2016

save for #64, we are now on mdbook.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants