Live data from Hacker News

Betty – English-like interface for the command line

github.com

61–70 of 84 posts

Re: Betty – English-like interface for the command line

#61
post #43

Other than being fun; I can't quite see the benefit of making my shell more verbose. I'm sure I am not the only one who can get by with the regular commands through mnemonics. And to further my point; if this was such a good idea, then why has nobody aliased 'ls' to list , 'cp' to copy , (etc.)? Or, while we're at it, 'list files' , or 'list files in current directory' . Maybe someone has and I just didn't meet them…

It becomes interesting when you can tell Betty to do things you don't otherwise know how to do. (How do you tell iTunes to skip this song from the cmd line? I don't know, and I'm too lazy to look it up.)

Do you mean skip it once, or skip it forever?

The first is really an "advance to next track" command.

The latter is a "mark current song as Never Play and advance to next track".

I'd be surprised if there was any kind of interface with iTunes that doesn't have at least one of those capabilities.

Re: Betty – English-like interface for the command line

#62
post #17
post #14

I wonder if the author of Betty has taken a look at one of the existing Inform ( http://inform7.com ) interpreter variants used for Interactive Fiction games (what we used to call "text adventures"). They have progressed a lot since the old text adventures of yore, and are now capable of parsing pretty complex English sentences (instead of just "take sword", you can write "examine sword, then take it and give it to t…

No, I wasn't aware of that, but that is interesting. Betty just grew out of my cheat sheet of commands. I was tired of repeatedly looking up things in my cheat sheet or Google, and decided to make this. The current project has a limited number of commands, but I am hoping that by making it public, others will issue pull requests with things they'd want to use. Its current state is command line only, which is for powe…

The very smart people at Wit.AI[1] are building a backend for this sort of thing. You could do worse than hook into that in the short term.

https://wit.ai/

Re: Betty – English-like interface for the command line

#63
post #23

Earlier quoted context omitted.

For now. The idea seems to make it English-like so that could simply be a matter of time.

the jump from simple regexes to "English-like" is quite the leap.

Sure, I'd say people should look at this like a MVP. If there's value there I'm sure someone will find a better way to reach that English-like goal.

Re: Betty – English-like interface for the command line

#64
post #18
post #17

Earlier quoted context omitted.

No, I wasn't aware of that, but that is interesting. Betty just grew out of my cheat sheet of commands. I was tired of repeatedly looking up things in my cheat sheet or Google, and decided to make this. The current project has a limited number of commands, but I am hoping that by making it public, others will issue pull requests with things they'd want to use. Its current state is command line only, which is for powe…

That would be cool indeed and I hope my comment didn't sound too negative. And you should definitely take a look at Inform (and similar), it's amazing what they can do. I think some interpreters are open source (edit: it seems it's not, I remembered incorrectly).

Here is another modern interactive fiction system of which I'm the creator and maintainer. It is fully opensource (BSD license): http://code.google.com/p/aetheria/

It can also parse sentences like the one with the sword and the wizard shown above. It's really not very difficult to achieve those things, as imperative sentences have pretty uniform characteristics that make the problem of parsing imperatives much easier than general parsing. As said in another comment, the bulk of the complexity of these systems is in the world model, not in the parsing.

A drawback is that, although the system works for several languages including English, the documentation for game developers/IF writers is only in Spanish at the moment. Collaboration for translating it to English would be very welcome.

Re: Betty – English-like interface for the command line

#65
post #41

Every natural language interface eventually will be required to generate a new program. For example, if you say my parser supports query like "count number of words in file X", someone would want to issue a queries like "count number of words starting with character a and at most length 3 in file X" and so on. Natural language interfaces eventually fall on its face not because parsing is really hard but rather becaus…

It is indeed a hard problem, but there is some research going on in this area http://people.csail.mit.edu/nkushman/papers/naacl2013.pdf

and the application is definitely worth it, because it lowers the barrier for doing "complicated" stuff for people that are not very computer-savvy

Re: Betty – English-like interface for the command line

#67
post #57
post #43

Other than being fun; I can't quite see the benefit of making my shell more verbose. I'm sure I am not the only one who can get by with the regular commands through mnemonics. And to further my point; if this was such a good idea, then why has nobody aliased 'ls' to list , 'cp' to copy , (etc.)? Or, while we're at it, 'list files' , or 'list files in current directory' . Maybe someone has and I just didn't meet them…

The whole point of this is when you don't remember the command which you are trying to achieve . (See the author's comment[1]: "Betty just grew out of my cheat sheet of commands. I was tired of repeatedly looking up things in my cheat sheet or Google, and decided to make this.") It's faster than a google search. [1] https://news.ycombinator.com/item?id=7696453

I'd say the time spent looking it up (and maybe creating an alias/script) is less than typing it verbosely each time.

I don't see 'betty whats my ip address' as a valid alternative to 'ip addr list'. And in case of 'betty next song' vs. osascript -e 'tell application "iTunes" to skip to next track' I'd just alias the latter to something short & memorable (though I just wrote it from memory).

Re: Betty – English-like interface for the command line

#68
post #14

I wonder if the author of Betty has taken a look at one of the existing Inform ( http://inform7.com ) interpreter variants used for Interactive Fiction games (what we used to call "text adventures"). They have progressed a lot since the old text adventures of yore, and are now capable of parsing pretty complex English sentences (instead of just "take sword", you can write "examine sword, then take it and give it to t…

What about for the blind?

Re: Betty – English-like interface for the command line

#69
This seems like a recipe for disaster.

When you're at a command prompt you should always know exactly what the command you're inputting is going to do. Since Betty necessarily obfuscates your command this seems like a good way for unintended consequences.

The obvious solution to that is make it so Betty never does anything that actually matters. So then the question is; why bother with Betty at all?

Re: Betty – English-like interface for the command line

#70
post #13

Earlier quoted context omitted.

I knew my reply will be heavily hammered by rubyists. There is nothing wrong in the language but I think that shell tools should be written in C or in some other low level language without complex dependencies over ruby or java or python etc. or any other non-default installation stuff

I'm afraid that ship has sailed a long time ago: $ for bin in /bin/* /usr/bin/* /usr/local/bin/*; do > if [[ -f $bin && "$(cat $bin | head -c 2)" == "#!" ]];then > echo $bin > fi > done | wc -l 544 I imagine most of these are written in Perl (though there's surely a fair amount of Python and shell scripting in there, too), but that's still a high-level language with a complex runtime and dependencies compared to C. T…

I was curious about what the spread would be, so for one data point:

    $ file -b /bin/* /usr/bin/* /usr/local/bin/* | cut -f1 -d, | sort | uniq -c | sort -rn | head -n 10
       1028 ELF 64-bit LSB executable
        388 POSIX shell script
        265 Perl script
        130 ELF 64-bit LSB shared object
        126 Python script
         46 Ruby script
         38 Bourne-Again shell script
         24 symbolic link to `mtools'
         18 setuid ELF 64-bit LSB executable
         16 setgid ELF 64-bit LSB executable
After the top 10, most were symbolic links. So, seems shell scripts are by far the most common, with perl and python scripts not too far behind, and ruby making a decent appearance.
Post reply on HN