Skip to content
This repository has been archived by the owner on Feb 8, 2022. It is now read-only.

Porting commands to engine-q list #242

Closed
stormasm opened this issue Oct 19, 2021 · 91 comments
Closed

Porting commands to engine-q list #242

stormasm opened this issue Oct 19, 2021 · 91 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@stormasm
Copy link
Contributor

stormasm commented Oct 19, 2021

Updated on January 14, 2022

We are getting closer thanks to everyone's help !

Instead of commenting on this issue, please go to nushell/nushell#4356

Engine-q will become Nushell's new parsing and evaluation engine in the future. As part of this, we'll port the existing Nushell commands into Engine-q. Much of this porting can be done mechanically, as while the two systems differ, they are similar enough that many commands can be ported following the steps below.

You can sign up to help out porting a command by commenting on this issue.

Our preference when sending us a Pull Request (PR) is to do one command at a time. It makes it a lot easier for us to review the code as well as making the merge conflicts easier to figure out...

Note: Instructions on how to port these commands from Nushell to Engine-q are below the list.

name sub category completed notes
alias core done
all? done @arthur-targaryen
ansi done @matthewauld
ansi gradient done @matthewauld
ansi strip done @matthewauld
any? done @arthur-targaryen
append filters done @stormasm
autoenv @jntrnr
autoenv trust @jntrnr
autoenv untrust @jntrnr
autoview done @jntrnr - mostly built into table now
benchmark system done
build-string strings done
cal done @onthebridgetonowhere
cd filesystem almost done missing cd -
char done @matthewauld
chart
clear done @Scorpil
collect done
compact done @matthewauld
cp filesystem done
dataframe done @elferherrera
date done @onthebridgetonowhere
date format done @onthebridgetonowhere
date humanize done @onthebridgetonowhere
date list-timezone done @onthebridgetonowhere
date now done @onthebridgetonowhere
date to-table done @onthebridgetonowhere
date to-timezone done @onthebridgetonowhere
debug done
def core done
default @matthewauld
describe done
do core done
drop filters done @stormasm
drop column filters done @stormasm
drop nth filters done @stormasm
du @Scorpil
each filters done
each group filters
each window filters
echo core done @aslynatilla
empty? done @onthebridgetonowhere
enter done @jntrnr
every done @pantonshire
exec @Scorpil
exit done @jntrnr
fetch done @onthebridgetonowhere
find @arthur-targaryen
first filters done @onthebridgetonowhere. Basic support in. Binary not yet supported
flatten done @onthebridgetonowhere
for core done
format strings done @aslynatilla
format filesize
from formats done
from csv formats done @jntrnr
from eml formats done @luccasmmg
from ics formats done @luccasmmg
from ini formats done @luccasmmg
from json formats done
from ods formats done @luccasmmg
from ssv formats done @luccasmmg
from toml formats done @luccasmmg
from tsv formats done @jntrnr
from url formats done @luccasmmg
from vcf formats done @luccasmmg
from xlsx formats done @luccasmmg
from xml formats done @luccasmmg
from yaml formats done @luccasmmg
from yml formats done @luccasmmg
g done
get filters done
group-by @andrasio
group-by date
hash done @CBenoit
hash base64 @CBenoit
hash md5 done @CBenoit
hash sha256 done @CBenoit
headers
help core mostly done Still needs syntax highlighting
histogram
history
if core done
ignore done @hustcer
insert
into conversions done
into bool conversions done
into binary conversions done
into column_path conversions
into datetime conversions done
into decimal conversions done
into filesize conversions done
into int conversions done
into path conversions done Done? No longer necessary
into string conversions done @onthebridgetonowhere
keep until done @arthur-targaryen
keep while done @arthur-targaryen
kill done @Scorpil
last filters done @stormasm
length filters done
let core done
let-env done
lines filters done
load-env
ls filesystem done @jntrnr
math done @luccasmmg is working on all of the math commands below
math abs done @luccasmmg
math avg done @luccasmmg
math ceil done
math eval done
math floor done
math max done @luccasmmg
math median done
math min done @luccasmmg
math mode done
math product done
math round done
math sqrt done
math stddev done
math sum done
math variance done @luccasmmg is working on all of the math commands above here
merge
mkdir filesystem done
move
mv filesystem done
n done @jntrnr
nth filters done @stormasm
open done @jntrnr
p done @jntrnr
parse done @CBenoit
path done @LiHRaM
path basename done @LiHRaM
path dirname done @LiHRaM
path exists done @LiHRaM
path expand done @LiHRaM
path join done @LiHRaM
path parse done @LiHRaM
path relative done @LiHRaM
path split done @LiHRaM
path type done @LiHRaM
pathvar done @kubouch switched e-q to using Value instead of String for env vars
pivot
post
prepend filters done @stormasm
ps done
pwd @Scorpil
random done @jaeheonji
random bool done @jaeheonji
random chars done @jaeheonji
random decimal done @jaeheonji
random dice done @jaeheonji
random integer done @jaeheonji
random uuid done @jaeheonji
range filters done @stormasm
reduce @kubouch
reject filters done @stormasm
rename filters
reverse filters done @stormasm
rm done
roll
roll column
roll up
rotate
rotate counter-clockwise
save
select filters mostly done Still needs to have latest changes ported from nushell
seq @nibon7
seq date done
shells done @jntrnr
shuffle filters done @stormasm
size done
skip done @arthur-targaryen
skip until done @arthur-targaryen
skip while done @arthur-targaryen
sleep done @Scorpil
sort-by filters @stormasm
source mostly done currently a bit buggy, needs some testing
split done
split chars done
split column done
split row done
split-by @andrasio
str done @onthebridgetonowhere
str camel-case done @onthebridgetonowhere
str capitalize done @onthebridgetonowhere
str collect done @onthebridgetonowhere
str contains done @onthebridgetonowhere
str downcase done @onthebridgetonowhere
str ends-with done @onthebridgetonowhere
str find-replace done @onthebridgetonowhere
str index-of done @onthebridgetonowhere
str kebab-case done @onthebridgetonowhere
str length done @onthebridgetonowhere
str lpad done @onthebridgetonowhere
str pascal-case done @onthebridgetonowhere
str reverse done @onthebridgetonowhere
str rpad done @onthebridgetonowhere
str screaming-snake-case done @onthebridgetonowhere
str snake-case done @onthebridgetonowhere
str starts-with done @onthebridgetonowhere
str substring done @onthebridgetonowhere
str trim done @onthebridgetonowhere
str upcase done @onthebridgetonowhere
sys system done
table viewers done output and theming now available
tags done Ported as metadata
to done
to csv done @luccasmmg
to html done @luccasmmg
to json done @jntrnr
to md done @luccasmmg
to toml done @luccasmmg
to tsv done @luccasmmg
to url done @luccasmmg
to xml done @luccasmmg
to yaml done @luccasmmg
touch filesystem done
tutor
unalias
uniq done @onthebridgetonowhere
unlet-env done now part of hide
update done
update cells
url done @jaeheonji
url host done @jaeheonji
url path done @jaeheonji
url query done @jaeheonji
url scheme done @jaeheonji
version done @onthebridgetonowhere
where filters done
which @Scorpil
with-env done @jntrnr
wrap filters done
zip done
$nu mostly done @jntrnr
$scope done this is done as a simple implementation, but feel free to improve it

Missing features/commands

  • command [autoenv trust] with parameter [dir] is missing in eq
  • command [autoenv trust] with parameter [quiet] is missing in eq
  • command [autoenv untrust] with parameter [dir] is missing in eq
  • command [autoenv untrust] with parameter [quiet] is missing in eq
  • command [benchmark] with parameter [passthrough] is missing in eq
  • command [binaryview] with parameter [bytes] is missing in eq <-- not porting
  • command [binaryview] with parameter [lores] is missing in eq <-- not porting
  • command [binaryview] with parameter [skip] is missing in eq <-- not porting
  • command [cd] with parameter [-] is missing in eq
  • command [chart bar] with parameter [columns] is missing in eq
  • command [chart bar] with parameter [format] is missing in eq
  • command [chart bar] with parameter [acc] is missing in eq
  • command [chart bar] with parameter [use] is missing in eq
  • command [chart line] with parameter [columns] is missing in eq
  • command [chart line] with parameter [format] is missing in eq
  • command [chart line] with parameter [acc] is missing in eq
  • command [chart line] with parameter [use] is missing in eq
  • command [compact] with parameter [rest] is missing in eq
  • command [dfr drop-duplicates] with parameter [subset] is missing in eq
  • command [dfr drop-duplicates] with parameter [maintain] is missing in eq
  • command [dfr select] with parameter [rows] is missing in eq <--- duplicated with get
  • command [dfr select] with parameter [rest] is missing in eq <--- duplicated with get
  • command [dfr unique] with parameter [period] is missing in eq <--- parameter doesnt exit
  • command [dfr show] with parameter [tail] is missing in eq <--- changed to to-nu
  • command [dfr show] with parameter [n_rows] is missing in eq <--- changed to to-nu
  • command [dfr where] with parameter [condition] is missing in eq <--- better logic with masks (redundant)
  • command [date format] with parameter [table] is missing in eq
  • command [date humanize] with parameter [table] is missing in eq
  • command [default] with parameter [column name] is missing in eq
  • command [default] with parameter [column value] is missing in eq
  • command [detect columns] with parameter [no_headers] is missing in eq
  • command [detect columns] with parameter [skip] is missing in eq
  • command [do] with parameter [ignore-errors] is missing in eq
  • command [du] with parameter [path] is missing in eq
  • command [du] with parameter [min-size] is missing in eq
  • command [du] with parameter [all] is missing in eq
  • command [du] with parameter [deref] is missing in eq
  • command [du] with parameter [exclude] is missing in eq
  • command [du] with parameter [max-depth] is missing in eq
  • command [each group] with parameter [group_size] is missing in eq
  • command [each group] with parameter [block] is missing in eq
  • command [each window] with parameter [window_size] is missing in eq
  • command [each window] with parameter [block] is missing in eq
  • command [each window] with parameter [stride] is missing in eq
  • command [empty?] with parameter [rest] is missing in eq
  • command [empty?] with parameter [block] is missing in eq
  • command [enter] with parameter [location] is missing in eq
  • command [enter] with parameter [encoding] is missing in eq
  • command [every] with parameter [stride] is missing in eq
  • command [every] with parameter [skip] is missing in eq
  • command [exec] with parameter [command] is missing in eq
  • command [exec] with parameter [rest] is missing in eq
  • command [exit] with parameter [code] is missing in eq
  • command [exit] with parameter [now] is missing in eq
  • command [fetch] with parameter [URL] is missing in eq
  • command [fetch] with parameter [raw] is missing in eq
  • command [fetch] with parameter [user] is missing in eq
  • command [fetch] with parameter [password] is missing in eq
  • command [find] with parameter [rest] is missing in eq
  • command [for] with parameter [numbered] is missing in eq
  • command [format filesize] with parameter [field] is missing in eq
  • command [format filesize] with parameter [format value] is missing in eq
  • command [from sqlite] with parameter [tables] is missing in eq
  • command [from tsv] with parameter [noheaders] is missing in eq
  • command [from xlsx] with parameter [noheaders] is missing in eq
  • command [g] with parameter [index] is missing in eq
  • command [get] with parameter [rest] is missing in eq
  • command [group-by] with parameter [grouper] is missing in eq
  • command [group-by date] with parameter [column_name] is missing in eq
  • command [group-by date] with parameter [format] is missing in eq
  • command [hash] with parameter [rest] is missing in eq
  • command [hash base64] with parameter [rest] is missing in eq
  • command [hash base64] with parameter [decode] is missing in eq
  • command [hash base64] with parameter [character_set] is missing in eq
  • command [hash base64] with parameter [encode] is missing in eq
  • command [histogram] with parameter [rest] is missing in eq
  • command [histogram] with parameter [use] is missing in eq
  • command [history] with parameter [clear] is missing in eq
  • command [inc] with parameter [rest] is missing in eq
  • command [insert] with parameter [column] is missing in eq <-- replaced with update
  • command [insert] with parameter [value] is missing in eq <-- replaced with update
  • command [into column-path] with parameter [rest] is missing in eq
  • command [keep] with parameter [rows] is missing in eq
  • command [length] with parameter [column] is missing in eq
  • command [let] with parameter [name] is missing in eq
  • command [load-env] with parameter [environ] is missing in eq
  • command [ls] with parameter [path] is missing in eq
  • command [ls] with parameter [du] is missing in eq
  • command [ls] with parameter [all] is missing in eq
  • command [ls] with parameter [long] is missing in eq
  • command [ls] with parameter [short-names] is missing in eq
  • command [match] with parameter [member] is missing in eq
  • command [match] with parameter [regex] is missing in eq
  • command [match] with parameter [invert] is missing in eq
  • command [match] with parameter [insensitive] is missing in eq
  • command [match] with parameter [multiline] is missing in eq
  • command [match] with parameter [dotall] is missing in eq
  • command [merge] with parameter [block] is missing in eq
  • command [move] with parameter [rest] is missing in eq
  • command [move] with parameter [before] is missing in eq
  • command [move] with parameter [after] is missing in eq
  • command [nu plugin] with parameter [load] is missing in eq
  • command [open] with parameter [path] is missing in eq
  • command [open] with parameter [encoding] is missing in eq <-- moved to decode command
  • command [open] with parameter [raw] is missing in eq
  • command [pivot] with parameter [rest] is missing in eq <-- renamed transpose
  • command [pivot] with parameter [ignore-titles] is missing in eq <-- renamed transpose
  • command [pivot] with parameter [header-row] is missing in eq <-- renamed transpose
  • command [post] with parameter [path] is missing in eq
  • command [post] with parameter [body] is missing in eq
  • command [post] with parameter [raw] is missing in eq
  • command [post] with parameter [user] is missing in eq
  • command [post] with parameter [password] is missing in eq
  • command [post] with parameter [content-type] is missing in eq
  • command [post] with parameter [content-length] is missing in eq
  • command [query json] with parameter [query] is missing in eq
  • command [reduce] with parameter [block] is missing in eq
  • command [reduce] with parameter [numbered] is missing in eq
  • command [reduce] with parameter [fold] is missing in eq
  • command [rename] with parameter [column_name] is missing in eq
  • command [rename] with parameter [rest] is missing in eq
  • command [roll] with parameter [by] is missing in eq
  • command [roll column] with parameter [by] is missing in eq
  • command [roll column] with parameter [cells-only] is missing in eq
  • command [roll column] with parameter [opposite] is missing in eq
  • command [roll up] with parameter [by] is missing in eq
  • command [rotate] with parameter [rest] is missing in eq
  • command [rotate counter-clockwise] with parameter [rest] is missing in eq
  • command [s3] with parameter [RESOURCE] is missing in eq
  • command [s3] with parameter [raw] is missing in eq
  • command [s3] with parameter [endpoint] is missing in eq
  • command [s3] with parameter [access_key] is missing in eq
  • command [s3] with parameter [secret_key] is missing in eq
  • command [s3] with parameter [region] is missing in eq
  • command [save] with parameter [path] is missing in eq
  • command [save] with parameter [append] is missing in eq
  • command [save] with parameter [raw] is missing in eq
  • command [selector] with parameter [inspect] is missing in eq
  • command [selector] with parameter [query] is missing in eq
  • command [selector] with parameter [as_html] is missing in eq
  • command [selector] with parameter [attribute] is missing in eq
  • command [selector] with parameter [as_table] is missing in eq
  • command [seq] with parameter [rest] is missing in eq
  • command [seq] with parameter [widths] is missing in eq
  • command [seq] with parameter [separator] is missing in eq
  • command [seq] with parameter [terminator] is missing in eq
  • command [seq date] with parameter [reverse] is missing in eq
  • command [seq date] with parameter [separator] is missing in eq
  • command [seq date] with parameter [output-format] is missing in eq
  • command [seq date] with parameter [input-format] is missing in eq
  • command [seq date] with parameter [begin-date] is missing in eq
  • command [seq date] with parameter [end-date] is missing in eq
  • command [seq date] with parameter [increment] is missing in eq
  • command [seq date] with parameter [days] is missing in eq
  • command [sort-by] with parameter [rest] is missing in eq
  • command [sort-by] with parameter [reverse] is missing in eq
  • command [sort-by] with parameter [insensitive] is missing in eq
  • command [split-by] with parameter [column_name] is missing in eq
  • command [start] with parameter [rest] is missing in eq
  • command [start] with parameter [application] is missing in eq
  • command [str] with parameter [rest] is missing in eq
  • command [table] with parameter [start_number] is missing in eq
  • command [term size] with parameter [tall] is missing in eq <-- tall renamed rows
  • command [term size] with parameter [wide] is missing in eq <-- wide renamed columns
  • command [to json] with parameter [pretty] is missing in eq <-- it is pretty by default now - non-pretty use json -r
  • command [tutor] with parameter [search] is missing in eq
  • command [tutor] with parameter [find] is missing in eq
  • command [unalias] with parameter [name] is missing in eq
  • command [update cells] with parameter [block] is missing in eq
  • command [update cells] with parameter [columns] is missing in eq
  • command [which] with parameter [application] is missing in eq
  • command [which] with parameter [rest] is missing in eq
  • command [which] with parameter [all] is missing in eq
  • command [xpath] with parameter [query] is missing in eq
  • command [zip] with parameter [block] is missing in eq

Porting WholeStreamCommand (nushell) to Command (engine-q)

All commands have the standard boilerplate methods including

  • name
  • usage
  • signature
  • run

Name and usage is fairly obvious

Signature

The signature can have required parameters, optional parameters, or no parameters. An example of a command with no parameters is the
command length.

  fn signature(&self) -> nu_protocol::Signature {
      Signature::build("length").category(Category::Filters)
 }

Please be sure and add in the Category of the command you are porting so that our documentation and filtering system picks it up

Commands with optional and required parts should work similarly between Nushell and Engine-q.

Run

Nushell:

fn run(&self, args: CommandArgs) -> Result<OutputStream, ShellError> { ... }

Engine-q:

    fn run(
        &self,
        engine_state: &EngineState,
        stack: &mut Stack,
        call: &Call,
        input: PipelineData,
    ) -> Result<nu_protocol::PipelineData, nu_protocol::ShellError> {

Run is where all of the action happens when porting over a command from nushell or writing a new command. You'll notice that Engine-q uses a much more expanded form of the arguments when compared to Nushell's more compact form. This allows for clear access to the components of running a command:

  • the state of the declarations known to the engines (EngineState)
  • the stack of values known at eval time (Stack)
  • the call to the command itself (including its flags and arguments)
  • the input to that command (the value being piped into it).

EngineState

The EngineState gives access to the global state of the engine, which currently is mostly the declarations that need to be known in order to run any code in the system.

Stack

The stack is a snapshot of the values that the current block can see. This Stack is narrowed using closure capture to only the variables the block can see.

Call

pub struct Call {
    /// identifier of the declaration to call
    pub decl_id: DeclId,
    pub head: Span,
    pub positional: Vec<Expression>,
    pub named: Vec<(String, Option<Expression>)>,
}

The call represents the call itself, including:

  • the unique identifier for what declaration this call will invoke (the decl_id)
  • the location of this call in the source code (the head)
  • the positional arguments (positional)
  • the named or flag arguments (named)

Rather than reaching into this structure directly, it's often better to access the contents of this call via the helper methods that can evaluate the unevaluated arguments for you:

// Example of getting a single required positional argument as a string with an associated span
let separator: Spanned<String> = call.req(context, 0)?;

The type of the variable allows call.req(...)? to invoke the right converter for you, failing with a type mismatch error if the caller has passed the wrong type at runtime. We use the same technique in Nushell, so this should port similarly with the change of having context as a new argument to the helper methods.

PipelineData

In Nushell, input and output were handled as streams. Commands often just applied themselves as calls onto these streams. The stream concept was helpful to get going, but also shows its limitations. For example, how do you represent a single value in the stream? What's the difference between a single item list and a single item? When should we take a list and flatten it into the stream? Ambiguities like this were fairly common in practice with implementing Nushell commands.

With Engine-q, we separate the various data types into specific cases. Single value outputs are now just a single value case of Value. Streams are handled separately from Value, and both form a PipelineData enum. This works for both input and output to commands.

To port from Nushell to Engine-q, for commands that call .map or .flat_map on the input stream, we've implemented helpers on Value that you can call with the same name. You can also call into_iter to get a full iterator. Additionalyl, you can also match on PipelineData yourself and handle the different cases.

Adding your commands

Add your newly ported commands to the crates/nu-command/src/default_context.rs file that is in the nu-command subcrate. There, you'll see a list of the commands that will be loaded in the default context. Adding your command here will make it visible when you start up Nu.

Tests and subcommands

If you add a new top-level command with subcommands, you'll need to add the top-level command to the group of default commands in the test context. You'll find this list in the crates/nu-command/src/example_test.rs file.

References

Core Engine-q data structures

From 12/13/2021 Discord

JT Note on Most important commands still needed to be ported

@luccasmmg
Copy link
Contributor

I can do all the math commands no problem

@stormasm
Copy link
Contributor Author

@luccasmmg sounds great ! thank you.... over time as you submit the PRs please reference this issue and then I will go ahead and mark it done ---- I will sign you up for the math commands now ---- so folks will know you are working on them...

@vitvakatu
Copy link

Hi, I want to try all of config commands

@kubouch kubouch added good first issue Good for newcomers help wanted Extra attention is needed labels Oct 28, 2021
@stormasm
Copy link
Contributor Author

@vitvakatu Thank you ! I signed you up for all of the config commands...

@onthebridgetonowhere
Copy link
Contributor

I'd love to work on all the date commands!

@sophiajt
Copy link
Contributor

@vitvakatu - engine-q config works a bit differently than Nushell, but you might be able to still port much of the functionality. Rather than using a toml file, engine-q uses a nushell script that runs in startup.

@onthebridgetonowhere - sounds good!

@onthebridgetonowhere
Copy link
Contributor

Could I have a go at first as well? Thanks!

@sophiajt
Copy link
Contributor

@onthebridgetonowhere - it's yours

@aslynatilla
Copy link

May I try and port echo and format?

@sophiajt
Copy link
Contributor

@aslynatilla - they're yours. echo should be simpler in e-q than it was in Nushell as each does all the iteration now. You should just be able to send on the PipelineData you get

@vitvakatu
Copy link

@jntrnr yep, I've noticed this after I decided to work on config :) I think I will be able to port it anyway. Thank you!

@onthebridgetonowhere
Copy link
Contributor

Could I also have into string from conversions? Thanks!

@LiHRaM
Copy link
Contributor

LiHRaM commented Nov 2, 2021

Hi, please sign me up for the path commands, if possible. :)

@sophiajt
Copy link
Contributor

sophiajt commented Nov 2, 2021

@onthebridgetonowhere - yup! it's yours

@LiHRaM - definitely. they're yours

@LiHRaM LiHRaM mentioned this issue Nov 2, 2021
10 tasks
@onthebridgetonowhere
Copy link
Contributor

Working on a few str cases:

  • camel-case
  • kebab-case
  • pascal-case
  • screaming-snake-case
  • snake-case

@luccasmmg
Copy link
Contributor

Can i be assigned the from yaml command?

@sophiajt
Copy link
Contributor

sophiajt commented Nov 5, 2021

@luccasmmg - yup, it's yours!

@onthebridgetonowhere
Copy link
Contributor

Worked on the str capitalize command #317

@onthebridgetonowhere
Copy link
Contributor

@jntrnr - I am planning to do all the str commands, but it will take me like a week or so (a bit every day). Unless, someone else wants to work on them and is faster :-)
We can also mark into string as done, you added the cell path support to it.

@sophiajt
Copy link
Contributor

sophiajt commented Nov 9, 2021

@onthebridgetonowhere - cool I'll mark those.

@stormasm
Copy link
Contributor Author

@matthewauld thank you for all of your effort... You are now signed up for compact and default... Enjoy !

@matthewauld
Copy link
Contributor

No problem! Really like nushell, figure this is a good way to learn the internals!

@onthebridgetonowhere
Copy link
Contributor

I'm working on porting fetch :-)

@sophiajt
Copy link
Contributor

@onthebridgetonowhere - nice! if you haven't looked yet, you should be able to use some of the logic from the new open command

@onthebridgetonowhere
Copy link
Contributor

@onthebridgetonowhere - nice! if you haven't looked yet, you should be able to use some of the logic from the new open command

Great suggestion, thanks JT.

@pantonshire
Copy link
Contributor

Could I have a go at the every command?

@fdncred
Copy link
Contributor

fdncred commented Dec 29, 2021

sure @pantonshire, have at it.

@fdncred
Copy link
Contributor

fdncred commented Dec 29, 2021

looking for seq, seq-date, and shells for some scripts. any takers?

@sophiajt
Copy link
Contributor

@fdncred - I'm signed up for shells since it needs some of the environment work. But folks should definitely feel free to take seq and seq-date

@ghost ghost mentioned this issue Jan 3, 2022
@kubouch
Copy link
Contributor

kubouch commented Jan 4, 2022

I can do reduce. I need it for my script haha 😀

@sophiajt
Copy link
Contributor

sophiajt commented Jan 4, 2022

@kubouch it's yours

@onthebridgetonowhere
Copy link
Contributor

I am thinking I'll give chart a try :-)

@sophiajt
Copy link
Contributor

sophiajt commented Jan 5, 2022

@onthebridgetonowhere - it's yours

@kubouch
Copy link
Contributor

kubouch commented Jan 5, 2022

I am thinking I'll give chart a try :-)

Currently, chart works like a histogram. I'd personally like to see it decoupled: you'll give it x,y data points and it will display them, nothing more. We have the histogram command in Nushell to compute histograms so if you want to display a histogram, you'd just pipe it to chart. Having a generic chart command for plotting any x,y data would make it more useful and versatile, IMO, and might be also easier to implement.

Maybe @andrasio might have some comments :-) .

@nibon7
Copy link
Contributor

nibon7 commented Jan 6, 2022

I'm trying to port seq.

@fdncred
Copy link
Contributor

fdncred commented Jan 6, 2022

thanks @nibon7 it's yours.

@onthebridgetonowhere
Copy link
Contributor

I am thinking I'll give chart a try :-)

Currently, chart works like a histogram. I'd personally like to see it decoupled: you'll give it x,y data points and it will display them, nothing more. We have the histogram command in Nushell to compute histograms so if you want to display a histogram, you'd just pipe it to chart. Having a generic chart command for plotting any x,y data would make it more useful and versatile, IMO, and might be also easier to implement.

Maybe @andrasio might have some comments :-) .

We can do that, sure! I will @ you once there's a PR with the changes.

@onthebridgetonowhere
Copy link
Contributor

I am unable to work on the chart command at the moment, so if anyone else wants to have a go at it, please go ahead!

@fdncred
Copy link
Contributor

fdncred commented Jan 21, 2022

I am unable to work on the chart command at the moment, so if anyone else wants to have a go at it, please go ahead!

Thanks @onthebridgetonowhere - i'll unmark you. we sure appreciate all your contributions!

@sophiajt
Copy link
Contributor

sophiajt commented Feb 4, 2022

Closing this in favour of: nushell/nushell#4356

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests