Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
scoutt
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
29 ms
·
271.
▲
by
scoutt
5y ago
The above was a joke. And where did I say “I don’t want to look at micropython”? I do know that if I want to learn it, it isn’t something out of my reach. But there are things you can do with C you can’t do with micropython, so other than f
272.
▲
by
scoutt
5y ago
I agree with what you wrote. > there's no point to distinguish them I think the distinction should be clearly made when someone wants to sell me something like Rust. They come up with the daily link about 70% of the bugs are memory
273.
▲
by
scoutt
5y ago
See??? Because you don't want to learn C now you have to learn Toit, Python, BASIC and another two subpar-performance languages!!! :)
274.
▲
by
scoutt
5y ago
> billions of embedded systems implementing safety critical functions I realize that there is a pattern: when high-level programmers talk about security and reliability, they basically mean "hackers breaking your system to steal you
275.
▲
by
scoutt
5y ago
> Overkill microcontrollers aren't that expensive anymore I knew that this would be mentioned but I didn't want to write an extensive comment. In many embedded markets, cents make the difference. Also, space constraints, power
276.
▲
by
scoutt
5y ago
So basically this is an RTOS that runs an interpreter for a script(s) stored in flash. Correct? I didn't understand if this script is precompiled or not. I'm sure that if you want to avoid uint8_t* ptr = 0x20000000; whil
277.
▲
by
scoutt
5y ago
> it will make sure https://www.cvedetails.com/vulnerability-list/vendor_id-1902... I'm not so sure.... And those are bugs from from people writing core stuff, like you know, the people who should know Rust bet
278.
▲
by
scoutt
5y ago
A lot of times... Skin/eyes: experimenting with high-brightness LEDs. These can become pretty hot in no-time. I was trying to do my own LED driver (regulating a PWM signal from voltage/current sensing), on an LED without heatsink.
279.
▲
by
scoutt
5y ago
Being these two the most important functions [1], [2]. The rest is merely overhead :) [1] https://fuchsia.googlesource.com/fuchsia/+/refs/heads/main/z... [2] https://fuchsia.googlesource.
280.
▲
by
scoutt
5y ago
> real-time executive loop or handling I/O I did some audio implementations on MCUs of all kind, and if I managed to pull out multitracked real-time mixed audio players under 4ms latency, I learn that the real problem here is RAM (o
281.
▲
by
scoutt
5y ago
Yes! That time I wanted to learn Rust every time I saw a complicated closure my mental parser/linter crashed (from a lifetime C developer PoV). I don't understand how a function that is defined in-place is more clear than a nice f
282.
▲
by
scoutt
5y ago
> emitting correct programs; or are they for literal transpiling? I guess the former. I am sure you are familiar with the "garbage-in, garbage-out" concept. The rules are set in the standard. If you feed the compiler with code
283.
▲
by
scoutt
5y ago
> now obsolete computer architecture model I think this is kind-of dismissive. You seem to assume that everyone is programming modern x86 machines. What about embedded? My little PIC32/STM32/ATMEGA do not have caches or predict
284.
▲
by
scoutt
5y ago
The spirit of the article and your comment seems to underrate the efforts required to come up with something like the standard for a C compiler. It's not a "perverse shield". In C, "optimize for correctness" is the
285.
▲
by
scoutt
5y ago
This could be useful in C for some situations. That said, the above is completely useless if just only one of those values (ranges or assignments) is dynamic: you'll be back to carefully (and manually) checking you don't overflow.
286.
▲
by
scoutt
5y ago
> internal debate had erupted over the discovery of a noose emoji I think I wouldn't survive 5 minutes in (big) corporate world. Perhaps it's because I'm entering the forties, but I imagine the amount of straight-face, hol
287.
▲
by
scoutt
5y ago
> That's easy. For code that is not yours, or code that you open a year later, I think it's easier to specify the type. Exactly as when you see something like "var x = some_function();" and you need to know the type.
288.
▲
by
scoutt
5y ago
Exactly. Like when you see: var x = some_function(); What am I dealing with here? mmmmmm.... Ok... let's find some_function()... I hope my editor has "go to definition", otherwise "grep -r some_function .".
289.
▲
by
scoutt
5y ago
> I believe it makes the parser marginally more complicated This would mean that the "peace of mind" of the Zig compiler developer has priority over my own "peace of mind". That's not ok. Is the compile developer
290.
▲
by
scoutt
5y ago
I am curious to know the reasons behind the @as() syntax. What's wrong with "i32 y = (i32) x;"? I look with interest to new languages but after so many years dealing with C, my parser crashes when I see the type after the var
291.
▲
by
scoutt
5y ago
> if someone's attacking you with their fists, they're potentially threatening your life ... use whatever tools are at your disposal to neutralise the threat. If a sentence like that is assimilated by the most obtuse cops (not
292.
▲
by
scoutt
5y ago
> it doesn't stop the external world Sure, but it can also happen when debugging desktop applications too. It's not just an embedded problem. Even if all events are queued up, you still can (for example) interrupt a handshake t
293.
▲
by
scoutt
5y ago
I don’t follow you. Usually breakpoints are hardware (not conditional breakpoints), and the core halts completely. You can continue execution as if nothing happened. Often watchdogs and timers are aware of breakpoints and core halting. What
294.
▲
by
scoutt
5y ago
I totally agree. I also use print message sometimes for the case you mention. Or for example when doing audio applications, to monitor the rate of buffers being filled under different loads. Generally high rate stuff, happening later in tim
295.
▲
by
scoutt
5y ago
Now that I re-read it, it is harsh. I meant no personal attacks. Sorry. But it's what I would feel if I see a colleague (C) programmer doing that.
296.
▲
by
scoutt
5y ago
I might be spoiled, since I started working on Windows using Visual Studio back in 1996. The debugger always seemed a fundamental part of developing (an learning to develop) applications. 10 years later, I was still being spoiled while buil
297.
▲
by
scoutt
6y ago
>the point of this "research". I think it's mostly "finger pointing": you need one exception to break a rule. If the rule is "open source is more secure than closed source because community/auditing
298.
▲
by
scoutt
6y ago
> Hardware doesn't obey Rust's rules Neither does the OS where rustls is running. I think Rust will have more adoption and more libraries like Rustls will be developed. I also think that when this happens, also more exploits ta
299.
▲
by
scoutt
6y ago
Thank you. Regarding size, from an embedded perspective, do you think all these enums, in a very deep call stack can, ultimately, overflow my stack? Because for every function call there should be 8, or 16 or 24 or N bytes of stack-allocate
300.
▲
by
scoutt
6y ago
> to determine at runtime I didn't know this. How is determined? Is there any code inserted by the compiler to do this? What's the overhead of using Result<T, E> ?
More ›