Instantly share code, notes, and snippets.

@maxogden /a.txt
Last active Aug 29, 2015

Embed
What would you like to do?
pipeline conversion example
import-data
run bionode-ncbi search genome eukaryota
then dat import --json --primary=uid
{
"import-data": [['run bionode-ncbi search genome eukaryota'], ['then dat import --json --primary=uid']]
}
{
"import-data": [
"bionode-ncbi search genome eukaryota",
"dat import --json --primary=uid"
]
}
@melaniecebula

This comment has been minimized.

Show comment
Hide comment
@melaniecebula

melaniecebula Dec 29, 2014

So is a.txt a hackfile and b.txt the parsed hackfile? (using https://github.com/mafintosh/hackfile) And then c.txt is basically reformatting b.txt to be json format? Would we want c.txt to be massaged to be input to gasket or be input to something similar to gasket which hasn't been made yet?

melaniecebula commented Dec 29, 2014

So is a.txt a hackfile and b.txt the parsed hackfile? (using https://github.com/mafintosh/hackfile) And then c.txt is basically reformatting b.txt to be json format? Would we want c.txt to be massaged to be input to gasket or be input to something similar to gasket which hasn't been made yet?

@maxogden

This comment has been minimized.

Show comment
Hide comment
@maxogden

maxogden Dec 29, 2014

So is a.txt a hackfile and b.txt the parsed hackfile? - yes

And then c.txt is basically reformatting b.txt to be json format? - yes

Would we want c.txt to be massaged to be input to gasket - yes

or be input to something similar to gasket which hasn't been made yet? - no I think we should use gasket

the hard part I think is going to be turning the verbs in b into gasket compatible JSON, e.g. making gasket support all the different things e.g. datproject/gasket#7

Owner

maxogden commented Dec 29, 2014

So is a.txt a hackfile and b.txt the parsed hackfile? - yes

And then c.txt is basically reformatting b.txt to be json format? - yes

Would we want c.txt to be massaged to be input to gasket - yes

or be input to something similar to gasket which hasn't been made yet? - no I think we should use gasket

the hard part I think is going to be turning the verbs in b into gasket compatible JSON, e.g. making gasket support all the different things e.g. datproject/gasket#7

@melaniecebula

This comment has been minimized.

Show comment
Hide comment
@melaniecebula

melaniecebula Dec 29, 2014

Okay, so currently if you want serial behavior in gasket you must put null commands between actual commands?

So with the current status of things, something like this:

import-data
        run foo
        run baz
        then dat import bar
        run foo2
        run foo3

would be massaged from b.txt to be something like this (if we wanted to run it in gasket)?

"gasket": {
    "main": [
        "gasket run foo",
        "gasket run baz",
        "null",  #convert "then" to a prepended null if not the first command in sequence?
        "dat import bar",
        "gasket run foo2",
        "gasket run foo3"
    ],
...

But this is not ideal, the more serial commands you want to have? (Since we'd be inserting a bunch of null commands, which is annoying)
In the issue, datproject/gasket#7, the problem I see with approach #1 is how would we mix both serial commands and parallel commands? (or is that not something we should attempt? If it's not, I don't see a problem with creating a javascript object with a boolean serial field in gasket instead of the array type)

melaniecebula commented Dec 29, 2014

Okay, so currently if you want serial behavior in gasket you must put null commands between actual commands?

So with the current status of things, something like this:

import-data
        run foo
        run baz
        then dat import bar
        run foo2
        run foo3

would be massaged from b.txt to be something like this (if we wanted to run it in gasket)?

"gasket": {
    "main": [
        "gasket run foo",
        "gasket run baz",
        "null",  #convert "then" to a prepended null if not the first command in sequence?
        "dat import bar",
        "gasket run foo2",
        "gasket run foo3"
    ],
...

But this is not ideal, the more serial commands you want to have? (Since we'd be inserting a bunch of null commands, which is annoying)
In the issue, datproject/gasket#7, the problem I see with approach #1 is how would we mix both serial commands and parallel commands? (or is that not something we should attempt? If it's not, I don't see a problem with creating a javascript object with a boolean serial field in gasket instead of the array type)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment