News for hackers. Stuff that matters.
Re:Ask HN: What do you code when learning a new language/fra... by coverclock on Thursday July 14, 2022 @07:56PM (#32102822)
I'm an embedded/real-time/systems software developer. The realms I work in tend to be either the very small or the very large. When I wanted to learn Rust and Go, I coded the same application in both of them, one that I had previously coded in Java, C++, and C: I implemented the Generic Cell Rate Algorithm using a virtual scheduler. The GCRA is a traffic shaping algorithm that takes as parameters a desired peak rate, sustained rate, and maximum burst size, to meter or police traffic. I coded it as a library function, and provided a unit test to convince myself that it worked. I can only learn by doing, and that's what I did. One of the reasons I like this approach is it requires a lot of stuff: threads, synchronization, modularization, etc. https://coverclock.blogspot.com/2018/11/vamoose-rustler.html
Re:Ask HN: What do you code when learning a new language/fra... by synergy20 on Thursday July 14, 2022 @11:45PM (#32104395)
same embedded developer here, my problem is that daily job only needs c/c++ so my skill about python or js or golang is always weak -- after a while I forgot many of their details due to lack of serious need...

my problem is: how to keep 3~4 language 'warm' at all times? write some code daily on each?

Re:Ask HN: What do you code when learning a new language/fra... by jmiskovic on Friday July 15, 2022 @06:57AM (#32106842)
I found Python to be a great sidekick for embedded work. Parsing the captured logs, decoding memory sections, crafting specific hex sequences, building mock devices making desktop supporting tools... The syntax is different enough from C/C++ that I don't mix them up. Currently switching between 3 languages and I do notice a stray keyword from wrong language occasionally slips in.
Re:Ask HN: What do you code when learning a new language/fra... by lordnacho on Friday July 15, 2022 @02:23AM (#32105209)
Write a web UI interfacing with your embedded stuff?

Then you can swap out all the python/njs/js frameworks to your heart's content.

Re:Ask HN: What do you code when learning a new language/fra... by defrost on Thursday July 14, 2022 @09:00PM (#32103338)
Nice example, good writeup, cheers for that.