Skip to content

Instantly share code, notes, and snippets.

View sophiajt's full-sized avatar

Sophia J. Turner sophiajt

View GitHub Profile
extern crate syn;
use std::env;
use std::fs;
use std::io::Read;
#[derive(Debug)]
struct File {
functions: Vec<Function>,
}
let x = {
let mut foo = Foo::new();
foo.append("bar");
foo.append("baz");
x
};
// or, more commonly:
@sophiajt
sophiajt / a case for nushell laziness.md
Last active June 27, 2022 03:01
A case for Nushell laziness

A case for Nushell laziness

Up to this point, Nushell has been built around the idea that commands stream data from one to the next via a pipeline. This pipeline is implemented as an iterator in Rust, allowing it to lazily compute the output as needed. A pipeline can be created, and only the rows needed are pulled through each stage.

This has served Nushell well. It's a simple, yet powerful, abstraction that commands can build on top of.

That said, I think it's time to experiment with a more powerful model. If this proves successful, it could put Nushell in a much better position for both higher performance but also a much more improved user experience.

Pipelines are too simple