Git Product home page Git Product logo

gosh's People

Contributors

chuenlye avatar coolbrg avatar mkouhei avatar papriwalprateek avatar seanknox avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gosh's Issues

for statement does not support InitStmt, PostStmt in omitted main func.

Gosh suports as follows currently.

>>> func main() {
>>> for i := 0; i< 10; i++ {
>>> fmt.Println(i)
>>> }
>>> }
0
1
2
3
4
5
6
7
8
9

But omit mode does not support this.

>>> for i := 0; i< 10; i++ {    
[error] /tmp/gosh-598639397/gosh_tmp.go:4:1: expected operand, found '}'
[error] # command-line-arguments
./gosh_tmp.go:4: syntax error: unexpected }, expecting semicolon or newline
>>> fmt.Println(i)
[error] /tmp/gosh-598639397/gosh_tmp.go:5:1: expected operand, found '}'
[error] # command-line-arguments
./gosh_tmp.go:5: syntax error: unexpected }, expecting {
>>> }
$ cat /tmp/gosh-598639397/gosh_tmp.go 
package main
func main() {
for i := 0
fmt.Println(i)
}

Commands history

Want to support commands history as like iPython's %hist command.

Input unnecessary "Enter"

To appear the prompt, we have to enter the "Enter" again, to appear the prompt.

$ $GOPATH/bin/gosh
>>> i := 10

>>> i += 100

>>> fmt.Println(i)
111

>>>

Can't navigate using arrow keys

When typing something, and you continue typing, then realise you want to change something, you can't press the left arrow key to go back and edit it. Instead, you have to copy paste up until the bit you want to fix, then fix, and copy paste the rest

Change the parser implementation in LIFO

Currently, implementing the parser FIFO, in this method,
it is difficult to solve the problem of issue #12.
The copying to the general implementation of AST , changing the FILO manner .

Not clear with func main() {}

>>> func test() {
>>> fmt.Println(1)
>>> }
>>> test()
1
>>> func main() {
>>> test()
>>> }
1
>>> test()
1
1
>>> func main() {}
1
1

Embeddable gosh

I have a situation where I want to skip RPC server connection overhead in an edit-compile-run cycle by doing it once and interactively use an API for experimentation. I also want user-configurable hooks that can convert from arbitrary strings to the type that a particular interface requires dynamically

....giving this problem, having a command-line shell after I've initialized a couple object would be quite useful.

At the moment, I think one problem preventing embedding gosh is that it doesn't expose any of the top-level functions that I could import and use into my own main. Is that correct?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.