FAQ
Hi, list

I wrote virtual machine that works like golang.

https://github.com/mattn/anko

---
$ cat foo.ank
func foo(x...) {
   return x[0] + x[1] + 1
}

println(foo(1, 2))
---

This is similar to JavaScript or golang or etc. This don't have static type
assertion.
And anko doesn't support goroutine yet. And not support defer/recover
idioms. But support try/catch/finally to handle exception. Mostly anko
works like charm script language. :)

---
a = http.NewClient().Get("http://www.google.com").StatusCode
println(a)
---

I'll add more packages into this, but it make anko plum-up. :(
Currently anko support http module.

---
http.HandleFunc("/", func(w, r) {
   w.Write(bytes("hello world"))
})
http.ListenAndServe(":8080", nil)
---

This works fine on my environment.
Have fun!

Thanks.

- Yasuhiro Matsumoto

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • ChrisLu at Apr 1, 2014 at 7:02 pm
    Great job! I hope it can call Go functions later.

    Chris

    On Monday, March 31, 2014 11:55:23 PM UTC-7, mattn wrote:

    Hi, list

    I wrote virtual machine that works like golang.

    https://github.com/mattn/anko

    ---
    $ cat foo.ank
    func foo(x...) {
    return x[0] + x[1] + 1
    }

    println(foo(1, 2))
    ---

    This is similar to JavaScript or golang or etc. This don't have static
    type assertion.
    And anko doesn't support goroutine yet. And not support defer/recover
    idioms. But support try/catch/finally to handle exception. Mostly anko
    works like charm script language. :)

    ---
    a = http.NewClient().Get("http://www.google.com").StatusCode
    println(a)
    ---

    I'll add more packages into this, but it make anko plum-up. :(
    Currently anko support http module.

    ---
    http.HandleFunc("/", func(w, r) {
    w.Write(bytes("hello world"))
    })
    http.ListenAndServe(":8080", nil)
    ---

    This works fine on my environment.
    Have fun!

    Thanks.

    - Yasuhiro Matsumoto
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • ChrisLu at Apr 1, 2014 at 11:07 pm
    Correct myself: I read more about it. anko can already register and execute
    go functions, although it is fairly verbose to do so.

    Chris
    On Tuesday, April 1, 2014 12:02:48 PM UTC-7, ChrisLu wrote:

    Great job! I hope it can call Go functions later.

    Chris

    On Monday, March 31, 2014 11:55:23 PM UTC-7, mattn wrote:

    Hi, list

    I wrote virtual machine that works like golang.

    https://github.com/mattn/anko

    ---
    $ cat foo.ank
    func foo(x...) {
    return x[0] + x[1] + 1
    }

    println(foo(1, 2))
    ---

    This is similar to JavaScript or golang or etc. This don't have static
    type assertion.
    And anko doesn't support goroutine yet. And not support defer/recover
    idioms. But support try/catch/finally to handle exception. Mostly anko
    works like charm script language. :)

    ---
    a = http.NewClient().Get("http://www.google.com").StatusCode
    println(a)
    ---

    I'll add more packages into this, but it make anko plum-up. :(
    Currently anko support http module.

    ---
    http.HandleFunc("/", func(w, r) {
    w.Write(bytes("hello world"))
    })
    http.ListenAndServe(":8080", nil)
    ---

    This works fine on my environment.
    Have fun!

    Thanks.

    - Yasuhiro Matsumoto
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Mattn at Apr 3, 2014 at 2:25 am
    Correct myself: I read more about it. anko can already register and
    execute go functions, although it is fairly verbose to do so

    Yes.

    https://github.com/mattn/anko/blob/master/_example/http.ank

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Mattn at Apr 9, 2014 at 9:14 am
    I made a playground for anko. This is based on go's playground.

    http://play-anko.appspot.com/

    Have fun :)
    - Yasuhiro Matsumoto

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
  • Chris Lu at Apr 9, 2014 at 5:39 pm
    This is nice! Keep it up!

    Chris

    On Wed, Apr 9, 2014 at 2:14 AM, mattn wrote:

    I made a playground for anko. This is based on go's playground.

    http://play-anko.appspot.com/

    Have fun :)
    - Yasuhiro Matsumoto

    --
    You received this message because you are subscribed to a topic in the
    Google Groups "golang-nuts" group.
    To unsubscribe from this topic, visit
    https://groups.google.com/d/topic/golang-nuts/vzXO2kALM3E/unsubscribe.
    To unsubscribe from this group and all its topics, send an email to
    golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedApr 1, '14 at 6:55a
activeApr 9, '14 at 5:39p
posts6
users2
websitegolang.org

2 users in discussion

Chris Lu: 3 posts Mattn: 3 posts

People

Translate

site design / logo © 2021 Grokbase