Android's new Bluetooth stack rewrite (Gabeldorsh) is written with Rust
101–110 of 393 posts
Re: Android's new Bluetooth stack rewrite (Gabeldorsh) is written with Rust
#102Earlier quoted context omitted.
Rust isn't that hard to learn. I teach it to college sophomores who only know Java, and within 2-3 months I have them writing parsers and interpreters in Rust. In fact these students are requesting our courses to be taught in Rust, and have never heard of Zig. I think that while the language is a little complicated, this is tempered by how nice the tooling is. I consider the borrow checker to be my TA, as it actually…
I'd imagine given another language (e.g. Python), they'd learn a lot faster and be a lot more prodictive throughout the course.
I do wonder if Rust is easier or harder than other comparable languages like C / C++ when the person has no prior knowledge of programming.
I would say just the ease of having a hello world and the ease of the Rust book would make it easier to get to grips with. No dealing with complex build systems and compiler flags at the start
Re: Android's new Bluetooth stack rewrite (Gabeldorsh) is written with Rust
#103Earlier quoted context omitted.
Rust does not have classes, strictly speaking, though you can define methods on structs. https://crates.io/crates/cxx is the simplest way to do an integration. It is slightly more work than "just plop in" but it's not incredibly difficult. It's harder than mixing C and C++ together, but then again, almost no pairings of languages are that easy.
Then C++ doesn't have classes either, you can put methods on structs though. Rust people keep saying there are not classes, but all a class needs it the ability to put methods on structs. Private access to some of the internals is often useful, but doesn't need to be enforced by the compiler.
Re: Android's new Bluetooth stack rewrite (Gabeldorsh) is written with Rust
#104Earlier quoted context omitted.
Rust isn't that hard to learn. I teach it to college sophomores who only know Java, and within 2-3 months I have them writing parsers and interpreters in Rust. In fact these students are requesting our courses to be taught in Rust, and have never heard of Zig. I think that while the language is a little complicated, this is tempered by how nice the tooling is. I consider the borrow checker to be my TA, as it actually…
I'd imagine given another language (e.g. Python), they'd learn a lot faster and be a lot more prodictive throughout the course.
Re: Android's new Bluetooth stack rewrite (Gabeldorsh) is written with Rust
#105Earlier quoted context omitted.
I'd imagine given another language (e.g. Python), they'd learn a lot faster and be a lot more prodictive throughout the course.
Python is way too ad-hoc to be a good teaching language in a professional context. It's designed to teach kids and first-time coders, as an alternative to BASIC.
To me it's the difference between programming and computer science.
Re: Android's new Bluetooth stack rewrite (Gabeldorsh) is written with Rust
#106Earlier quoted context omitted.
Anecdotal, but my new 16 inch MBP drops BT connections all the time. I had to give up the keyboard and mouse I've used for years across at least 5 computers, mostly Mac's because they disconnected so much. Even the Apple keyboard and mouse I switched to drop occasionally.
Honestly sounds like faulty hardware or interference.
Re: Android's new Bluetooth stack rewrite (Gabeldorsh) is written with Rust
#107Wait , so can rust generally be replace C++ code in most projects ? Has anyone here had success with a partial to Rust migration.
I mean, Mozilla migrated parts of Firefox to Rust, that's the big one. I hear it might start being included in the Linux Kernel soon.
Re: Android's new Bluetooth stack rewrite (Gabeldorsh) is written with Rust
#108Earlier quoted context omitted.
Any insight into why Apple seems to have a much better bluetooth stack? I do a lot of BLE development that has to work cross platform, and we see constant GATT connection issues on android compared to almost none on ios.
Apple has a unique relationship to its hardware, and the money to bend vendor's firmware to their will. Half of the problem with Bluetooth is the host stack. The other half is the firmware running on the controller on the other side of HCI. If the controller ever gets screwed up, the host stack can only disconnect from HCI and totally restart the controller.
Re: Android's new Bluetooth stack rewrite (Gabeldorsh) is written with Rust
#109Earlier quoted context omitted.
Any insight into why Apple seems to have a much better bluetooth stack? I do a lot of BLE development that has to work cross platform, and we see constant GATT connection issues on android compared to almost none on ios.
Anecdotal, but my new 16 inch MBP drops BT connections all the time. I had to give up the keyboard and mouse I've used for years across at least 5 computers, mostly Mac's because they disconnected so much. Even the Apple keyboard and mouse I switched to drop occasionally.
https://news.ycombinator.com/item?id=26625356
tl;dr Using USB3 ports can cause Bluetooth dropouts on Macs (and lots of other machines).