-
Notifications
You must be signed in to change notification settings - Fork 6
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
Intrusive singly-linked list #8
Comments
Someone with a little Rust experience could probably do this fairly easily by copying the doubly-linked list code. |
✋ Raises hand. No Rust experience so far but willing to learn. |
@amanjeev sounds good! I'd be happy to walk you through it step by step, but probably won't have the time until next weekend. If you'd like to start now, I can give you pointers to resources and answer questions as you go? |
@hawkw Thank you for responding! I understand it is pretty busy. I think "pointers to resources" for now is the best place to start. Hopefully, this will save you some time as well and will allow me to dive in. |
@amanjeev The Rust Programming Language is probably a good place to start for basic Rust syntax and idioms/ |
Thank you! I shall begin. :-) |
Is it going to be too verbose and annoying if I leave insights as I go. :D Here is one for today - Learnt that I had to use nightly build instead of stable.
OK, maybe it will be bad. I will keep it to the questions then. |
No, please feel free to post any insights and document your progress! Hopefully others will find it useful as well.
Yes, this library currently only builds against the nightly compiler --- there's an issue open, #12, for eventually being able to build against the next stable release as well. This definitely should be documented elsewhere, though; that's my fault for not putting it in the README! EDIT: I've added a note in the README documenting the Rust compiler requirement --- thanks again for pointing this out. |
I was about to reply with I could do that but you beat me to it. 👍
Thank you! |
@hawkw What does your setup look like? Example of the things I would like to know
Thank you. PS: I am trying Jetbrains CLion with rust plugin mainly so that I can easily jump to the declarations but it does not work for core lib for me. I opened a question for the plugin folks - intellij-rust/intellij-rust#2238 |
VSCode is popular if you need a full IDE type experience, the rls plugins work well but can be annoying to set up on nightly. To start you really just need to install rust with rustup and pick any editor and start coding (I started with just vim and a syntax highlighting plugin), try to get the project to build with cargo. The rust compiler produces good errors, that should be enough for now. |
@amanjeev, @leshow's advice is pretty much spot on. I'm using VS Code with the RLS plugin; there's also a comparable RLS plugin for Atom which works alright. If you have trouble installing a working version of RLS, check out editor-rs/vscode-rust#363 (comment) --- it should save you a bit of pain. This applies to any editor that uses the RLS as a backend. |
So far, I have been able to copy (Commenting so you can point out obvious flaws in my reasoning/thinking etc. :) ) |
@amanjeev I'm not sure if we actually want a singly-linked list to have the ability to traverse backwards (e.g. The primary use-case I can see for a singly-linked list is when you intend to use a list exclusively as a stack and thus don't need the additional overhead of maintaining a set of reverse links. Furthermore, I'm not really sure how one would go about giving a node with only a forward reference the ability to reference the previous node... What do you think? |
(also, if you'd like to, please feel free to push up a work in progress branch at any point and I can check out what you're working on!) |
I am an idiot. I kept thinking I had to contain most of the functionality. Sorry about that, @hawkw. My branch is |
I, literally, just commented out and deleted a bunch of stuff from |
It looks like you're on the right track so far! I suspect the code could be made somewhat simpler by removing the |
Yay!
Sounds good to me. |
I tried to follow your advice about removing Took me a while to wrap my head around the traits, although I still falter with multiple //keeping-fingers-crossed |
@hawkw I see a bunch of changes when I run I also see a bunch of warnings like these...(click to open)
|
@amanjeev, yeah, the |
Forgive my ignorance. What does Like https://github.com/hawkw/alarm/blob/master/intruder_alarm/src/doubly/mod.rs#L58 |
If you think its worth something, should I open a PR? Please let me know if you have suggestions for further improvements. |
@amanjeev if the implementation is done and the tests pass, please open a PR! :D |
Opened #35 😨 😃 |
No description provided.
The text was updated successfully, but these errors were encountered: