1. 1

    Doesn’t work for me on Firefox or Chrome. Must be my adblocker

      1. 2

        Same thing :(

        1. 1

          Try with http:// as a prefix

    1. 3

      I would like to know why the author thinks so poorly of the visitor pattern. Having written a small compiler in C++, I have made extensive use of that design pattern and had a great experience doing so.

      1. 4

        I went for yet another option and decided to colo my older intel i3 nuc with 16gb of memory and 128gb + 1tb of storage. I pay 70euro per 6months and get 2 ipv4 addresses and the standard /64 for ipv6. Transfer volume included is so high I don’t think I even managed to get to 5%.

        This was to be honest the cheapest solution I could find, and I can always request my hardware back, I think the fee for that is 20euro. I can also pay a one time fee of 25euro to get an access card to go visit my nuc myself and swap hardware/reboot it. The cost of the server is highly tied to the amount electricity my hardware is using, so I could lower the cost/gain more by upgrading the hardware to something more powerful that’s using the same amount of energy.

        You’d be surprised to see how many companies let you colo small devices like nuc’s or even a raspberry pi for very low cost. It’s a route not many people take, but to be honest it works great for me and might be worth to have a look.

        1. 1

          How did you find out about the collocation?

          1. 1

            I was talking to colleagues about 1.5year ago and complained about the lack of good quality vps providers for a low price. One of them said something like “it’s a shame you can’t put your nuc in a datacenter” and I remembered some people exactly do that. I looked for colo providers; mailed 2 that offered NAS hosting because it matched most, and both replied they had no issue with putting a nuc in and gave me a price.

            I could drop the nuc off personally, or send it to them via registered & insured mail. I choose the latter, and 2 days later it was installed and up and running. Went extremely well, and I had a 3minute downtime during the 1.5 years due to a planned maintenance when they upgraded the DDoS protection service.

          2. 1

            What’s the volume and where do you find them?

            1. 1

              I think transfer volume included is something like 5tb a month. Like I said that’s more than enough for me.

              I just did a search for colo providers and picked a couple that also offered NAS hosting. Since my nuc and a synology NAS are about the same volume (physically) I mailed them and both said it’s no problem and gave me the price. I picked the more expensive one actually, because they offered extra’s as the option to go and look at my hardware myself.

            2. 1

              How do you handle data backups?

              1. 1

                I cross-transfer between my home nuc and my colo nuc via syncthing. It’s probably not the best or most glorious solution, but it works like a charm for me. I don’t generate a lot of data, to be honest, so I wasn’t looking for an advanced solution.

            1. 1

              My very first Rust project was a raytracer, and my second one a path-tracer. I do tend to agree with the OP that the borrow checker might feel like more of a hindrance on this kind of code, compared to simply using Asan.

              However, I really liked using rayon instead of having to write my own thread pool as I did in C99. Going from iter to par_iter on my vector and having everything just work was great .

              1. 1

                You could likely use OpenMP to do something similar without too much effort in C or C++.

                1. 2

                  Yup! This requires one parallel, schedule(guided) pragma.

                  It does come with trade offs though. I find asm output with OpenMP in the mix more difficult to follow, and it’s compiler dependent. Generally I’d favor writing the basic thread pool or parallel for myself.

                  1. 1

                    I have two things to say about that : first OpenMP is not portable, being a compiler extension, whereas rayon would work on any Rust target and with any Rust compiler.

                    Secondly, I got way better results (pretty much a x8 on my 8 core system) using rayon, whereas OpenMP only tripled the performance or so. I had to write my threading using pthread to actually make use of my cores correctly.

                    1. 1

                      That’s quite a drop in performance! Did you get a sense of where the bottlenecks were in your OpenMP version?

                      Anecdotally, I’ve always needed to tweak job sizing/assignment and fix a few instances of false sharing when applying the pragmas to previously single threaded code.

                      1. 1

                        Yeah, I would have had to fix a few things, which happened when I refactored to use pthread. My point was mostly to explain that rayon really has that magical feeling of modifying one line and having it just work.

                        And that comes from Rust imposing the architectural decisions that lead to good threading support, compared to C where you’re free to do whatever.

                        1. 2

                          And that comes from Rust imposing the architectural decisions that lead to good threading support, compared to C where you’re free to do whatever.

                          I can’t say I agree with this. The architecture rayon guides you towards is about equivalent to the architecture OpenMP’s parallel-for pragma guides you towards. I think rayon has some better defaults, and I’ve found its codebase easier to dig through than OpenMPs, but don’t really see any large narrative there.

                          1. 1

                            Yeah, but OpenMP isn’t C. C by itself doesn’t guide you to any architecture. I’m not talking about OpenMP.

                1. 1

                  Doesn’t groovy formatting work the same way? I remember something along those lines when using Filebot title formatting.

                  1. 1

                    Apparently?!! It seems Groovy placeholders are formed from an expression inside braces; and the expression can look like {title} but also like {"$title"} or {"this is the $title"}; and if the value title is undefined the entire placeholder {...} evaluates to the empty string. Which in the last example means the prefix “this is the “ also gets suppressed.

                    I’m not sure the Groovy devs themselves are aware that you can use this to get prefix-only-if-value-is-defined behaviour … the docs don’t mention it! But Okam from 2012 figured it out, and wrote it in the only post they ever made on the Filebot forum. I can’t say we’re lucky to have Google, but we’re lucky to have search engines.

                  1. 1

                    I’ve always wanted to try NixOS, but I don’t want to taint my computer with systemd.

                    I’ll try it whenever somebody forks it and removes the systemd dependency or they release a systemd-free version.

                    /shrug

                    1. 5

                      I don’t think that will happen, as NixOS uses several good features from systemd. You can also just try Nix, for handling packages and dependencies for your projects.

                      1. 8

                        There was a talk at NixCon about abstracting out services in NixOS:

                        https://cfp.nixcon.org/nixcon2020/talk/TW79FU/

                        Allowing us to reuse the service configuration for launchd on macOS or various alternatives like supervisord.

                        1. 1

                          I might try the Nix sometime. But for now it looks like I can safely cross NixOS off the list of distros to try.

                          1. 17

                            If blind hatred of systemd here is what is holding you back, maybe try broadening your horizons a bit.

                            NixOS uses it to good effect.

                            1. 5

                              Did you really just assume that my hatred of systemd is blind?

                              That I, in no way, have a rational disgust for this software?

                              systemd is a horrible piece of software for many reasons:

                              1. The undeniable feature creep. While some people actually enjoy the features brought in from it (boot manager, network manager, login manager, home manager, etc), I find them to be nothing but bloat. An init system should be just that. An init system. Not <insert an exaggerated amount of functions here>.

                              2. It is slow. Slow to shutdown, slow to boot up, etc. Here are actual timed reboots from my machine using 3 init systems. systemd (2m3s), OpenRC (11s), Runit (7s). 2m3s vs 7s, which would you choose?

                              3. Due to the feature creep, there is a larger attack service for bugs and security vulnerabilities. And there are security issues with systemd.

                              4. This is the one that bothers me the most. It’s almost as if the dev(s) are completely oblivious or at least ignorant to the feature creep and security issues.

                              5. A lot of the time, we don’t even get the choice to not use systemd. There a lot of packages (and the list grows every day) of packages with a hard dependency of systemd, So unless you modify that program yourself, you literally won’t be able to use it unless you succumb to using systemd.

                              6. There are privacy issues with it. For example the hardcoding of Google’s DNS. “It’s a fallback”, that’s no excuse. At some point someone will be using that and their privacy will be ruined.

                              Now, some of these you could call nitpicks (like the reboot times). However I find issues 1, 4, 5, and 6 just unacceptable. Those are what absolutely keep me from using it.


                              This is my abridged list of issues, but I can make an even larger wall of text if you want me to.


                              And I really don’t appreciate your tone. You sound very stuck up and pretentious telling me to “broaden my horizons”.

                              On top of the fact that you just assumed that I had no reason to hate systemd. Honestly.

                              All you had to do was ask, “hey, may I know what about systemd you hate? why is it bad?”.

                              But no, you decide to insult me with your stupid response.

                              1. 10

                                You don’t have to use it forever, or even agree with its implementation! You don’t have to trash your daily driver!

                                But my dude, not even giving it a shot because of your issues with systemd (quite aside from whether or not those are valid, which I mostly think they are…I rather despise it for other reasons) is cutting off the nose to spite the face–especially since you also don’t want to try Guix.

                                I meant broadening your horizons in the literal sense: there is some really interesting stuff happening in those ecosystems, and even a brief foray into them may be really useful and neat–or it might not. But, like, if you refuse to even try because of NixOS’s use of systemd, you’re letting those developers harm you twice.

                                1. 4

                                  I apologize for my rudeness. At the time I had literally just woken up, haven’t had any coffee or cigarettes, and the first thing I saw was someone telling me that I have a blind hatred and that I need to broaden my horizons.

                                  Surely you can admit that from my perspective, that would be at least a little irritating.

                                  I can agree with what you’re saying, but personally I can’t do it. Using an OS which uses systemd would be justifying it. And I can’t allow that. That would be hypocritical and unjust.

                                  “Be the change you want to see”: By refusing to use anything with systemd, I as an individual am giving less power to it and it’s devs.

                                  1. 2

                                    No sweat–I probably could’ve found a gentler phrasing than “broaden your horizons”. My apologies!

                        2. 3

                          What about Guix?

                          1. 2

                            No thank you. Guix is a rant for another time, but trust me when I say I hold a disain for it.

                            1. 7

                              I’d like to hear that rant some time, out of curiosity.

                              1. 2

                                I second this, even just a rought draft would do.

                                1. 1

                                  Maybe sometime.

                                  When I rant, it messes my whole day up. I’m still seething about the “blind hatred of systemd” thing.

                                  1. 1

                                    Seconded. This person seems to have interesting opinions.

                              2. 3

                                You can use Nix and nix packages without systemd… nix is a package management system, and does not itself run any services.

                                1. 1

                                  I was mainly interested in the OS, not the package manager.

                                  But at some point I plan on trying Nix. If I like it enough, I might run NixOS in a VM.

                                2. 1

                                  You can use systemD free version PKGSRC

                                  1. 9

                                    pkgsrc completely lacks the desired-state, functional language, and system management components of nix. It’s an apples and oranges comparison.

                                    1. 1

                                      Can you demonstrate how I can install multiple different versions of the same package without breaking the system install via pkgsrc?

                                      As well as defining everything in a declarative way? I already use the “systemd free version” known as macos nix package manager. And I can do the same on any linux.

                                      Also will need a way to do things like nix overlays which let me add custom patches to package builds.

                                      Drive by comments like this without explaining how PKGSRC replaces or can be an alternative aren’t very useful. And as a note, I’ve set a super high bar for PKGSRC here but thats due to I get all of the above (and more) for free from the nix package manager. Nixos adds some more neat bits but ultimately its all on top of nix.

                                  1. 3

                                    The author mentions returning a vector from a function as being costly without the use of move semantics, this is inaccurate. Return Value Optimization is what makes returning a vector from a function cheap, and using std::move on your return value is actually a pessimization of your code.

                                    1. 1

                                      Do you have a source for that? I want to know more about it, but searching doesn’t give me anything useful.

                                      1. 1

                                        Currently, he says “don’t even get me started on” that subject, without using std::move on his return value.

                                        1. 1

                                          I have no problem with this, but the parenthesis with “again, prior to the magic of move semantics” could lead someone to think they need to use std::move or have costly copies.