top of page
Search

Workspaces! (Not "sessions")

  • Writer: Jack Orenstein
    Jack Orenstein
  • Dec 22, 2023
  • 1 min read

I was ruminating about adding "sessions" to marcel, in the last blog post. It's done! They're called workspaces, not sessions.


A workspace:

  • Has its own startup script. I found that I was growing a large startup script (~/.config/marcel/startup.py), with imports and functions and database access configurations useful in different projects. Now I can have a workspace per project, and each workspace's startup script has only the definitions needed for that project.

  • Has its own command history. Wading through a command history is easier if you only have the commands relevant to your project.

  • Persists environment variables. This is the most significant improvement. If you use a workspace, then any variables you define are saved between sessions. I found that I would spend some time playing with a complex pipeline, perfecting it, and then writing it down in a notes file for later use. With workspaces, I just assign it to a variable, and it's always present when I use the same workspace. This is also useful for saving streams between sessions. (If you don't use a workspace, then environment variables are not saved.)


I've added a page to the tutorial describing workspaces. Read more about them here.

 
 
 

Recent Posts

See All
Compiling Marcel to Python

Marcel is interpreted. A command like this: gen 100 | map (x: (x, x**0.5)) | write gives rise to objects of type marcel.op.Gen,...

 
 
 
Marcel in more places

Thanks to two different pilot errors on my part, I have broken the packaging system of two OSes that package marcel. I would have had no...

 
 
 

Comments


  • github
  • email
bottom of page