1. 9

    I always hated fullscreen exclusivity. It seemed to always break my system whenever I closed out of the game, or even alt-tabbed out (which would usually take several seconds for things to appear). Very annoying when a game was unresponsive and you couldn’t reach task manager.

    1. 5

      Same, I initially didn’t want to support it at all for that reason—one interesting thing I discovered when writing this up but didn’t elaborate on in the post is that it’s actually possible to go exclusive without that breakage, but nobody seems to do it intentionally!

      Most games fiddle with the display settings when you’re in exclusive mode, and upon losing focus they have to revert their changes. This causes a hang, and if they don’t properly set CDS_FULLSCREEN to make their changes temporary it’s also likely what’s causing things to be weird after exiting.

      There may have been a time when changing the display settings was necessary, but it’s not currently necessary on any of the setups I tested, and it doesn’t appear to have measurable performance benefits (though the tests I ran to conclude that were admittedly less thorough.)

      If you get exclusivity without calling ChangeDisplaySettings, you’ll lose a few frames and get a much quicker flash when alt tabbing or such, but it’s nothing compared to the pain of trying to alt tab from a fullscreen exclusive game as normally implemented!

      1. 4

        Windows 10 and DXGI 1.4 vastly improved exclusive fullscreen, prior to that it was extremely finnicky and fragile.

        1. 3

          Ah, I didn’t realize that. It’s super finicky now so I can only imagine what it must have been like before Windows 10!

    1. 13

      Do not run malicious code in docker. This is an extremely risky decision to have made.

      1. 7

        Indeed, Ghidra is available in many distros and is not hard to use for basic static analysis. The author took a massive risk and a thoughtful attacker will be ready to exploit this kind of panicked decision.

        1. 2

          I have some intuition on why that would be bad, but could you go into more detail of what types of harm could come from this? Are there container escapes?

          1. 3

            Container escapes are trivial.

        1. 65

          My vote goes to 1Password, for ease of use, built in security model (client side encryption), versatility in handling all kinds of data (notes, credit cards, etc) and reliability of the plugins to work with all websites and apps. Other password management apps that I’ve tried have frequently had problems with some websites. Sometimes 1Password still has edge cases where e.g. 2FA is not automatically filled in and you have to copy paste it manually. But I haven’t seen a better app yet.

          1. 6

            Yeah, me too. I ended up at 1Password after trying a lot of both offline and online systems.

            1. 2

              Have you had a chance to compare it with LastPass?

              1. 6

                My work used LastPass and I couldn’t have created a worst UI if I’d tried. There was no easy way to generate a new password. It took three clicks in non-obvious places to get to it.

                1. 2

                  When I previously used LastPass, there were some weird differences between the browser version and the desktop version - there were some things that each of them couldn’t do.

                  One oddity worth noting - I don’t use the desktop app with 1Password. I’ve found their browser extension, 1PasswordX, to be more stable (it also has the benefit of working on Linux).

                  I believe with the addition of HaveIBeenPwned integration on the LastPass security dashboard, they’re pretty much similar feature wise (though maybe 1Password can store 2FA tokens). I’ve used 1Password because it felt way less clunky than LastPass and it doesn’t require me to install a random binary on my Linux machines in order to access my passwords.

                  1. 2

                    I used LastPass for several years before switching to 1Password a year ago. Wish I had switched earlier. LastPass’s UI design needs a lot of work and over time actually got worse with various annoying small bugs.

                    1. 2

                      Hard no to LastPass. I used it years ago, audited it one evening on a lark, found a few vulns, reported them, a couple got fixed, a couple got me told to fuck off.

                      And also, LastPass: Security Issues

                      1. 1

                        I switched to 1Password from LastPass a couple years ago and haven’t looked back.

                        LastPass got unusably slow for me after I had more than a few hundred entries in it. I don’t know if they’ve fixed their performance problems by now, but I can’t think of anything I miss.

                    2. 5

                      Long time 1Password user here. It’s by far the best tool I’ve ever used. And I believe it goes beyond the application itself, as the support team is also great. Given a matter as sensible as all my credentials to login into several different services, having good support is mandatory IMO.

                      1. 4

                        I just switched to 1Password after 5-10 years on Lastpass. There’s some quirks, it’s not perfect, I generally prefer it to Lastpass.

                        The only thing Lastpass truly does better is signup form detection. Specifically I like the model Lastpass uses of detecting the form submission, 1Password wants you to add the password prior to signing up, which gets messy if you fail signing up for some reason.

                        1. 2

                          1Password wants you to add the password prior to signing up, which gets messy if you fail signing up for some reason.

                          Oh yeah, this is a constant frustration of mine. ALso, whenever I opt to save thep assword, I seem to have a solid 4-5 seconds of waiting before I can do this. This seems to be 1Password X, FWIW. Back in the good old days of 1Password 6 or so when vaults were just local files, the 1P browser extension seemed to save forms after submission.

                        2. 4

                          1Password here too. Excuse the cliché, but it just works. The cost is minimal for me — $4/mo, I think.

                          I’ve been slowly moving some 2FA to it, but it seems dependent on 1Password itself detecting that the site supports it vs. something like Authy where I can add any website or app to it.

                          1. 2

                            I’ve been able to get my whole family onto a secure password manager by consolidating on 1Password. I don’t think I would have been successful with any of the other options I’ve found.

                          1. 78

                            Backlash against Kubernetes and a call for simplicity in orchestration; consolidation of “cloud native” tooling infrastructure.

                            1. 18

                              I’m not sure if we’ve reached peak-k8s-hype yet. I’m still waiting for k8s-shell which runs every command in a shell pipe in its own k8s node (I mean, grep foo file | awk is such a boring way to do things!)

                              1. 15

                                You must not have use Google Cloudbuild yet. They do… pretty much exactly that, and it’s as horribly over-engineered and needlessly complicated as you can imagine :-D

                                1. 4

                                  I haven’t worked with k8 yet but to me all of this sounds like you’ll end up with the same problems legacy CORBA systems had: Eventually you lose track of what happens on which machine and everything becomes overly complex and slow.

                                2. 13

                                  I don’t know if it will happen this year or not but I’ve been saying for many years that k8s is the new cross-language J2EE, and just like tomcat and fat jars began to compete we’ll see the options you’re discussing make a resurgence. Nomad is probably one that’s already got a good following.

                                  1. 7

                                    I understand where you’re coming from but I don’t think it’s likely. Every huge company I’ve worked with has idiosyncratic requirements that make simple deployment solutions impossible. I’m sure there will be some consolidation but the complexity of Kubernetes is actually needed at the top.

                                    1. 1

                                      We’ve been on k8s in some parts of our org for 2+ years, we’re moving more stuff that direction this year though primarily because of deployments and ease of operation (compared to alternatives).

                                      We don’t use half of k8s, but things are only just now starting to fill that gap like Nomad. I think we’re probably at least a year off from the backlash though.

                                    2. 4

                                      I won’t be surprised if the various FaaS offerings absorb much of the exodus. Most people just want self-healing and maybe auto-scaling with minimal yaml. Maybe more CDN edge compute backed by their KV services.

                                      1. 1

                                        Which FaaS offerings are good? They are definitely less limited than they used to be, but do they deal with state well and can they warm up fast?

                                        I haven’t seen any “reviews” of that and I think it would be interesting. Well there was one good experience from someone doing astronomy on AWS Lambda

                                        https://news.ycombinator.com/item?id=20433315

                                        linked here: https://github.com/oilshell/oil/wiki/Distributed-Shell

                                        1. 2

                                          The big 3 cloud providers are all fine for a large variety of use cases. The biggest mistake the FaaS proponents have made is marketing them as “nanoservices” which gives people trauma feelings instead of “chuck your monolith or anything stateless on this and we’ll run it with low fuss”.

                                          “serverless” and “function as a service” are both terrible names for “a more flexible and less prescriptive app engine”, and losing control of the messaging has really kneecapped adoption up until now.

                                          Just like k8s, there are tons of things I would never run on it, but there are significant operational savings to be had for many use cases.

                                      2. 4

                                        I wish, but I am not hopeful. But I have been on that bandwagon for years now. Simple deploys make the devops folks love you.

                                        1. 1

                                          For those in the AWS world, I like what I’ve seen so far of Amazon ECS, though I wish that Fargate containers would start faster (i.e. 5 seconds or less).

                                        1. 6

                                          I wish there was more material on becoming Powershell-literate, specifically. Most of the stuff out there is just for sysadmins, I’d love a more programmer oriented bent. Maybe it’d make me miss linux less!

                                          1. 3

                                            Powershell always seemed really verbose and and a lot of typing to me; not bad for some tasks, but also not great for interactive usage.

                                            1. 3

                                              First-class tab completion available for all cmdlets is a big part of making it suck less.

                                            2. 2

                                              I hard-abandoned Powershell after I realized that it returns different shaped data types depending on if a command returns zero, one or more items. I forget what the scenario was. I initially started building Jump-Location in pure powershell but abandoned it for a C# commandlet after this experience.

                                              1. 2

                                                I’ve always been a Windows focused programmer, but I’ve felt that PowerShell has always been an IT/Sysadmin tool rather than programmer focused. These days I just use WSL and life is just better.

                                              1. 1

                                                The packaging on this looks super slick. Those are some of the best docs I’ve ever seen.

                                                That being said, where does this fall in the stack exactly? What does it replace?

                                                Let’s say I had a Grafana/Loki+Promtail/Prometheus/Jaeger setup or ELK stack (maybe with fluentd instead of logstash).

                                                Why and where would I want this?

                                                1. 3

                                                  Good question! We’re hoping to make use cases more clear with a new website in the coming weeks.

                                                  We are positioning Vector as the only tool needed to collect, process, and route all observability data. Our intent is to replace Prometheus exporters, Telegraf, Fluent, Logstash, Beats, Splunk forwarders, and the like. If you zoom out, we think Vector can serve as an observability data platform that puts you in control. Use cases include:

                                                  • Cost reduction by sampling and cleaning data.
                                                  • Cost reduction by separating the system of record from the analysis. (Ex: using S3 as your system of record and sampling data sent to Splunk).
                                                  • Cost reduction by simply using less internal resources for processing observability data.
                                                  • Security/privacy compliance through data redaction and other security features.
                                                  • Prevent lock-in by decoupling data collection and processing from your downstream vendor(s).

                                                  And finally, we hope that Vector provides a better data catalog than the tools I mentioned above, so it will play an active role in improving the insights you get from this data.

                                                  Let me know if that helps!

                                                1. 1

                                                  Thanks for this, I have Grafana setup already with InfluxDB and my weekend project is setting up Promethus + Loki!

                                                  1. 6

                                                    I wish more tools would learn from other tools. I haven’t ever really seen Perforces Time-lapse view replicated many other places for example. It’s fantastic and I wish git tooling would evolve from it.

                                                    https://www.perforce.com/video-tutorials/vcs/using-time-lapse-view

                                                    1. 4

                                                      Somebody did create one for git in Vim and I maintain a fork people might find useful - https://github.com/junkblocker/git-time-lapse

                                                    1. 4

                                                      Great writeup! I wish there were more self-contained examples for how to use pg (and honestly other SQL systems) for stuff that isn’t just libraries, banks, or scheduling.

                                                      I’m not entirely sure I agree with having a different table per event type, since I usually use a hybrid approach of event name/string column plus a json details column, but they made it work and work well.

                                                      As a side statement, I want to point out how little (relatively) code this takes compared to the same implementation in other languages. Like, it’s nice to see a clear reminder of how the worldview of a language helps simplify a problem.

                                                      1. 2

                                                        One thing we’ve started using pg for lately is a Message Queuing Service, ala AWS SQS. It has built in support for it and works fantastic.

                                                      1. 9

                                                        This analogy resonates really well with me because I used to be terrible about flossing but then I got a water pik. Now I “floss” everyday. Maybe the “water pik of software correctness” is out there.

                                                        1. 7

                                                          This comment convinced me to take my water pik out of storage. As some one that loves software correctness but is bad at flossing.

                                                          Thanks lobsters.

                                                          1. 3

                                                            I was thinking the same kind of thing, but then about gum picks. Flossing is annoying, but using gum picks is a breeze and achieves a better result.

                                                          1. 1

                                                            Any specific reason you have /httpserver rather than /internal/httpserver?

                                                            1. 2

                                                              Not the author, but I personally don’t think there’s always value to hiding all the packages in internal if your exported artifact is a binary… it adds one extra path component to the import path everywhere with minimal benefit. As an example, I’d rather import github.com/belak/something/models rather than github.com/belak/something/internal/models.

                                                              I agree that there’s value for libraries, but this is specifically an http server template.

                                                            1. 11

                                                              Do you know either language?

                                                              Use the one that you know.

                                                              If you love working with Python, then I’d suggest Go. Rust would likely be too much cognitive overhead for little benefit.

                                                              1. 5

                                                                Interesting. I would have the exact opposite reaction. Go will make you think about raw pointers and that kind of thing, whereas rust you can write at a high-level like Python.

                                                                Totally agree use the one you know unless you have a desire to learn a new one.

                                                                1. 18

                                                                  If pointers are too much cognitive load then Rust’s lifetimes and ownership juggling is going to be way worse. I’d say that the comparison is more that Python and Go are not particularly functional languages, while Rust obviously is (and that’s the appeal of it to people who like functional languages).

                                                                  If Rust is faster for a given use case that’s a more like-for-like basis for comparison, but then you might want to use Fortran to go even faster depending on the use case. ;-)

                                                                  1. 4

                                                                    Admittedly I’ve invested time in becoming comfortable with Rust, but I actually concur – after gaining some familiarity, Rust feels much higher level than Go.

                                                                    1. 6

                                                                      Rust does can definitely operate at a higher level than Go, but it also has a lot more cognitive overhead.

                                                                  2. 5

                                                                    Pointers in Go are pretty trivial to work with, and I say this coming to Go from Ruby. Basically your only concern with points are “they can be nil,” otherwise you barely need to differentiate between pointer and structs if you’re writing idiomatically (that is a gross oversimplification and there are performance implications at times, but it’s extremely unlike C/C++ in this respect).

                                                                1. 6

                                                                  Note the use of pointers, this forces other systems to take care of the actual storing of objects, leaving the physics engine to worry about physics, not memory allocation.

                                                                  The wording makes it sound clever, but now we’re just jumping around memory and this system is now 10x slower than it could be :/

                                                                  1. 3

                                                                    Why? They could all be pointers to memory blocks that are close to each other, and the allocator for this type of object could just return from there (eg. arenas). The main issue seems to be that you can’t ever “move” any object now bc. all of the pointers to it would be invalidated. So maybe it’d’ve been better as a ‘sparse map’ (id map to indices into a contiguous array, when you delete you can swap the last element in keeping elements contiguous); but it depends on tradeoff between that map lookup and complete contiguousness.

                                                                  1. 4

                                                                    AMP is probably my least favorite thing to happen to the internet in the last ~3 years.

                                                                    Does it bring me anything of value? Slightly faster load times /sometimes/ ?

                                                                    1. 3

                                                                      Nope. It brings you and me confusion and Google ad revenue. I’m frustrated that it’s effectively a centralization push for aspects of the Internet that have historically be decentralized.

                                                                    1. 18

                                                                      The expectations of a professional/licensed engineer can be fulfilled whether producing code or writing emails as much as they can by building bridges. I studied electrical engineering (and computer science) but haven’t touched a circuit in 4 years. Currently I’m applying for professional recognition, and of the 16 competencies the body wants to see, there is no requirement for anything physical.

                                                                      This body’s definition of what makes an engineer includes:

                                                                      • ethical behaviour
                                                                      • how you analyse problems
                                                                      • how you keep up to date on industry practice
                                                                      • how you communicate with peers and stakeholders
                                                                      • how you manage risk

                                                                      Some lessons I feel can be learnt from software practices: Agility, being able to plan for uncertainty particularly for problems where the solution is not known immediately; Revision management, version control was one of the first things I learnt in software and I’m constantly explaining to traditional engineers why it’s important for any publication.

                                                                      Some lessons I feel software practices could learn from traditional engineering: Stakeholder management; problem analysis (surprised how few sketches and produced for software systems compared with even the management systems I work with); communication.

                                                                      I’d say anyone working with software - from coder to management - can fulfill the behaviours expected of an engineer; many engineers build their communities without ever touching CAD or concrete.

                                                                      1. 4

                                                                        Forgive my ignorance but how exactly do they define ethical behaviour?

                                                                        I’d argue that someone working on literal bombs is highly likely more of an engineer than I am, yet I find that much much much less ethical than anything I’d ever work on.

                                                                        1. 3

                                                                          They would define it in a way that doesn’t touch anywhere close to that. I think it is the same way that Christian theology was able to exclude war acts from the “do not kill” thing. Any government recognized organization would be expected to do the same leaps.

                                                                          I suspect any safety considerations attached to ethical behavior would be for things not including when the thing drops from the sky. Like not accidently blowing up when being hit lightly by a hammer…

                                                                          1. 3

                                                                            Search for “{name of institution} code of ethics” to answer this. Some examples:

                                                                            And specifically in computering:

                                                                            1. 3

                                                                              Bombs are not unethical.

                                                                              You could use bombs to excavate a mine. You could use bombs to stop a horde of murderers coming to your town.

                                                                              If it is ethical to kill in self-defense, then it is ethical to build tools that could be used to kill in self-defense.

                                                                              1. 4

                                                                                Maintaining ignorance towards what your employer will use your work for, because hypothetically it could be used for something not-unethical, is not ethical behavior. You can assume that in OP’s question they’d be working for the military industrial complex.

                                                                                The only thing necessary for the triumph of evil is for good men to do nothing. As an engineer, you can make a difference. You’re a scarce resource. Simply choosing to work in a place that does good takes labor away from places that do evil or do “nothing”. And your wage will always be good enough to not have to do “nothing” at a place that does evil.

                                                                                1. 3

                                                                                  The idea that it is ethical to kill in self defence is not universal. There are some that argue it is better to die than to kill. Also, though you could use a bomb to excavate a mine, that is not it’s purpose. Bomb is defined in wiktionary as “An explosive device used or intended as a weapon”. If an explosive device is designed and used for excavation it is not a bomb.

                                                                                  Sorry to nitpick, I know these points are very niche. I simply want to point out that the statement ‘bombs are not unethical’ is open to debate.

                                                                                2. 2

                                                                                  The other response to your comment (leeg) is spot on. For example, the organisation I’m seeking to recognise me has a code of ethics defined by: Demonstrate integrity, Practise competently, Exercise leadership, Promote sustainability. Deeper definitions are available in their code, and these definitions would allow defence workers, infrastructure builders, and software implementers to practice within their ethical framework.

                                                                                  Part of such recognition is picking a professional body which is compatible with your personal code of ethics. If you are seeking people who have such recognition, then you could use the recognising body’s code of ethics to evaluate these people.

                                                                                  Coincidentally, hours after my previous post I met an engineer who worked with bombs, though his were used to dig tunnels for highways and rail ;)

                                                                                3. 1

                                                                                  When I took some EE a decade ago (switched to computer science, didn’t have the will to endure EE), I remember they had some specific reason why “software engineering” wasn’t an engineering discipline. I only wish I could remember what it was. I believe in Canada it wasn’t recognized at the time. The engineers saying this were certainly within the bounds of “physical engineering” - that is to say, their craft built upon real physical things instead of upon an “world”/architecture we as a species defined.

                                                                                  I much prefer the list you have. I feel that is the a great direction for the industry.

                                                                                  1. 2

                                                                                    If you’re interested in further depth on this, Engineers Australia is the organisation I’m referring to. People who undertook accredited study and work with software, whether it be computer games or medical devices, can be recognised as professional engineers based on their behaviours rather than strict preconceived notions (such as typically evidenced by exam).

                                                                                1. 3

                                                                                  I initially thought it’ll let you download a ZIP with MP3/FLAC/OGG/OPUS/ as a backup, Would be nice for someone who want to move out from Spotify, as you can’t actually play the JSON file or even import it somewhere else.

                                                                                  (disclaimer: I don’t really care about these “piracy issues” which people likely want to bring on there)

                                                                                  1. 6

                                                                                    I will point out that it’s near trivial to bypass the Spotify DRM with Panda. There’s a post i’ll try to dig up.

                                                                                    https://moyix.blogspot.com/2014/07/breaking-spotify-drm-with-panda.html

                                                                                    1. 4

                                                                                      Yeah, now that I think of it I should have called it export rather than backup, or something like that…

                                                                                      1. 2

                                                                                        I used to use something like that for a Spotify competitor in the very early days of streaming music. It was fantastic.

                                                                                        1. 2

                                                                                          You used to be able to do that with C SDK[1].

                                                                                          [1] https://github.com/mopidy/libspotify-archive (archive because the files aren’t hosted by Spotify anymore)

                                                                                        1. 38

                                                                                          Rust.

                                                                                          The dev experience is so much nicer than my usual C/C++. After spending a lot of time writing and doing code reviews of C, C++, and rust, I am pretty convinced that it is much easier to write correct code the first time in rust than it is in the others, and rust has equally nice performance properties but is much easier to deploy.

                                                                                          I spend most of my day working on high performance network software. I care about safety, correctness, and performance (in that order). The rust compiler pretty much takes care of the first item without any help from me, makes it very easy to achieve the second one, and is just as good as the alternatives for the third.

                                                                                          1. 6

                                                                                            I’m curious if you’ve ever tried another — non C/C++/Rust — language (anything garbage collected or dynamically typed) for projects where you don’t necessarily care about the fastest runtime? Is that ever relevant, or do you really only work on “high performance network software”?

                                                                                            1. 8

                                                                                              I work in games, and my experience is very similar to mortimer. I would go rust with no hestitation.

                                                                                              I’ve done a lot of C# with Unity, and quite a bit of Go. I’d pick Rust over both of them any day of the week.

                                                                                              The big thing with C# in games is that you lack control, and also have to do generally more memory management than even C++, working around the garbage collector is not fun.

                                                                                              1. 7

                                                                                                Sure, there is some stuff where performance doesn’t matter too much, and for those we’re free to choose something else. Python is pretty popular in this space, though even for these things I’d still consider using Rust instead just because the compiler makes it harder to screw up error handling and such.

                                                                                                I did a transparent network proxy in ruby once, and that was super nice because ruby is super nice, but if I were to do it again today then I’d pick Rust. Most of the code wasn’t something you’d get from a library, and the vast bulk of bugs I had to handle would have been squashed by a better type system (this thing that is usually a hash is suddenly an array!) and better error handling (this thing you thought would work did not, and now you have a nil object!). Ruby (also python) just don’t help you at all with these things because it’s dynamically typed and will usually return nil to indicate error (or python will sometimes throw, which is just offensive). This paradigm where the programmer has to manually identify all the places where errors can happen by reading the documentation, and then actually remember to do the check at runtime is really failure prone - inevitably someone does not remember to check and then you get mystery failures at runtime in prod. Rust’s Result and Option types force the programmer to deal with things going wrong, and translate the vast bulk of these runtime errors into compile time errors (or super-obvious-at-code-review-time unwrap()s that you can tell them to go handle correctly).

                                                                                                I haven’t really done any professional Java dev, but the people I know who do Java dev seem happy with it. They don’t have any complaints about performance - and they deploy in places where performance matters. When they do complain about Java, they complain about the bloat (?) of the ecosystem. FactoryFactoryFactories, 200 line backtraces, needless layers of abstraction, etc.. I don’t think they’re looking to change, so they must be happy enough. When I did Java in school I remember lots of NullPointerExceptions though, so I assume the same complaint I have about ruby / python / C / C++ error handling would apply to Java.

                                                                                                For personal projects, it was usually ruby (because ruby is super nice), but lately all the new stuff is Rust because the error handling is so much better and it’s easier to deploy. Even when I don’t care about it being fast I do care about it being correct.

                                                                                              2. 1

                                                                                                Another reason: Attract good developers!

                                                                                                That’s the flipside of all the good techical reasons, plus actually some of the bad - learning curve and newness.

                                                                                                There are too few Rust and Haskell jobs, ok many C and C++ jobs, and absurdly many Java jobs.

                                                                                                1. 11

                                                                                                  In order to validate the ‘learning curve for newbies’ concern, I actually gave Rust to a new employee (fresh out of uni) to see what would happen. They had a background in Java and hadn’t heard of Rust before then. I gave them a small project and suggested they try Rust, then sat back to see what happened. They were productive in about a week, had finished the project in about two weeks, and that project has been running in production ever since without any additional care or feeding for over a year now. This experience really cemented for me that Rust isn’t that hard to learn, even for newbies. The employee also seemed to enjoy it (this is a bit of an understatement), so if new staff can be both productive and happy then I’m not too concerned about learning curves and stuff.

                                                                                                  1. 4

                                                                                                    Vast majority of people that write about Rust online mention fighting the borrow checker. Your new folks didn’t have that problem?

                                                                                                    1. 8

                                                                                                      Having helped both a few co-workers and a fresh intern with answering rust questions as they learned it, I’ve come up with a theory: Fighting the borrow checker is a symptom of having internalized manual memory management in some previous language before learning rust. And especially severe cases of it is from having internalised some aspect of manual memory management wrong. People who don’t have that are much more likely to be open to listening to the compiler than people who “know” they’re already implementing it right & they just need to “convince the compiler”.

                                                                                                      1. 8

                                                                                                        I find that I can often .clone() my way out of problems for now and still be correct.

                                                                                                        Sometime later I can revisit the design to get better performance.

                                                                                                        1. 4

                                                                                                          Oh yes, new people fight the borrow checker but it just isn’t that bad (at least not in my experience) and they seem to get past it quickly. The compiler emits really excellent error messages so it’s easy to see what’s wrong, and once they get their heads around what kinds of things the borrow checker is concerned about they just adapt and get work done.

                                                                                                          1. 3

                                                                                                            I felt that I wasn’t fighting it. It was difficult, but the compiler was so helpful that it felt more like the compiler was teaching me.

                                                                                                            (That said, I was coming from Clojure, which has terrible compilation errors.)

                                                                                                            1. 1

                                                                                                              Not sure about his employee’s perspective. But, I’m new to writing in Rust, and I think the frustration with the borrow checker is not understanding (or maybe just not liking?) what it is trying to do. My experience has been that at first I wanted to just try to build something in Rust and work through the documentation as I go. In that case the borrow checker was very frustrating and I wanted to just stop. But, instead I worked my way through the Rust book and the examples. Now I’ve picked up the project again, and it isn’t nearly as frustrating because I understand what the borrow checker and ownership stuff is trying to do. I’m enjoying working on the project now.

                                                                                                            2. 2

                                                                                                              This experience really cemented for me that Rust isn’t that hard to learn, even for newbies.

                                                                                                              Counter anecdota – we have a team at $job that works entirely in rust, and common complains from the team are:

                                                                                                              1. The steep learning curve and onboarding time for new team members
                                                                                                              2. The Very Slow compile times

                                                                                                              We aren’t hiring many folks direct from uni though – so perhaps counter-intuively, having more experience in other languages may make learning rust more difficult for some, and not less? Unsure.

                                                                                                        1. 21

                                                                                                          Catalina runs best on Macs with hardware specifications that Apple marketing isn’t yet prepared to make the baseline for models such as the iMac.

                                                                                                          So MacOS Catalina is like Windows Vista?

                                                                                                          1. 7

                                                                                                            Yes. Having been a Windows user at that time, all I feel are unpleasant flashbacks.

                                                                                                            1. 2

                                                                                                              In that case, on the upside macOS in 2-3 years is going to be absolutely fantastic for 5-7 years!

                                                                                                              1. 3

                                                                                                                You jest but I’m looking forward to it.

                                                                                                                1. 3

                                                                                                                  And then it will be cursed to become a user-hostile ad platform that you have to pay for, until the end of time.

                                                                                                              2. 1

                                                                                                                Using any new piece of software triggers roughly two dozen security prompts, so yes.

                                                                                                              1. 1

                                                                                                                This is a good intro and a decent play to start with templating k8s. We’ve been doing similar things for a while now, but recently we’ve been moving towards https://helm.sh/ Which takes care of most of this for us.

                                                                                                                We have our charts which live inside the repo with each microservice, then we have deploy-* git branches on that repo. The chart is templated, and we have “values” yaml files for each branch. When our CI/CD detects a change on one of those branches it builds, and then deploys to the namespace specified by the branch name “deploy-prod” -> “prod.values.yaml”.

                                                                                                                It’s been absolutely fantastic so far, though I can see that there’s still a lot of room for improvement.

                                                                                                                1. 4

                                                                                                                  Anyone have a snippet of the kind of code that C2rust ends up generating? Would be interesting to see how much work cleanup would end up being

                                                                                                                  1. 5

                                                                                                                    I did a fairly deep investigation but it was a while ago, the tools have probably changed since: https://wiki.alopex.li/PortingCToRust

                                                                                                                    1. 4
                                                                                                                      1. 4

                                                                                                                        Not sure if the website is being kept still up to date, but www.c2rust.com let’s you try it online. The code is pretty un-idiomatic (using unsafe points instead of references and so on), but note that there is also a refactor step being actively worked on. Based on the video, it doesn’t look like they used that here, but this is where the code lives: https://github.com/immunant/c2rust/tree/master/c2rust-refactor.

                                                                                                                        Full disclosure: I used to work on this, but I’ve not kept up with developments from the past few months.

                                                                                                                        1. 2

                                                                                                                          Here’s dwm converted with it.

                                                                                                                          1. 2

                                                                                                                            You can see yourself. There’s an online translator: https://c2rust.com/

                                                                                                                            Rust intentionally tries to discourage use of raw pointers and pointer arithmetic by not having a syntax sugar for them, so directly translated C code ends up very ugly.

                                                                                                                            It starts looking OK only after you disambiguate pointers into proper references/slices/optionals. In C it’s not clear whether a pointer argument to a function means 0 or 1, exactly 1, or N elements. Rust has separate types for these cases, and syntax sugar and safety comes with them.

                                                                                                                            1. 1

                                                                                                                              It’s a start though! I’d rather start from there, and refactor towards idiomatic than start from scratch in some cases.