home tags blog microbio cv tech cv

Julia x Zellij

Soc Virnyl Estela | 2022-12-19 | reading time: ~2min

Multiplexing workflows§

A multiplexer is a program that multiplex a screen into several splits usually separated with their own purpose and function. In this post, the multiplexers we are talking about is for the terminal.

There are many multiplexing programs that exist today such as screen, tmux, and zellij. They serve similar purposes in that each split, pane, tab or whatever they call it can specific programs to your liking e.g. running htop, editing a file, listing passwords. Other multiplexing capabilities maybe is already built-in with your terminal emulator e.g. kitty and wezterm are known to have such features.

So how does a multiplexing workflow help you improve your Julia package development?

What is Zellij?§

Zellij is one of the popular rust cli tools that exist today - a multiplexer with batteries included and soon to have plugins support. I am writing this blog with the help of zellij using a layout that runs zola. It's a simple layout you can use as you can see below.

layout {
  pane split_direction="vertical" {
    pane command="helix"
    pane split_direction="horizontal" {
      zola { args "check"; }
      zola { args "build"; }
      zola { args "serve"; }
      pane {
      	name "free-terminal"
      }
    }
  }
  pane size=1 borderless=true {
    plugin location="zellij:compact-bar"
  }
  pane_template name="zola" {
    command "zola"
    start_suspended true
  }
}

Julia x Zellij§

As you can see from the example layout from the previous section, you can finally get an idea of how to integrate julia with zellij.

layout {
  pane split_direction="vertical" {
  	pane command="helix"
  	pane split_direction="horizontal" {
  		pane {
  			name "julia-repl"
  			command "julia"
  			args "--startup-file=no" "--project=." 
  			start_suspended true
  		}
  		pane {
  			name "julia-test"
  			command "julia"
  			args "--startup-file=no" "--project=." "-e" "using Pkg; Pkg.instantiate(); Pkg.test()"
  			start_suspended true
  		}
  		pane {
  			name "free-terminal"
  			focus true
  		}
  	}
  }
  pane size=1 borderless=true {
  	plugin location="zellij:compact-bar"
  }
}

This results with the layout below:

zellij-julia-layout-template

  • Left contains your editor
  • Right contains the following:
    • Julia REPL
    • Julia Pkg.test() command
    • Terminal

This layout makes it easy for you to test and rerun commands for your Julia package development.

Now what?§

This may not be your workflow but for those who are interested in using zellij may find it a good idea to integrate this workflow for their next Julia project. Thanks for reading this short post.

Articles from blogs I follow around the net

Decrypting FortiOS 7.0.x

Introduction Decrypting Fortinet’s FortiGate FortiOS firmware is a topic that has been thoroughly covered, in part because of the many variants and permutations of FortiOS firmware, all differing based on hardware architecture and versioning — we may have …

via GreyNoise Labs April 23, 2024

Copyleft licenses are not “restrictive”

One may observe an axis, or a “spectrum”, along which free and open source software licenses can be organized, where one end is “permissive” and the other end is “copyleft”. It is important to acknowledge, however, that though copyleft can be found at the …

via Drew DeVault's blog April 19, 2024

What Precious Things Does The Corporate World Steal From Us?

It has been about a year and a half of working three days a week in response to burnout. It took me six months to regain the ability to do anything beyond resting the moment I was done working, and in the past year I have recovered much of my ability to fu…

via Ludicity April 15, 2024

Generated by openring-rs