1. 2

    Coincidentally I was just looking at the EmacsWiki: DWIM last night.

    1. 28

      It’s what I’d do even if I weren’t getting paid. It’s my primary hobby, my profession, and what I’ve wanted to do since I can remember.

      1. 6

        This is exactly my feeling. I love solving problems using software I write, I love knowing people are using what I make, and I love reducing the amount of boring and error-prone repetition in my life using my own software.

        I think people who don’t enjoy coding belong in the industry just as much as anyone else. At that level, it’s a job, and we don’t expect people in any other field to love it, necessarily. But it’s a very odd, specialized job which is definitely not for everyone, and anyone smart enough to be a programmer is probably smart enough to make a living in some other field which doesn’t involve the obscure pains programming can expose you to.

        1. 4

          That’s awesome that your hobby and profession aligns 🙂

          Do you have any advice for people who currently don’t enjoy doing what they do for a profession and how to get there?

          1. 11

            Well, I guess my first advice would be to ask, what do you love? There’s absolutely nothing wrong with coding to pay the bills and doing what you love with your free time. My other hobby is Western religious history, which definitely is not a moneymaking industry. :)

            I’d also say, coding is a huge field, like “talking”. There are a million languages, a million techniques. You might find that you like the theoretical side more (math, complexity theory, category theory, etc). You might find out that you really like writing parsers. Maybe you hate Java but you end up loving Erlang. There’s a lot out there.

            But, again, there’s nothing wrong with just having a day job. Life is meant to be enjoyed so don’t worry about what you “should” like, do what you do like however you can.

            1. 1

              I like to ice skate and tinker, mostly with keyboards and other input devices, but the skies the limit really.

              Unfortunately neither pay well so here I am 🙂

              1. 5

                Has it always been the case or in the beginning you used to enjoy programming?

                If you used to like it, but not anymore, it’s worth trying to investigate why. This is something that has also happened to me, and it took me a while to finally find an answer. At first, I thought this was a matter of abstract vs concrete activities and I tried to find concrete activities that I could find interesting. Though I did start cooking (and discovered I enjoy it), this still wasn’t the real issue. You said you like ice skating and tinkering, so maybe this is a good place to start thinking about it.

                Later, I realized that what I really miss from the early days is having everything under control: relatively small code bases that I understand well, none or just a few third party libraries, etc. In contrast, most professional projects I have taken are the complete opposite: large code bases that no one really understands with lots of external libraries. I still don’t know what exactly I can do about this, but just from knowing where my discomfort comes from, I already feel a bit better about programming overall.

                This has been my quest so far to try to start enjoying coding as much as used to. You’ll probably find other topics that I haven’t mentioned, but that are important to you. This is an introspective exercise I think you should do if you also wish to get back to programming with a refreshed feeling.

                1. 4

                  I used to like it. I had a really good job at the start of my career with an amazing mentor. However, since that job, I haven’t liked it much.

                  I’ll try to reflect on exactly why, but I have a suspicion that it’s when I realized that agile and startups are irrevocably intertwined with coding. Both I can’t stand.

                  This is an introspective exercise I think you should do if you also wish to get back to programming with a refreshed feeling.

                  That sounds amazing. Hopefully, I can get there. 🙂

            2. 4

              Not the parent commenter, but how about looking into other programming paradigms? e.g. if you only do OOP right now, try looking into functional programming, there’s a lot of interesting and beautiful stuff there that might appeal to you.

              Or perhaps have a look at formal methods, either “lightweight” ones like TLA, or the more heavy weight ones like Coq and Lean. I’ve found writing specifications above the level of abstraction that most programming languages provide and model checking them or writing proofs for them quite an interesting/enlightening experience for me and it’s one of my favourite things to do.

              Lastly, I think generally identifying pain points in your workflows and writing little programs to automate them and scratch your itch could be another way to find joy in programming. For me that’s writing little Haskell scripts or elisp (Emacs Lisp) tidbits here and there.

              1. 2

                Thanks for the reply! I know this is a “me problem” but when I have to learn new technologies I find it very frustrating. Recently I’ve been on a Scala project and FP hasn’t done anything for me.

                It wasn’t always that way though, I used to get excited about new technologies but after a while it just notice it for the revolving door it is.

                1. 2

                  […] but when I have to learn new technologies I find it very frustrating.

                  I can relate to that :)

                  Recently I’ve been on a Scala project and FP hasn’t done anything for me.

                  Interesting. I’d say in that specific case, the language and the machinery it offers probably influence that as well. Like, for instance I’d take writing Haskell over Scala any day. But oh well, that’s me.

                  It wasn’t always that way though, I used to get excited about new technologies but after a while it just notice it for the revolving door it is.

                  Right. Same here actually. I don’t go looking for shiny new things to use just because they’re shiny and new. But I would still gladly consider things that could help improve the quality and correctness of programs that I write, and see if they’d be worth the investment of time for learning/integrating them into my workflow. And that bar has certainly increased over the last couple years.

          1. 7

            I read Micay to say that he has irretrievably deleted the signing keys. I’ve asked for him to be explicit; we’ll see if there’s a response.

            1. 12

              Yup:

              I purged my Android signing keys which were used to sign CopperheadOS releases including all three offline backups of them. It’s not possible to create app or OS updates that will be accepted anymore. No one else ever had access to my keys.

              I poked around in my settings and it doesn’t appear possible to trust a new OS key or release channel. Even if this business dispute is solved, every CopperheadOS user would need to reinstall the OS for updates.

              Edit: and more detailed on reddit:

              They’re the keys that I used to sign my releases to prove that they were from me. The OS will not install updates not signed with those keys, so it’s no longer possible to create an update or app the OS will accept as valid and install. James hijacked all of the infrastructure but his control over the update servers, etc. doesn’t mean he can ship updates to people so he’s not capable of compromising their privacy / security. I did my best to fulfill my obligation to keep people secure.

              No matter what happens with Copperhead, they would need to made the explicit choice to unlock and flash another OS with different signing keys. I blocked receiving automatic updates from a compromised company. This is how the Android update system is designed / intended to work but I never expected that something like this would happen…

              1. 2

                I’m guessing you’re a CopperheadOS user?

                1. 11

                  I am. I don’t know what I’ll migrate to or when. I appreciated the focus on security and privacy. I know the security community loves iPhones for the secure enclave and other features, but I strongly dislike their closed ecosystem, prohibition of GPL software, mandatory Apple accounts, limited tinkering, etc.

                  1. 7

                    but I strongly dislike their closed ecosystem, prohibition of GPL software, mandatory Apple accounts, limited tinkering, etc.

                    I’m still on Android for that reason. My solution was to just modify my usage to be consistent with the truth: “there is no secure smartphone”. I’m also hesitant to trust the future of anything in that space that isn’t FOSS for at least core with ownership and distribution controlled by a long-standing, trustworthy non-profit. I mean, about every one of the strongest offerings is controlled by untrustworthy companies, got acquired by them, or in this case became one. The secure, affordable mobile situation is consistently bad to the point that is should just be a loss leader, maintained for its criticality, and supported by revenue from other things.

                    1. 3

                      @pushcx Not particularly security-oriented, but I’d recommend LineageOS. If you like to go the Google-less route (as much as possible, at least) and not install GApps, the microG project is worth checking out. They even provide builds on https://lineage.microg.org, but you can compile your own as well (see lineageos4microg/docker-lineage-cicd).

            1. 3

              Awesome! Thanks for sharing.

              wasamasa has experimented with CHICKEN a fair bit and has written some cool blog posts about it.

              1. 2

                Looked like cool projects. Bookmarked it in case I check out Chicken when trying Scheme again.

                1. 2

                  Chez Scheme is now open-source, and it’s the best Scheme implementation out there for production work. I find Guile easier to get into than Chicken, but Chicken is must faster than Guile, and has a ton of neat extensions.

                  1. 2

                    Yeah, it’s on my list, too. It goes way back. The Racket people are also porting to it.

              1. 2

                I spent some time a few years ago speeding up my own shell (I think I was up to around 5 seconds startup time), and replacing Oh-My-Zsh with hand-built files was one of the biggest wins.

                Out of interest I just timed it, and it’s still under half a second so I’m happy. (Although Zim looks interesting, thanks for pointing that out @aminb!)

                $ echo -n "$SHELL "; for i in {1..10}; do /usr/bin/time $SHELL -ic exit; done |& awk '{ i += $1 } END { print i/NR }'
                /usr/local/opt/zsh/bin/zsh 0.34
                

                How fast does your shell start?

                1. 3

                  Nice :) And no problems.

                  How fast does your shell start?

                  Here’s mine:

                  ➜ echo -n "$SHELL "; for i in {1..10}; do /usr/bin/time $SHELL -ic exit; done |& awk '{ i += $1 } END { print i/NR }'
                  /bin/zsh 0.0206667
                  
                  1. 1

                    $HOME/.brew/bin/fish : 0.0241765

                  2. 1

                    I really don’t understand why we need to optimize a shell.

                    ; echo -n $SHELL' ';{for(i in `{seq 1 10}){/usr/bin/time $SHELL -ic exit}}>[2=1]|awk '{i+=$1}END{print i/NR}'
                    /p9p/bin/rc 0
                    
                    1. 3

                      Mostly to avoid flow state interruptions. I want tools that stay out of the way. Prompting for updates I just want to do work is dumb.

                  1. 7

                    If you like oh-my-zsh, I recommend checking out Zim as well. I haven’t used oh-my-zsh in a few years so I can’t speak about that, but my Zim-based setup’s startup time with 13 modules and a couple other plugins averages around 0.04 seconds, i.e. as fast as author’s bash startup time. And I haven’t done any profiling/optimizations beyond whatever Zim comes with.

                    1. 1

                      I’m a big fan of Zim too. I’ve tried oh-my-zsh, Pure, and a few others too.

                    1. 7

                      Git-ssb is a great proof of the Secure Scuttlebutt community eating its own dogfood. Great Work!

                      1. 2

                        +1. I think it’d be cool if lobste.rs had its own Pub server. What do you say @pushcx?

                        1. 2

                          I don’t know much of anything about ssb but am generally in favor of novel ways to distribute Lobsters links and comments. Grab me on IRC sometime and we’ll talk about what you’re planning before you get too deep into coding.

                        2. 0

                          Dogfood has a negative connotation. Is this like a dry joke or a commendation?

                          1. 3
                            1. 1

                              right right I just was trying to see if it wasn’t negative because often the term is used disparagingly.

                              1. 2

                                I don’t read it as negative in this case but @soapdog Is the one who can answer for sure.

                                1. 4

                                  @voronoipotato and @gerikson, no negative connotation was implied. I used the term as a positive aspect of the ecosystem (which I am a part of). I like when I see communities building their own tools on top of their own tools :-)

                        1. 6

                          In a similar vein, @dakrone’s eot comes to mind as well.

                          1. 6

                            I’m working with my supervisor and two of her other students on a paper for the upcoming MODRE 2018 workshop, comparing TLA+, B/Event-B, and Dash for declarative modelling and model checking.

                            Here’s the abstract from the Dash paper I linked above:

                            We present DASH, a new language for describing formal behavioural models of requirements. DASH combines the ability to write abstract, declarative transitions (as in Z or Alloy) with a labelled control state hierarchy (as in the Statecharts family of languages). The key contribution of DASH is the combination of explicit support for user-level abstractions that create and factor sets of transitions, such as state hierarchy, and the use of full first-order logic to describe the transitions.

                            I’ve had past experience with TLA+ and Event-B, and am focused mainly on writing about TLA+ in the paper. I can say that lack of a proper type system in TLA+ is very noticeable and at times very annoying. But Event-B’s simple type system has its own limitations as well. Regardless, both are very useful tools for modelling and writing specifications.

                            1. 3

                              That sounds neat. I look forward to reading the paper.

                              I’m curious why Spin isn’t in there, though. It has had more industrial success than any other model-checker of its type. At least based on what I read. They used it especially on protocols and hardware. One of few comparisons between TLA+ and Spin had Spin’s analysis hit several times the depth in states that TLA+ did. In that case at that time. Having lots of users and positive results, it seems like Spin should be the default that all the others are compared to. If anything is better, then Spin users seeing that might be early adopters of the new method. Spin itself might adopt new techniques if they’re general for model-checking.

                              Far as types in TLA+, I did submit this previously that tried to address it. Is that the kind of thing you’re looking for or something else?

                              1. 2

                                Thanks for the comment and kind words nick.

                                As for why Spin isn’t there, mainly because as far as I’m aware, none of us students has had much experience with it, and since we were short on time for this deadline, we each decided to write about the tool we’re most familiar with. But thanks for mentioning/reminding me of it. I’ll bring it up with the rest of the group as well.

                                As for types in TLA+, thanks for the link. I’d seen that paper by Merz before, but unfortunately haven’t gotten a chance to read it yet. It’s pretty high on my reading list though, especially since I was thinking of trying to write a type system for TLA+ the other day.

                                1. 1

                                  That makes sense. I can dig you up the comparison or some case studies on ig if you want. You can find a lot of that in ACM and IEEE, too.

                                  1. 2

                                    Thanks, I’d very much appreciate that :)

                            1. 5

                              Lean is awesome :) An Introduction to Lean is a nice (albeit incomplete) one too.

                              There’s a fairly active community on Zulip over at https://leanprover.zulipchat.com if you like to drop by for a chat or get some help.

                              1. 20

                                Bitwarden is my tool of choice for this. I haven’t been a fan of other more CLI-centric password managers as they usually don’t have browser integration. The usability of using an in-browser UI to generate a random password and the prompts to save it when I submit forms are very important IMO. Nothing has come close to that while also being open source.

                                1. 3

                                  One thing that irks me about Bitwarden is having to provide an email address and getting an installation id & key if I’d like to self host it for myself. Please correct me if I’m wrong but from what I understand, even for using it without the “premium” features one still needs to perform this step.

                                  If so, I think I’ll stick with my pass + rofi-pass + Password Store for Android combo for now.

                                  1. 4

                                    This is true, there are ways around it, if you work a little, since it is OSS. However, there are a few 3rd party tools, 2 of which are server implementations: bitwarden-go(https://github.com/VictorNine/bitwarden-go) and bitwarden-ruby(https://github.com/jcs/bitwarden-ruby).

                                    There is also a CLI tool (https://fossil.birl.ca/bitwarden-cli/doc/trunk/docs/build/html/index.html)

                                  2. 2

                                    Are you self-hosting it or using the hosted version? I’m somehow always sceptical of having hosted password storage, even if it’s encrypted and everything.

                                    1. 1

                                      If it’s not encrypted, they see your secrets. If it is encrypted, they’re in control of your secrets. In self-hosted setup, you are in control of your secrets. If encrypted, you might loose them. If sync’d to third party (preferably multiple), you still might loose key. If on scattered paper copies, each in safe place, you probably won’t. For some failures, write-once (i.e. CD-R) or append-only storage can help where a clean copy can be reproduced from the pieces.

                                      That’s pretty much my style of doing this. It’s not as easy as 1Password or something, though. There’s the real tradeoff.

                                      1. 2

                                        It is encrypted, here is a link on how the crypto works in english: https://fossil.birl.ca/bitwarden-cli/doc/trunk/docs/build/html/crypto.html

                                        I agree Bitwarden is not quite as user friendly(or as secure if using local vaults) as 1Password, but for an OSS app, it’s definitely at the top of the list on user friendliness of password managers.

                                        I run a server locally on my LAN, and my phone/etc sync to it. I definitely don’t want my secrets out in the cloud somewhere, no matter how encrypted they might be.

                                  1. 3

                                    My favorite F-Droid app is Vanilla Music. Its my daily driver mp3 player. https://f-droid.org/en/packages/ch.blinkenlights.android.vanilla/

                                    1. 3

                                      Vanilla Music’s [mostly inactive] co-maintainer here. Thanks for the shout out!

                                      Be sure to check out the various Vanilla plugins too. https://staging.f-droid.org/search?q=vanilla

                                      1. 2

                                        I had no idea Vanilla Music had a plugin system, thank you!

                                    1. 24

                                      I can sympathise with jgm’s desire for a simpler spec; modern Markdown is “more congealed than designed”, to misquote Douglas Adams. However, I’m pretty sure one of Markdown’s original design goals was to make good-looking, readable plain-text documents, ever-so-slightly constraining existing conventions so that they could make good-looking, readable rich-text documents too.

                                      To dramatically reduce ambiguities, we can remove the doubled character delimiters for strong emphasis. Instead, use a single _ for regular emphasis, and a single * for strong emphasis.

                                      The trouble is that in plain-text documents, people traditionally used * and _ for level-one emphasis (read as “bold” and “underlined” respectively), but typographic tradition is that level-one emphasis is italic text. So “single for level-one emphasis, double for level-two emphasis” is the most natural, semantic translation.

                                      Shortcut references like [foo] would have to be disallowed (unless we were willing to force writers to escape all literal bracket characters).

                                      I don’t know how I missed it, but until this year I missed that shortcut references were even possible. I started off with long-form [text](url) references, which looked ugly and broke up the text, and eventually twigged to [text][tag] references which still look weird to people who don’t know Markdown (or people who haven’t seen that syntax before). Just being able to write [text] in running prose marks that text as special without overly distracting the reader, and if the next paragraph (or something at the end of the document) says [text]: http://example.com the association should hopefully be plain.

                                      Since we have fenced code blocks, we don’t need indented code blocks.

                                      Fenced-code blocks are weird and ugly unless you’re already familiar with Markdown, while indenting is a clear visual delimiter.

                                      Instead of passing through raw HTML, we should introduce a special syntax that allows passing through raw content of any format.

                                      I can appreciate this from a technical standpoint (it’s a simple rule that solves a whole class of problems!) but even without raw HTML support, Markdown is pretty heavily tied to the HTML document model. Consider Asciidoc, which is basically Markdown but for the DocBook XML document model instead. There’s definitely similarities to Markdown, but the differences run much, much deeper than just what kind of raw content pass-through is allowed.

                                      We should require a blank line between paragraph text and a list. Always.

                                      This also is an excellent technical opinion, but click through to the OP and look at the examples of the new syntax and tell me whether either of them look pleasing.

                                      Introduce a syntax for an attribute specification.

                                      This definitely makes Markdown more flexible, but doesn’t make it any prettier to read. Also, if anything it ties Markdown even closer to the HTML document model.

                                      Overall, these changes would move Markdown further from being a plain-text prettifier, and closer towards being a Huffman-optimized encoding of HTML. That’s not a bad thing, and certainly it seems to be what most people who use Markdown actually want, but it’s quite different from Markdown’s original goals.

                                      When the CommonMark first began (as “Standard Markdown”), they tried to get John Gruber involved, but as I recall he refused to take part and told them not to use the name “Markdown”. I felt he was being a jerk, but having thought about it, I wonder if maybe he felt a bit like Chuck Moore about ANSI Forth, that the real value was the idea of a hastily-written script that took something human-friendly and made it computer-friendly, and making a set-in-stone Standard with Conformance Tests would be the exact opposite of Gruber’s idea of Markdown, no matter how compatible it was to his script. I imagine something like ABC notation is much closer, despite being entirely unrelated.

                                      1. 8

                                        You raise valid points and I can certainly understand where you’re coming from with “[o]verall, these changes would move Markdown further from being a plain-text prettifier” (to which I would sort of concur.) I have some disagreements about fenced code blocks and a blank line between paragraph text and a list but they boil down to personal visual preferences. Code indenting is in my opinion ambiguous and I almost always insert a blank line between paragraph text and a list item. It’s great that original Markdown allows for both.

                                        On the other hand, I feel we have to acknowledge that original, i.e., canonical Markdown has evolved from Gruber’s original implementation and scope (simple blog posts?) to the lingua franca of text input in websites—such as the prompt I’m currently writing in—and the de facto plain text format or LaTeX pre-processor. For instance, I do all my writing in plain text Markdown and use Pandoc to produce LaTeX typeset documents, letters, and papers with bibliography. Heck, I even wrote a static blog engine on top of my publishing workflow to guarantee that one text source file produces the same document regardless of output medium (PDF, web, &c.) (The OCD kicked in, lol.) I am a big believer in plain text and separating content from formatting, and Markdown is a great, modern plain text format.

                                        Ultimately, I think we have to cater for and balance both realities. Gruber’s original simplicity of the format, which notwithstanding being ambiguous, should be the guiding principle, and the evolved scope of present-day Markdown. And, boy, that’s a tough one.

                                        1. 4

                                          I definitely agree. Like all successful technologies, Markdown has grown well beyond its creator’s intended limits, and as much as I miss pretty plain-text I much prefer Markdown to BBCode or the rich-text editing features browsers provide. ReStructuredText is a light-weight markup explicitly designed to support multi-target output and the kind of extensibility people want for Markdown, but I find it awkward and pedantic and I’d much rather use Markdown any day.

                                          I’m curious, though: you say “Code indenting is in my opinion ambiguous”, how so?

                                          1. 2

                                            First off, forgot to mention that I always use [link][tag] link references and didn’t know about tagless ones. Neat.

                                            Regarding your question: I feel like between tabbed and space-based indentation (which may output the source text differently when cating or writing in $EDITOR) and cases like list-nested blocks (should I indent again or maintain current indentation level?,) that you have to worry how different current and future Markdown interpreters will interpret the document. Instead, I find the fencing solution (with ` backticks, for the record) better and clearer: wherever I am in the document simply fence the code and be done with it—I don’t have to count or check the indentation.

                                            1. 1

                                              Follow-up: also what @myfreeweb and @Forty-Bot wrote below.

                                          2. 4

                                            [text][tag] references

                                            Ha! I only knew about the shortcut [text] references, TIL on the [text][tag] one :D

                                            indenting is a clear visual delimiter

                                            Indenting can be a pain to work with though. Especially in web comment fields!

                                            1. 4

                                              Indenting can be a pain to work with though. Especially in web comment fields!

                                              I end up having to paste text in and out of vim to format code correctly. Backticks are a much better solution imo.

                                              1. 1

                                                One of these days I’ll get around to writing a replacement for the “It’s All Text” extension that works with modern Firefox, then I can write all my comments in a real text editor!

                                                1. 3

                                                  I’ve seen a few around, but haven’t found the time to test any of them to see how well they work.

                                            1. 15

                                              I started researching the GitHub APIs that would be relevant to implement something like this a few months ago, but I’m really hesitant to sink a lot of investment into GitHub and its accompanying monopoly in my free time.

                                              I’ve moved a bunch of my personal projects over to GitLab, but they’ve been doing stupid stuff like refusing to render static repository content without whitelisting Javascript, or telling my my two-week-old browser is unsupported because it’s outdated, so … not a lot of motivation to invest in that ecosystem either.

                                              1. 13

                                                This. I noticed the mandatory JS for rendering nonsense too. I really want to like GitLab, and have tried multiple times to use them as my main, but to me the UX is just inferior to GitHub. The UI is sluggish and feels very bloated.

                                                It’s been a while since I’ve given up on GitLab for the time being, and have been self-hosting Gitea. Now Gitea uses JS too, but also works quite well without it. And it’s nowhere near as slow as GitLab.

                                                1. 5

                                                  but to me the UX is just inferior to GitHub.

                                                  Well, GitLab for all its faults doesn’t hijack my Emacs key bindings to do idiotic shit like “bold this thing in markdown” (which was already only two keystrokes to begin with; why are you adding a shortcut for something I never do on ctrl-b that I use all the time?) so I wouldn’t say GitLab has quite sunk to that level yet.

                                                  1. 3

                                                    Interesting. That’s a fair point; though GitHub’s editor isn’t the first to do that. I hadn’t noticed it with GitHub mainly because I use Vimium in Firefox, Evil in Emacs, and bspwm; so I rarely use Emacs-style bindings but I agree that could be frustrating.

                                                    Does exwm’s simulation keys work around the issue, or does GitHub’s in-browser binding take precedence?

                                                    EDIT: There’s also xkeysnail, though it does require running as root.

                                                    EDIT2: It seems like running xkeysnail as root may not be necessary if the user has access to input devices. On Arch (or any distro with systemd >= 215) that can be achieved by adding the user to the input group (see here and here).

                                                    EDIT3: The Emacs-keybinding extension may be another option, though apparently it only works in macOS. There’s also shortkeys but I haven’t tried either one.

                                                    1. -2

                                                      If you’re editing text, Ctrl-B for bold (or Ctrl-F if you’re in Germany) should be expected. Editing text means Word keybindings, not Emacs bindings.

                                                      This also means Ctrl-I for italic (or Ctrl-K in Germany) and Ctrl-U for underlined (this one is actually the same).

                                                      1. 12

                                                        I strongly disagree, at least on a Macintosh, where all native text entry widgetsobey the Emacs keybindings. Web garbage that arrogates system functionality to itself, hijacking my chosen platform experience for a poor copy of some other system is noxious, and broken.

                                                        1. 0

                                                          I just tried in the macOS Notes app and ctrl+b makes the text bold. The Pages app does the same, ctrl+b makes the text bold. These are two native text entry applications developed and provided by Apple themselves.

                                                          1. 6

                                                            No, you are pressing cmd. Control is reserved for motion.

                                                            1. 1

                                                              That’s the problem of your system then – the browser explicitly exposes Ctrl, Alt, Meta. If your keyboard does not offer these, either your browser, OS, or keyboard has to map between these and the actual keys.

                                                              Users on all other systems (aka 99.5% of users) expect Ctrl-B (or Ctrl-F) to create bold text.

                                                              1. 6

                                                                No, users on Macs expect their modifier keys to respect platform convention – Emacs keybindings for movement, cmd for meta. To assume otherwise is disrespectful.

                                                                1. 0

                                                                  So what do you suggest? Breaking keybindings for all windows and linux users instead?

                                                                  1. 4

                                                                    No, use the proper keybindings for the platform that the user is using.

                                                                    1. 0

                                                                      So how do you suggest to do that without using heuristics on the useragent?

                                                                      I’d be interested in your implementation of a JS function that returns the correct set of modifiers and keys to use for the bold shortcut. And which works reliably.

                                                                      Currently, the browser doesn’t expose this, so everyone gets the most commonly used solution.

                                                                      1. 3

                                                                        Currently, the browser doesn’t expose this, so everyone gets the most commonly used solution.

                                                                        ????

                                                                        Note: On Macintosh keyboards, [.metaKey] is the ⌘ Command key.

                                                                        MOD_KEY_FIELD = navigator.platform.startsWith('Mac') ? 'metaKey' : 'ctrlKey';
                                                                        
                                                                        // lazy
                                                                        if (keyEvent.ctrlKey && ...
                                                                        
                                                                        // bare minimum for any self-respecting developer
                                                                        if (keyEvent[MOD_KEY_FIELD] && ...
                                                                        

                                                                        What I want to know is how you’re commenting from 1997. Just hang tight, in a couple years two nerds are gonna found a company called Google and make it a lot easier to find information on the internet.

                                                                    2. 3

                                                                      Using the proper modifier depending on platform? The browser should expose “application-level modifier” say, for bold, and that would be ^B on X11/Windows and Super-B for Mac.

                                                                      1. 0

                                                                        The browser isn’t exposing this, though. The best chance is sniffing the user agent and then using heuristics on that, but that breaks easily as well.

                                                                  2. 2

                                                                    100 - 99.5 != 12.8, your assumption is off by a factor of 25.

                                                                  3. 1

                                                                    You’re right. Lord I’m an idiot.

                                                                  4. 4

                                                                    Ctrl+b on my Mac goes back a character in both macOS Notes and Pages, as it does everywhere else. Cmd+b bolds text (as also it does everywhere else).

                                                                    In general, Macs don’t use the Ctrl key as a modifier too often (although you can change that if you want). They usually leave the readline keybindings free for text fields. This seems to be by design

                                                                    The standard key bindings are specified in /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict. These standard bindings include a large number of Emacs-compatible control key bindings…

                                                                2. 4

                                                                  Editing text means Word keybindings, not Emacs bindings.

                                                                  Those of us who use emacs to edit text expect editing text to imply emacs keybindings.

                                                                  Some of us expect them everywhere, even.

                                                                  1. 3

                                                                    If it was a rich text WYSIWYG entry, I’d be 100% agreed with you. (I would also be annoyed, but for different reasons.)

                                                                    But this is a markdown input box. The entire point of markdown is to support formatted text which is entered as plain text.

                                                              2. 3

                                                                It’d be great if we had a language server protocol extension for code review + a gerrit backend. I started taking a look at this a few months ago (I work mostly in Gerrit now) but didn’t have the bandwidth for actually prototyping it. It seems like an obviously good idea, though having to use git hampers some of the possibilities.

                                                              1. 5

                                                                @bytemyapp can I have your feedback on this? From your book and talks, you seem to have a good experience on Haskell and teaching it. This seem to be relevant to any Haskell leaner.

                                                                1. 5

                                                                  Probably meant to ping @bitemyapp.

                                                                1. 6
                                                                  1. 2

                                                                    Someone on HN linked to the story of JPB meeting his partner, Cynthia Horner: Act Three, When Worlds Collide (Audio version). He wrote about her here, including a eulogy for her.

                                                                    Some of the most touching pieces I’ve ever read. Most definitely worth the read.

                                                                    Rest in peace John.

                                                                    1. 11

                                                                      As far as I can tell, this is a revival of dwm’s tags/views model.

                                                                      While, apparently, many dwm users use tags as if they are workspaces, that is only a fraction of their potential; and, when used properly, they can offer a workflow identical (from my perspective) to the one mentioned in the post.

                                                                      cf. tags are not workspaces.

                                                                      This is not to say that the author is wrong or is stealing and should give credit or anything like that. It is only to suggest that this paradigm has been known and is available in some window managers.

                                                                      Now, here’s where my knowledge of the subject gets a little thin. Where dwm supports this paradigm, I am unsure as to whether or not its many derivatives do (e.g., awesomewm, xmonad, etc.). I’d be interested in hearing from those users if this type of configuration is possible (presumably, anything is possible in xmonad since it’s really just a WM library and you can have whatever logic you’re willing to program, but I more meant, well-supported and easy to achieve through minor configuration changes).

                                                                      1. 4

                                                                        Awesome supported this, I believe. I remember having Win+[1-9] set to switch between tags, and when I would accidentally hold control when switching I would get windows from both tags!

                                                                        I like the idea of this, but I struggle with the execution when bringing in another tag causes overlaps or forces my current workspace to rearrange. For example, if I had chat and a browser open together taking up most of the screen while dealing with some operational issue, adding the editor group/tag to the screen would either overlap (if things were floating) or rearrange/resize existing windows (if some kind of tiling).

                                                                        To those that use the group/tagging feature in the way described in the post, how do you deal with the overlap or resizing issue?

                                                                        1. 1

                                                                          I fix the areas, so I don’t say «give me also group X», I say «please put group X in this subarea (and — in majority of cases — remove everything else from this subarea) without touching the rest of my screen»

                                                                          1. 1

                                                                            I have pretty much the exact shortcuts you describe. I use tiling mode almost exclusively, so I expect it when I look at two at once. It seems totally normal. I also have super + J and K for moving windows up and down in the current order.

                                                                          2. 3

                                                                            I’m not running xmonad at the moment, but it seems like xmonad-contrib has a XMonad.Actions.TagWindows module that does this.

                                                                            1. 3

                                                                              dwm’s tags are indeed capable of handling that workflow I describe in this post, and even more IIRC. My first experience with groups came with cwm which lets you add windows to a group. Doing so would automatically remove the window from any other groups. With dwm, a single window can have multiple tags, thus allowing finer control over your task set, and which application to bring back and forth. This might be a little more complex to manage though, as you are responsible from adding AND removing windows from tags. Automatic removal from groups is, to me, the best compromise between workspace and tags.

                                                                            1. 1

                                                                              I don’t live in the GTA anymore, but I’d be down to attend whenever I’m around.

                                                                              1. 1

                                                                                Dave also gave a talk on Whiley last year: David Pearce - What does the Future of Programming Look Like? (demo at the 11:25 mark).