1. 8

    Tech tutorials on Medium are the worst. I don’t have an account so I always get the paywall, and it’s annoying enough to have to open an incognito window or another browser that I usually just keep looking for another answer.

    I get why non-tech writers would use something like Medium, but I wish more developers who write would just set up their own site and use Netlify. I think writing in markdown is a much more pleasant experience, too.

    1. 5

      The lack of proper syntax highlighting is a real deal breaker for me as an author. You are left with screen grabs of your editor window or “HOSTED WITH HEART BY GITHUB” gists embeds everywhere, which are terribly painful to work with.

      1. 2

        Agreed. I have no idea why anyone uses it for any writing that involves code.

        1. 1

          Because it’s by far the easiest option. I don’t have to fart around with anything.

          1. 1

            What about dev.to? Just as easy, no paywall.

      2. 1

        I don’t have an account so I always get the paywall, and it’s annoying enough to have to open an incognito window or another browser that I usually just keep looking for another answer.

        You might like the Cookie AutoDelete extension.

        1. 1

          Me too, I have to open medium links in a private tab. Not only to avoid the paywall but also to escape from the Google Accounts 3rd party cookie, which is impossible to block on Firefox for iOS.

          Now, on my phone, I don’t even click on Medium links anymore.

        1. 15

          A new law is being drafted which gives the attorney general massive powers to regulate encrypted services under the pretense of combatting child sexual abuse material. The stick that is being used is section 230 protections against liability. It’s hard to fight this without sounding like a CSAM-supporting villain, which is intentional.

          This article is a really solid breakdown by someone with technical and legal expertise.

          Matt Green on twitter responding as well: https://mobile.twitter.com/matthew_d_green/status/1223246416308527106

          1. 4

            This is a case where trends on the Supreme Court really matter. Recently, the justices have been signaling that they are ready to address the practice of Congress delegating authority to departments. It’s a practice that, essentially, allows those departments (DOJ in this case) to write law as they see fit. If EARN IT passes, it would be ripe to be a test case. It is easy to see how this sort of law that delegates to the AG could be used to bully various companies selectively.

            1. 1

              Ok what’s your proposal to keep encryption but fight CSAM?

              1. 4

                Not that I necessarily owe you a solution nor claim I’m necessarily the best person to create one, but:

                Slow down on eroding civil rights (banning e2e and enabling surveillance), and let us researchers work on things like cryptographically-enforceable exceptional access for law enforcement, homomorphic CSAM evaluation functions, and to boost the efficiency of secure multiparty computation to allow for blind privacy-preserving image evaluation. Simultaneously, fight against any law which adds such ridiculous unilateral power, particularly to a non-elected executive position in the government.

                Proposals which build off PhotoDNA et al are dangerous because they make it really easy to derive tools which automatically adjust media to avoid detection and potentially even to generate novel CSAM using generative sampling.

                1. 0

                  OK but all of those amount to “don’t do anything about CSAM right now”. Which you’re right - to anyone not deeply engaged with privacy makes it sound like you’re cool with CSAM sharing.

                  The point I’m making is that once something like this (something that as a stated goal is an obvious and universal good), you can’t just say “maybe don’t do that ”. You have to have an alternative solution to the problem that is being put at the top of the agenda. If you really want to head this proposal off, you have to put forward an alternative.

                  1. 3

                    “Don’t do anything” is very different than “continue doing the things we’re currently doing, but not this new thing because reasons.”

                    You’re creating a false dichotomy. An argument against one proposal is not inherently flawed by a lack of a competing proposal. The criticisms in this post are points where the existing proposal could be improved. Creating new NSF grants in another executive action which could move positive change by supporting the aforementioned research.

                    Now, you may be right that the public opinion of the argument against will be negative due to a lack of strong competing proposals, but that’s a very different issue which your somewhat troll responses do not address.

                    1. 0

                      No, you’re falsely assuming that everyone cares about this issue and will bother to read the same nuance into it you do. Which is why Barr will get his way.

                      1. 1

                        I feel like you’re not reading what I’m writing. I directly acknowledged that point:

                        public opinion of the argument against [may] be negative

                        because not only do I know that not everyone cares about it as much, I actually want to help make it so that people don’t have to be concerned for their privacy, because it’s just there by default.

                        Now, I don’t have a perfect solution, if that’s what you’re expecting. If your goal is to help improve my argument here for the

                        obvious and universal good

                        of protecting children while also preserving civil liberties, then I’d love to hear constructive suggestions, solicitor. Otherwise, I’m really not sure what the purpose of your standoffish argumentation is.

                        Barr will probably get his way for a myriad of reasons including the fact that there is bipartisan support for increased surveillance and it’s difficult to get people to call their representatives.

                        1. 1

                          I’m telling you that your argument isn’t even an argument for not banning encryption because it completely fails to address the suddenly pressing need to do something about CSAM.

                          @nickpsecurity gets us to somewhere in the right ballpark of “so actually spend more FBI budget on this first”. That’s something, it’s fairly obvious how it helps, and it’s not nothing.

                2. 3

                  There’s over 10,000 FBI agents with a budget of around $8 billion. The agents and budget assigned to stopping child rapists and pornography is a lot lower. FBI has used many agents on victimless crimes and spent billions over time on bullshit, though. I’m for FBI putting enough resources into those units to make an even larger difference. I’d also love to get a chance to ask a FBI Director on TV why they endlessly talk about pedophiles and kidnappers but put fewer resources into stopping them vs other crimes.

                  Must be doing all this for a different reason. For decades, two have been to get power for its own sake and/or to use for reasons entirely different than they state. Usually broader over time, too. For all their lies, I oppose most expansions of power to instead reorganize their current workforce and budget with a big boost in accountability.

                  1. 1

                    You’re not wrong. Any ideas for how to get that message out?

                    1. 2

                      I’m better at coming up with the messages than getting them out. I’m both working on that and keeping my eye out for opportunities.

                  2. 1

                    I fight child abuse by not abusing children, and if I ever come across somebody who is I’d like to think I might kick them in the nuts before I hand them over to the man. And we keep encryption by realising you can’t make 1 + 1 != 2 simply by legislating it so.

                1. 3

                  As ever people misunderstand the US legal system: this ruling only binds federal courts in the 9th circuit, which cover the west coast.

                  Two other parties going at each other in another part of the country may or may not find that the law is the same.

                  1. 1

                    Where are the benchmarks? What are the setups?

                    1. 1

                      There are a few in the paper they linked to on the site.

                    1. 1

                      Is it possible to get a graphics card hooked up?

                      1. 3

                        No.

                        1. 8

                          (More specifically, because the RK3399’s PCIe host controller is so half-assed that it only has 32MB of address space, which is not nearly enough for GPUs.)

                      1. 2

                        I’ve learned enough about pbt Omega to think that it would be relevant to the author’s interest.

                        Systems of property based types (PBT) overcome many of the limitations of current automated systems because they are built on a logical foundation that differs remarkably from those of conventional digital computers and artificial intelligence (AI). In particular, systems of property based types can validly characterize anything imaginable, to answer questions in the absence of complete information, and to calculate with infinite structures and domains. The power of PBT systems derives from their unique semantic structure, ability to guarantee valid results, expressiveness, and use of abstraction, generalization and analogy.

                        1. 2

                          How are these different from dependent types?

                          1. 4

                            I dived down the rabbit hole for ya. “Property-based types” are types defined by predicates. So you can have a “dog type”, a “dog named ‘spot’ type”, a “dog named ‘spot’ currently within 30 feet of some cat” type, etc. If a value (“example”) satisfies a type’s predicate, then it counts as that type.

                            Cool idea, but everything the guy’s written or said is setting off crackpot alarms. Maybe someone else has done a better take ¯\_(ツ)_/¯

                            1. 1

                              Thanks! Will keep an eye on the term PBT, and hope to see some code soon.

                            2. 1

                              My guess (haven’t seen any code or any other material outside of that site) is that it’s a system of types with inheritance and mixins.

                              Dependent types, as I understand them, are a runtime type of type system where the type of something depends on the value of something else.

                              My guess is that PBT is sort of like property based testing, in that you can provide more and more info about your types and enhance the semantics of existing programs that use those types.

                              I could be wildly off, but that’s my hunch from the little I see available on that site.

                              1. 2

                                The whole point of dependent types is to make runtime state checks into compile time errors. All implementations that I know of are static.

                            3. 2

                              This site is giving me really bad vibes. Do you have any sources that show it in action, or by people other than D A Fisher?

                              1. 2

                                I don’t. It’s largely theoretical right now but some (reportedly very slow and resource hungry) implementation exists. I can’t find a recording of the intro talk I attended but this recording of Capabilities & Limitations of Classical Logic is like chapter 2 or 3 of learning about Dr. Fisher’s ideas.

                              2. 1

                                Interesting. Thanks for sharing. At first glance it makes sense to me, and I see how it could be relevant.

                                I would love to see some code to get a better sense of it.

                                Is there a relation to the old Omega variant of Haskell?

                                1. 2

                                  a relation to the old Omega variant of Haskell?

                                  I don’t think so. Dr. Fisher’s production experience is mostly in Ada and C, if I recall correctly.

                                1. 1

                                  Thanks! I wasn’t familiar with that term from Linguistics. Definitely seems relevant. These sorts of links help me clarify my thoughts a bit.

                                  The class of errors I’m talking about generally involve large arrays of events and not singletons. The Evidentiality concept seems to be focused on singletons (“I saw he ate it”). I don’t think there are so many errors made on those singletons. Generally I think the problem is when people try to speak about a big collection of things as if they actually had a big dataset.

                                1. 2

                                  Why would I use this instead of kafka? Presumably this either has a different sweet spot or is an attempt to be better in a way that is concretely articulable?

                                  1. 3

                                    Other than the ecosystem (which shouldn’t be discounted), Pulsar is quite a bit of ahead in terms of architecture and API decisions than Kafka. Arguably, they had the second mover advantage.

                                    One key feature I particularly like is that storage is offloaded to Bookkeeper rather than storing it locally on broker nodes. Thus storage is decoupled from the brokers (where as Kafka stores data on broker nodes). This makes scaling the storage and compute (brokers) trivially easy. The trade-off is that you need to operate a Bookkeeper cluster (in addition to the brokers and Zookeeper).

                                    In addition, storage can be “tiered” which means, old messages (by some definition of old) can be offloaded transparently to object storage such as S3. This is often cheaper storage than what Bookkeeper uses at the expense of latency when requesting it. It may not be necessary, but its a nice option for keeping all the data and archiving it.

                                    Personally, I am keeping an eye on the NATS project, specifically the new development around Jetstream (https://github.com/nats-io/jetstream#readme). The simplicity of the API and operability of the cluster (no external dependencies) is very attractive. As the README notes, its still in development, but the creator Derek Collison is actively working on clustering and remaining features over the next few months.

                                    1. 2

                                      Don’t know if it is ok to link to the angry orange site, but here’s a number of comments directly addressing your question:

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

                                    1. 12

                                      Anyone else liked the labelled arguments? I liked how they added expressivity to the code without looking hackish, and I think It was a clever idea to make the label different from the parameter name

                                      1. 6

                                        Thank you! All credit goes to the clever people who designed Swift. We went through quite a few different designs but it turned out that copying Swift was best.

                                        1. 4

                                          well, this predates Swift by ages — this style of labeled args came to Swift directly from Objective-C :)

                                          1. 4

                                            I meant specifically the syntax here, but yes! We’re certainly standing on the shoulders of giants

                                            1. 4

                                              This predates objective-c by ages. It came to objective-c from Smalltalk.

                                          2. 3

                                            I didn’t get it at first, but took a second look upon reading your comment. They’re really nice! I can see it being useful to have both labels and arguments when you’d refer to those parameters while calling the method versus executing the method. Correct me if I’m wrong, but you could use it like this in pseudo code:

                                            pub fn run_job(at time) {
                                              if (time == now) execute(job_id)
                                            }
                                            
                                            run_job(at: 2020-01-01)
                                            

                                            I’ve had “cute” code in Ruby where I’d have arguments named at or in which is nice when calling the method, but not as nice in the body of the method. That’s a really neat feature.

                                            1. 2

                                              Yes, exactly, It reads really well from both outside and inside.

                                            2. 1

                                              Too bad default values and random ordering didn’t make it.

                                              1. 5

                                                When using labelled arguments random ordering is supported, and default values may come later :)

                                            1. 6

                                              I’ve thoroughly tested a lot of CI/CD services about a year back. I finally settled on GitLab CI as best choice. It requires you to host your repository on GitLab though.

                                              1. 3

                                                Interesting! I know a lot of people like GitLab because it’s not part of the Github/Microsoft monoculture. Was that a driving reason, or were there others?

                                                1. 1

                                                  I’ve been using GitLab for almost 4 years now, largely for reasons stated in https://www.jvt.me/posts/2017/03/25/why-you-should-use-gitlab/ but also for all the extra stuff they’ve built on top over the years. Originally it was just because of private repos, but evolved into a love of the platform being built in a way that folks can contribute, unlike GitHub.

                                                  (https://www.jvt.me/mf2/2019/12/gphsl/)

                                                2. 2

                                                  Why was that your choice? What usecase?

                                                  I don’t love gitlab CI for the reason it isn’t accommodating of usecase it’s not designed for, and I’m stuck with both. This is obviously very different from the cases where you are in the designed usecases.

                                                  And actually one peeve is that it encourages the use of “fat” docker containers.

                                                  1. 4

                                                    My experience was the opposite. We went “all-in” on gitlab and love the ci process. Initially we used 2 bare runners, windows and linux, and installed whatever software we wanted on those. CI just called what it needed in those runners. Worked great.

                                                    All the online examples used docker and we found that adding a docker runner allowed us to do more. Now we build our own docker images to use so they aren’t “fat”, they are minimal to what that step needs.

                                                    Ultimately, we found that it was completely customizable to what we wanted.

                                                1. 1

                                                  What kind of errors are you trying to avoid with static typing?

                                                  1. 1

                                                    Any that I can, honestly.

                                                  1. 2

                                                    Don’t break out the champagne. This is a district court. Unless the case is appealed and affirmed the law hasn’t changed anywhere.

                                                    For those who don’t understand the US legal system, federal law varies by large areas (usually several states) called circuits. The different laws come about because different circuit courts make different decisions. Harmony is restored if and when the Supreme Court takes up the case and announces a uniform rule.

                                                    1. 4

                                                      So the advice is to use apache guacamole, a vnc/rdp/etc over browser solution, in order to run a browser in the cloud. 😂

                                                      1. 1

                                                        It’s always possible to go too far one way or the other.

                                                        There’s a tendency to always build from base images and generate enormous images. I appreciate this as the antidote. I imagine there may be times when this is relevant. However this exact pattern loses you the benefit of shipping your application code (in this case the jars) with its binary dependencies such that you know exactly how they interact. Packing jars + jvm together is basically the exact pattern that docker is intended for.

                                                        1. 2

                                                          Ah yes instead of templating things and using macro expansion we’re going to make our lives easier by using logic programming instead.

                                                          Unfortunately, I’m not smart enough to understand any logic programs I’ve ever seen, so I’ll have to stick with macro expansion.

                                                          1. 4

                                                            Often the big problem with logic programming isn’t getting it to run, but getting it to run fast. A lot of confusing stuff in production logic code are optimizations.

                                                            If we’re working in a restricted domain, we can presumably minimize performance traps, so it should be easier to understand.

                                                            1. 1

                                                              As someone vaguely aware of logic programming but who’s never managed to find a use case for it, do you have any suggestions for further reading?

                                                              1. 2

                                                                Mostly speaking from secondhand discussions with logic folk and my experience with constraint solving, so I don’t have anything to recommend, sorry :/

                                                                1. 2

                                                                  https://github.com/larsyencken/marelle is using prolog for system configuration

                                                                2. 1

                                                                  For you maybe. I straight up struggle to understand logic programmes and have never succeeded at writing anything more than exercises for university courses.

                                                                  I think it’s a paradigm that excludes more people than templating does.

                                                                3. 4

                                                                  There’s no logic programming involved in cue. Cue is just a configuration language that uses a novel approach for “reducing boilerplate” and making it possible to validate that a configuration conforms to a set of defined constraints. Or to put it in even plainer language, it has some kind of types and does some kind of templating. The “kind of” is new, so yes, you’ll have to make some effort to understand it at first. As with anything.

                                                                  1. 2

                                                                    The article sure makes it sound like logic programming:

                                                                    CUE is based on a different model of logic programming that makes it well suited for configuration. The language’s foundations make tasks like validation, templating, querying, and code generation first class features. CUE is designed around graph unification where sets of types and values can be modeled as directed graphs and then unified

                                                                    1. 3

                                                                      A different model of logic programming, it’s the first sentence in your quote. Did you actually read any of the examples? They read like typed YAML with struct merging. It’s like logic programming because of how the values and types in structs merge together: you can’t contradict yourself and you can’t be ambiguous. CUE schemas look much more like SQL column types and CHECK constraints than classic logic programming.

                                                                      // contradiction, 1 is not a string
                                                                      { key: string } & { key: 1 }
                                                                      
                                                                      // contradiction, 1 is not 2
                                                                      { key: 1 } & { key: 2 }
                                                                      
                                                                      // no contradiction, 2 is an int
                                                                      { key: int | 1 } & { key: 2 }
                                                                      
                                                                      // ambiguous, is key 1 or 2?
                                                                      { key: 1 | 2 }
                                                                      
                                                                      // not ambiguous, 1 is more specific than int
                                                                      { key: int | 1 }
                                                                      

                                                                      As in the original post’s examples, this kind of merging gets used primarily for templating.

                                                                1. 8

                                                                  Gawk has all of these. Don’t port anything.

                                                                  At some point, however, awk’s limitations start to show. It has no real concept of breaking files into modules, it lacks quality error reporting, and it’s missing other things that are now considered fundamentals of how a language works.

                                                                  1. 3

                                                                    GAWK is not portable. You could possibly say “neither is Python”, but I would bet that Python is more available than GAWK. and even if it isnt, if youre going to have to install a package anyway, wouldnt a butcher knife be better than a plastic kids knife?

                                                                    I like AWK, I have used it for many years and would consider myself an AWK expert. But when the question is “what is the right tool for the job”? The answer is rarely AWK or GAWK.

                                                                    1. 10

                                                                      The right tool is obviously Perl in this case.

                                                                      1. 7

                                                                        and the tool is a2p since forever.

                                                                        1. 2

                                                                          Came here to say that very thing. The syntax maps more precisely and the idioms fit more completely thanks to Perl’s history for this almost exact purpose. The right tool for the right job.

                                                                        2. 6

                                                                          What do you mean “gawk is not portable”? Name one platform that has awk and python that does not have gawk?

                                                                          The point is you can either spend your time rewriting or you can just keep using the same code with extensions.

                                                                          And if you really really want to rewrite, Perl is a lot closer. This whole article just seems like someone who has arbitrarily decided that python is a “real” language so it’s inherently better to use it.

                                                                          1. 8

                                                                            The author blurp has:

                                                                            He has been programming Python since 1999

                                                                            Looks like a case of hammer, nail to me.

                                                                            (and the examples with the yields only convince me more that python is not the better choice)

                                                                            1. 2

                                                                              To be fair, I know far more carpenters with Python hammers than with Awk hammers.

                                                                              I myself have but a ball peen Awk hammer, compared to my sledge Python hammer. So for really stubborn nails, Python is the better choice for me.

                                                                              1. 1

                                                                                I’ve been using Awk for even longer though.

                                                                                The story in https://opensource.com/article/19/2/drinking-coffee-awk was in 1996.

                                                                              2. 0

                                                                                Um, Debian, BSD? should I go on?

                                                                                1. 4

                                                                                  I suppose you mean that gawk features are not portable among the default awk on different OSes, so you shouldn’t use them and pretend that the script will work on any awk. That is totally true.

                                                                                  But the OP likely means that you can use gawk explicitly, treating it as a separate language. Gawk is available on almost all Unix OSes, so it is portable.

                                                                                  1. 2

                                                                                    My point is if your going to have to install a package, you might as well install $proper_programming_language instead of AWK. Unless what you need can be easily done with GAWK alone, its not really worth using.

                                                                                    Keep in mind that even with GAWK, proper support for indexed arrays is not available, nor first class functions, private variables in AWK are footguns, no HTTP client, no JSON, etc.

                                                                          1. 3

                                                                            So if I’m reading this right, I would want this because I want actors in rust.

                                                                            Is this more like pony (actors in a single process managing across processes is an exercise for the user) or like akka/erlang (lots of stuff for working with multiple os-level processes).

                                                                            And on the other dimension is this “let it crash” actor supervision or “static analysis makes it hard to write actors that crash”?

                                                                            Edit: reading the front page again it looks like it’s supposed to erlang style easily federated and let it crash.

                                                                            1. 1

                                                                              Edit: reading the front page again it looks like it’s supposed to erlang style easily federated and let it crash.

                                                                              Yes exactly. That’s the roadmap of the project.

                                                                              1. 2

                                                                                Do you have a rundown of what’s real and what’s planned?

                                                                                1. 4

                                                                                  Basic near future planned things:

                                                                                  • Stabilizing unstable features.
                                                                                  • Distributed carrier protocol.
                                                                                  • Faster runtime with a more advanced scheduler.

                                                                                  The real part is what is written in the readme:

                                                                                  • Fault tolerance against panic mechanism
                                                                                  • Dynamic message dispatch
                                                                                  • Dynamic supervision
                                                                                  • Nearly the same scheduler that Erlang has.

                                                                                  Far future plans:

                                                                                  • HCS (hot-code-swap)
                                                                            1. 4

                                                                              Soo… Where the hell do I go next, once Mojave is out of support? Linux laptops just don’t compare, and don’t get me started on Windows.

                                                                              1. 7

                                                                                Linux on a desktop is dirt cheap (something like 4x the performance per dollar).

                                                                                If you mostly use the laptop in two places (eg work desk and home desk), you can fit both sites with top quality desktop equipment for a fraction the price of a new macbook, and have cash left over for a chromebook or similar (for portable browsing/email).

                                                                                I only have one work location (home office), so I’m working on the fastest machine I’ve ever had, running ubuntu (24 cores, 64g ram). Best computing environment I’ve had in years.

                                                                                I miss one or two things from OSX (liceCAP, preview.app and mail.app alternatives are not as good) but having a working package manager etc is pretty great.

                                                                                1. 2

                                                                                  I disagree with this. I switched to Mac originally because it was the cheapest way to get a decent spec laptop with a metal case and ssd. I don’t believe that has changed.

                                                                                  1. 6

                                                                                    Word 4 of my response: “Desktop”.

                                                                                    I’m not aware of a good linux laptop either. My point is that for the price of a macbook pro, you can get 4 desktop machines, each of which is faster than the macbook.

                                                                                    1. 1

                                                                                      What about https://system76.com/ ? I’ve heard positive reviews, but am not a customer (still running an old 2013 macbook pro).

                                                                                      1. 1

                                                                                        I haven’t heard anything bad about them, but IME reviews for an expensive niche provider tend strongly positive since the reviewers have looked up that particular niche, so it’s hard to know.

                                                                                    2. 3

                                                                                      If those are your only requirements, there are other metal laptops (Razer) and otherwise well built ones (Dell XPS) with good specs. Price should be around the same (but I haven’t actually done a good comparison).

                                                                                      1. 1

                                                                                        My fully specced Dell Precision (Enterprise XPS with Xeon instead of i7) was almost couple thousand Euros cheaper than fully decked MacBook Pro. With addition of having 32gb ram when Macs had only 16gb maximum.

                                                                                        1. 1

                                                                                          Hows the battery life? IIRC power consumption was one of the key arguments in favor of choosing laptop hardware that could only run 16gb.

                                                                                          1. 2

                                                                                            Two part answer:

                                                                                            IIRC RAM has least energy draw of all components in computer, so I didn’t give any thought on that when picking configuration. I think that “RAM drastically affects battery life” idea became from Apple marketing as answer why they don’t have more than 16gb in their machines (and nowadays they also have 32gb laptops).

                                                                                            I rarely use my work laptop (which that machine is) without peripherals, so I haven’t got too clear idea about battery life while working. But it does manage half work day (so around 3.5 - 4 hours) without problems. OTOH system I mostly develop is half a dozen “microservices” and I dev against integration tests which:

                                                                                            • run non-trivial test interactions in browser (average suite transfers 0.5 - 2.5gb data with caches enabled).
                                                                                            • there is also have heavy calculations happening in postgres and backend servers

                                                                                            So the load during those battery times haven’t been exactly light.

                                                                                            1. 1

                                                                                              IIRC RAM has least energy draw of all components in computer, so I didn’t give any thought on that when picking configuration. I think that “RAM drastically affects battery life” idea became from Apple marketing as answer why they don’t have more than 16gb in their machines (and nowadays they also have 32gb laptops).

                                                                                              By my understanding, RAM has almost no energy draw. Available motherboard chipsets capable of running more than 16gb (even if you only install 16gb in them), however…

                                                                                              Half a day is pretty good; it means you can sit in the park in good weather.

                                                                                              1. 1

                                                                                                You’re right and wrong. On a high end desktop computer a CPU can use 150+ watts. But a MacBook processor running at full power only uses ~35W, and only a couple watts idle. RAM on the other hand uses a constant amount of power, constantly refreshing memory cells as long as it’s powered on.

                                                                                                I don’t know about RAM in MacBooks, but IIRC full size DDR4 DIMMs use about 0.375W per GB. So 6W for 16GB, 12W for 32GB.

                                                                                                Assuming some casual use drawing 10W CPU power, 10+6W vs 10+12W makes a pretty big difference in battery life, that’s 37% more power. Assuming 3W / 16GB, that’s still a 23% increase in power consumption to power 32GB RAM.

                                                                                                These numbers are all approximate / from memory, but nevertheless you can see the huge difference between desktops and laptops when it comes to power economy.

                                                                                    3. 1

                                                                                      Exactly what I’m thinking :( Probably just install Linux

                                                                                    1. 1

                                                                                      I think I can do even better:

                                                                                      BEGIN{
                                                                                          if(!RS) { RS="[^[:alnum:]]+"; };
                                                                                          if(!outlen) { outlen=100 };
                                                                                          srand(systime())
                                                                                          prevword = ""
                                                                                      }
                                                                                      
                                                                                      # form transition matrix
                                                                                      {
                                                                                          nextwords[prevword]=nextwords[prevword]" "$0;
                                                                                          prevword = $0;
                                                                                          prevrt = RT # try to pick good initial words
                                                                                      }
                                                                                      
                                                                                      # choose an initial word
                                                                                      (rand() < 0.1) && !firstword && prevrt ~ /[!?.]|^/ { firstword=$0 }
                                                                                      
                                                                                      
                                                                                      END {
                                                                                          ORS=" "; # put spaces between words
                                                                                          word = firstword
                                                                                          for(i=outlen; i >= 0; --i) {
                                                                                              print word;
                                                                                              split(nextwords[word], potential_successors, " ");
                                                                                              word = potential_successors[int(rand() * length(potential_successors))+1]
                                                                                          }
                                                                                          ORS="\n" # have a final newline
                                                                                          print word
                                                                                      }
                                                                                      

                                                                                      Pure gawk, 15 lines (excluding lines which are only comments, whitespace, closing braces or starts of rules)

                                                                                      I wrote more about it here: https://medium.com/@albamus/fun-with-text-generation-pt-1-markov-models-in-awk-5e1b55fe560c?sk=70b02510d2bcf1b5b3e064be50fe5c7d (“friend link” to bypass medium’s paywall).

                                                                                      1. 6

                                                                                        This is a good place to start thinking about the classification and construction of tests differently.