RSSAmplifier

Blog

marcel

marcel

marceltheshell.orgRSS feed ↗15 posts

Latest posts

Shell scripting with marcel

You can write shell scripts using marcel. I created a source file, hello.m containing these commands: #!/usr/bin/env marcel ('Hello world') I then made the file executable and executed it: jao@loon:/tmp$ ./hello.m Hello world Here is a script, recent.m, to find files recursively inside the current directory, that have changed in the last 10 days. #!/usr/bin/env marcel ls -fr | select (f: now() -…

Marcel runs on MacOS!

Yes, marcel now runs on MacOS. I've been working on this for months , and it's finally done. This was a major project because: Most...

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,...

Generating graphs from the marcel command line

I was working on a project in which I needed to munge some data, producing a stream of (x, y) tuples, and then graph the data. I had...

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...

Marcel and Jupyter

For years, I kept hearing about iPython, as a vastly improved Python REPL. I played with it a little bit, and yes, I saw that. I found...

8 Queens as a Marcel One-Liner

Yes, the 8 Queens problem can be solved in marcel, as a one-liner even. If you want the details, you can find them here. But the basic...

Workspaces! (Not "sessions")

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

Thinking about sessions

A number of ideas floating around in my head are coming together around the idea of adding sessions to marcel. Here are the pieces:...

Hi, Hacker News!

Wow! Somebody submitted another project of mine, Object Shell to Hacker News. Marcel supercedes Object Shell, and I guess someone on HN...

Throwaway functions

Suppose you need to read a CSV file and fix the data in one of the columns. Maybe a column has strings that may contain spaces and...

Building new commands

grep is very useful, and you can call it from marcel, e.g. grep "def render_compact" *.py Running this in marcel's marcel/object...

Streams and Variables

Marcel pipes carry streams of data between operators. In the same way that you find it useful to store lists or arrays or sets of objects...

Pipelines and Variables

Most interaction with marcel involves the execution of a pipeline. For example: ls -fr | select (f: now() - f.mtime < days(1)) ls...

Database Access

Marcel pipes streams of tuples between operators. Relational databases operate on tables, which are sets of tuples, and queries yield...