favicon here hometagsblog

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

Perma-Vuln: D-Link DIR-859, CVE-2024-0769

Recently Sift caught an interesting payload. As it turns out, the exploit was CVE-2024-0769, which is now tagged here: D-Link DIR-859 Information Disclosure Attempt . This vulnerability is a path traversal leading to information disclosure. But, perhaps mo…

via GreyNoise LabsJune 25, 2024

Synergy Greg

Synergy Greg would like to see you in His office, it is the one down the hall, past the cubicles and dreary faces, uplifted only when He deigns to venture forth. You will know Him when you see Him, He is the one composed, of a thousand writhing forms,…

via LudicityJune 22, 2024

Status update, June 2024

Hi all! This status update will be shorter than usual because I had a lot less free time for my open-source projects than usual this month. Indeed, I recently joined SNCF Réseau (the company responsible for the French railway infrastructure) to work on OSR…

via emersionJune 18, 2024

Why People are Angry over Go 1.23 Iterators

NOTE: This is based on, but completely rewritten, from a Twitter post: https://x.com/TheGingerBill/status/1802645945642799423 TL;DR It makes Go feel too “functional” rather than being an unabashed imperative language. I recently saw a post on Twitter showi…

via Articles on gingerBillJune 17, 2024

My RSS feed has been upgraded ✨

I did some integration work to include posts written for other publications in my RSS feed. Apologies if you see some duplicated items! 📪

via Rob O'LearyJune 15, 2024

Programming at the edge with Fastly Compute

So you’ve heard about computing at the edge, and you’ve heard that Fastly let’s you run JavaScript, Go, Rust and any other language that compiles to Wasm at the edge… well, let’s take a look and while we’re at it let’s try and understand how caching works …

via Posts on integralistJune 12, 2024

Generated by openring-rs