Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
scoutt
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
32 ms
·
301.
▲
by
scoutt
6y ago
Thank you! Yes, the last 2 examples are much clearer to my eyes. And it's on the tutorial too: File::open("hello.txt")?.read_to_string(&mut s)?; I should pay more attention :) But I also deduce 2 things: - That
302.
▲
by
scoutt
6y ago
As a C developer for embedded, considering Rust for a long time now, the panic thing is something that bothers me. I don't want/I can't panic. I want to be returned false , null or whatever. Do I have to check if an exte
303.
▲
by
scoutt
6y ago
Aside from Linus' reaction, there are some really interesting pearls in that thread, for example: Regarding code style[1]: > The more you make it look like (Kernel) C, the easier it is for us C people to actually read. My eyes have
304.
▲
by
scoutt
6y ago
Thanks. Yes, of course it can point to something in the heap. My comment was related to GP's "but there is an underlying array on the heap" and I wanted to say that &str is not always necessarily in the heap. I missed tha
305.
▲
by
scoutt
6y ago
You can be using a system that doesn't have a memory allocator (so no heap memory), like in many embedded systems.
306.
▲
by
scoutt
6y ago
>strings aren’t actually simple arrays of characters in Rust like they are in C, but there is an underlying array on the heap Not a Rust expert, but to my understanding, 'string' is an array of characters, not necessarily livin
307.
▲
by
scoutt
6y ago
I am pretty sure that something can go wrong with a bad (partial or missing) rule of 5.
308.
▲
by
scoutt
6y ago
In a few words, when dealing with kernel modules and drivers (and I guess every low-level implementation), ensuring that the upper (Rust) layers are safe is still the job of a person: a person, with a great understanding of both worlds, wri
309.
▲
by
scoutt
6y ago
I've seen some other (often more serious) breakout producers to put solder jumpers in their boards to enable I2C pull-ups (disabled by default). That's pretty nice since you can enable the I2C pull-ups just when needed.
310.
▲
by
scoutt
6y ago
I've seen much more buggy I2C peripherals than SPI (ST, I'm looking at you). SPI is usually very stable. Here it's being used to generate VGA signals: https://www.artekit.eu/vga-output-using-a-36-pin-stm32
311.
▲
by
scoutt
6y ago
Nowadays it's more like: >Most of the time people find themselves fighting against the language, and struggling to have the program simply to ... compile.
312.
▲
by
scoutt
6y ago
“Both” runtime and compile time would be correct. Runtime checks has nothing to do with GC. Bounds checking has nothing to do do with GC for example.
313.
▲
by
scoutt
6y ago
Some at compile time, some at runtime (RefCell).
314.
▲
by
scoutt
6y ago
The name surely recalls the same word as the acronym of Code Of Conduct, which I always wondered why are they using that acronym in texts (like "Enforcing a CoC") and nobody is complaining. But then I think it's just because
315.
▲
by
scoutt
6y ago
Since the text in your parent post is more or less the same of your last comment from 10 hours ago, I agree you are in a sort of "keyword oriented" evangelization crusade against good'ol C. The question would be, why caring s
316.
▲
by
scoutt
6y ago
For the practical case is not different. But is not coherent. It’s weird. And opening/closing files is an historical concept. Why “drop” is the opposite of “open”? Let’s change “open” for “lift” or “notdrop”.
317.
▲
by
scoutt
6y ago
FFmpeg is the whole package including ffmpeg as a standalone program and its libraries. From https://www.ffmpeg.org/about.html "FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux
318.
▲
by
scoutt
6y ago
Consider that C/C++, being highly portable, has support for many platforms and architectures, including the possibility of cross-compiling. I guess if a package manages works on all those architectures and platforms, then the implement
319.
▲
by
scoutt
6y ago
No matter the implemented package manager solution, it has deal with different packages types: from a single class library (a single hpp file) up to monster libraries like ffmpeg. In the case of ffmpeg, what the package manager should do? D
320.
▲
by
scoutt
6y ago
>Every feature you have in C++, Rust does it better. IDK. I miss variadic functions (not macros) and being able to do certain simple things without resorting to strange paradigms, like arbitrarily closing an std::fs::File without needing
321.
▲
by
scoutt
6y ago
I build Android almost every day, and now it takes forever on a dedicated build machine with SSDs and 32GB RAM. I hope this doesn't increment build time, otherwise it'll be a true pain. >For complex C/C++ code bases, often
322.
▲
by
scoutt
6y ago
If the second dose is a sort or service pack , I hope it will include uBlock.
323.
▲
by
scoutt
6y ago
Believe me, I truly don't want to sound pedantic, but why are you waiting for someone else to implement those (or other) things for you? What abilities does "that someone else" has, that you don't?
324.
▲
by
scoutt
6y ago
> Everyone knows you won't. I think the most important thing is that you can, if you want .
325.
▲
by
scoutt
6y ago
Because you can also use the modem coupled with a low-end MCU, communicating through a serial port. This configuration is more common than one might think (I was personally involved in many of projects with that configuration).
326.
▲
by
scoutt
6y ago
> I really wonder why modem manufacturers feel the need to encapsulate everything so much. The alternative would be using an RTOS of some sort, implementing a full network stack (with > 100Mb throughput) and a USB device, as the bare
327.
▲
by
scoutt
6y ago
My question would be what were the motivations to move into a stack written in Rust, if the much of the bugs are in the closed source FW running in the peripheral? What would happen if consistency is lost outside the Rust domain but still i
328.
▲
by
scoutt
6y ago
Sorry, but I don't think a bad advice is necessarily a lie. > "You should smoke cigarettes because it will help you lose weight." Standing to you the above is not a lie and I agree. I think it's a bad advice, but not
329.
▲
by
scoutt
6y ago
"initially not recommended to the general public so that first responders wouldn’t feel the strain of a shortage of PPE." To me, that doesn't sound as "bad for you". Maybe if "not recommended" is taken out
330.
▲
by
scoutt
6y ago
> Nor was this lie the impulsive decision of a few rogue experts. My non-native English might betray me, and I didn't follow Fauci's statements from the beginning, but based on the quoted article, where is the lie? "they w
More ›