Lightweight Browser

Yeah, I'm more focused on keeping it in range than exactly matching the user's input. If they think results seem odd, turn on the verbose mode and see what happened.

I rarely use getopt(), and usually go for getopt_long(), but I'm not expert in either. I skipped getopt_long() here because I believe getopt() is a lot more portable. I seem to recall I needed to #ifdef some include files on one of the BSDs last time I tried it.

I'll probably make a proper repo, and include animations, sometime this weekend. I'll look into testing more edge cases then.

Elijah

------ too bad the video copyrights are so murky

Reply to
Eli the Bearded
Loading thread data ...

Might be worth having a look at replacing usleep with nanosleep, since the former is deprecated. Not sure if some platforms already omit it, but I guess not; that would break too much. It probably overshoots by quite a lot, though, which is another reason why nanosleep might be preferred. (And/or why you might need a time diff as argument to the sleep function, instead a fixed value.)

Reply to
A. Dumas

Always check how long your sub-second sleeps are actually taking. Some implementations return immediately if the wait is less one timer tick, others always wait at least one timer tick, however long that is on the particular platform.

I was always pulling up the other engineers for using Python usleep's of less than 1ms (the minimum tick on Windows) which weren't doing anything on Python 2. When we moved to Python3 they suddenly started taking 1ms, slowing down loops far too much.

---druck

Reply to
druck

Code:

formatting link

And blog post: https://qaz.wtf/qz/blosxom/2020/08/22/slowcat

Elijah

------ reworking signature.c was almost as long as watching all the videos

Reply to
Eli the Bearded

Run a browser (in a secure sandboxed container?) on another machine (another Pi?), and do an Xsession connect to it. Obviously won't be great for video, but it shouldn't load your main desktop down.

--
Adrian C
Reply to
Adrian Caspersz

Not really an option unfortunately. The idea is for this to be completely stand-alone.

--
W J G
Reply to
Folderol

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.