1. 2

    I don’t get the purpose of this, isn’t it easier just to switch sessions the regular way with ^b( and ^b)

    1. 2

      I do that as well (as well as prefix-s) but it doesn’t start up new sessions in the directory I care about automatically. It’s a couple commands to start one, and potentially getting it wrong if I forget that a session already exists… classic shell script territory 😆

      1. 1

        I see, we probably use sessions slightly different. I use a session per active project/customer I’m working on plus one generic/sandbox and usually I have around 3 sessions open, one session usually consist of 2-9 windows with a couple of panes each where I have a window per subproject in a larger project. For instance when I’m working on a client code base where there’s subproject for frontend, a couple of backed services, database, infra, documentation I keep a window for each of them named after their respective name or purpose and name the whole session after the client/project.

    1. 1

      I have been investing quite some time for my static website to be as lightweight as possible for the client (for instance, rendering equations off-line), and I noticed the same thing.

      I will probably try to see if I can use this approach too. Thanks for sharing!

      1. 1

        how are you calculating the tradeoff between rendering equations in the browser vs shipping images to the frontend? Are the images truly tiny, beating the size of mathjax (or whatever you use?) Also curious how you’re keeping this accessible!

      1. 1

        Thanks for the article, it’s a very neat approach!

        An alternative I always wanted to try but didn’t get around to is using unicode-range and slicing up the font so that the browser can load more glyphs on demand if it needs to. I’m curious if this works as advertised in most browsers (i.e. font files are not downloaded unless there’s some char in their unicode range)

        1. 1

          caniuse suggests yes!

        1. 4

          https://github.com/Munter/subfont seem like a good alternative tool which probably would be easier to use - from what I can see.

          1. 1

            mm, this looks neat! I probably won’t switch tools at this point, but I’m happy this exists!

          1. 7

            If you’re talking about code blocks, I always set them like my block quotes. If it’s inline code, try and find a code font that has around the same x-height as your body text. If the family you’re using had a monospace variation, that’s probably your best bet as it will have been have designed to look good with the rest of the family.

            Aside from general advice, could you share some screenshots? The x/y problem exists in design too. 😅

            1. 2

              Oh I am still experimenting, HERE is the current version, and HERE is the same for a trickier situation where the output is displayed below the code. But it is “work in progress” and the design will probably be changed again. I tried too many things this weekend, will need to take a break before revisiting this question later.

              But I am interested in the general principles too. The thing is - I have several example websites which look lovely in terms of text typography. But I don’t know of any actual website where I would say “yeah, this one has code display figured out”.

              1. 7

                I think it looks fine. You can play around with this forever, but IMHO you quickly get diminishing returns and just gets a distraction from actually writing content.

                For me, the biggest issue I try to avoid is horizontal scrolling, as I find that’s just annoying.

                1. 5

                  I wrote an essay with a bunch of code-blocks in it, and I think they turned out alright. Unfortunately for typesetting code, there’s a bunch of conventions that collide:

                  • Prose text wants to run about 60 characters per line
                  • Code is typically formatted about 80 characters per line (since there’s often significant indenting and short lines)
                  • Your code typeface should be about the same size and shape as your text typeface

                  Personally, if I’m writing code for an article, I compromise on the second one and wrap my code at 40-60 columns. It feels a bit cramped, but I can present individual code-chunks and provide context in prose, rather than having to present a big lump of code that provides context through indentation (and thus requires wider output).

                  For the absolute details of formatting, it looks like you’re going minimalist for your text formatting, and so the complexity of your code formatting (background colours, borders, and occasionally horizontal scroll bars) feels distracting. For the examples you’ve posted, I think just removing the borders makes them look much better.

                  1. 1

                    The style of code blocks in your essay look very well and even original. Very nice. Thank you for the comment as well, I found your opinion about conventions that collide to be true. The way I try to solve it is by reducing the font size of code blocks.

                    And yes, I am trying to be very minimalist but when I just indent code it doesn’t stand out as much as I want it to.

                  2. 2

                    CSS Tricks, possibly?

                    Looks like you’re using a different size for your code. Even if it’s the same pixel value it’s perceptually different. Adjusting it until the Bowls of the lowercase o are about the same actual size might be a good way to go. It also looks like there is some margin around your inline snippets—that may look more jarring because it is literally offset from the flow of the text.

                    1. 1

                      In fact yes, CSS Tricks is pretty good. https://css-tricks.com/almanac/properties/f/flex/

                      The inlines are separate but flow well

                      1. 1

                        CSS Tricks work for their case. I tried dark background similar to what they have in this example. However it only works when your syntax has a lot of colors. If you use one color for text it doesn’t look good against the dark background.

                        Regarding margins - the margins in the example should be consistent between paragraphs as well as paragraph and border of the code block. It looks off in the example I gave because all the paragraphs are one line in length :) I think it will not look too jarring with normal blocks of text like HERE

                1. 4

                  Hmm, 404’s for me.

                  1. 1

                    same here!

                    1. 1

                      it’s a self-hosted instance of git.sr.ht, seemingly without an https redirect enabled in nginx and with an expired cert.

                      1. 1

                        What’s the email part about, though?

                      2. 1

                        email + git = 404

                      1. 5

                        I’m not sure why fewer than 200 people said they use Haskell at work in the previous question but more than 600 said they use Haskell at work at least some of the time in this question.

                        Was the question “Where do you use Haskell?” multiple choice, or was the survey using radio buttons? Could be the source of the discrepancy.

                        1. 5

                          The “where do you use Haskell” question was multiple choice (check boxes). The “do you use Haskell at work” question was single choice (radio buttons).

                          1. 3

                            I had this same problem with State of Elm. The first go ‘round people told me that the binary yes-or-no was unclear because they felt they had to be using it in production. But that wasn’t my intent, so this year I tried to fix it by making the “where are you using Elm” question have the following choices:

                            • I’m just tinkering
                            • Don’t feel ready for production
                            • No code in staging or production but feel capable
                            • In development towards production
                            • In production on a side project
                            • In production at work (internal)
                            • In production at work (user-facing)

                            Next year I’m going to break it down even more. It turns out that a lot of things I thought were yes/no initially are actually sliding scales. (Except for “can I have your email” or really really specific and leading questions.)

                            1. 1

                              That is actually quite interesting, I’ve been tinkering with both Haskell and Elm at work but haven’t used them on any project meant for production.

                              I usually experiment with a lot of languages for smaller side projects and when architecting a new product and evaluating tech choices, many of these are never put into production usage while some do.

                        1. 2

                          This seems like it could break a lot of stuff!

                          I wonder how big the group actually making decisions is here? It’s interesting to see all the names tagged coming in as implementers of specific browsers or members of the working group.

                          1. 6

                            This is a good start! I imagine they might go into it later in the series but RemoteData is super useful here: http://blog.jenkster.com/2016/06/how-elm-slays-a-ui-antipattern.html

                            1. 1

                              Hey Brian, This is awesome! I will try to talk about that later! And Yeah, this was a good starting point about getting data from APIs, in this case, just JSON ;)

                            1. 9

                              This is 20% good advice (e.g. ‘An hour will never occur twice in a single day’) and 80% useless ‘fun facts’ (e.g. ‘The month Pi Kogi Enavot in the Coptic calendar only has 5 or 6 days in it’).

                              I wish these kinds of sites / articles would concentrate on actual advice and problems.

                              1. 10

                                The advice is to use the ICU libraries for calendar stuff…

                                1. 2

                                  “Useful” really depends on what you need to do. If I was implementing a Coptic calendaring system, I would certainly want to keep it in mind.

                                  1. 9

                                    If you were implementing a Coptic calendaring system, you probably shouldn’t be relying on blog posts for your edge-cases.

                                1. 6

                                  It was pretty funny reading this on mobile and seeing the 200% line height they have going on there. ?

                                  1. 1

                                    Agreed, I kept wishing he’d take his own advice and “fix” his blog before the Nexus page. It was humorous.

                                  1. 5

                                    I really love hearing AFL war stories for some reason. It’s such a neat tool!

                                    1. 10

                                      Since his volume was so high, I had assumed that pushcx was a bot, but looking at the profile I see I was wrong. Thanks (and to all contributors) for all the posts!

                                      1. 11

                                        @pushcx isn’t a bot.

                                        He’s actually a sockpuppet account for @michealochurch. :P

                                        1. 10

                                          He also runs barnacl.es!

                                          1. 7

                                            Hesitant to register squ.id

                                          2. 3

                                            For some time I thought av was a bot because sometimes half of the newsfeed is made up of submissions by him/her.

                                            1. 1

                                              That crossed my mind. Shortly later, I saw his Barnacles comments. The AI’s & chatterbots just aren’t getting such deep insights yet. Much less presenting them at appropriate times. So, he’s Googling, submitting, and writing all this while working an IT job and trying to start a marketing business. Maybe having fun on the side, too. Leads right to next possibility: he doesn’t sleep or just allows 4 hours for it. A mutant power there’s ample precedent for, especially among entrepreneurs, die-hard coders, and doctors with lawyers on speed dial.

                                              1. 4

                                                Huh. This is one of those cases where the outside view looks radically different than the inside one. I generally feel ridiculously unproductive and lazy. Not that I am, but I’m pretty self-critical about what I do get done, which isn’t helpful. I need 8.5h of sleep per night to not feel pretty lousy the next day.

                                                Maybe it’s worth reminding that I work 3 days/week, not full-time, and the marketing business is an outgrowth of stuff I picked up over years at work rather than a new skillset. And rather than watch TV 5 hours a day I spend my downtime reading.

                                                1. 1

                                                  I was exaggerating it for humor but you being part-time does make more sense. Im like you on the sleep thing.

                                            1. 2

                                              *Note that an AC adapter for the USB cable is required to play the system but is not included in the packaging.

                                              I don’t understand why they made this decision. It seems rather odd that a vital piece of the system (power) would be missing. Any ideas?

                                              1. 4

                                                To increase profit, because most people have USB power adapters, and they can sell the exact same package internationally. I could be wrong on this last one.

                                                1. 2

                                                  Most TVs sold today have USB ports. You just plug it into HDMI and USB. No wart needed.

                                                1. 6

                                                  +1 but as an elm-conf organizer I’m a little biased. ;)

                                                  1. 1

                                                    As an elm-conf organizer, any insight as to the price? $625 for one day is very pricey imho. Is it lack of sponsorship? EDIT: Looks like it is two days, friday and saturday, but still…

                                                    1. 1

                                                      the $625 is for Strange Loop as well. The ticket to elm-conf is an add-on. We’re colocating with them because there’s no way we could have the conference otherwise.

                                                      • Thursday: elm-conf, all day
                                                      • Friday: Strange Loop
                                                      • Saturday: Strange Loop

                                                      Also we’re paying speaker travel, hotel, and tickets, so that might be one way to save some money. ;)

                                                      1. 2

                                                        Better late than never, thanks for clarifying this!

                                                  1. 1

                                                    $625 for one day? A bit steep, imho.

                                                    1. 3

                                                      Three days really, as it’s an add-on to Strange Loop.

                                                      1. 3

                                                        Elm-conf only pricing is still TBD.

                                                      1. 5

                                                        Now seems like a good time to mention the hype cycle. Microservices are definitely up at the peak right now. I find it funny that even though we have the best advice in the business essentially saying “hey, maybe don’t do this at first, wait until you can split apart a larger app” people are still wanting to try to start out with microservices.

                                                        1. 5

                                                          It’s interesting enough to reverse engineer the API, but using it to pull a prank? Perfect! :)

                                                            1. 4

                                                              a HTTP API for Pandas called Koalas. More accurately, building a service layer around it to make available for public data hosting.