HNHacker News
TopNewBestAskShowJobs

roryrjb

556 karma · joined January 28, 2016

submissionscomments
roryrjb··on The Linux Commands HandBook
Yeah this is OK, but running macOS commands for Linux deployments doesn't work all the time. What about `lsblk` or `ip`? Also md5 vs md5sum. Also and I don't have macOS handy to try it, I'm pretty sure grep has differing options. I can't count how many times friends and colleagues who use macOS for development have put BSD commands into Dockerfiles and CI pipelines and have wondered why it didn't work.
roryrjb··on Githubassets.com Cert Has Expired
Just came to Hacker News to post this, GitHub's assets don't load and the site's front end is broken.
roryrjb··on One Year of Nushell
set -o pipefail is now part of POSIX[0] and I believe as soon as someone posts a patch to dash to implement it, it will get included[1].

[0]. https://www.austingroupbugs.net/view.php?id=789

[1]. https://lore.kernel.org/linux-dash/20200701015226.GA6839@gon...

roryrjb··on Git commit accepts several message flags (-m) to allow multiline commits
I pretty much always write my commit messages in Vim and never knew about -v, this is really nice thanks for the tip. Going to set it as default with:

    git config --global commit.verbose true
roryrjb··on Go is boring, and that’s fantastic
But is Go boring? I'm less interested in language syntax and semantics than I am about the runtime. I mean this generally and with all languages. Yes Go the language is simple and boring but the runtime, to me at least seems somewhat magical. By that I'm really talking about the concurrency. A lot of people sell Go by talking about Go routines but to me it's the one thing that makes me wary of adopting it. I'm very uncomfortable just blindly using concurrency features and not really knowing what's going on underneath.
roryrjb··on A History of Clojure [pdf]
I see nothing but praise for Clojure and for good reason. I experimented with it a bit a few years ago and it seemed to be a more practical and useful version of Lisp, although I say that as someone who wasn't that experienced in Lisp more generally, with only some small experiments in Scheme. Something just as significant was that the ecosystem seemed to be quite sane and I got on really well with Leiningen for example, if you were considering diving in then give it a go.

I personally won't consider it now but not because of the language or the ecosystem but because of the runtime(s). For me the layers of abstraction are too much complexity to not be justified.

roryrjb··on CLIs are reified UIs (2017)
Previously discussed here: https://news.ycombinator.com/item?id=15619796
roryrjb··on The Ten Commandments for C Programmers (1987)
Actually yes I did forget about BetterC and it has been on my radar for a while. I have played with D before and honestly out of all the options in this space I've found it's probably the one I would go for on a project. It seems to strike the best balance between productivity and performance for me, the runtime seems much less magical than Go. I will definitely check out BetterC!
roryrjb··on The Ten Commandments for C Programmers (1987)
I really love C, although I'm no expert by any means. C++ and Rust (and D) are different kinds of languages, they have many many more features. There isn't an adequate replacement yet. Aside from having GC, if anyone mentions Go, yes the syntax is simple but the runtime is a massive magic black box, I don't like magic. The closest things that I can see are Zig or the yet unknown language that Drew Devault is working on[0]. So people know about Zig of course, but the reason I mention about Drew's language that he has hinted at with snippets is that I can see by his posts that he both loves and respects C and he cares about complexity[1], I really really look forward to seeing what he's been up to.

[0]. https://drewdevault.com/2020/04/15/Status-update.html [1]. https://drewdevault.com/2020/01/04/Slow.html

roryrjb··on CLUI: Building a Graphical Command Line
I don't agree that GUIs are a replacement for the CLI. Yes in the past that is all we had, but really they are completely different and should be considered in parallel. CLIs were never really meant for non-technical users though as far as I'm aware, or at least the end user was already expected to have some kind of established context. I'm not really against exploration in this area but I disagree that CLIs are flawed. I'm biased of course, excuse me while I get back to my UNIX/xterm/tmux/vim development environment.

EDIT: I would like to point out that I've only been in the industry for 6/7 years so it's not like I started my career where this established environment was the only choice.

roryrjb··on The Quora Partner Program Is a Scam
No matter what the intentions are on either side, this is still a user creating data inside the black box that is a web service/company/database and once you do that it's their data. They can shut you out at any moment for any reason, right or wrong. I try to avoid all of this where possible and if I have anything in the cloud I keep a backup of everything, say in the case of Fastmail or Gmail I use isync. Anything else that isn't critical I just accept that one day it might not be there. I know this isn't addressing anything in the article directly I just mean generally if people are going to be annoyed if a company has changed the goal posts in their domain then don't commit to using that service. Offline first!
roryrjb··on Perl in 2020: Is It Still Worth Learning Now?
I really like Perl, although unfortunately I don't get to use it much. Sometimes when I am learning a language or a framework and I start getting the feel of it, I will try something and sometimes it works or doesn't. Either I didn't understand it right or maybe the API wasn't designed in the best way, but with Perl it would usually do what I thought it would do. All those sigils and context-aware variables really fits my mind and I feel so productive and happy using Perl. Unfortunately the naming issue feels really detrimental so it's good that's now behind us. In my opinion Perl is still valid as a general programming language (the relative lack of built-in OOP is a benefit to me), but for some things it's the best tool for the job. More generally speaking, the variety and quality of modules on CPAN is great. You can easily interface with C (ok maybe not with XS so easily), do some event loop programming, write one liners, non-GIL threading, FastCGI/PSGI web servers (not to mention all the nice frameworks such as Mojolicious, Dancer, et al), even CGI via SlowCGI or fcgiwrap + Nginx/Apache/httpd is still relevant and possible. I don't have any benchmarks to hand but I'm still under the impression that it's faster than Python or Ruby, if that's an important consideration. Sometimes Perl is only used in place of shell scripting itself or as an alternative to awk and that's OK, definitely still worth learning in 2020.

Edit: I also wanted to add that companies still use it, some more famous names include Booking.com and DuckDuckGo. It forms the foundation of a lot of Linux and BSD utilities, Git, it's available out of the box on OpenBSD, 99% of Linux distributions, macOS Catalina (all of these I know for a fact) and if not available by default is easily installed or built.

roryrjb··on Experts Warn of Possible Sustained Global Spread of New Coronavirus
So reading or watching the news makes all this sound very worrying, but if you look up the amount of deaths from influenza every year, "Up to 650,000 respiratory deaths per year"[0] then this will just become a run-of-the-mill thing, or am I missing something here?

0. https://en.wikipedia.org/wiki/Influenza

roryrjb··on Show HN: Sandy – A tiny Sandbox to run untrusted code ️
I don't think this really is what people might call a sandbox but it can optionally block or allow syscalls happening (in my mind only one aspect of a sandbox) and it looks like it's interactive. I think this is great. OpenBSD has had great success with pledge and I have been experimenting with seccomp (via the libseccomp project) with both Node.js bindings and a cli in C for doing a very similar thing as Sandy (although not interactively, which is a nice touch).
roryrjb··on Bash $* and $@ (2017)
Yeah don't get me wrong the bashisms are useful, but I'm hopping between OpenBSD, FreeBSD and Linux (and perhaps sharing scripts with my macOS-using colleagues) and although bash is available on all those platforms and more, POSIX shell will work out of the box without any further configuration.
roryrjb··on Bash $* and $@ (2017)
Shell scripting is absolutely still relevant. The rule of thumb should not be about length but about complexity, specifically if you absolutely need something like a real array or a hash then move onto a different language. Use shellcheck and avoid bash for scripting. I use bash or pdksh interactively but stick to POSIX shell for scripting. I am finding myself writing POSIX shell all the time and having great success with it.
roryrjb··on Following Up on “Hello World”
The clarification here is what I took away from his first post. I am not someone who is satisfied with just using technology and not knowing how it works underneath. This mindset doesn't actually benefit me in my actual day job but it's an itch I have to scratch. I have been using computers on and off (literally I gone for a few years without even owning a computer) since the late 90s, some of which I was programming, although I have only been "in the industry" for 6 years and I totally see how performance has dropped over time especially when things like Electron come into play. I see people using VS Code and Hyper terminal and even though those people are still productive in those applications, I shudder to think of all that waste. Of course unused RAM is wasted RAM but there must be some kind of critical mass of people using bloated applications where innovations are driven by their bloat, when it's completely unnecessary. If it wasn't for people trying to fight against this complexity like Drew, like suckless, like OpenBSD, like me and many others I wouldn't really like to see the outcome.
roryrjb··on Home in Nix – dotfile management
This was posted recently https://drewdevault.com/2019/12/30/dotfiles.html, but I actually liked the idea of using uname, hostname etc in constructing $PATH and even though I was already using git to track my dotfiles I adapted some parts of my setup like Drew describes and made $HOME a git repo itself ignoring everything by default. Works quite well across different OSs, machines and shells.
roryrjb··on Pattern Matching in Ruby 2.7 (2019)
Nice thank you. The last time I looked at Raku a few years ago when it was still called Perl 6 I hadn't considered native bindings. Will take a look.
roryrjb··on Pattern Matching in Ruby 2.7 (2019)
Thank you. I've heard of it and read about it a few times but haven't seriously considered it, but I will.
roryrjb··on Pattern Matching in Ruby 2.7 (2019)
This is a big use case for me. I really want to use Perl but I favour Python because the CPython API vs XS, it's a no brainer. I haven't really looked into the Ruby C API but if it's sane I would use it as well.
roryrjb··on Interpol issues 'red notice' for Carlos Ghosn's arrest
Huh, it was my VPN (PIA). Does anyone know why this would happen? I tried a few different servers.
roryrjb··on Interpol issues 'red notice' for Carlos Ghosn's arrest
Anyone else getting "An error occurred during a connection to www.bbc.co.uk. PR_END_OF_FILE_ERROR" when trying to access BBC News? This in under Firefox on Linux but also cannot access it in Chromium.
roryrjb··on How Unix Works
A very nice overview. Now knowing all this isn't necessarily a prerequisite for getting a lot of stuff done, but I think it's very useful indeed. In my experience in the industry so far I find that most people don't know any of this and just implicitly rely on the magic going on underneath and just interact with higher level interfaces, but when things go wrong then they're stuck and rely on Google or Stack Overflow for answers, copy and pasting solutions without really knowing why it works. This is fine of course, some people might not be too interested in this aspect, and just want to solve that blocker and move on with their task, but for me it's essential.
roryrjb··on Ask HN: What other Hacker News like forums you hang out at?
https://lobste.rs/ is potentially a good one, similar focus to Hacker News and on top of that it's invite only, so quality is high. Also there's a concept of "hats", basically badges that accounts can have which are verified, it makes it easy to see who represents a project or organisation in some official capacity. There's also 2FA. I've posted a couple of things, and commented a few times but it's definitely quieter than Hacker News and sometimes there's crossover.
roryrjb··on Two malicious Python libraries caught stealing SSH and GPG keys
It would be good to get some feedback on this instead of just anonymous downvotes.

I'm thinking the way it would work is that, at the application level, you'd open sockets and other file descriptors and then lock everything down, so if some malicious library tried to read a file or spawn a process the application would be either be killed or return an error, obviously depending on the application logic and whether or not it can handle the error. I would advocate this kind of approach as it doesn't need any external hardening, i.e. you get the benefits whether or not you're inside or outside of a container, whether or not the application is being run on a distro with SELinux or AppArmor, it's basically built in. I may be missing some big thing here but like I say it would be good to get some feedback here.

roryrjb··on Two malicious Python libraries caught stealing SSH and GPG keys
I have been working on a Node.js library (very much work in progress and progressing slowly due to lack of time) that integrates libseccomp to be used programmatically inside Node.js whether at library or application level. For me at the moment it's kind of an experimental idea as it can be quite tricky to get everything right and in order without the kernel killing the process by mistake, but at least I think for some of the cases in the category that this issue is in, it will help mitigate it. I believe libseccomp already has official bindings for Python, as well as third party bindings for other languages, but this kind of work has been very successful in OpenBSD with pledge and I think it has been overlooked in dynamic programming languages and Linux in general.
roryrjb··on Principles for C Programming
I have been enjoying learning and using C over the past few years. I think I see it the way Drew does. I have used it mostly alongside a dynamic language like Python or Lua (either using the Lua C API or Luajit's FFI module) or in Nodejs wrapping a C++ interface around it (i.e. not using the more recent N-API interface), but sometimes I have used it by itself, but basically it has always been quite small in scope, so I don't have the experience of what it's like to use in a large project.

I started to use C and like I said only recently, with my eyes wide open. There are faults and foot-guns but the simpler you keep things the better. For me it's less about performance, even though naive C will likely be quicker than most dynamic languages out there (where most of my experience is) and more about manual memory management and much smaller memory usage. Another reason I like C is that it is available everywhere. Of course as the article mentions ("Use only standard features.") you need to take care of what is included for it to be available on other platforms easily or at all. I'm saying this as someone who is only targeting x86 desktops and servers rather than targeting other processor architectures, so I'm mainly thinking about different OSs. From the viewpoint of Linux and the BSDs on which I have some experience to talk about, as they are primarily in C, the whole stack is C and what I mean is that if you know C you can can potentially figure out how everything works and is put together all the way down to the kernel. I also can't overestimate just how good man pages are in Linux and BSDs for C functions, using them is probably one of the best learning experiences for C that I've found.

roryrjb··on Thanks Gitlab
You're joking right? This is being posted on a personal account by one half of Sourcehut against a company that has had over $400 million in funding. Respect has to be earned and Gitlab have lost a lot of respect over this.
roryrjb··on Lesser Known Coding Fonts
Some of my favourites not mentioned on this thread yet include D2Coding by Naver (https://github.com/naver/d2codingfont) and Programma by Douglas Crockford (https://github.com/douglascrockford/Programma).
← PreviousPage 2 of 7Next →