milis

joined 2 months ago
[–] [email protected] 2 points 1 month ago* (last edited 1 month ago)

I just would like to learn from your experience.

I have a different background, can't say I am developer but a coder who mainly do prototyping in short amount of time, and sometimes help out building microservices, backend stuffs. Go really fit the bill neatly for my job, so my first attempt jumping into the embedded world, as a hobbyist, was with TinyGo and found it completely different from userspace application development. To be honest, I did like it as a unified toolchain, but it was not yet that mature the time when I used it (I hope they are much better now) and I always had to go into the "machine" code file to find out things that should be documented better. That said, I was really happy when I got my head around multiplexed led array on the microbit, and even figured out how to drive a continuous rotation servo by timed highs and lows (TinyGo had no PWM support for microbit) for a car crusher, with an empty tissue box of course. Made my little one cry when he saw it the first time and thought his toy cars were crushed.

But when I got into more "serious" hobbyist realm, playing around with nRF52840, ESP32 and Cortex-M0, I found that Zephyr Project just feel right to me. Maybe because I am not a bare-metal magician by trade, I found the device tree concept so easy to understand and I managed to tune a DTS for ESP-EYE to use the correct address region for PSRAM, though I could only enable 4MB of it as I still couldn't understand why there are 2 separated address regions for a total 8MB of PSRAM!

By pure coincidence, IoT became the next big thing for the company I work in, so I am thinking about getting more tools in my shed. I will definitely look into CircuitPython. Never learned Python before because I just don't like it, without any objective reason I am afraid, but I reckon it is a great tool to build something really really quickly. Another language I want to learn, as you can tell, is Rust, because I can't expect my colleagues to know Zephyr when FreeRTOS is just a much more popular choice. I think one day I will have to look into FreeRTOS again but wouldn't hurt learning one more modern langauge that hopefully can do the trick easily.

However, with some initial digging, it scares me. From libraries and tutorials, one thing that bugs me is that it seems everyone has to do like Peripherals::take().unwrap() and many other long chains of method calls ending with .unwrap(). I feel like the borrow-checker is not quite ready for memory mapped IO but assumes every pointer is allocated on the heap. I just feel worried that one day they will say "okay, we actually need a different compiler for embedded, just like TinyGo for Go", and I have to relearn. Another thing that I don't know yet is, it seems not so easy to get them onto the chip? If I understand correctly, some of the nRF and ESP32 are on tier-1 support so I suppose they will be the easier choices to get started. I am interested to know from your experience what was wrong in the equation?

Thanks and my apologies for making it so long.

[–] [email protected] 7 points 2 months ago (1 children)

I have the same problem, but I like how ulong for being positive all the time.

[–] [email protected] 3 points 2 months ago

Go will be easy enough to get the job done, then you will have plenty of time rewrite it with whatever language you like.

That's at least my case. I have a cloud server that hosts a few services for news, weather, LLM client, etc.. Most of them, if not all, took me just 2-3 hours to get it up and running, and a couple hours more the following day to fine tune. Now I have a working service and I can move on to rewrite it in (in my case) Rust as a learning opportunity.

[–] [email protected] 8 points 2 months ago

(I am using an advanced speech-to-text Lemmy client to post this, because, I don't know, some creature just tampered with my setting and I am blind now)

[–] [email protected] 4 points 2 months ago (1 children)

No worries. You can use those sentences in any shape or form, without any need to mention my name. They are released under BSD zero-clause.

I think it is a bit like clickbaits, but sometimes you need them. Hope you find your way soon and most importantly, enjoy yourself in writing!

[–] [email protected] 4 points 2 months ago (3 children)

Agree with @[email protected] on intro text. Some tech blogger will make the first few sentences really catchy to keep you scrolling. If in your case, I think what they may do with the "Introducing Decentralized Chat" article will be like:

Have you ever imagined having a completely private and secure chat app that keeps your messages only in your browser?

There are already so many chat apps in the market, so why are we building a new one?

Signal is great, but does it mean that we don't deserve a chat app that is even better?

(I am trying my best...)

On the other hand, I see that most of the time when people post on Hacker News, they simply put a link in there and people will watch and comment. I don't have an account myself so can't say I am sure, but would it help generating some traffic as well?

[–] [email protected] 14 points 2 months ago (14 children)

Not an expert in both the languages but I heard that C developers are trained to use memory smartly, sometimes even reuse a range of allocated memory for completely different purpose to save cycles freeing and reallocating. But for Rust developers, everything is about making sure when one should get the hand away from the memory, and whose memory is allowed to be touched.

Sounds to me like sharing rides that maximise economically but we may have some oops moments sitting on someone's laps vs absolute private rides to make sure no one in your family will be harmed but we have to make sure everyone gets a car only when needed.

It is quite interesting to see how it will work out eventually...

[–] [email protected] 18 points 2 months ago

I feel so sorry for you about this WTF but I can't stop laughing!

[–] [email protected] 1 points 2 months ago

It is the first time I heard of her but, omg, she has a crazy life!

[–] [email protected] 3 points 2 months ago (1 children)

I saw long time ago from somewhere saying that handling exception is expensive in terms of stack operations. To avoid the unexpected I guess you should do both, but a check before loading just saves you from unnecessary exception handlings which, if the very first statement is indeed true, would harm the performance.

[–] [email protected] 7 points 2 months ago (1 children)

RSS works great for me though.

I have an app on my not-so-smart phone to read news when commuting. It is not a long journey so I just want to have a quick glance at the headlines and read the actual articles that I want to. There are only 6 sites that I am interested, but still will take quite some work to crawl from the proper websites. RSS in turn is unified so I don't need to worry about their website layouts, formats, etc. It also gives me an URL to the actual content which I can use readability/reader mode library to parse and further reduce unnecessary contents.

Quite the opposite, I hope more informational sites offer/keep RSS! (Some removed RSS typically after a revamp, design change)

view more: next ›