Live data from Hacker News

Coroutines make robot code easy

bvisness.me

1–10 of 127 posts

Re: Coroutines make robot code easy

#3
Thankfully a piece that emphasizes that coroutines are functions that pause. Java frameworks like Quasar became focused on other goals besides that basic capability and lost their way (IMHO).

Java's not the easiest to pick up in high school unless you really make a big after-school effort. Something like Lua is probably better.

Re: Coroutines make robot code easy

#5
post #2

If you want to make it easy for high schoolers, just don't use java in the first place...

The only officially supported languages for the competition are C++, Java, and LabVIEW. When those are your educational options...you stick with Java.

(We've now switched to Lua, integrated with the official C++, but it's a lot more work behind the scenes.)

Re: Coroutines make robot code easy

#6
Had a go at writing a game a while back, purely for fun, reinventing the wheel to learn about what makes writing games hard. The command pattern here is a really great way to solve a persistent difficulty I had (largely the same one discussed in the article). I have certainly missed the point of the article but that is a great takeaway for me personally.

Funnily enough I have used the command pattern before to automate sequences of steps in a workflow. Back then I kind of stumbled on it - it is super effective for certain kinds of things.

Re: Coroutines make robot code easy

#7

Thankfully a piece that emphasizes that coroutines are functions that pause. Java frameworks like Quasar became focused on other goals besides that basic capability and lost their way (IMHO). Java's not the easiest to pick up in high school unless you really make a big after-school effort. Something like Lua is probably better.

I don't know Quasar, but a lot of projects seem to want to add functionality rather than be a library for that purpose, and create a new one for the completely unrelated feature that you want.

Re: Coroutines make robot code easy

#10
leaky abstractions and all aside, the coroutine code is unreadable to me after clean looking commands. :|

yes, new Java(new Java(1), new ...) is bad, and asynchronous programming paradigms are usually fitting for robotics, but abstractions are good.

Post reply on HN