Safe Network Dev Update - September 10, 2020

Just want to add that using async in Rust is very nice indeed, and makes doing multi threaded code easy compared to the rocket science it is without it. The result is much less code, far fewer bugs, easier debugging and maintenance, and greater efficiency.

I’ve not done much yet, but the concurrency needed for my logterm-dash app was a breeze because of this. Getting the concurrent threads coded and working was literally fifteen minutes, instead of probably an hour reading and who knows how long writing and fixing the code. I was literally shocked at how easy it was.

Using Rust is in general an incredible experience, because the compiler won’t let you write unsafe (buggy) code. So here I am, with a lifetime’s experience of C, C++ in particular, learning how to write bullet proof code because I’m forced to think it through at a whole new level. Having debugged compiled code at the assembly language level I thought I understood this, and I did in part - what gets put on the stack and the heap, and how each variable is stored and accessed in memory. But I’d never thought about ‘borrowing’ in this way, even though it is fundamental to writing solid multi threaded code. I suspect that I developed a way of coding that avoided these issues to some extent, but would then end up having to spend literally days, sometimes weeks tracking down and fixing tricky bugs.

And with a compiler that can suggest cut and paste fixes for my basic errors, life for a newcomer is made much easier. I still struggle with borrowing, but each time I am learning a bit more how to go directly to the solution, and I’m being taught why my first attempt was buggy.

Using Rust a really nice experience because I love to learn, and it is teaching an old dog new tricks!

23 Likes

Just wow!!

5 Likes

I’d like to take a look at Rust one day. It does sound like it has moved the system oriented programming language space on to a new level.

6 Likes

It’s a big claim, but in many ways it’s accurate. Now it needs to async automatically and let us write straight logic. If it could then handle interior/exterior mutability automatically we would be a good place (leave the mutkeyword, but say I will handle that for you now you told me it can mutate) :slight_smile:

8 Likes

Just an FYI, the Safe name brand poll is now closed. It was a close vote at the end. But “Safe Network” with a space has pulled through as the winner. Thanks to all who participated!

Cheers

11 Likes

in greek only the summary through google translate

2 Likes

Is there a doc outlining why this was formulated in this particular way, eg why 2 reserved bytes and not 1 or 3 or 10? Not that I am personally interested in critique, I’m more interested in it for historical purposes down the track, documenting thoughts, intentions (or absence of), historical context, influence and precedence can be a handy resource in five or ten years when those spare bits might be subject of debate. Even if it’s just something informal it can be good to have something publicly available. Much easier to do it when the decision process is fresh than six months later.

3 Likes

That was an arbitary number really.

Version is a simple version, so any breaking change increments this.
Length - up to 4Gb files/chunks or can be set at 0 for streaming (radio etc.)
Flag, currently only uses 1 bit to indicate qp2p message or a consumer message.

7 Likes

Sounds a lot like what HTTP proto concluded was a good pattern :stuck_out_tongue: , HTTP headers vs body and order of sending so(headers hit first then body buffers). Not necessarily the specific lengths but the concept anyways.

1 Like

Anyone who has every worked with asynchronous code and callbacks knows that nested callback hell is the worst. Async/Await for me as starting developer made everything so much easier. For that same reason I think the core developers will have much better time with less errors and straightforward readable promise logic.

9 Likes

Why is parsec being removed from routing? I thought the development of parsec was the jam…

Explanations given here:

9 Likes