Added a useful blog about Rust error handling:
-
Study of std::io::Error is a well written and helpful explanation of how to design good error handling by examining
std::io::Error
and the thinking behind its design (October 2020, blog)
Added a useful blog about Rust error handling:
std::io::Error
and the thinking behind its design (October 2020, blog)We need more of these, nice find Mark.
[EDIT] The reddit discussion is enlightening as well https://www.reddit.com/r/rust/comments/jbdk5x/blog_post_study_of_stdioerror/
Gah. Just when I though std::io::Error
was neat you had to spoil it. There’s always more, and I guess I love that really
Toivo, how is your progress? Hope it’s going well!
To give a little ‘update’ on my computing journey here, the Rust course seemed doable (it’s very beginner level) but I had a funny feeling after a couple of days of getting through it over Christmas of being absolutely groundless, and having a thousand other things I felt I wanted to know about before continuing with any specific language.
So it’s been a software/hardware onslaught since then, and it’s been very lovely and full of adventure. I’ve upgraded my 12 year old laptop’s RAM and put in an SSD all by myself, felt like a complete wizard, it runs pretty smoothly now. A CPU I ordered arrived in the post last week but I can’t get one screw out of the bottom of the laptop (yet, I will find a way) so haven’t been able to open it up and replace it. I’ve been through ~10 operating systems, I can partition disks now I’ve settled on PureOS, it’s very lightweight and functional, no propietary software. I’ve backed up all my data and cleaned it up with external hard drives, I’d never done that before. I feel like I know what data ‘is’ now in a way I didn’t before.
One exciting project here on the hardware side for me is picking up a cheap second hand x200 thinkpad and flashing libreboot on it and pimping out the hard drive and ram one of these days. I’ve started asking my students (I’m a music teacher) if they have old laptops they don’t use and I’m going to start repairing and fixing them up and selling them on as a learning/recycling type project, there is at least a 2009 imac on the way.
I’ve a raspberry pi 3b+ on which I set up my own desktop a few days ago (again, still feels like utter wizardry to me). I plug the pi into a 10€ 4:3 ratio monitor from the 90s which I picked up second hand, which helps me feel like I didn’t miss out too much on all that computing in the 90s.
On the software/languages side of things, I’ve been learning to record and mix music in Ardour, learning to write music scores using LilyPond - Wikipedia I really like this little program, you write the music in some kind of Scheme-based syntax. I’ve been playing Colobot Colobot - Wikipedia where you use a C++ esque language to colonise planets, I’ve been coding live music with this https://sonic-pi.net/ which is incredible. So yes, a lot of games and music, so far.
I’ve learned Bash, a bit of basic scripting, some Markdown, some Latex, a bit of VIM, basics of the linux file system. I can sort of picture what a program is now, and the last few days have come back to thinking about actually developing things, and looked at a few tutorials about HTML, CSS, and Javascript, and frameworks for Javascript, it’s a lot easier to read and think about now. Considering Svelte here, as @happybeing is rarely far off on these things it seems.
Things I’d like to get more into: Risc V, Wasm, GNU Net, GUIX, Guile, Tor, i2p, Python, and of course, Rust and Safe so yes if I can finish this long rambly post with a bit of clarity - computers, wow, I think I might be here to stay, what a fun game. Cheers to MaidSafe for existing and continuously tempting me into facing the fact that there still is hope for the computing world, and it would be worth my while to get involved, and that a more beautiful and free cyberspace could still exist, and that I could even possibly help make it an interesting place. I mean, I’ve still an incredible amount to learn, the clearer I see the more the vastness of the subject becomes apparent to me, but maaaaybe I could one day help out with something. Anyway, hats off and three cheers to MaidSafe.
With a little bit of robotics and controllers (embedded) along with NeuroEvolutionary networks and time, the latter being impossible right now, but that’s my goal. Bliss I tell ye bliss.
I personally can’t wait to see how you comibine those things, or some other mad project, once you have 5 or 10 hours free a week again David. It’ll be sooner than you think rolling around. Finish line is in sight
That’s fabulous @JayBird I really enjoyed reading that, you are flying!
I can’t wait to hear future installments. By the way, if you are interested in making music with WASM the maintainer of wasm-git
who I did some work with recently is experimenting with using WASM to make music. You can follow him on Twitter here, or in GitHub of course.
I had no idea any of this was possible - you’re throwing me even further down the rabbit hole here. He has a blog post on ‘physical model synthesis’, with plenty of links, brilliant stuff
Well thanks for asking, but no, no progress at all. I’m a bit all over the place in thinking what to do in my life in general, and programming seems at the moment a bit more as a distraction or sidestep. It would probably be quite good sidestep in many ways, but might require too much focus, that is away from other things.
It actually comes down to realizing that I have focused far too much on money. You know, I have been hoping to get rich enough from MAID in order to be free to choose to do whatever I want, not thinking about income etc. That has become the main reason for waiting for the next dev update, checking progress on Github etc. - and becoming interested in coding. No, I’m not thinking I could do anything for the project, but becoming interested in coding was a side effect from this focus on money, checking Github, etc. But recently I have started asking myself, why I want money? The answer seems to be, that there are not many actual things I would need the money for, but I dream of unlimited freedom and “infinite potential”. But what are those actual concrete things I would use that potential for? Turns out that I don’t really know that very well, and turns out that focusing on dreaming about the potential is actually closing my view on hands-on living. Turns out also, that I am already much more free to do whatever I choose, if I just remember, that money itself is not something I actually want, but a tool. And actully quite unnecessary for the things I want. Well, not unncessary, but I can go forward with what I have, no need to achieve an omnipotent power as the richest guy on the planet, if you know what I mean. Yes, more money might be better, and I might feel safer when thinking my future, but to think about money too much is a distraction. I know, that should not be news to any mature person, but honestly that has happened to me. So now my mantra is “I don’t want money, I don’t want money…” and that helps me to find something I really want, (and maybe later I may want money for that).
So back to learning Rust… not at this moment. But it was super nice to hear how you have been doing!
(And yes, I am still also genuinely interested in Safe Network, but there is this quite unhealthy, nervous, habitual, non productive aspect, that I need to do something for. At the moment it seems that the best thing I can try, is to distance myself a bit, but it is very difficult, when the testnet is always just around the corner. )
Cultivate the kindness that lives inside you. It’s easier if you have enough money not to constantly be in fight-or-flight mode, but you don’t need millions for that.
I also recommend looking into chickens. They’re cute, easy and inexpensive.
Best stick with the former. Or you’re liable to encounter the fight-or-flight incarnation.
EDIT: I do enjoy the latter too, but that’s a secret we don’t talk about.
Maybe this topic wasn’t such a great idea…
Oh my, it’s happening…
I’ve not done programing since I used Logo and Basic on my Franklin Ace 1000 which was a clone of an apple II.
Franklin Ace 1000
Released: 1982
Price: $1349
CPU: MOS 6502, 1.0 MHz
RAM: 64K
Display: monochrome; color is optional
280 X 192, 40 X 24 text
Ports: composite video output
8 internal expansion slots
Storage external 143K floppy ($479)
with interface card
OS: Apple DOS
What books would you guys recommend to get a good background on programing concepts? I’d like to try my hand at learning rust. First I’d like to understand the structure and concepts that I’ll be using.
I would recommend starting with the C Programming Language book: https://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628
Then the The Rust Programming Language.
I’m no expert on teaching programming, but this was a good book path for rust programming for me.
That’s interesting because K&R was the first programming book I read, and I’m struggling to recall if I’ve read any others… until the Rust Book!
One that I’ve never read but which I think may be worth looking up is called something like “Design Patterns”. I’d be surprised if by now there aren’t variations with examples in different languages, even Rust. Quick search… ahah: Rust Design Patterns Book.
I see there are now lots of such books but I’ve no idea which are worthwhile. The Rust one I’ve linked is free online so I plan to have a read of that.
Today I learned when to include / not include Cargo.lock with the repository:
Binary? Include it.
Library? Don’t include it.
Why do binaries have Cargo.lock in version control but not libraries
If you’re building a non-end product, such as a rust library that other rust packages will depend on, put
Cargo.lock
in your.gitignore
. If you’re building an end product, which are executable like command-line tool or an application, or a system library with crate-type ofstaticlib
orcdylib
, checkCargo.lock
intogit
.