1. 12

    I message my friends with Signal or Keybase

    I mean, sure IM has its place but you can’t equate it with email. They exist mutually exclusive of each other. You recommend it as an “alternative”, however—what guarantee do you have that these services will exist in the future—say the next 10 years, or 5 even? I know that email will. It’s not centralized, and most definitely not run by a VC funded org.

    1. 1

      You could use standardized IM, but even so I agree that at least the apps that exist today cannot replace the email use case.

      1. 2

        what is standardized IM that you speak of ? sorry, but i haven’t come across any such beast.

        1. 1

          There are a few. My favourite is https://tools.ietf.org/html/rfc6121 but another obvious one would be https://tools.ietf.org/html/rfc3428

    1. 1

      one of the design goals of xi was/is :

      CRDT as a mechanism for concurrent modification.

      i am genuinely wondering if concurrent modification is really, truly needed ? for reference feel free to look at the crdt-retrospective that is linked in this article.

      thank you kindly in advance for elucidation.

      1. 7

        So “needed” is really a function of your requirements. If you’re trying to build Google Docs, then obviously yes. If you’re doing simple editing of plain text files, then obviously no.

        The interesting case, I think, is language servers (and perhaps other similar services). They’re slow enough that blocking synchronously on them would be a horrible experience. Thus, you’re in a situation when there’s a concurrent edit by the user and an “edit” of sorts (basically adding annotations) by the language server. If you don’t pay attention to concurrency issues, then you’ll have all kinds of issues around annotating incorrect regions in the text. I do believe this is a problem today and that it’s possible to do better.

        The question, then, is what kind of concurrency mechanism. What xi explored was the idea of building a completely general mechanism based on CRDT, which has a beautiful mathematical theory behind it. This did not work well for two reasons. First, while CRDT handles some use cases well (syntax highlighting), for others it is a poor fit. It might be possible to figure out how to express auto-indentation (and other similar features like “soft spans”) robustly in the CRDT framework, but we didn’t figure out how to do that.

        Second, given what I now know of the OT and CRDT space, it is clear that a general mechanism is basically a dream, not reality. When you have a server of some kind doing automated edits, you want to treat those differently from edits from a human user. In particular, in the case of conflict (and conflict is inevitable), you generally want to discard the automated edits.

        Coming back to the specific question of auto-indentation. The original plan was to use TextMate syntax definitions. These can sometimes be slow (this is basically a tradeoff for having access to hundreds of definitions), so the goal was to not interrupt typing, perhaps fixing up indentation with a small delay. But in retrospect, and looking at the overall system design, it seems like a better choice is to use an incremental parser (like tree-sitter or Lezer) that is so fast that it is possible to apply its auto-indentation results synchronously without degrading the interactive experience.

        1. 2

          wow ! thanks for the lovely explanation, much appreciated. kind regards !

      1. 9

        Here is the PDF of the book Amazon-linked in the article. Gotta starve the beast.

        1. 6

          I clicked before opening the link and was surprised to see it’s the same book as the one my monitor is resting on :)

          1. 2

            is it legally in the public domain now ? would be pretty surprising…

            1. 10

              the domain this pdf is stored at is public, which is good enough for me

          1. 34

            Every time I see this article, I causes me to go look up and read the one below, and it has yet to fail to improve my day

            https://www.usenix.org/system/files/1311_05-08_mickens.pdf

            1. 6

              This is an excellent rebuttal that I’d never considered, even though I’ve read and enjoyed both articles multiple times.

                1. 1

                  I’m so excited, thank you for sharing this

              1. 4

                This was the result of three discussions here on lobsters. I’m hoping that collecting some of the resources I had mentioned into a single place with more discussion might be of use.

                1. 2

                  Thanks, it is! I’ll read High Performance Browser Networking, from a cursory look it seems like it’s a great way to learn the details I’m missing.

                  1. 1

                    yeah it pretty useful. in the same thread, there was a mention of this which also looks comprehensive.

                  1. 15

                    I’ve worked in networking a good while and have a draft blog post on just this subject - but it’ll probably stay draft a bit longer. 🙂

                    My four main book recommendations are:

                    1. High Performance Browser Networking (available for free online https://hpbn.co) - great crash course on protocols and browsers. This is probably 90% of what most software developers need to know.
                    2. Interconnections by Radia Perlman - if you want to learn about routing protocols, this is still the best resource. Perlman is extremely accomplished in the field and has an accessible writing style. A few newer protocols will be missing, but this will give you the basis you need to pick those up easily from eg. wikipedia
                    3. Network Routing by Deep Medhi and Karthik Ramasamy - I only recommend this for the chapter on hardware, and possibly the chapter on label switching. It has a great overview of how a physical router is actually put together and works, but I found most of the rest of the book extremely dry and nowhere near as engaging as Perlman.
                    4. The Internet Peering Playbook (much of the content is free at drpeering.net) - if you want to understand the people/business rather than the technical side of how the Internet is put together
                    1. 2

                      i would also heartily recommend ‘network algorithmics’ it is really very good.

                    1. 3

                      i found John Ousterhout’s book A Philosophy of Software Design to be pretty good as well.

                      1. 18

                        For the record these would make terrible interview questions, but they seem like really fun questions to annoy your programmer friends with.

                        1. 2

                          nerd-sniping that’s the term you are looking for i believe.

                          1. 2

                            I got the top one as an interview question from the manager of my now-former team.

                          1. 2

                            i have been using terminus for quite a while now. check it out, you might like it.

                            1. 1

                              I’ve used Terminus in the past, it’s very good indeed.

                            1. 13

                              Some of those problems sound at least an order of magnitude harder than I’d expect in an interview unless it’s a specialized role and you were asked to prepare. Anyway, a positive bit of advice is that if you still want to do this, go try out interviewing.io. You’ll get concrete feedback on what they expect.

                              By the way, one tiny piece of information about the world (offered with no judgment, b64 decode if you desire the advice, leave alone otherwise):

                              VGhlIHdvcnN0IGFjY2VwdGFibGUgcmVzcG9uc2UgdG8gZmFjaW5nIGEgY2hhbGxlbmdlIHlvdSdyZSBub3QgZmFtaWxpYXIgd2l0aCBpcyAiT2gsIEkndmUgbmV2ZXIgd29ya2VkIG9uIHNvbWV0aGluZyBsaWtlIHRoYXQgYmVmb3JlLiBMZXQgbWUgZ2l2ZSBpdCBhIHNob3QiLiBUaGUgYmVzdCB1bmFjY2VwdGFibGUgcmVzcG9uc2UgaXMgIkkndmUgbmV2ZXIgd29ybGQgb24gc29tZXRoaW5nIGxpa2UgdGhhdCIu

                              1. 6

                                one tiny piece of information about the world (offered with no judgment, b64 decode if you desire the advice, leave alone otherwise)…

                                what’s the best acceptable answer ?

                                1. 7

                                  “The best solution I’ve come across when working on something similar…”, Solve the problem while displaying experience, skill and phenomenal personality. Extra points for making them laugh. You could tell them you don’t know and attempt a solution - that’s the safer route, or you could lie and pretend cough be brilliant, like the unicorns they’re expecting and solve it perfectly.

                                2. 4

                                  I think your advice is spot on. I’ve heard that interviewers will often look for the way you approach a problem you’ve never seen before instead of your solution. You’re usually allowed to ask for help or explain the way you would attack the problem if you knew a specific piece of information that you’re currently forgetting. The interviewer probably doesn’t want to work with someone who says “I don’t have any experience in that” and lets their brain shut down right then and there.

                                  1. 1

                                    The issue I have is that in a lot of interviews that’s not stated up front. So now I’m stuck in this spot of, do I ask and say I don’t know, and be downgraded or ignored because I “didn’t know it”? Or will I be downgraded because I didn’t ask when they were expecting me to. State up front what you want from me. Don’t leave it ambiguous.

                                1. 9

                                  Battlestation

                                  • 2 × 24-inch 4K screens
                                  • Filco Majestouch Ninja 2 with GMK Plum keycaps and custom controller
                                  • Ryzen 9 3900X desktop (smaller box on right, bigger one is the i7-6700K box it replaced)

                                  Screenshot

                                  • Arch Linux
                                  • Awesome WM
                                  • CLIon
                                  • Neovim in Alacritty
                                  • Firefox
                                  • zsh in Alacritty
                                  • rsfetch

                                  dotfiles

                                  1. 1

                                    Nice. What’s the font used for editing in CLion?

                                    1. 10

                                      That’s PragmataPro Mono. Expensive, but insanely high-quality.

                                      1. 6

                                        Yep perfect summary. It’s PragmataPro — expensive but can’t recommend enough.

                                        1. 1

                                          What are the differences in quality and experience between the PragmataPro font, and, say, Hack?

                                          1. 3

                                            Quality in a font is a little hard to describe but I’ll try: Extensive glyph coverage, no need to apply “powerline” and patches similar patches. Includes fonts with and without ligatures. Has ligatures for many programming character combinations.

                                            Quality aside though. It’s the monospace font I find most visually pleasing.

                                            1. 2

                                              PragmataPro has many more glyphs than Hack (7000+ vs. 1500). PragmataPro supports ligatures if that’s your thing. (There are of course version with all ligatures disabled.)

                                            2. 1

                                              Is it substantially better than SF Mono?

                                              1. 2

                                                yes, it is.

                                            3. 2

                                              Looks a bit like IBM Plex or a variation of Input Mono.

                                          2. 1

                                            Did you do anything to improve the font rendering, or is this just the advantage of a 4k screen?

                                            1. 1

                                              No no tweaks that’s the stock config except for overrides to force PragmataPro for monospace.

                                          1. 3

                                            don’t agree: there are instances were it would be most useful to go from binary-stream to in memory representation without an intermediate ‘unpacking’ stage.

                                            or as james-micken’s puts it (the night watch):

                                            … You can’t just place a LISP book on top of an x86 chip and hope that the hardware learns about lambda calculus by osmosis. …

                                            1. 12

                                              Protobufs are an attempt at a solution for a problem that must be solved at a much lower level.

                                              The goal that Protocol Buffers attempt to solve is, in essence, serialization for remote procedure calls. We have been exceedingly awful at actually solving this problem as a group, and we’ve almost every time solved it at the wrong layer; the few times we haven’t solved it at the wrong layer, we’ve done so in a manner that is not easily interoperable. The problem isn’t (only) serialization; the problem is the concept not being pervasive enough.

                                              The absolute golden goal is having function calls that feel native. It should not matter where the function is actually implemented. And that’s a concept we need to fundamentally rethink all of our tooling for because it is useful in every context. You can have RPC in the form as IPC: Why bother serializing data manually if you can have a native-looking function call take care of all of it for you? That requires a reliable, sequential, datagram OS-level IPC primitive. But from there, you could technically scale this all the way up: Your OS already understands sockets and the network—there is no fundamental reason for it to be unable to understand function calls. Maybe you don’t want your kernel serialize data, but then you could’ve had usermode libraries help along with that.

                                              This allows you to take a piece of code, isolate it in its own module as-is and call into it from a foreign process (possibly over the network) without any changes on the calling sites other than RPC initialization for the new service. As far as I know, this has rarely been done right, though Erlang/OTP comes to mind as a very positive example. That’s the right model, building everything around the notion of RPC as native function calls, but we failed to do so in UNIX back in the day, so there is no longer an opportunity to get it into almost every OS easily by virtue of being the first one in an influential line of operating systems. Once you solve this, the wire format is just an implementation detail: Whether you serialize as XML (SOAP, yaaay…), CBOR, JSON, protobufs, flatbufs, msgpack, some format wrapping ASN.1, whatever it is that D-Bus does, or some abomination involving punch cards should be largely irrelevant and transparent to you in the first place. And we’ve largely figured out the primitives we need for that: Lists, text strings, byte strings, integers, floats.

                                              Trying to tack this kind of thing on after the fact will always be language-specific. We’ve missed our window of opportunity; I don’t think we’ll ever solve this problem in a satisfactory manner without a massive platform shift that occurs at the same time. Thanks for coming to my TED talk.

                                              1. 5

                                                You might want to look into QNX, an operating system written in the 80s.

                                                1. 1

                                                  It should not matter where the function is actually implemented.

                                                  AHEM OSI MODEL ahem

                                                  /offgetlawn

                                                2. 3

                                                  I’ve been thinking along the same lines. I’m not really familiar with Erlang/OTP but I’ve taken inspiration from Smalltalk which supposedly influenced Erlang. As you say it must be an aspect of the operating system and it will necessitate a paradigm shift in human-computer interaction. I’m looking forward to it.

                                                  1. 2

                                                    cap’n proto offers serialisation and RPC in a way that looks fairly good to me. Even does capability-based security. What do you think is missing? https://capnproto.org/rpc.html

                                                    1. 2

                                                      Cap’n proto suffers from the same problem as Protobuffers in that it is not pervasive. As xorhash says, this mechanism must pervade the operating system and userspace such that there is no friction in utilizing it. I see it as similar to the way recent languages make it frictionless to utilize third-party libraries.

                                                    2. 2

                                                      well, the fundamental problem imho is pretending that remote and local invokations are identical. when things work you might get away with it, but mostly they dont. what quickly disabuses you of that notion is, that some remote function calls have orders of magnitude higher turnaround time than local ones.

                                                      what does work is asynchronous message passing with state-machines, where failure modes need to be carefully reasoned about. moreover it is possible to build a synchronous system on top of async building blocks, but not so the other way around…

                                                    1. 6

                                                      check this one out to see how hard it is to actually save data without corruption or data loss.

                                                      1. 2

                                                        if you like this, then you might want to check out hierarchical-state-machine (hsm) as well. as opposed to vanilla state-machines, in hsm’s, adding new states don’t cause a NxM explosion of state/event problem. states are in a well defined hierarchy, with unhandled child events handled by parent states etc. etc.

                                                        1. 9

                                                          Fun stuff! I’ve been meaning to do a write-up on this but haven’t gotten around to it yet. I may not be a master, but I maintain a number of themes (base16, monokai-pro, and grayscale being my favorites).

                                                          My config has gone through a number of revisions both in and out of org-mode, with evil-mode, with normal bindings, etc. This is where I’ve settled for the time being.

                                                          https://github.com/belak/dotfiles/tree/master/emacs.d

                                                          Advantages to a config in org-mode: everything is in one file, org is amazing, and it’s easy to leave comments in a format that allows for more than just text.

                                                          Disadvantages: everything is in one file, completion and linting of code blocks has never worked quite right in org files for me, and it can be slower

                                                          Here are a number of things I can recommend for every config:

                                                          • use-package - this makes config much easier and is the reason separate files works for me. It makes it easy to separate packages into different blocks (the main advantage you get from org-mode blocks) and removes a lot of boilerplate often used to speed up config loading.
                                                          • straight - this is an alternative to package.el. It’s at least worth looking into. I’m using it because it makes it a lot easier for me to maintain my own packages without having a manual cloning process.
                                                          • ido, helm, or ivy/swiper - pick one of these. ido is built-in but there are lots of good packages that expand it. helm is a huge package that does a ton of awesome things and ivy is a lighter weight package that’s still fully featured. I prefer ido because it’s fairly minimal.
                                                          • If you want code completion, company-mode is amazing. I’ve been moving away from this for performance reasons, but I may revisit it later.
                                                          • flycheck does an amazing job with linting.
                                                          • magit is the best git wrapper I’ve used… ever
                                                          • projectile made project navigation super easy. I would strongly recommend this for anyone who sometimes works in multiple projects at a time.

                                                          If you’re looking for a good config framework, there are a few really solid ones I’ve used in the past, but I’m picky so I don’t tend to use them:

                                                          • doom-emacs is a well-maintained project built on a really solid base that gets tons of updates. This is evil-mode focused but recently had better emacs bindings submitted as well.
                                                          • spacemacs is evil-mode focused, but also has emacs bindings. It’s tried and true.
                                                          1. 4

                                                            I’ve tried spacemacs, although i like it, I think its too much magic. I would like to get my hands in and learn how to configure things myself.

                                                            Thanks for sharing your config. If you ever write a blogpost, please share it in the community!

                                                            1. 1

                                                              Thanks for grayscale. I’ve been using it exclusively for a long time.

                                                              1. 1

                                                                grayscale looks very zenburn’ish to me…

                                                                1. 1

                                                                  Yep! I ended up using the zenburn colors as highlights. The general idea was taken from the original duo themes for atom where brighter colors are supposed to be “more important”, but even after that, there were still things like warnings, errors, diff colors, etc… so I went with the zenburn colors because I found they worked well with grayscale.

                                                            1. 12

                                                              Read a brief rundown of the OSI model. Focus on understanding one or two examples of things you’ve dealt with in the past that exist at each layer.

                                                              Don’t. The OSI model is a theoretical model, which is not used in practice. You might be able to apply the lowest three layers to Ethernet and IP, but it just doesn’t apply in other cases, such as VPNs or TLS. Just learn a bit of HTTP, TCP, IP, Ethernet and thereby the concept of encapsulation.

                                                              1. 3

                                                                Does the OSI model not have any applicability to the real world? I’ve heard this as well, but thought it’d be useful as a framework for understanding network issues and a common language, if nothing else.

                                                                1. 10

                                                                  The OSI model is fine, and you’re right that there’s value in a shared language (L4 vs L7 loadbalancers are an example where layers have become common terms). The main modification I’d suggest is to think of layers 5-7 as “application” and not get too caught up in the distinction.

                                                                  I also think there’s value in understanding a theoretical framework, because it helps you notice the hairier parts of the current protocol suites that ideally shouldn’t exist (eg ARP) and will serve you well in understanding new protocol developments like QUIC.

                                                                  If you’re looking for a solid, more in depth networking foundation, the book to read is still Interconnections by Radia Perlman. It’s not up to date with developments like vxlan, quic, and mpls, but it’ll give you the grounding you need to easily understand those. And it’s very well written; networking literature more than many other areas of tech tends to be excessively dry.

                                                                  1. 2

                                                                    The main modification I’d suggest is to think of layers 5-7 as “application” and not get too caught up in the distinction.

                                                                    In his blog, @mooreds writes:

                                                                    Focus on understanding one or two examples of things you’ve dealt with in the past that exist at each layer.

                                                                    I would recommend using the four-layered “Internet model” (or one of the others from the Wikipedia article I linked) for this exercise, because this exercise would be especially confusing at the layers 5-7 of the OSI model.

                                                                    1. 1

                                                                      I see no distinction to choosing a four layer model versus using OSI while omitting 5/6 - except that your layer numbers will be off from everyone else you talk to. 🙂

                                                                      It isn’t terribly important either way though.

                                                                  2. 7

                                                                    Several different models have been made and I think they all reflect reality better than the OSI model. See: https://en.wikipedia.org/wiki/Internet_protocol_suite#Layer_names_and_number_of_layers_in_the_literature

                                                                    1. 4

                                                                      I think it is helpful. But, I feel that most of the time it is useful enough if you can clarify if it’s a “network”, “OS configuration”, or an “application” issue.

                                                                      1. 3

                                                                        radia-perlman’s book, interconnections, will dissuade you of any such notions…

                                                                      2. 1

                                                                        I like an abridged OSI model. Layers 1, 2, 3, maybe 4, and the application are really the useful ones. :-)

                                                                        1. 1

                                                                          I think the OSI layers are really useful for understanding data flow between protocols. It helps me design and communicate design for software products.

                                                                          I also like the ip stack [0] a bit better as it’s a little simpler and more practical (ie, I don’t deal with data frame too much).

                                                                          I wish we spent more time working on protocols than service interoperability. And using these layers helps me design with abstraction.

                                                                          [0] https://en.wikipedia.org/wiki/Internet_protocol_suite

                                                                        1. 1

                                                                          for me it is quite trivial actually (borrowed from gentoo)

                                                                          ` # gentoo prompt is excellent. set that up

                                                                          prompt_gentoo_setup () {
                                                                              prompt_gentoo_prompt=${1:-'blue'}
                                                                              prompt_gentoo_user=${2:-'green'}
                                                                              prompt_gentoo_root=${3:-'red'}
                                                                          
                                                                              if [ "$USER" = 'root' ]
                                                                              then
                                                                                  base_prompt="%B%F{$prompt_gentoo_root}%m%k "
                                                                              else
                                                                                  base_prompt="%B%F{$prompt_gentoo_user}%n@%m%k "
                                                                              fi
                                                                              post_prompt="%b%f%k"
                                                                          
                                                                              path_prompt="%B%F{$prompt_gentoo_prompt}%1~"
                                                                              PS1="$base_prompt$path_prompt %# $post_prompt"
                                                                              PS2="$base_prompt$path_prompt %_> $post_prompt"
                                                                              PS3="$base_prompt$path_prompt ?# $post_prompt"
                                                                          

                                                                          }

                                                                          prompt_gentoo_setup “$@” `

                                                                          1. 3

                                                                            My first CS class was AP Computer Science in high school. It teaches Java with an orthodox OOP. It took my a decade to get out of using implementation-by-inheritance, deep class hierarchies, and all that stuff. Now I try to use a mix of composition and functional concepts. I’m sure in 10 years I’ll have a different opinion.

                                                                            1. 7

                                                                              I’m not sure you will. :) I’ve been using mainly composition and functions, with classes of depth ~1 as ADTs when that’s how the language does it, for >30 years, and it’s always worked just fine. (Most of my serious work has been in C, 1990s C++, C#, Ruby, and lately some Go.)

                                                                              Even Java doesn’t require freakish levels of OO — it just became particularly fashionable there for some reason.

                                                                              1. 3

                                                                                That’s basically how I did it, too. OOP just for data structures and information hiding. Functions/procedures were always good enough for me. State machines, too.

                                                                                1. 1

                                                                                  aww, you guys are missing async-message-passing :)

                                                                                  1. 1

                                                                                    I did it for distributed in some project. I held off on learning it until I could make it safe-ish. I’ll be looking deep into Erlang and/or Pony some time in the future. Just not ready yet.

                                                                            1. 4

                                                                              currently reading ‘Countdown to Zero Day: Stuxnet and the Launch of the World’s First Digital Weapon’ is an excellent retelling of the entire incredible (at that time at least) incident, and ofcourse some minor information on cyber-weapons at the disposal of nation states. highly recommended.

                                                                              1. 3

                                                                                Currently reading this as well, but I wish a condensed version existed that didn’t have to explain computing concepts I already understand

                                                                                1. 2

                                                                                  a fleeting glance for such sections is what i do. but, honestly, i felt that these were few, and far between.