1. 2

    Writing a Python exercise for a pre-interview meeting

    1. 11

      very cool ! fwiw, there is also the quintessential ‘nand to tetris’ book & website which also goes into building a complete machine from nand gates. and once you are done with it, you can enjoy a cool game of tetris on your creation !

      1. 1

        I have that book! It was given to me as a gift!

      1. 10

        It must be noted that this has happened a lot more times if one considers ccTLDs (which are TLDs). In fact, .cs has died twice. Once for Czechoslovakia and once for Serbia-Montenegro https://en.wikipedia.org/wiki/.cs

        1. 2

          Indeed. Still see advertisement on trucks, etc. that have email address in the dead .yu zone here in Montenegro. It seems that the transition period of 3 years was too short. On the other hand, .su (for Soviet Union) is still active.

        1. 4

          I am amazed that mutt is still alive and kicking. Fond memories of another Internet

          1. 4

            It’s very much alive and kicking - there’s even NeoMutt, a fork with added features. As someone who’s used Mutt/NeoMutt almost every day for 20+ years, it’s still very much useable today. Yes, HTML email does make things a bit painful, but there are workarounds.

            1. 1

              I’m using a stripped down version of elinks to do HTML -> plaintext conversions, both for mail and some other projects. w3m is also popular for this task.

              Do you have other solutions you’d like to share?

              1. 3

                I’m using pretty much the same, albeit with w3m. I use a modified version of view_attachment.sh to handle attachments (grabbed from The Homely Mutt - there are plenty of other great tips in that article).

                1. 1

                  Thanks. I’m working on a bidirectional mail gateway which does Unicode/MIME/RFC-5322/RFC-6854 <—> ASCII-ANSI-X3.4-1986/RFC-822 conversions.

                  Converting MIME/Base64 encoded parts into to UUENCODE and back is straightforward (and lossless).

                  The lossy transliteration of Unicode characters into plaintext equivalents is less straightforward and there is a wealth of prior art.

                  The task of ceating a usable presentation of modern HTML mail as plaint text, however, is more of an art than a science.

                2. 2

                  FWIW urlscan is another useful tool https://github.com/firecat53/urlscan

                  In mutt I bind this to C-b so I can quickly open some link in my browser

              2. 2

                I’m actually still an elm user, myself.

                1. 2

                  I also still use it. Works great, no nonsense. Sure, when I want to see an image I have to scp it to my local system, but hey :)

                1. 2

                  Does this exist for non-.app domains?

                  1. 1

                    I would think most other domains like .com and .net would already have most short names registered.

                    1. 1

                      True, but aren’t there lots of new TLD’s?

                      1. 2

                        Which new TLD’s would you want something like this for?

                        1. 3

                          I like .space, .blue, .coffee, .kiwi, .pink, .ink, among others. :) I guess I’m looking for all of them…

                          1. 2

                            Yes, that would be nice maybe we can get the owner of minus.app to add them too.

                    2. 1

                      The closest I can think of https://dailychanges.domaintools.com/

                    1. 1

                      It so reminded me of On Paper by Diomidis Spinellis!

                      1. 5

                        A list is a graph. A tree is a graph. A B-Tree is a graph. Relational systems use trees (graphs) for indexing. Non-relational systems too.

                        A network is a graph. BGP operates on the internet graph.

                        Transportation networks are graphs. The Braess paradox happens on a graph.

                        By visualizing a relationship graph you can explain the complexity without words.

                        Centrality (there are many BTW), spanning trees, optimal paths are key takeaways you can see applied to many disciplines if you can model your problem as a graph problem.

                        I hope it helps.

                        1. 1

                          So this is actually the exact reason why I want to learn more about graphs, but I’m looking more for what about graphs I should learn. Are there any major topics or mental models I should take away? (For example, if someone asked me about economics, I would suggest they look at: marginal analysis, monopolies, the creation of money, game theory, etc.)

                          Edit: alas, my poor reading comprehension. I didn’t see spanning trees. Will take a look - thank you.

                          1. 3

                            The first seven chapters of Graph Theory and Complex Networks

                            1. 1

                              Thanks for the reference. More interesting answer than usual on why it’s free:

                              “Why for free?

                              Sometimes when you write a book, it makes a lot of sense to think big and act commercially. Thinking big in this sense means you expect many people to have access to your book. Acting commercially means that you try to successfully market and sell your book. Sometimes, it’s enough to just think big, knowing that acting commercially will certainly keep everything small. When you write a book containing mathematical symbols, thinking big and acting commercially doesn’t seem the right combination. I merely hope to see the material to be used by many students and instructors everywhere and to receive a lot of constructive feedback that will lead to improvements. Acting commercially has never been one of my strong points anyway.

                              However, freely accessible doesn’t mean that everyone has the right to copy and spread the material, which I would find quite offensive. For this reason, when requesting an electronic copy, the book will be watermarked with your e-mail address. The watermark is part of the LaTeX source, so it will take some effort to remove, although I do not have the illusion that removal is impossible.”

                              First part sound great. Second makes me raise an eyebrow as to what they mean. No judgment since they wrote and gave away what you said is a great book. Maybe author just wants to track number of and be able to contact the beneficiaries?

                              1. 1

                                This is called Social DRM. This is a totally different discussion though, and you could email the author for more details about his stance.

                                1. 1

                                  Ive never heard of Social DRM. I’ll have to look into that further.

                        1. 5

                          I got reminded of this book from the 90s: Object Oriented Programming with ANSI C (link is PDF)

                          1. 3

                            I was thinking about it few minutes ago, reading this wonderful response about Rust.

                          1. 3

                            If FreeBSD or OpenBSD had a first class Docker port, I’d be using BSD for everything. I tried using one of the Docker betas. A lot of stuff worked, but it was so old I couldn’t connect to it with a lot of other docker clients/libraries and it really shot down what I could do.

                            I ended up using FreeBSD for my VPN and Ubuntu for my Docker server:

                            https://penguindreams.org/blog/bee2-creating-a-small-infrastructure-for-docker-apps/

                            1. 2

                              From my experience (just few months really) Docker and OpenBSD follow pretty different philosophies. Not sure it’s a good combination.

                              1. 2

                                You mean the CLI to connect to a Linux VM in vmd which runs the containers like docker-machine on OS X and Windows? I haven’t tried it but that could work on OpenBSD. A real, native port does not sound likely as Docker makes extensive user of Linux kernel features which are just not there in OpenBSD at least. Not sure how much of docker compatibility could be build upon FreeBSD jails.

                                1. 1

                                  There was an effort to get Docker running natively on FreeBSD. Unfortunately it hasn’t been updated in years and is still at version 1.8:

                                  https://wiki.freebsd.org/Docker

                                  But when I tried it, I could get images to pull and run and work fairly well.

                                2. 1

                                  I’ve heard, but have not tested, that people on OpenBSD use VMM to spin up Alpine and then run docker images from there. Granted you cannot actually run a swarm like that, but if you absolutely need to run a docker image, it could be a solution for a developer machine.

                                1. 5

                                  An anonymous feedback bot reminds me too much of Yik Yak and could easily lead to a very toxic work environment

                                  1. 3

                                    Behavioral control (for lack of a better term, help me here) is the responsibility of the team. If toxic pattern arise, people could abstain from such a bot, or even reach to a conclusion that such a device is not a cultural fit for their team in the end because it promotes the wrong type of behavior.

                                    This is not something that could work with every Slack team anyway. I find it interesting. It reminded me of days past, when there were IRC bots that implemented “private” channels maintaining named and anonymous conversations in a similar manner.

                                  1. 3

                                    Oh but ed can run Rule 110 which is Turing complete and therefore indeed ed can run anything (although in a different context than what the OP meant).

                                    1. [Comment removed by author]

                                      1. 1

                                        I am willing to accept it because as the author of rule110.ed writes “The alternative to self-modification is to have the script and the data in separate files”. But I think we digress.

                                    1. 2

                                      I’ve almost drafted a similar blogpost in order to try to explain to myself what a Monad is. Damn!

                                      1. 1

                                        I had been running with an OpenBSD desktop until 2013.

                                        1. 1

                                          Out of curiosity:

                                          1. Why did you stop using OpenBSD?
                                          2. What did you switch to?
                                          1. 3

                                            I do not really remember why I switched. I think I was given a new desktop and either it could not install, or there were devices that were not really supported in the motherboard and it bothered me.

                                            (This was also a similar reason for me switching pf firewalls from OpenBSD to FreeBSD to DragonFlyBSD. Whatever the hardware at hand could load, that was being used, with the above order of preference.)

                                            I switched to Windows and kept running OpenBSD in a VM. Then I went to work for a Mac-only organisation. Then to an Ubuntu friendly shop. Then to a really big multinational with Windows. And now I am back with a Mac.

                                            I still use OpenBSD in a VM when I write C code. But I do not want to look for how to make device X work with it or not. I want Chrome (not Chromium), Slack, Zoom, Hangouts and the like to just work. And unfortunately, the best platforms for these to work are either Windows or Mac.

                                            1. 2

                                              I want Chrome (not Chromium), Slack, Zoom, Hangouts and the like to just work.

                                              I don’t blame you. If you need that stuff to work for your job or personal life, then you do what you gotta do. Thanks for answering.

                                        1. 3

                                          The article keeps saying how they really wanted it to be on 4.4.4.4 but stops short of explaining why that didn’t happen. Anyone know? Are the owners of 4.4.4.4 not willing to make use of that address? Is there a technical reason why it can’t be used?

                                          1. 2

                                            Well, it seems that by the time they started their project somebody had already assigned 4.4.0.0/16 for DSL tests, and thus it was unavailable. As to what it can be done now with 4.4.4.4, I think this is left to Level3’s management. https://mailman.nanog.org/pipermail/nanog/2010-February/018291.html

                                          1. 2

                                            What does this mean? openbsd won’t support ipv4?

                                            Edit: oh

                                            1. 2

                                              417072696c20466f6f6c

                                            1. 3

                                              We’re a small shop (~15 folks, ~10 eng), but old (think early 2000s, using mod_perl at the time). Not really a startup but we match the description otherwise so:

                                              It’s a Python/Django app, https://actionk.it, which some lefty groups online use to collect donations, run their in-person event campaigns and mailing lists and petition sites, etc. We build AMIs using Ansible/Packer; they pull our latest code from git on startup and pip install deps from an internal pip repo. We have internal servers for tests, collecting errors, monitoring, etc.

                                              We have no staff focused on ops/tools. Many folks pitch in some, but we’d like to have a bit more capacity for that kind of internal-facing work. (Related: hiring! Jobs at wawd dot com. We work for neat organizations and we’re all remote!)

                                              We’ve got home-rolled scripts to manage restarting our frontend cluster by having the ASG start new webs and tear the old down. We’ve scripted hotfixes and semi-automated releases–semi-automated meaning someone like me still starts each major step of the release and watches that nothing fishy seems to be happening. We do still touch the AWS console sometimes.

                                              Curious what prompts the question; sounds like market research for potential product or something. FWIW, many of the things that would change our day-to-day with AWS don’t necessarily qualify as Solving Hard Problems at our scale (or 5x our scale); a lot of it is just little pain points and time-sucks it would be great to smooth out.

                                              1. 6

                                                FYI, I get a “Your connection is not private” when going to https://actionk.it. Error is NET::ERR_CERT_COMMON_NAME_INVALID, I got this on Chrome 66 and 65.

                                                1. 2

                                                  Same here on Safari.

                                                  1. 1

                                                    Sorry, https://actionkit.com has a more boring domain but works :) . Should have checked before I posted, and we should get the marketing site a cert covering both domains.

                                                  2. 1

                                                    Firefox here as well.

                                                    1. 1

                                                      Sorry, I should have posted https://actionkit.com, reason noted by the other comments here.

                                                    2. 1

                                                      https://actionk.it

                                                      This happens because the served certificate it for https://actionkit.com/

                                                      1. 1

                                                        D’oh, thanks. Go to https://actionkit.com instead – I just blindly changed the http://actionk.it URL to https://, but our cert only covers the boring .com domain not the vanity .it. We ought to get a cert that covers both. (Our production sites for clients have an automated Let’s Encrypt setup without this problem, for the record :) )

                                                    1. 2

                                                      Nice effort. It pushes me to complete my lisp implementation too

                                                      1. 1

                                                        Wow. Why does Postgres use IP for talking to its own local stats collector, and not, like, a unix socket?! o_0

                                                        1. 1

                                                          Maybe for compatibility with systems without Unix sockets, like Windows?

                                                          1. 1

                                                            I think it should be at least configurable.

                                                          1. 6

                                                            As the years go by, I am lowering my expectations from my work. There is only so much stuff you can accomplish and only so many spoons to move during a day. So yes, since it puts food on the table it is meaningful. No I am not working to save lives in general and my work by extension cannot be used in such a context (I mean a programming language designer may end up developing a language that could be useful to biologists; my work is not even that).

                                                            My worry is that other people always do more interesting work. But the thing is when you get the chance to go to the place that does interesting work, you see that in the general case it is not as exciting as when you were observing from the outside.

                                                            What makes me happily worried is that certain people look at me and have directly told me they consider me as a kind of mentor. So if I live up to their standards they may fly off and do some more meaningful work than mine.

                                                            1. 2

                                                              When I see questions about [ vs [[ I tell people to execute the command “which [”