Ruby: A great language for shell scripts

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Scout Monitoring - Free Django app performance insights with Scout Monitoring
Get Scout setup in minutes, and let us sweat the small stuff. A couple lines in settings.py is all you need to start monitoring your apps. Sign up for our free tier today.
www.scoutapm.com
featured
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
  • truffleruby

    A high performance implementation of the Ruby programming language, built on GraalVM.

    It's not quite what you're describing, but TruffleRuby is Ruby on GraalVM:

    https://github.com/oracle/truffleruby

    Unlike GraalVM Java, as far as I can tell TruffleRuby doesn't provide a bundler that can create a single executable out of everything.

  • Scout Monitoring

    Free Django app performance insights with Scout Monitoring. Get Scout setup in minutes, and let us sweat the small stuff. A couple lines in settings.py is all you need to start monitoring your apps. Sign up for our free tier today.

    Scout Monitoring logo
  • Ammonite-Ops

    Scala Scripting

    for Scala there's Ammonite which can do this https://ammonite.io/#MagicImports

  • Nuitka

    Nuitka is a Python compiler written in Python. It's fully compatible with Python 2.6, 2.7, 3.4-3.12. You feed it your Python app, it does a lot of clever things, and spits out an executable or extension module.

    You could try Nuitka [1], but I don't have enough experience with it to say if it's any less brittle than PyInstaller.

    [1]: https://nuitka.net/

  • buildpacks

    Heroku Cloud Native Buildpacks (by heroku)

    Bootstrapping and different behavior for different versions and not being able to use the dependency ecosystem really make it a lot more difficult than people realize if you’re trying to “script” at scale.

    I’ve used rust for this task but people get mad that I’m calling it a “script”. “That’s not a script that’s a program” which…sure. But so maybe we need another term for it? “Production-scripts” or something.

    My experience is rewriting Ruby and bash buildpacks for the open spec CNCF Cloud Native Buildpack project (CNB) https://github.com/heroku/buildpacks

    I agree that Ruby is easier to start and grow complexity, that would be a good place to start.

  • scriptisto

    A language-agnostic "shebang interpreter" that enables you to write scripts in compiled languages.

    Scriptisto is an underrated tool: https://github.com/igor-petruk/scriptisto

    It can do the Python venv stuff behind the scenes for you and it just looks like a single Python file.

  • pants

    The Pants Build System

    You actually can distribute a whole executable, python and all, with .pex tools: https://docs.pex-tool.org/

    You have to mind your dependency packages and build options if you want cross-platform, but you can also "cross compile" to make distributions for a platform.

    Pants is in some ways even better for building .pex files, managing options, dependencies, and lockfiles, at the expense of a bit of more complexity (understanding pants options): https://www.pantsbuild.org/

  • pex

    A tool for generating .pex (Python EXecutable) files, lock files and venvs.

    You actually can distribute a whole executable, python and all, with .pex tools: https://docs.pex-tool.org/

    You have to mind your dependency packages and build options if you want cross-platform, but you can also "cross compile" to make distributions for a platform.

    Pants is in some ways even better for building .pex files, managing options, dependencies, and lockfiles, at the expense of a bit of more complexity (understanding pants options): https://www.pantsbuild.org/

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • direnv

    unclutter your .profile

    There are plenty of ways to have the venv automatically activate (and de-activate) when you enter/leave the directory for the project. direnv [0], mise [1], or various shell hooks.

    There are useful libraries, I’m not saying there aren’t. I just dislike it when people include one as a dependency when they really didn’t need it.

    [0]: https://github.com/direnv/direnv

    [1]: https://github.com/jdx/mise

  • mise

    dev tools, env vars, task runner

    There are plenty of ways to have the venv automatically activate (and de-activate) when you enter/leave the directory for the project. direnv [0], mise [1], or various shell hooks.

    There are useful libraries, I’m not saying there aren’t. I just dislike it when people include one as a dependency when they really didn’t need it.

    [0]: https://github.com/direnv/direnv

    [1]: https://github.com/jdx/mise

  • open3

    Open3 gives you access to stdin, stdout, and stderr when running other programs.

  • ruby-linux-initrd

    linux image with ruby utils and shell

    I've been working (intermittently) on a project to do exactly this: https://github.com/0mWh/ruby-linux-initrd

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Pyenv – lets you easily switch between multiple versions of Python

    20 projects | news.ycombinator.com | 25 Mar 2024
  • Ask HN: What side projects landed you a job?

    62 projects | news.ycombinator.com | 3 Dec 2023
  • As if there weren't enough packaging tools already: mitsuhiko/rye: an experimental alternative to poetry/pip/pipenv/venv/virtualenv/pdm/hatch/…

    14 projects | /r/Python | 23 Apr 2023
  • Manage python on Mac arm hardware

    2 projects | /r/learnpython | 16 Apr 2023
  • Downgrade Python 3.10 to 3.9 Ventura

    2 projects | /r/MacOS | 30 Mar 2023

Did you konow that Python is
the 1st most popular programming language
based on number of metions?