|
but can't you just ssh over and run compgen there using the command line you extracted from COMP_WORDS well whatever, grats EDIT: that came across super-snarky, it seems like a legit cool hack rjmccall fucked around with this message at 20:12 on Mar 17, 2018 |
# ? Mar 17, 2018 20:09 |
|
|
# ? May 17, 2024 04:02 |
|
rjmccall posted:but can't you just ssh over and run compgen there using the command line you extracted from COMP_WORDS like yeah but it also makes local files work too, i.e ./remotehack --input=localfile --output=localfile works it is more than just cli completion, it is about presenting a local command that looks and feels like a local command despite all of the work being done remotely.
|
# ? Mar 17, 2018 20:22 |
|
right, but isn't that just ordinary filename completion on the remote i'm kinda confused about how you're using "local" there, i assume you don't want to complete the remote command with filenames from the local machine
|
# ? Mar 17, 2018 20:29 |
|
rjmccall posted:i assume you don't want to complete the remote command with filenames from the local machine a) that's what it does b) it then copies file contents over/back as needed heh
|
# ? Mar 17, 2018 20:49 |
|
like the whole point is my machine$ command butt butt > farts works as it were a local command but what's really happening is that some machine in the cloud $ command --wait_for_connections my machine $ alias command="textfree86 10.0.0.2:1234 --' my machine $ command butt butt > farts like there's weird reasons you might want to do this the simplest one is wrapping some poo poo you're running over ssh but another is for clis like `heroku` or `docker` where a lot of what the command line does is talk to a daemon elsewhere instead of writing a daemon, writing an API, writing a schema, building client libraries, writing a CLI well, you write a CLI that runs locally and get one that runs remotely
|
# ? Mar 17, 2018 20:55 |
|
stretch goal: eventually make a screencast or at least an animated gif demoing the features I mean seriously though, even if you fix the readme I think it's still one of those things that are too naturally opaque to understand without a firsthand experience
|
# ? Mar 17, 2018 21:26 |
|
TimWinter posted:Writing your own version of something existent gives it unique flavor, a new take on an old standard. Like a carefully crafted loss edit.
|
# ? Mar 17, 2018 21:29 |
|
your gearbox looks sick
|
# ? Mar 17, 2018 21:47 |
|
tef posted:a) that's what it does oh what, so anything that looks like a path in the remote command and that exists locally gets copied over from the local machine and rewritten to be the remote path, and vice-versa after the command runs? that is uh a lot crazier than i thought you were talking about so if you run "ssh x y -- foo /tmp/bar /tmp/baz" and /tmp/bar exists locally but /tmp/bar doesn't then you copy /tmp/bar to remote:bar-tmp, run the remote command "foo bar-tmp baz-tmp", and copy remote:baz-tmp to /tmp/baz rjmccall fucked around with this message at 21:57 on Mar 17, 2018 |
# ? Mar 17, 2018 21:54 |
|
rjmccall posted:oh what, so anything that looks like a path in the remote command and that exists locally gets copied over from the local machine and rewritten to be the remote path, and vice-versa after the command runs? that is uh a lot crazier than i thought you were talking about that's one way of doing it but yeah, except foo is written in 'magic framework' so there isn't intermediary files, but yes i mean it's not much different from form uploads on a web site tbh
|
# ? Mar 17, 2018 22:38 |
|
TimWinter posted:Writing your own version of something existent gives it unique flavor, a new take on an old standard. Like a carefully crafted loss edit.
|
# ? Mar 18, 2018 00:45 |
|
mystes posted:Can I pretend I didn't google this and still think "loss edit" is just some sort of euphemism for a turd? a shameful admission
|
# ? Mar 18, 2018 01:29 |
|
mystes posted:Can I pretend I didn't google this and still think "loss edit" is just some sort of euphemism for a turd? i mean that's basically what it is
|
# ? Mar 18, 2018 05:18 |
|
i used to have tab completion that was git aware, like git br<TAB> knew it was 'branch' without a FS check or w/e. the really handy thing was knowing the local branches so i could hop around them tabbing instead of copy pasting but it wasn't so good that ive taken the time to set it up again v0v
|
# ? Mar 18, 2018 20:22 |
|
JawnV6 posted:i used to have tab completion that was git aware, like git br<TAB> knew it was 'branch' without a FS check or w/e. the really handy thing was knowing the local branches so i could hop around them tabbing instead of copy pasting it's a bit of a novelty feature to lure people into understanding what the actual problem it solves is the rough idea is that you have some web API and want a CLI client for it and that, well, instead of shipping one CLI tool per service, and being locked into an update cycle you ship one CLI tool, and the API describes the commands yes i wrote network transparent tab completion library to try and demonstrate the principles of a web browser + respresentational state transfer
|
# ? Mar 18, 2018 20:28 |
|
tef posted:yes i wrote network transparent tab completion library to try and demonstrate the principles of a web browser + respresentational state transfer this is actually cooler than the tool itself solve an ultra-specific problem to illustrate a general one. nice
|
# ? Mar 18, 2018 20:30 |
|
in UI/UX design, i've heard this kind of feature called "discoverability" the idea is that the user can browse what's available (in this case, remote/local path names), and by browsing will learn to use the system better. by allowing convenient exploration, the program allows the user to discover how to do what they want to do. sublime text lets you type potential commands into ctrl+shift+p and uses fuzzy matching to find maybe the command you were looking for. same fuzzy matching is used by sublime for finding files in the project spacemacs mode for emacs has nice popups of possible commands once you type the first part of the command. works for keybinds and function calls etc. a good rest api, imo, is one that is easy to query for a list of possible commands and object types. one that you can query and print this info live and dynamically. you get the same information as the api's reference documentation, but presenting it in a browsable way in the user's editor makes it easier to understand and learn.
|
# ? Mar 18, 2018 22:26 |
|
a good rest api is using xmlrpc or soap. it's "discoverable" like all other libraries are: my IDE can read the API documentation directly and provide hinting and lookups by definition any http api that isn't either xmlrpc or soap is bad.
|
# ? Mar 20, 2018 01:36 |
|
someone should come up with a JSON spec for REST services that can be located at their root URLs to provide machine readable descriptions of their schema for documentation and codegen use then the cycle truly will be complete
|
# ? Mar 20, 2018 02:21 |
|
eschaton posted:someone should come up with a JSON spec for REST services that can be located at their root URLs to provide machine readable descriptions of their schema for documentation and codegen use you mean swagger
|
# ? Mar 20, 2018 02:21 |
|
yeah swagger is WSDL but in json.
|
# ? Mar 20, 2018 02:22 |
|
I leafed through (one of?) the json schema spec(s) once "what if xml but shittier" was my takeaway
|
# ? Mar 20, 2018 03:11 |
|
i tried to do non trivial things with json schema once and it is god loving awful.
|
# ? Mar 20, 2018 03:12 |
|
pokeyman posted:I leafed through (one of?) the json schema spec(s) once json is xml but shittier so json schema would always be xml schema but shittier. it still beats no json schema
|
# ? Mar 20, 2018 04:19 |
|
Notorious b.s.d. posted:by definition any http api that isn't either xmlrpc or soap is bad. lmao
|
# ? Mar 20, 2018 04:33 |
|
i was hella pro-soap until i realised how many people handcraft their soap envelopes even in languages with excellent soap support (java, c#) at least with rest you know that everyone creates their own bespoke clients so you have no expectations about reliable interop
|
# ? Mar 20, 2018 05:17 |
|
my main experience with soap (wcf) was generating the api client in the same solution as the api server, generating a bunch of identical model classes and service interfaces instead of keeping those classes in a common project or something.
|
# ? Mar 20, 2018 05:40 |
|
redleader posted:i was hella pro-soap until i realised how many people handcraft their soap envelopes even in languages with excellent soap support (java, c#) I've once had to do that when a regional health care service had a broken wsdl that visual studio refused to chew for some reason fortunately it was just a couple of calls so it wasn't too bad. and i got a chance to combine both of visual basic's best-kept secrets, xml literals and iterator lambdas
|
# ? Mar 20, 2018 08:40 |
|
xml literals is this the scale thread?
|
# ? Mar 20, 2018 08:41 |
|
Shaggar posted:json is xml but shittier so json schema would always be xml schema but shittier. it still beats no json schema I’ll have to take your word for it, it looked pretty garbage
|
# ? Mar 20, 2018 12:17 |
|
json schema may be worse than no jsob schema
|
# ? Mar 20, 2018 12:40 |
|
at redhat we built a mongo api layer that tried to enforce a schema over mongo collections by using json schema
|
# ? Mar 20, 2018 12:41 |
|
that sounds amazingly awful!
|
# ? Mar 20, 2018 12:47 |
|
then we migrated all of our enterprise oracle database data onto it.
|
# ? Mar 20, 2018 13:05 |
|
what always amazes me is that there is, for better or worse, a lot of discussion about things like swagger, raml, etc to provide decent tooling for rest apis. none of these things have an inkling about asynchronous communication at all. want to use message queues to reliably communicate with other (micro)services? better not want anything documented!
|
# ? Mar 20, 2018 13:20 |
MALE SHOEGAZE posted:then we migrated all of our enterprise oracle database data onto it. why ;_;
|
|
# ? Mar 20, 2018 13:21 |
Sagacity posted:what always amazes me is that there is, for better or worse, a lot of discussion about things like swagger, raml, etc to provide decent tooling for rest apis. *bursts in through the wall* my man have you heard of graphql
|
|
# ? Mar 20, 2018 13:21 |
|
cinci zoo sniper posted:why ;_; to save money I guess
|
# ? Mar 20, 2018 13:28 |
|
Sagacity posted:want to use message queues to reliably communicate with other (micro)services? better not want anything documented! message queues will not improve reliability of communication with other services, just make failures more obscure
|
# ? Mar 20, 2018 13:36 |
|
|
# ? May 17, 2024 04:02 |
Symbolic Butt posted:to save money I guess but why mongo, not postgres or some poo poo
|
|
# ? Mar 20, 2018 14:04 |