Threads for nato

  1. 2

    Seems as though Erlang/OTP will be adopting a similar construct quite soon: https://www.erlang.org/eeps/eep-0049

    I think I’d have to play with this to get a feel for it – not just read source code – but I have a slight itchiness forming that Let It Crash (an Erlang koan) and these patterns could be at odds. Not to say that all langs should follow Let It Crash, but in the case of Erlang, it’s so typical to skip writing defensive lines of code.

    1. 1

      One niggle about the Unnecessary cd in shell scripts section, if you’re working with Makefiles (yes, I know, not a script per say), then the pattern the OP is railing against could be needed, as each command in a Makefile’s rule is stateless, so you’d may want to set a dir macro or env. Just wanted to point out this little exception found in the real world.

      1. 3

        Backus’ paper Can Programming be Liberated [sic] : https://dl.acm.org/doi/pdf/10.1145/359576.359579

        1. 15

          Joe Armstrong of Erlang fame used to posit that a truly FP lang will only keep your room warm.

          1. 14

            A nice side effect if I’ve ever seen any

            1. 1

              Good one!

          1. 2

            FYI, a new pinning operator that got a lot of feedback on the mailing list, is not coming to this release

            http://erlang.org/pipermail/erlang-questions/2021-February/100670.html

            1. 2

              I recall when a local Erlanger, Brian Troutwine, estimated that there was around 1k Erlang programmers working today (a few years ago, but, I don’t see how this number would have ballooned as of late). I remember thinking, the SF darling Twitter had that many engineers alone, working with more haute languages. It seemed that with little demand for Erlang, and knowing how much salary, roughly, an Erlanger made, that Erlang was a dismal choice for anyone who thinks in terms of short-term career tactics.

              Is the world all of a sudden going to switch to Erlang? Most likely not. So, the future for the Erlang job market could look quite a bit like it has in the last five years. Will Erlang enrich you and perhaps make you a better engineer? Without question. I think Erlang/OTP can expand one’s horizons quite a bit, and that alone is a reason to invest your precious time with it.

              1. 1

                It’s my understanding that XTerm has no mechanism for having fallback fonts.

                1. 1

                  Not a big fan of Scott Adams, but he did sell me on creating frameworks instead of setting goals a few years back; it plum works. I wrote it up a while ago if there’s interest: http://blog.cretaria.com/posts/goals-and-frameworks.html

                  Best to you in 2021!

                  1. 3

                    That sounds like quite the witch hunt. I can’t recall how many times where sleeping on it led to meaningful headway for solving these kinds sleuthing problems. However, I’m sure with upper management, this isn’t always a luxury and a good deal of frustration is inevitable. Thanks for sharing.

                    1. 1

                      I haven’t started tinkering yet, but csh isn’t able to change the prompt after a non-escaped carriage return, or can it? Isn’t this the only way $prompt could be changed on the fly? (Kinda a csh dork, forgive me.)

                      1. 1

                        Each project I have usually has a NOTES, MUSE, SCRAP file that contains markdown of things that are (respectively): slightly helpful for self; inspirational ideas to jot down; a glorified quick copy/paste board.

                        My boxes/laptops have a non-project version of the same that is more zoomed out and macro.

                        Don’t think I’ve deviated from this in a good long while.

                        1. 4

                          ’Miss this man.

                          1. 4

                            I love OpenBSD, and recommend it to anyone who didn’t foolishly purchase a laptop with an nVidia GPU.

                            1. 1

                              It works fine on my (most?) laptop with a nvidia GPU. I think my laptop thinkpad440p has intel video for non 3d stuff.

                              1. 2

                                I mean, it works perfectly on mine with an nvidia chip for the most part. I just can’t persuade it to drive an external display

                                1. 1

                                  oh :/ good to know

                              2. 1

                                I’m about to embark on buying a laptop dedicated to OpenBSD. Would you recommend a dream machine for this purpose that you believe to be a good pairing with this OS? Thanks in advance…

                                1. 2

                                  I am not an expert, and I have only used OpenBSD on one laptop. I think any not-too-new thinkpad should be fine, ideally without an nvidia GPU

                                  1. 1

                                    Indeed! I was leaning that way. Not-too-new… I suppose for the reason that OpenBSD has had time to support the older ones? er…?

                                    1. 2

                                      For anyone who cares, I ended up going with a Thinkpad T480. I’ll probably write up something regarding my experience with OpenBSD running on it.

                              1. 5

                                As an Erlanger, and ex-rubyist, I recall when I first heard of Elixir: I had a glance at the equivalent of the Rails’ `routes.rb,’ but in this new Phoenix/Elixir project that was gaining popularity. It was clear to me that one of the main goals of Elixir had to be to emulate the ruby syntax/patterns as much as possible from looking at that file (can’t recall what its namespace is in Phoenix). To my eyes, the sameness was uncanny. So despite the constant backpedaling from Elixir people that they’re only like Erlang, it’s clear to me that Elixir was designed to look like Ruby as much as possible.

                                1. 3

                                  So despite the constant backpedaling from Elixir people that they’re only like Erlang, it’s clear to me that Elixir was designed to look like Ruby as much as possible.

                                  Well, not really. Elixir is for sure Ruby-inspired, but for sure it is nit designed to be “as much Ruby as possible”. It is designed to have bells and whistles that makes language as flexible as possible though - hence macros that allows for stuff that can be seen in Phoenix. Macros are great, even if overused sometimes.

                                1. 13

                                  Give OTP a try sometime. Battle-hardened patterns for concurrency-model demands.

                                  1. 1

                                    Do you know of anyone who’s tried to build something like OTP in Go? I think, with the right juggling of channels behind the scenes, it should be generally possible?

                                    1. 11

                                      OTP builds on top of Erlang. There is one fundamental rule that you have to follow if you want to have even a vague chance of getting concurrency right: No object may be both mutable and shared between concurrent execution contexts. In Erlang, that is trivial: the only mutable objects are the process dictionaries, which you cannot take a reference to and so cannot share. Everything else is immutable and so safe to share.

                                      In Go, there is nothing in the type system that helps you avoid accidentally sharing mutable objects. There is no real notion of immutability in the language, so you have to build immutable abstractions by creating objects that expose only read-only accessors for their state.

                                      For a language that has channels or message passing and also has mutable objects, you want to guarantee that one of two properties holds for any object that you send. It is either immutable, or you gave up your reference to it at the time that you sent it. Pony and Verona enforce this in the type system, Rust tries to build this the standard library, C++ makes it possible to express this via smart pointers (but doesn’t make it easy), Go doesn’t even make it possible to express this in any way that can be statically checked.

                                      Go is one of the worst languages around for concurrency. It makes it incredibly easy to write concurrent code but gives you no help in writing correct concurrent code.

                                      1. 2

                                        Yikes. Thanks for the insights!

                                      2. 1

                                        Not off hand. Sounds like a fantastic idea, though. Not familiar with Go, but I know that some of the fundamentals that probably need to be at hand to do something OTP-like are monitors, links, and an error model that’s rooted in message passing.

                                    1. 1

                                      Even though the lion’s share of langs can be used to develop for the web, I found that embracing languages other than the typical go-to web-dev langs was the path that got me programming outside of the web world. It was probably just a side-effect, but that’s what happened all the same. Of course, coming back to the web, ouch; now that really hurts after tasting the fruits off of yummier trees.

                                      1. 4

                                        Hi. My name is Nato. And I’m (somewhere) on the ol’ Spectrum.

                                        Question to the author, should you care to divulge: @baweaver, does coding accentuate/agitate some of the ASD-ness? ‘Was curious. I find that coding resonates to that type-a-ness to such a degree, that it’s perhaps the last craft I should have chosen for myself. Perhaps I should have chosen a craft that mollifies all the ASD type feelings.

                                        P.S. I mean no snark in the first part of the comment, to be clear.

                                        1. 4

                                          It does, and to some extent that’s bad but to another it’s amazingly helpful. It’s allowed me a level of focus and creativity that’s not normal, and now I’ve leveraged that into doing conference talks using cartoon lemurs to teach programming as an outlet for some of those crazy ideas:

                                          https://www.youtube.com/watch?v=TVwVLBor8WE

                                          There are several such talks of mine in circulation: Reducing Enumerable, Scaling Christmas, The ActionCable Symphony, Tales from the Ruby Grimoire, The Night Before Code Freeze, Professor When and the Timey Wimey Extensions (soon), and more on the way.

                                          In a lot of ways I leaned in once I realized that my level of eccentric was not only tolerated but celebrated in the Ruby community.

                                          1. 1

                                            Thanks for taking the time to reply. Looking forward to going through these. Best to you.

                                        1. 1

                                          The Knuthian TeX versioning is droll, for those who haven’t heard of it: It (used to?) use precision of numbers in pi to increment the version… (from wikipedia of Software_versioning)

                                          The current version is 3.14159265. This is a reflection of TeX being very stable, and only minor updates are anticipated. TeX developer Donald Knuth has stated that the “absolutely final change (to be made after [his] death)” will be to change the version number to π, at which point all remaining bugs will become permanent features.

                                          1. 3

                                            I remember at an Erlang conference, there was a question to Robert Virding and Mike Williams (co-creators of the lang) about how do they deal with `imposter syndrome.’ They were dumbfounded; they had no idea what that concept could even mean.

                                            1. 1

                                              I had that happen once with a co-founder. Had to explain the concept. In retrospect that explained a lot of things about them and our relationship (both the good and the bad).

                                              1. 1

                                                I’ve never had impost syndrome, it’s a mystery to me. But then I got started in programming during the 80’s with 8 bit micros. In those days tech was hugely uncool (in my area), and there was more of a culture among enthusiast around sharing knowledge and knowhow. I have noticed there tends in todays coders there seems to be a lot more one upsmanship and showing off which I try to discourage any chance I get.

                                              1. 6

                                                Thanks for the invite @pushcx, and happy bday. A nice little community.