1.  

    In the SiteDefinition there is find_video_direct_url() function. Is it a good abstraction, generic and flexible enough? What if some site requires composing the video from several pieces or does some other kind of streaming? Some sites may also require specific User-Agent headers or some cookies.

    Maybe the SiteDefinition could return an input stream of bytes or get an output stream of bytes as a parameter and write to it.

    BTW: I like your Code of Merit.

    1.  

      I am not the author though

      1.  

        You are right, downloading from several parts is not supported yet, resulting in a lack of support for (e.g.) YouTube playlists. I outlined a draft to fix this in issue #1 and I hope that someone helps me to make it. :-) Thank you for the suggestion.

      1. 3

        strlcpy is identical to the sprintf invocation from before, except it uses the correct size_t return type. This still means it fails to satisfy the performance requirements of 3 and 4

        This isn’t true. I don’t know why this person thinks strlcpy is implemented in terms of snorintf, but of course it isn’t; that would be silly. I haven’t seen the implementation, but I have no reason to assume its performance is less than the optimized code at the start.

          1. 1

            What interface works best depends on your use. Are you reallocating the destination buffer if it is too small? Are you concatenating a lot of strings? Are you scanning a buffer copying out substrings?

            Performing a strlen like this one can be dangerous because people might end up with accidentally quadratic code.

            1. 2

              Totally fair point! However even for such simple but critical functions I prefer to use a bullet-proofen implementation which strlcpy(3) and strlcat(3) are.

        1. 2

          I’m generally an enjoyer of the SQLite ecosystem and it’s always interesting how they come up with their own solutions cause other ones weren’t fitting: CVSTrac, Fossil-SCM, Lemon and apparently Althttpd which all look really neat in my opinion.

          1. 10

            Nice, super easy/quick upgrade from 6.8 using sysupgrade.

            1. 4

              Upgraded my server too. This time there sure wasn’t any manual work.

              After sysupgrade, there was nothing to sysmerge, so I just pkg_add -u’d and rebooted again.

              1. 5

                While talking about pkg_add -u, it received a major boost in performance!

            1. 6

              I hope this might lead to a relicensing of Plan9 to a more liberal license than GPL. Many forks already did that maybe a newer license could bring back some unity

              1. 29
                1. 7

                  Why would that matter? Linux is under the GPL and it seems to do just fine. In fact, for an operating system it feels like the GPL might be the best option to prevent fragmentation and incompatibility.

                  1. 12

                    The problem is that several Plan 9 forks license their contributions under a different license so up until now there’s no unity and that kinda sucks to check which part of the code is under which license

                    1. 2

                      Oh, gotcha, that’s unfortunate!

                  2. 3

                    I don’t think that would help anything: folks who refuse to contribute their changes to the rest of the community (as required by the GPL) are unlikely to contribute those changes to the rest of the community when no longer so required.

                    Sure, things like the BSDs exist, but their ecosystem is far, far smaller than the GNU ecosystem.

                    1. 3

                      That would be an issue for a usual open source project. The status of the plan 9 and its forks is: there are forks, with the plural ‘s’. Allow me to rephrase your statement: folks who refuse others’ changes are unlikely to accept those changes no matter what license they use.

                  1. 2

                    Interesting design decision to avoid any heap allocation, even at the cost of performance.

                    Thinking about performance, I started to idly wonder just how much of the work could be done at compile time, if you had a better meta programming framework than C macros.

                    1. 4

                      The costs appear much greater than performance. It looks like providing an invalid regex results in memory corruption: https://github.com/kokke/tiny-regex-c/issues/30

                      1. 3

                        Yeah, when I saw this library I considered all the potential bugs possible when implementing something as fiddly as regexes in a language as unsafe as C; then I backed slowly away.

                        1. 1

                          I mean, just because it’s in C doesn’t mean it’s untrustworthy. GNU Grep is written in C (over 3K lines, not including external helpers) and seems to work pretty well.

                        2. 1

                          That issue was closed as “fixed” a year ago, about 6 months after it was opened. The code now passes analysis by KLEE.

                          1. 2

                            The response from the maintainer made it seem like it was a design decision. And also, “If you are concerned about security problems, this library is not for you.”

                            But good to see that it has been fixed. It looks like the maintainer has gone from “i don’t care about ub” to “let’s do formal analysis to prove it doesn’t happen.” That’s good.

                        3. 2

                          That decision is probably based on the intended platform:

                          Most (all?) of my public projects are designed to be runnable on embedded platforms, and usually that means I make some harsh compromises.

                          Static allocation makes it much easier to ensure that code won’t run out of memory on a device with very little of it.

                          1. 1

                            There is a template-based compile-time regex implementation in C++. I didn’t bookmark it, though; all I remember is it was written by a Russian woman about four years ago.

                            I imagine this could be done in Rust, Nim or Zig, too.

                            1. 2

                              You mean this?

                          1. 4

                            This is by far the best resource for networking ever published. His guides aren’t boring as he even makes them entertaining and fun to read

                            1. 2

                              I recall being put of by the overly tongue-in-cheek tone. It distracted me from what I wanted to know. Though that might be because I wanted a reference manual, and what I was reading was more like a book.

                            1. 8

                              http://undeadly.org for anything OpenBSD-related

                              1. 4

                                About Dragonfly, but actually covering all BSDs to some degree.

                                https://www.dragonflydigest.com/

                                1. 3

                                  The weekly bsd and then one day later the weekly “cool stuff from the internet” are one of the posts I look forward to everyone week!

                                  1. 1

                                    Absolutely. They manage to be the highlight from my tracked rss these days, quite often.

                                  2. 2

                                    I second this.

                                1. 12

                                  Some more interesting articles on the website, including: http://jehanne.io/2018/11/15/simplicity-awakes.html

                                  I wonder why GCC and not e.g. tcc, if simplicity is stated as the primary goal?

                                  The author ponders package management in one place, I’m curious if they’d like https://github.com/andrewchambers/hermes

                                  1. 4

                                    I think the answer to this question is that much software relies on a (GNU) C standard not fully supported by tcc. As far as I know tcc only supports C89 fully (maybe even GNU89 although I am not sure)

                                    1. 1

                                      Is there an alternative minimal C toolchain that supports C11?

                                      1. 7

                                        cproc? The vast majority of packages in Oasis Linux are compiled with it

                                        1. 1

                                          Even if it supports C11, that wouldn’t be sufficient. Many applications use so called GNU C extensions (Linux for example) which are only fully supported by clang and gcc.

                                    1. 3

                                      As someone who is the target audience of this guide (programming experience but never written a single line of R in my life) I must say that this guide is pretty good. Short, simple and straightforward. Unfortunately many languages often only offer guides for total beginners which isn’t necessarily a bad thing but often boring for people with programming experience who just want to get started as fast as possible. This often leads to the skipping of chapters and therefore the missing of important information from those.