1. 2

    I love not going to an office, but I have a family. How many of you who find remote working lonely live alone or with people you’re not close with?

    1. 4

      I’m curious about this too. I’m working from home, with family around too, and don’t miss interactions in the office. Even when I worked in an office, I tried to keep those to a minimum, and preferred days where I just went by without talking to anyone directly (we did communicate through computers, mind you). But then, I’m a bit of a recluse…

      1. 3

        I live alone. It’s lonely, but it was lonely when I had an onsite job too. Having people around does not remove that feeling. It takes people that you can really connect with at a deeper level. Like family or real friends.

        1. 2

          I don’t live alone but have before.

          Currently living with my partner and a friend who’s living 50% at our place due to a long-distance relationship.

          Living alone and working remotely was really hard, because I would easily go through days and sometimes weeks without actually seeing anyone I know. All depends on your surrounding social life of course. I’ve never been particularly social, and now moved to a city (country even) where I don’t know anyone, and I’m not great at making friends. So I decided to go back to an office after doing that for a year.

          Sometimes I think that I can’t actually stand either permanently, but just need to switch every year or two until I get fed up.

          My actual idea situation might be unlimited remote working while living close to the office so I can come in if I feel like it in the morning, though that robs me of the ability to move countries regularly, which is a thing I do.

        1. 9

          Want to find the magical ffmpeg command that you used to transcode a video file two months ago?

          Just dig through your command history with Ctrl-R. Same key, more useful.

          (To be fair, you can do this in bash with history | grep ffmpeg, but it’s far fewer keystrokes in Elvish :)

          Sorry, what? Bash has this by default as well (At least in Ubuntu, and every other Linux distribution I’ve used). ^r gives autocomplete on history by the last matching command.

          1. 10

            I hoped I had made it clear by saying “same key”. The use case is that you might have typed several ffmpeg commands, and with bash’s one-item-at-a-time ^R it is really hard to spot the interesting one. Maybe I should make this point clearer.

            1. 6

              That’s handy, but it is easy to add this to bash and zsh with fzf:

              https://github.com/junegunn/fzf#key-bindings-for-command-line

              With home-manager and nix, enabling this functionality is just a one-liner:

              https://github.com/danieldk/nix-home/blob/f6da4d02686224b3008489a743fbd558db689aef/cfg/fzf.nix#L6

              I like this approach, because it follows the Unix approach of using small orthogonal utilities. If something better than fzf comes out, I can replace it without replacing my shell.

              Structured data in pipelines seems very nice though!

              1. 1

                What exactly does programs.fzf.enableBashIntegration do? I just enabled it, and it seems to have made no difference.

                1. 2

                  https://github.com/rycee/home-manager/blob/05c93ff3ae13f1a2d90a279a890534cda7dc8ad6/modules/programs/fzf.nix#L124

                  So, it should add fzf keybindings and completions. Do you also have programs.bash.enabled set to true so that home-manager gets to manage your bash configuration?

                  1. 1

                    programs.bash.enabled

                    Ah, enabling that did the trick (no need to set initExtra). Thanks!

                    I did however have to get rid of my existing bashrc/profile. Looks like I need to port that over to home-manager …

                    1. 2

                      Yeah, been there, done that. In the end it’s much nicer. Now when I install a new machine, I have everything set up with a single ‘home-manager switch’ :).

            2. 3

              I’ve always found bash’s ctrl+r to be hard to use properly, in comparison elvish’s history (and location) matching is like a mini-fzf, it’s very pleasant to use.

              1. 1

                I think the idea here is that it shows you more than one line of the list at once, while C-r is sometimes a bit fiddly to get to exactly the right command if there are multiple matches.

                1. 1

                  For zsh try «bindkey '^R' history-incremental-pattern-search-backward» in .zshrc. Now you can type e.g. «^Rpy*http» to find «python -m http.server 1234» in your history. Stil shows only one match, but it’s easier to find the right one.

                  1. 1

                    I use https://github.com/dvorka/hstr for history search on steroids and I am very happy with it.

                  1. 3

                    This is one of the reasons I always disliked the GUI Linux desktop experience. There are so many possible toolkits that on a regular desktop installation you’re easily using 3-5 at the same time. Getting GTK and Qt to look roughly the same is possible, but more niche ones always stick out.

                    The fact that CSS via obscure user stylesheets is the only way to theme most of these is clearly a big issue, because CSS is way to powerful and thus leads to a lot of unexpected interactions between software and themes. Maybe it’s time to agree on a unified way to define style for desktop GUI applications that clearly defines the boundaries of what a theme can affect. This could probably even work for Electron apps.

                    1. 4

                      The situation is almost the same on Windows. Microsoft programs use ribbons, older generations of Microsoft apps use toolbars, and each generation uses different toolbar button styles and oddities. Even menu bar is different in different generations of Microsoft apps. Adobe programs use their own widgets, probably their own cross-platform toolkit targeted to Mac OS too. Except Lightroom, which uses its own unique style. Chrome uses goofy “mix of material design and raygun gothic” widgets, including round buttons (inconsistent with other Google’s UIs). Various Electron apps use their own css-based designs. 3D modeling and DAWs have especially bizzare UIs. There are TUIs too, for example Far Manager, which has complex and rich TUI. Java apps have distinct style, and there are two varieties: Swing and JavaFX. There are even two completely different official GUI subsystems now: Win32 and WinRT (or what is proper name for it), and “classical” and “tiled” apps.

                      So, I don’t think it’s very important to have consistent visual style. This unification had failed long ago.

                      On MacOS it’s almost the same as on Linux, only Apple makes apps according to their guidelines, except iTunes. Sometimes you have to use apps which have menu bar embedded in window.

                      1. 3

                        I don’t think it’s very important to have consistent visual style

                        It’s not a hard problem, but we gave up on it because the context we operate in values stupid things like branding above actual users. What’s worse is we don’t even see it as a problem because we’ve gotten used to five different spinner styles.

                        “But then how would I use HTML/CSS to write my desktop app?” you might ask. Already, you’re asking the wrong question by starting at what you want over what your users want.

                        1. 2

                          I think marketing and “corporate identity” is rarely a reason for such differences. In case of Chrome and iTunes on Windows it’s probably main driving factor. But I can’t imagine graphics or 3D editor with standard Windows 95 widgets: they are too large and rough, so I think such programs use custom controls out of necessity. In case of DAWs it’s because of weird culture where ultra-skeuomorphism is still valuable. Different applications have different needs: data entry form will have elements that look differently from widgets in 3D modeling app property editor.

                          Web apps, despite easy customizability and lack of standard look, chose to unify with Bootstrap-like style and I don’t like it, because Bootstrap is ugly and was designed for Twitter which has horrible UI.

                        2. 3

                          I haven’t been on Windows in a while, so I don’t know about that, but on macOS I feel like 90% of the native apps looks pretty consistent. On the other hand there’s no custom styling, apart from switching between light and dark mode.

                          I actually really dislike software that comes with its own weird toolkit because it usually breaks workflows that work across the rest of the system. For example I hate that in Firefox i can’t use C-n/-p to select entries in the address bar drop down, which works pretty much across the system.

                          1. 2

                            That really is horrible from a UX POV, but sometimes specialized software has to get a pass.

                            I hate not having ctrl+pgup/pgdown change tabs in Godot or XFCE’s file manager, and haven’t even found config options. Maybe they don’t ecist :(

                            I don’t see the value in Evince’s shitty menus, but I wouldn’t know how to do Blender more properly so it’s still Blender.

                            When I was young, and this may still be true, we’d get crap like totally custom-looking dvd-playing apps bundled with dvd drives. They all taught me “never trust software that looks like candy”, but yeah, some apps need to be given the benefit of a doubt.

                        3. 3

                          easily using 3-5 at the same time

                          In my experience, it’s all GTK3 the vast majority of the time. The only Qt5 app I use semi-regularly is MusicBrainz Picard.

                          This could probably even work for Electron apps

                          Look at the “But it’s fine as long as you follow best practices” section of the article — if a “unified way to define style” can’t work for just GTK, there’s no way everyone would agree on that across multiple toolkits, especially not web-apps-on-desktop.

                          1. 2

                            GTK3 apps have always felt bad to use, with bizarre hamburger menus and strange feng shui all over. Maybe a unified way can’t work when you all for such UI/UX design choices, and the world would be better off with stricter sets of rules.

                            And easier theming would follow as a consequence.

                        1. 5
                          • Hopefully finally buy a bicycle
                          • Find some projects to contribute to for Hacktoberfest
                          • Try out a supposedly really good pizza place around the corner
                          • Maybe get some people together to plan a climbing trip before winter actually comes
                          1. 3

                            This is a really interesting read. I like those “build X from scratch” posts about topics that I don’t already have a basic understanding of (looking at you, neural networks).

                            1. 9

                              Apart from hobby programming, my main hobby to get out is rock climbing. I just moved back to mainland Europe from London and hope I get to do some nice trips around the continent over the next year.

                              Also, like whjms learning Dutch. I’ve been learning French for about a year and switched to Dutch as I moved to Amsterdam (which is really hard because everyone keeps speaking English to me).

                              In the evenings I like to unwind reading with a blanket and a cup of tea. Currently reading Hawking’s A Brief History of Time. I’m always reading something, probably 70:30 non-fiction:fiction.

                              My most practical “hobby” is cooking. I need to eat, and preparing food is more fun and frugal than eating out all the time, which is one of my worst habits acquired in London.

                              1. 3

                                I already finished up re-writing my CV, because I didn’t have a nice one and don’t want to wait until I actually need it.

                                I’ll probably spend some time tinkering with my iOS app as well (me being a backend dev).

                                1. 3

                                  I disabled this when I got my first iPhone because it sometimes falsely triggered and haven’t re-enabled it since. Just last week I wanted to undo something I messed up and didn’t even remember that this was a thing at all, thinking there just isn’t undo on iOS (unless you attach a keyboard), which was very frustrating.

                                  Slightly off-topic, but this leads me to one of my common workflows for text, which is copying on iOS, using the synchronised clipboard to paste into emacs on MacOS, edit my text there, and then copy it back onto my phone to use it, which, while quite ridiculous, just works.

                                  1. 5

                                    I find it interesting that the author uses AST rewriting to convert |. I’ve seen approaches in the past which just use a filler object (like foo | into | bar, into being the filler) which has a special __or__ method that does the piping.

                                    I personally have experimented with a simple function just called pype() which also does some magic to avoid the need for lambda functions, see here.

                                    EDIT: I did a quick writeup of my solution.

                                    1. 7

                                      I always just reduced the value over the reverse of callables. It made higher order stuff, particularly data transforms, a lot easier to read. The code I used at my last job is open sourced here (the thread() function): https://github.com/curiosity/yunobuiltin/blob/develop/yunobuiltin.py#L444

                                      We used pipeline() more than thread(), which takes only callables (no value) and returns a callables. It is functional composition with the order reversed such that the callables are applied from left to right.

                                      The nice advantage of using the ast is that you can get much closer to Clojure’s -> and friends. By working from a compiler hook (the ast transformer), you wouldn’t need to use partial/rpartial/lambda as much. The downside is that it is quite a bit more complicated than a one liner.

                                      1. 2

                                        That is very nice and clean, though I don’t really like lambdas in Python, they feel super verbose for what they are. I wish there was Haskell-style partial application.

                                      2. 6

                                        I’d considered that approach as well, but I wanted to avoid needing a wrapper for the leftmost expression and I also wanted to avoid needing to partially apply functions.

                                        Take the 3rd example from the post:

                                        Users.find_all() | group_by_category(max=5) | print()
                                        

                                        without transforming the ast that’d have to look something like:

                                        pipe(Users.find_all()) | partial(group_by_category, max=5) | print
                                        
                                      1. 5

                                        I’m Robin and I mostly write about functional programming and software engineering as a profession:

                                        Link: https://sulami.github.io / https://sulami.gitlab.io

                                        1. 2

                                          I nearly posted this as an ‘ask’: Slack is not good for $WORK’s use case because it does not have an on-premise option. What on-premise alternatives are people using/would you recommend?

                                          1. 4

                                            I’ve used Mattermost before, which AFAIK has an on-prem version - just as a user, not setup or admin so I can’t speak to that end.

                                            1. 6

                                              I’ve heard rumblings about Zulip being a decent option too. I haven’t used it myself though.

                                              1. 2

                                                Same, actually. It does look very interesting, I’d be highly interested in whether anyone has any experience with it?

                                                1. 1

                                                  Zulip looks pretty solid, thanks for mentioning it. We may give it a try…

                                                2. 2

                                                  We’ve used mattermost for a few years now, it’s pretty easy to setup and maintain, you basically just replace the go binary every 30 days with the new version. We just recently moved to the integrated version with Gitlab, and now Gitlab handles it for us, even easier now, since Gitlab is just a system package you upgrade.

                                                  1. 2

                                                    A lot of people have said Mattermost, might be a good drop-in replacement. According to the orange site they’re considering dropping a “welcome from Hipchat” introductory offer, which is probably a smart move.

                                                    1. 2

                                                      IIRC mattermost is open core. I’ve heard good things about zulip. Personally, I like matrix, which federates and bridges

                                                    2. 3

                                                      Matrix is fairly nice to use. I had some issues hosting it though.

                                                    1. 2

                                                      I’ve done a quite small (47 LOC) Haskell solution for this a couple of years ago. Turns out solving Sudokus is quite simple. Blogpost/Code. The basis is just going over the whole grid, pruning possibilities per field, filling in the ones with just one possible solution. Rinse and repeat until you’re done. Very fun exercise to learn a new language as well.

                                                      1. 3

                                                        Um, resolving single candidates is not enough to solve most Sudoku puzzles.

                                                        1. 2

                                                          Yeah generally on “hard” boards you’ll have to randomly pick a value for a couple, then do a DFS on that choice and subsequent choices.

                                                          1. 2

                                                            Depends on the level of inference one is willing to implement.

                                                            Full inference for each row/column/square individually plus something called shaving/singleton arc consistency/several other names which means to do the hypothesis test for each square/value pair “If this square was assigned this value, would that lead to an inconsistency?” is enough to solve all 9x9 Sudokus without search empirically. For details, see Sudoku as a Constraint Problem by Helmut Simonis.

                                                            1. 1

                                                              That just sounds hugely frustrating. I usually just solve them by elimination, but I don’t really do super hard ones.