Threads for wally

    1. 1
      ~ % echo $SHELL

      Eh, I don’t know. That tells me that it’s configured as my shell but does not necessarily tell me the location of the shell I’m currently typing in.

      I can hardly notice the difference. Since you have quit the terminal and started a new session, isn’t the shell you are using guaranteed to be the one configured?

      1. 9

        I can hardly notice the difference. Since you have quit the terminal and started a new session, isn’t the shell you are using guaranteed to be the one configured?

        I think this is the entire point of the article, “is it guaranteed?” The author is presenting a way to be sure your assumption about what is running is what is actually running, outside of the normal checks someone such as myself might run, such as echo’ing the $SHELL variable.

        If we abstract this a bit, let’s examine the value of a variable halfway through the execution of a program. We believe the value should not have changed, but without looking at the source code, that is a big assumption and the reason we’d be writing tests. The author just let us prove which actual executable was running.

        For a more concrete example, this screenshot is not edited at all. I clicked the ‘Terminal’ icon on my (admittedly Linux) desktop and immediately echo’d the $SHELL variable. It returns /bin/zsh. But when I use the author’s fuser suggestion, it shows there are no copies of that running, only /bin/bash! You can see all I had to do to fool echo $SHELL was set SHELL to be a new value in my .bashrc file.

        So to answer the question, no it is not guaranteed and the author just let you prove it.

        1. 1

          I can see your point, but “The argument to chsh will be the shell for your subsequent logins as well as the content of $SHELL” is a promise made by the Unix-like environment. If you don’t trust the environment (which makes sense: maybe there is a rootkit), then you shouldn’t trust the output of fuser either, since it’s also part of the environment.

          Your example of examining source code reminds me of this story. What if the tool you use to view the source also has a backdoor to hide a statement that changes the variable? :)

          1. 3

            I take your comment in the “:)” light it is intended and would like to meet you in the middle. I half considered going down the crazy extremes, but my example was more to point to the article giving us a way to start down the road of proving our assumptions, the same as we would prove the assumption that $x shouldn’t ever be negative in such-and-such a function.

            I think the happy middle ground which allows that one might want to do more than echo $SHELL and less than cover my house in foil is the fact that I am often a fool and make silly decisions, often after saying “This shouldn’t hurt anything…” Occasionally I have found it very useful to validate my assumptions, only to realize that something I decided to do X months ago actually invalidated them. With how often that has proven true, I think the article’s offering of a way to prove the promise made by the Unix-like environment true, or false, is a very worthwhile thing, even if often it will not be needed.

        2. 1

          Thanks for this. I was afraid that what I was trying to convey wouldn’t quite come across. It’s a little meta in that I was curious if I could figure out the current path of the current process of the shell I was typing in.

      2. 5

        I just opened a terminal with my default shell being /bin/bash. I typed zsh, and at the zsh prompt typed, echo $SHELL. The response was, /bin/bash because that’s my login shell, and the one that spawned zsh.

    2. 3

      Currently reading:

      “Convict Conditioning” by Paul Wade - a book about calisthenics training which I’m picking up seriously (not smoking for 2 years now, stopped drinking alcohol, got a door bar). The author supposedly spent 20 years in federal prison where he ‘designed’ a perfect training scheme, there is no proof whatsoever that he spent even a single day there and it might be a marketing ploy but the research I did online in general supported his training plan and claimed that following it leads to good results (although mentioning that some parts of the scheme can be greatly improved with small modifications). The book is a very fast read, full of motivational phrases dropped here and there. It starts of with the history of calisthenics focusing mostly on ancient Greece then goes on to covering each one out of the six main exercises split into 10 steps to master. The author is very openly criticizing bodybuilding (people pumping iron at gyms) and that gets annoying pretty quickly without adding any value to the book. I obviously can’t yet tell how well the exercise plan works out as I’m barely starting but so far I like the focus on perfecting the technique of each presented exercise and the graded approach from step 1 of each exercise requiring very little to the final 10th hard to master step.

      In queue:

      4 more books about calisthenics from the same author

      “Mafia” by Petra Reski - a book about the Italian mob, it’s structure, hierarchy etc.

      Just finished:

      “Spy Secrets That Can Save Your Life: A Former CIA Officer Reveals Safety and Survival Techniques to Keep You and Your Family Protected” by Jason Hanson - got this one as it had media patronage from a local Polish itsec news site and I expected some nice opsec tips from it. Highly disappointed, the book can hardly pass as a beginner preppers field book and reads like an advertisement for multiple products the author launched. Covers basic things like keeping your car at half tank, having a 72h backpack with ratios and basic survival tools etc. There are chapters dedicated to ie. getting out of handcuffs, duct tape, zip ties etc. but they are not illustrated which detracts a lot of value. In general, most of the things in this book you can pick up in much more breadth and detail online.

      1. 3

        Does “Convict Conditioning” have any relationship to Charles Bronson? I remember seeing the movie without knowing anything about the guy and found out he managed to put on decent amounts of muscle with just body weight exercises.

        1. 3

          Doesn’t look like it. Charles Bronson apparently wrote Solitary Fitness. Paul Wade didn’t ever appear anywhere online, the only interviews he did were over email, including conversations with the person posing for the pictures in the book.

    3. 4

      Trying to finish up a little utility called linkview that is similar to urlview but parses only HTML documents to display more context by showing link text or image alt/title tags in the menu instead of just the URL. Also, how to suck less at chess.

    4. 8

      Direct link to EFF’s mobile friendly page.

      1. 10

        Hacked by JUICE.

      2. 1

        I think the page may look differently if you’re running content blockers.

    5. 1

      Happy Birthday, and friends.

    6. 7

      Home office on an overcast day.

      Screen at the moment is boring default macOS, so not really worth screenshotting.

      1. 2

        Gorgeous view.

        1. 6

          One of the main perks of living far away from everything is that I can afford a nice view on a modest salary. :-) I pay about the same for a 2-bd apartment with an ocean view here as I used to pay for a 1-bd converted garage apartment in Santa Cruz, CA!

          Not the place if you like city living— nearest significant city is Plymouth, 90 mins away; nearest big city and reasonable airport is Bristol, about 3 hours. But nice for the outdoors.

      1. 2

        if it was a wider shot, I would say it was featured on :-)

        1. 1

          Oh boy, there are some nice setups on that site. Maybe I’ll take a better shot when the sun is up.

      2. 1

        Why do your Chrome tabs look different to mine? Is that a Chrome theme of some sort?

        1. 2

          Because I’m using Firefox. I have the Compact Light theme enabled which can be found in about:addons > Appearance. Signal, the desktop client which is technically a Chrome app is the reason you’re seeing it in my dock.

          1. 1

            That’ll be why then! Never noticed that Firefox setting before, thanks o/

    7. 4

      I doubt it will happen but if Lenovo uses this as a metric for future ThinkPad design and starts shipping 4:3 display laptops again, that would be very cool.

      1. 3

        I’ve been super happy with my Surface Book and I think the 3:2 display is part of that.

    8. 14

      I love this. Often we don’t get a glimpse of how one gets started doing what they do. Some might assume people are naturally born with certain skills. Turns out we all start at the bottom.

      This type of encouragement from within the community goes a long way in helping drive those who feel less likely to contribute because of self doubt.

      1. 3

        I agree! This was very encouraging.

    9. 18

      Little bit of effort next time, please.

      Who is Chris Lattner? What is his relation to Tesla? Why should we care?

      1. 24

        The creator of LLVM and Swift, started at Tesla 6 months ago and was the head of the division doing the self-driving car software.

        1. 15

          Regrettably, unless the HR and compensation folks for Tesla are users here, there’s not a lot to do about this.

          Also, posting Twitter threads tends to normalize low-quality articles.

          How much insight can we actually gain from 140 characters? I submit, unless it’s K or APL, not a lot.

          1. 11

            While I agree that I would generally avoid posting just a tweet, Chris Lattner leaving Tesla is rather big news in itself even without the why. He has noticeable impact to the FOSS world.

            Sadly, it’s missing a lot of context, I agree with you there.

            1. 16

              Chris Lattner leaving Tesla is rather big news in itself even without the why

              This just seems like celeb-worshipping to me.

            2. 8

              Perhaps, but news is a better fit over at HN, no? Otherwise we tend to get flooded with trivial nonsense and clickbait and “news” that is really just gossip and cocktail-party brinksmanship with factoids.

              1. 3

                How many socks are there on lobsters?

                1. 5

                  I think they are the same person.

                  I’m just now figuring this out, don’t judge me. :)

                  1. 5

                    Yeah, angersock is currently experimenting being not angry. It’s been very interesting to watch.

                    1. 1

                      Is that why friendlysock isn’t exclusively friendly here?

                      1. 2

                        Yes, if you dig into his past, you’ll find sarcasm, curtness and other less than courteous behaviors. I’ll be very interested to see what he concludes from his experiment of friendliness.

        2. 5

          Here’s what he had said at the time about why he left Apple for Tesla.

        3. 2

          started at Tesla 6 months ago and was the head of the division doing the self-driving car software.

          So it’s possible he quit because self-driving isn’t going well at Tesla.

      2. 3

        You’re absolutely right, I should have posted some more context. I wrongly assumed everyone on Lobsters knew him through his work (llvm, swift). Thanks!

    10. 6

      Been using this for a while on iOS with DuckDuckGo for everyday searching. Seeing this post and reflecting on Focus makes me realise it quickly became a new mode, that I really like - open, find the thing I want, read, destroy session, easily and without even thinking about it. The iOS app has the occasional rendering or JS issue, making a given page not work properly compared to Safari (which I guess is down to the custom tracking-blocker stuff), but I’d say about 95% of the time it’s fine. I still have a zillion Safari tabs open in the background for articles/URLs I want to come back to, but that almost seems a different thing now; for just quickly looking things up, with the equivalent of a new private/incognito window every time but without any fiddling or settings, it’s great. Like having a simple, single-purpose, incognito search app. Wonder which rendering/JS engine it uses on Android.

      1. 3

        It uses the default Android WebView, so WebKit, according to reports. There’s a bug open to switch to Gecko at some point.

      2. 1

        Just because I’m genuinely curious, does Focus itself have any extra benefits over just using it as a content blocker within Safari?

        edit: Sorry, what I meant to say was privacy benefits.

        1. 2

          Besides the blocker, it also wipes cookies/cache between sessions. But if you use Safari in Private Browsing mode along with a 3rd-party content blocker, that’d be pretty similar.

    11. 1

      I like Heroku. I’ve been using the free tier for almost a year now to run a little twitter bot, @loveapaper. Like this post mentions, it may not fit your use case but for such a small project it made sense for me.

    12. 4

      Don’t forget to check out Papers We Love.

      Papers We Love is a repository of academic computer science papers and a community who loves reading them.

      Also, I wrote a bot that tweets random papers from their repo. You can follow the bot @loveapaper as well as their main twitter account @papers_we_love for updates on new papers and remote chapters.

    13. 11

      As someone who has jumped back and forth between different operating systems including Linux, OpenBSD, and macOS I find I’m most productive on macOS.

      Countless days have been spent finding the right tools, tweaking various configuration files and tuning systems just to my liking. This never lasted though and the cycle would repeat itself. The problem was that I spent more time trying to find this perfect setup than I did actually using my computer for anything else. I could never quite find the right setup. Wonder if a lot of the folks over at /r/unixporn have the same problem?

      Fortunately, with macOS there’s less of this. Some might call this a restriction or a lack of freedom but I find it almost relieving.

      Of course there are many people out there who have no problem installing a distro and getting on with their lives. I’m jealous of those who can but I’ve tried and it never worked. Something always popped up which lead me down a rabbit hole of tweaking and fiddling.

      Until this year I was using a ThinkPad X230 running Debian for over two years. Now I’m currently running a 2016 MacBook Pro (sans TouchBar) and have been happy so far. Maybe it’s indicative of my personality or maybe I’m getting older, I’m not sure.

      1. 5

        Yeah, I used to have this problem. These days (and I do think it has something to do with getting older) I install Ubuntu and move on with my life. I’ve considered switching to Arch for newer versions of things, but there’s just too much fiddling required. I really don’t care why or how font anti-aliasing works, for example, I just want anti-aliased fonts. Antergos looks promising, though. It appears to be to Arch what Ubuntu originally was to Debian.

        1. 4

          ouch, you’ve put your finger directly on the one problem i have with arch. overall it was[1] a pleasure to use, and i definitely enjoyed using it day-to-day more than i did ubuntu, but i was never quite happy with the fonts, whereas ubuntu looked perfect straight out of the box. the problem is it’s really hard to tweak the settings and tell if a font actually looks good; it’s more a feeling that something is subtly wrong but you can’t quite tell what.

          [1] my machine died; i will probably install arch on the new one too

          1. 2

            Fonts are exactly one the issues I was referring to in my previous comment. At least a few years ago it was the case (maybe still is) that Ubuntu used some type of patched fonts. It was either libfontconfig or some other package which handled the better rendering. You could of course install said package on Debian but any further upgrades would overwrite it and on reboot your fonts would look like crap again. Package pinnning with apt is always an option here but… yeah, like I said, back down the rabbit hole.

            1. 3

              Indeed, Debian used to have pretty poor font rendering, at least when compared to derivatives like Ubuntu. I think some of this was caused by subpixel rendering being disabled due to patent issues (now since resolved, I believe).

              From the Debian Wiki:

              The default fonts in Debian derived distributions like Ubuntu and Linux Mint have better looking fonts when compared to default Debian Squeeze since the ubuntu-based distros have heavily patched cairo or freetype2 whereas Vanilla Debian doesn’t do patching as much as they do. A lot of things about the cairo package has changed recently in wheezy and unstable which have brought almost the same font setup to Debian (But not Squeeze or old) but you have to set it up to your liking.

    14. 5

      Not 100% satisfied with battstat so I’m thinking about refactoring the code to add printf(1) style formatting instead of space delimited replacement tokens.

      I finally got around to setting up a blog (Ghost running on docker) but I’m not sure how much or how little information I want to share on it, and what topics to cover. Getting in the habit of writing more was my intention so we’ll see how long it lasts.

      1. 2

        battstat is cool; thanks!

    15. 2

      Over the winter break I worked on a little CLI battery status indicator, battstat, that works on Linux, macOS, and OpenBSD. It could still use a little bit of work especially for machines with multiple batteries.

      This week I’m determined to get a blog up and running because I’ve been wanting to brush up on my terrible writing skills. I’ll probably end up going with Ghost running in a docker container since my homepage is already running in a nginx container. Of course the issue with exposing multiple web containers on a single host is port conflicts so I’ll have to setup another nginx container as a proxy to sit in front of the services.

    16. 5

      Is this linked anywhere?

      1. 2

        According to the original commit, no. Haven’t looked far enough into the commit log to see if it was eventually linked. Also if you’re curious about other pages you can check out the routes.rb file in the lobsters repo.

      2. 2

        I think this should be somewhere in the profile or in the top bar.

    17. 4

      I have never used elementary OS so I can’t give any anecdotal input but according to some folks over at Reddit it may not be the best distro to switch from macOS to. My recommendation for newcomers has always been to just use Ubuntu. Also, if you really hate Unity that much use Gnome. There’s even an official flavor of Ubuntu called Ubuntu Gnome.

      1. 3

        Ubuntu Gnome is always what I suggest to beginners just because Unity is all kinds of slow on basically every configuration I’ve ever run, and Gnome 3 is easy enough to figure out and work in.