github.com/yunabe/lgo@v0.0.0-20190709125917-42c42d410fdf/examples/basics.ipynb (about)

     1  {
     2   "cells": [
     3    {
     4     "cell_type": "markdown",
     5     "metadata": {},
     6     "source": [
     7      "# Welcome to lgo\n",
     8      "This notebook demostrates the basic usage of lgo. You can use all Go (golang) language features with lgo.\n",
     9      "\n",
    10      "## More examples\n",
    11      "After you learn this notebook, see these notebooks to understand advanced topics.\n",
    12      "\n",
    13      "- [interrupt.ipynb](interrupt.ipynb)\n",
    14      " - This demostrates you can interrupt execution with lgo.\n",
    15      "- [game_of_life.ipynb](game_of_life.ipynb)\n",
    16      " - More practical and advanced example with [Conway's Game of Life](https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life)\n",
    17      "- [bugs.ipynb](bugs.ipynb)\n",
    18      " - A notebook to demostrate fixed/open known issues.\n",
    19      "- [many_cells.ipynb](many_cells.ipynb), [make_many_cells.ipynb](make_many_cells.ipynb)\n",
    20      " - These notebooks demostrate lgo can handle thousands of code snippets.\n",
    21      "- [gonum.ipynb](gonum.ipynb)\n",
    22      "  - [gonum](https://github.com/gonum) examples in lgo\n",
    23      "- [plot_libraries.ipynb](plot_libraries.ipynb)\n",
    24      "  - Demos of plot libraries in lgo"
    25     ]
    26    },
    27    {
    28     "cell_type": "markdown",
    29     "metadata": {},
    30     "source": [
    31      "# Environments\n",
    32      "Displays the environment where this notebook is executed."
    33     ]
    34    },
    35    {
    36     "cell_type": "code",
    37     "execution_count": null,
    38     "metadata": {},
    39     "outputs": [
    40      {
    41       "name": "stdout",
    42       "output_type": "stream",
    43       "text": [
    44        "Go: go1.9.2 (linux_amd64)\n",
    45        "User: gopher\n",
    46        "Working dir: /examples\n",
    47        "NumCPU: 2\n"
    48       ]
    49      }
    50     ],
    51     "source": [
    52      "import (\n",
    53      "    \"fmt\"\n",
    54      "    \"os\"\n",
    55      "    \"os/user\"\n",
    56      "    \"runtime\"\n",
    57      ")\n",
    58      "\n",
    59      "{\n",
    60      "    user, _ := user.Current()\n",
    61      "    fmt.Printf(\"Go: %s (%s_%s)\\n\", runtime.Version(), runtime.GOOS, runtime.GOARCH)\n",
    62      "    fmt.Printf(\"User: %s\\n\", user.Username)\n",
    63      "    wd, _ := os.Getwd()\n",
    64      "    fmt.Printf(\"Working dir: %s\\n\", wd)\n",
    65      "    fmt.Printf(\"NumCPU: %d\\n\", runtime.NumCPU())\n",
    66      "}"
    67     ]
    68    },
    69    {
    70     "cell_type": "markdown",
    71     "metadata": {},
    72     "source": [
    73      "# Simple functions"
    74     ]
    75    },
    76    {
    77     "cell_type": "code",
    78     "execution_count": null,
    79     "metadata": {},
    80     "outputs": [],
    81     "source": [
    82      "// naiveFib calculates the n-th fibonacci number\n",
    83      "func naiveFib(n int) int {\n",
    84      "    if n > 1 {\n",
    85      "        return naiveFib(n - 1) + naiveFib(n - 2)\n",
    86      "    }\n",
    87      "    return 1\n",
    88      "}"
    89     ]
    90    },
    91    {
    92     "cell_type": "code",
    93     "execution_count": null,
    94     "metadata": {},
    95     "outputs": [
    96      {
    97       "name": "stdout",
    98       "output_type": "stream",
    99       "text": [
   100        "10946\n"
   101       ]
   102      }
   103     ],
   104     "source": [
   105      "naiveFib(20)"
   106     ]
   107    },
   108    {
   109     "cell_type": "markdown",
   110     "metadata": {},
   111     "source": [
   112      "# if, for, etc.."
   113     ]
   114    },
   115    {
   116     "cell_type": "code",
   117     "execution_count": null,
   118     "metadata": {},
   119     "outputs": [
   120      {
   121       "name": "stdout",
   122       "output_type": "stream",
   123       "text": [
   124        "n is positive: 10\n"
   125       ]
   126      }
   127     ],
   128     "source": [
   129      "import \"fmt\"\n",
   130      "\n",
   131      "n := 10\n",
   132      "\n",
   133      "if n > 0 {\n",
   134      "    fmt.Println(\"n is positive:\", n)\n",
   135      "} else {\n",
   136      "    fmt.Println(\"n is not positive:\", n)\n",
   137      "}"
   138     ]
   139    },
   140    {
   141     "cell_type": "code",
   142     "execution_count": null,
   143     "metadata": {},
   144     "outputs": [
   145      {
   146       "name": "stdout",
   147       "output_type": "stream",
   148       "text": [
   149        "55\n"
   150       ]
   151      }
   152     ],
   153     "source": [
   154      "sum := 0\n",
   155      "for i := 1; i <= n; i++ {\n",
   156      "    sum += i\n",
   157      "}\n",
   158      "sum"
   159     ]
   160    },
   161    {
   162     "cell_type": "code",
   163     "execution_count": null,
   164     "metadata": {},
   165     "outputs": [
   166      {
   167       "name": "stdout",
   168       "output_type": "stream",
   169       "text": [
   170        "OK\n"
   171       ]
   172      }
   173     ],
   174     "source": [
   175      "switch sum {\n",
   176      "case 55:\n",
   177      "    fmt.Println(\"OK\")\n",
   178      "default:\n",
   179      "    fmt.Println(\"Fail\")\n",
   180      "}"
   181     ]
   182    },
   183    {
   184     "cell_type": "markdown",
   185     "metadata": {},
   186     "source": [
   187      "# Use standard libraries"
   188     ]
   189    },
   190    {
   191     "cell_type": "code",
   192     "execution_count": null,
   193     "metadata": {},
   194     "outputs": [],
   195     "source": [
   196      "import (\n",
   197      "    \"fmt\"\n",
   198      "    \"math\"\n",
   199      ")"
   200     ]
   201    },
   202    {
   203     "cell_type": "code",
   204     "execution_count": null,
   205     "metadata": {},
   206     "outputs": [
   207      {
   208       "name": "stdout",
   209       "output_type": "stream",
   210       "text": [
   211        "sin(pi/3) == 0.866025\n",
   212        "cos(pi/3) == 0.500000\n",
   213        "sqrt(3)/2 == 0.866025\n",
   214        "log(e^2) == 2.000000\n",
   215        "21\n",
   216        "<nil>\n"
   217       ]
   218      }
   219     ],
   220     "source": [
   221      "fmt.Printf(\"sin(pi/3) == %f\\n\", math.Sin(math.Pi/3))\n",
   222      "fmt.Printf(\"cos(pi/3) == %f\\n\", math.Cos(math.Pi/3))\n",
   223      "fmt.Printf(\"sqrt(3)/2 == %f\\n\", math.Sqrt(3)/2)\n",
   224      "fmt.Printf(\"log(e^2) == %f\\n\", math.Log(math.E * math.E))"
   225     ]
   226    },
   227    {
   228     "cell_type": "markdown",
   229     "metadata": {},
   230     "source": [
   231      "# Non-deterministic code"
   232     ]
   233    },
   234    {
   235     "cell_type": "code",
   236     "execution_count": null,
   237     "metadata": {},
   238     "outputs": [],
   239     "source": [
   240      "import (\n",
   241      "    \"math/rand\"\n",
   242      "    \"time\"\n",
   243      ")"
   244     ]
   245    },
   246    {
   247     "cell_type": "code",
   248     "execution_count": null,
   249     "metadata": {},
   250     "outputs": [
   251      {
   252       "name": "stdout",
   253       "output_type": "stream",
   254       "text": [
   255        "636250466556259171\n"
   256       ]
   257      }
   258     ],
   259     "source": [
   260      "rand.Seed(time.Now().UnixNano())\n",
   261      "r := rand.Int()\n",
   262      "r"
   263     ]
   264    },
   265    {
   266     "cell_type": "code",
   267     "execution_count": null,
   268     "metadata": {},
   269     "outputs": [
   270      {
   271       "name": "stdout",
   272       "output_type": "stream",
   273       "text": [
   274        "9171\n"
   275       ]
   276      }
   277     ],
   278     "source": [
   279      "r % 10000"
   280     ]
   281    },
   282    {
   283     "cell_type": "code",
   284     "execution_count": null,
   285     "metadata": {},
   286     "outputs": [
   287      {
   288       "name": "stdout",
   289       "output_type": "stream",
   290       "text": [
   291        "2017-10-16 13:17:47.637999781 +0000 UTC m=+6.138424087\n"
   292       ]
   293      }
   294     ],
   295     "source": [
   296      "start := time.Now()\n",
   297      "start"
   298     ]
   299    },
   300    {
   301     "cell_type": "code",
   302     "execution_count": null,
   303     "metadata": {},
   304     "outputs": [
   305      {
   306       "name": "stdout",
   307       "output_type": "stream",
   308       "text": [
   309        "2017-10-16 13:17:48.311503905 +0000 UTC m=+6.811928266\n"
   310       ]
   311      }
   312     ],
   313     "source": [
   314      "end := time.Now()\n",
   315      "end"
   316     ]
   317    },
   318    {
   319     "cell_type": "code",
   320     "execution_count": null,
   321     "metadata": {},
   322     "outputs": [
   323      {
   324       "name": "stdout",
   325       "output_type": "stream",
   326       "text": [
   327        "end - start = 673.504179ms26\n",
   328        "<nil>\n"
   329       ]
   330      }
   331     ],
   332     "source": [
   333      "fmt.Printf(\"end - start = %v\", end.Sub(start))"
   334     ]
   335    },
   336    {
   337     "cell_type": "markdown",
   338     "metadata": {},
   339     "source": [
   340      "# struct and interface"
   341     ]
   342    },
   343    {
   344     "cell_type": "code",
   345     "execution_count": null,
   346     "metadata": {},
   347     "outputs": [],
   348     "source": [
   349      "type person struct {\n",
   350      "    name string\n",
   351      "    age int\n",
   352      "}\n",
   353      "\n",
   354      "func (p *person) Hello() string {\n",
   355      "    return fmt.Sprintf(\"Hello! Name: %s, Age: %d\", p.name, p.age)\n",
   356      "}"
   357     ]
   358    },
   359    {
   360     "cell_type": "code",
   361     "execution_count": null,
   362     "metadata": {},
   363     "outputs": [
   364      {
   365       "name": "stdout",
   366       "output_type": "stream",
   367       "text": [
   368        "p.name = \"Alice\"\n",
   369        "p.Hello() == \"Hello! Name: Alice, Age: 12\"\n",
   370        "43\n",
   371        "<nil>\n"
   372       ]
   373      }
   374     ],
   375     "source": [
   376      "p := person{\"Alice\", 12}\n",
   377      "fmt.Printf(\"p.name = %q\\n\", p.name)\n",
   378      "fmt.Printf(\"p.Hello() == %q\\n\", p.Hello())"
   379     ]
   380    },
   381    {
   382     "cell_type": "code",
   383     "execution_count": null,
   384     "metadata": {},
   385     "outputs": [
   386      {
   387       "name": "stdout",
   388       "output_type": "stream",
   389       "text": [
   390        "h is *person\n",
   391        "h.Hello() == \"Hello! Name: Alice, Age: 12\"\n"
   392       ]
   393      }
   394     ],
   395     "source": [
   396      "type hello interface {\n",
   397      "    Hello() string\n",
   398      "}\n",
   399      "\n",
   400      "func printHello(h hello) {\n",
   401      "    if _, ok := h.(*person); ok {\n",
   402      "        fmt.Println(\"h is *person\")\n",
   403      "    }\n",
   404      "    fmt.Printf(\"h.Hello() == %q\\n\", h.Hello())\n",
   405      "}\n",
   406      "\n",
   407      "p := person{\"Alice\", 12}\n",
   408      "printHello(&p)"
   409     ]
   410    },
   411    {
   412     "cell_type": "markdown",
   413     "metadata": {},
   414     "source": [
   415      "# Go libraries and interfaces\n",
   416      "Of course, you can interacts with Go libraries using interfaces"
   417     ]
   418    },
   419    {
   420     "cell_type": "code",
   421     "execution_count": null,
   422     "metadata": {},
   423     "outputs": [
   424      {
   425       "name": "stdout",
   426       "output_type": "stream",
   427       "text": [
   428        "Read 'H'\n",
   429        "Read 'e'\n",
   430        "Read 'l'\n",
   431        "Read 'l'\n",
   432        "Read 'o'\n",
   433        "Read '!'\n",
   434        "buf == \"Hello!\"\n"
   435       ]
   436      }
   437     ],
   438     "source": [
   439      "// You can pass a type defined in lgo as an interface defined in Go.\n",
   440      "\n",
   441      "import (\n",
   442      "    \"bytes\"\n",
   443      "    \"fmt\"\n",
   444      "    \"io\"\n",
   445      ")\n",
   446      "\n",
   447      "type myReader struct {\n",
   448      "    content string\n",
   449      "    idx int\n",
   450      "}\n",
   451      "\n",
   452      "func (r *myReader) Read(p []byte) (n int, err error) {\n",
   453      "    if len(p) == 0 {\n",
   454      "        return 0, nil\n",
   455      "    }\n",
   456      "    if r.idx >= len(r.content) {\n",
   457      "        return 0, io.EOF\n",
   458      "    }\n",
   459      "    p[0] = r.content[r.idx]\n",
   460      "    fmt.Printf(\"Read %q\\n\", r.content[r.idx])\n",
   461      "    r.idx++\n",
   462      "    return 1, nil\n",
   463      "}\n",
   464      "\n",
   465      "{\n",
   466      "    r := myReader{content: \"Hello!\"}\n",
   467      "    var buf bytes.Buffer\n",
   468      "    io.Copy(&buf, &r)\n",
   469      "    fmt.Printf(\"buf == %q\\n\", buf.String())\n",
   470      "}"
   471     ]
   472    },
   473    {
   474     "cell_type": "code",
   475     "execution_count": null,
   476     "metadata": {},
   477     "outputs": [
   478      {
   479       "name": "stdout",
   480       "output_type": "stream",
   481       "text": [
   482        "Len(01234) == 5\n",
   483        "Len(0123456789) == 10\n"
   484       ]
   485      }
   486     ],
   487     "source": [
   488      "// You can pass a struct defined in Go as an interface defined in lgo too.\n",
   489      "\n",
   490      "import (\n",
   491      "    \"bytes\"\n",
   492      "    \"fmt\"\n",
   493      ")\n",
   494      "\n",
   495      "type withLen interface {\n",
   496      "    Len() int\n",
   497      "}\n",
   498      "\n",
   499      "func printLen(l withLen) {\n",
   500      "    fmt.Printf(\"Len(%v) == %d\\n\", l, l.Len())\n",
   501      "}\n",
   502      "\n",
   503      "{\n",
   504      "    var buf bytes.Buffer\n",
   505      "    buf.WriteString(\"01234\")\n",
   506      "    printLen(&buf)\n",
   507      "    buf.WriteString(\"56789\")\n",
   508      "    printLen(&buf)\n",
   509      "}"
   510     ]
   511    },
   512    {
   513     "cell_type": "markdown",
   514     "metadata": {},
   515     "source": [
   516      "# return & defer\n",
   517      "A code block in lgo is executed code inside a function with no return value.\n",
   518      "You can exit code by `return` statement. Also, you can use `defer` to execute functions after a code block."
   519     ]
   520    },
   521    {
   522     "cell_type": "code",
   523     "execution_count": null,
   524     "metadata": {},
   525     "outputs": [
   526      {
   527       "name": "stdout",
   528       "output_type": "stream",
   529       "text": [
   530        "return!\n"
   531       ]
   532      }
   533     ],
   534     "source": [
   535      "// return\n",
   536      "if true {\n",
   537      "    fmt.Println(\"return!\")\n",
   538      "    return\n",
   539      "}\n",
   540      "fmt.Println(\"continue!\")"
   541     ]
   542    },
   543    {
   544     "cell_type": "code",
   545     "execution_count": null,
   546     "metadata": {},
   547     "outputs": [
   548      {
   549       "name": "stdout",
   550       "output_type": "stream",
   551       "text": [
   552        "start\n",
   553        "end\n",
   554        "4\n",
   555        "<nil>\n",
   556        "defer (2)\n",
   557        "defer (1)\n"
   558       ]
   559      }
   560     ],
   561     "source": [
   562      "fmt.Println(\"start\")\n",
   563      "defer fmt.Println(\"defer (1)\")\n",
   564      "defer fmt.Println(\"defer (2)\")\n",
   565      "fmt.Println(\"end\")"
   566     ]
   567    },
   568    {
   569     "cell_type": "markdown",
   570     "metadata": {},
   571     "source": [
   572      "# channel and goroutine"
   573     ]
   574    },
   575    {
   576     "cell_type": "code",
   577     "execution_count": null,
   578     "metadata": {},
   579     "outputs": [
   580      {
   581       "name": "stdout",
   582       "output_type": "stream",
   583       "text": [
   584        "i == 0\n",
   585        "i == 1\n",
   586        "i == 4\n",
   587        "i == 9\n",
   588        "i == 16\n",
   589        "i == 25\n",
   590        "i == 36\n",
   591        "i == 49\n",
   592        "i == 64\n",
   593        "i == 81\n"
   594       ]
   595      }
   596     ],
   597     "source": [
   598      "import \"fmt\"\n",
   599      "\n",
   600      "{\n",
   601      "    done := make(chan struct{})\n",
   602      "    ch := make(chan int)\n",
   603      "    // producer\n",
   604      "    go func(){\n",
   605      "        for i := 0; i < 10; i++ {\n",
   606      "            ch <- i * i\n",
   607      "        }\n",
   608      "        close(ch)\n",
   609      "    }()\n",
   610      "    // consumer\n",
   611      "    go func() {\n",
   612      "        for i := range ch {\n",
   613      "            fmt.Printf(\"i == %d\\n\", i)\n",
   614      "        }\n",
   615      "        close(done)\n",
   616      "    }()\n",
   617      "    <-done\n",
   618      "}"
   619     ]
   620    },
   621    {
   622     "cell_type": "markdown",
   623     "metadata": {},
   624     "source": [
   625      "# panic"
   626     ]
   627    },
   628    {
   629     "cell_type": "code",
   630     "execution_count": null,
   631     "metadata": {},
   632     "outputs": [
   633      {
   634       "name": "stderr",
   635       "output_type": "stream",
   636       "text": [
   637        "panic: failed!\n",
   638        "\n",
   639        "goroutine 41 [running]:\n",
   640        "runtime/debug.Stack(0xc400000008, 0x7f257d12a338, 0xc4204301a0)\n",
   641        "\t/usr/lib/go-1.9/src/runtime/debug/stack.go:24 +0xa9\n",
   642        "github.com/yunabe/lgo/core.(*resultCounter).recordResult(0xc420430188, 0x7f257cf4f140, 0x7f25705f3970)\n",
   643        "\t/home/yunabe/local/gocode/src/github.com/yunabe/lgo/core/core.go:182 +0xce\n",
   644        "github.com/yunabe/lgo/core.(*resultCounter).recordResultInDefer(0xc420430188)\n",
   645        "\t/home/yunabe/local/gocode/src/github.com/yunabe/lgo/core/core.go:187 +0x3b\n",
   646        "panic(0x7f257cf4f140, 0x7f25705f3970)\n",
   647        "\t/usr/lib/go-1.9/src/runtime/panic.go:491 +0x294\n",
   648        "github.com/yunabe/lgo/sess7b2274696d65223a313531333332343933303133383031353930307d/exec3.lgo_init()\n",
   649        "\t/home/yunabe/local/gocode/src/github.com/yunabe/lgo/sess7b2274696d65223a313531333332343933303133383031353930307d/exec3/src.go:6 +0x40\n",
   650        "github.com/yunabe/lgo/cmd/runner.loadShared.func3()\n",
   651        "\t/home/yunabe/local/gocode/src/github.com/yunabe/lgo/cmd/runner/runner.go:60 +0x26\n",
   652        "github.com/yunabe/lgo/core.newRoutineManager.func1(0xc420430180, 0xc42042aad0)\n",
   653        "\t/home/yunabe/local/gocode/src/github.com/yunabe/lgo/core/core.go:205 +0x83\n",
   654        "created by github.com/yunabe/lgo/core.newRoutineManager\n",
   655        "\t/home/yunabe/local/gocode/src/github.com/yunabe/lgo/core/core.go:202 +0xc5\n",
   656        "main routine failed\n"
   657       ]
   658      }
   659     ],
   660     "source": [
   661      "panic(\"failed!\")"
   662     ]
   663    },
   664    {
   665     "cell_type": "code",
   666     "execution_count": null,
   667     "metadata": {},
   668     "outputs": [
   669      {
   670       "name": "stderr",
   671       "output_type": "stream",
   672       "text": [
   673        "panic: goroutine failed\n",
   674        "\n",
   675        "goroutine 67 [running]:\n",
   676        "runtime/debug.Stack(0xc400000008, 0x7f257d12a338, 0xc4204181c0)\n",
   677        "\t/usr/lib/go-1.9/src/runtime/debug/stack.go:24 +0xa9\n",
   678        "github.com/yunabe/lgo/core.(*resultCounter).recordResult(0xc4204181a8, 0x7f257cf4f140, 0x7f25703ef760)\n",
   679        "\t/home/yunabe/local/gocode/src/github.com/yunabe/lgo/core/core.go:182 +0xce\n",
   680        "github.com/yunabe/lgo/core.FinalizeGoroutine(0xc42032e2c0)\n",
   681        "\t/home/yunabe/local/gocode/src/github.com/yunabe/lgo/core/core.go:283 +0x4f\n",
   682        "panic(0x7f257cf4f140, 0x7f25703ef760)\n",
   683        "\t/usr/lib/go-1.9/src/runtime/panic.go:491 +0x294\n",
   684        "github.com/yunabe/lgo/sess7b2274696d65223a313531333332343933303133383031353930307d/exec4.lgo_init.func1.1()\n",
   685        "\t/home/yunabe/local/gocode/src/github.com/yunabe/lgo/sess7b2274696d65223a313531333332343933303133383031353930307d/exec4/src.go:12 +0x40\n",
   686        "github.com/yunabe/lgo/sess7b2274696d65223a313531333332343933303133383031353930307d/exec4.lgo_init.func1(0xc42032e2c0)\n",
   687        "\t/home/yunabe/local/gocode/src/github.com/yunabe/lgo/sess7b2274696d65223a313531333332343933303133383031353930307d/exec4/src.go:13 +0x4a\n",
   688        "created by github.com/yunabe/lgo/sess7b2274696d65223a313531333332343933303133383031353930307d/exec4.lgo_init\n",
   689        "\t/home/yunabe/local/gocode/src/github.com/yunabe/lgo/sess7b2274696d65223a313531333332343933303133383031353930307d/exec4/src.go:8 +0x4a\n",
   690        "1 goroutine failed\n"
   691       ]
   692      }
   693     ],
   694     "source": [
   695      "go func() {\n",
   696      "    panic(\"goroutine failed\")\n",
   697      "}()"
   698     ]
   699    },
   700    {
   701     "cell_type": "markdown",
   702     "metadata": {},
   703     "source": [
   704      "# reflect\n",
   705      "`reflect` package works with lgo properly.\n",
   706      "Note that unexported fields are renamed with `LgoExport_` prefix in lgo."
   707     ]
   708    },
   709    {
   710     "cell_type": "code",
   711     "execution_count": null,
   712     "metadata": {},
   713     "outputs": [],
   714     "source": [
   715      "import (\n",
   716      "    \"reflect\"\n",
   717      ")\n",
   718      "\n",
   719      "type person struct {\n",
   720      "    Name string\n",
   721      "    Age int\n",
   722      "    secret string\n",
   723      "}\n",
   724      "\n",
   725      "func (p *person) GetSecret() string {\n",
   726      "    return p.secret\n",
   727      "}\n",
   728      "\n",
   729      "p := &person{Name:\"Alice\", Age: 12, secret: \"1234\"}"
   730     ]
   731    },
   732    {
   733     "cell_type": "code",
   734     "execution_count": null,
   735     "metadata": {},
   736     "outputs": [
   737      {
   738       "name": "stdout",
   739       "output_type": "stream",
   740       "text": [
   741        "--- fields ---\n",
   742        "field[0] = Name\n",
   743        "field[1] = Age\n",
   744        "field[2] = LgoExport_secret\n",
   745        "--- methods ---\n",
   746        "method[0] = GetSecret\n",
   747        "------------\n",
   748        "p == &lgo_exec.LgoExport_person{Name:\"Alice\", Age:34, LgoExport_secret:\"1234\"}\n"
   749       ]
   750      }
   751     ],
   752     "source": [
   753      "{\n",
   754      "    t := reflect.TypeOf(p)\n",
   755      "    fmt.Println(\"--- fields ---\")\n",
   756      "    for i := 0; i < t.Elem().NumField(); i++ {\n",
   757      "        fmt.Printf(\"field[%d] = %s\\n\", i, t.Elem().Field(i).Name)\n",
   758      "    }\n",
   759      "    \n",
   760      "    fmt.Println(\"--- methods ---\")\n",
   761      "    for i := 0; i < t.NumMethod(); i++ {\n",
   762      "        fmt.Printf(\"method[%d] = %s\\n\", i, t.Method(i).Name)\n",
   763      "    }\n",
   764      "\n",
   765      "    // Set \"Age\" via reflect.\n",
   766      "    v := reflect.ValueOf(p)\n",
   767      "    v.Elem().Field(1).Set(reflect.ValueOf(34))\n",
   768      "    \n",
   769      "    fmt.Println(\"------------\")\n",
   770      "    fmt.Printf(\"p == %#v\\n\", p)\n",
   771      "}"
   772     ]
   773    },
   774    {
   775     "cell_type": "markdown",
   776     "metadata": {},
   777     "source": [
   778      "# Display\n",
   779      "To display non-text content like HTML, MarkDown and images, use `_ctx.Display`."
   780     ]
   781    },
   782    {
   783     "cell_type": "code",
   784     "execution_count": null,
   785     "metadata": {},
   786     "outputs": [
   787      {
   788       "data": {
   789        "text/html": [
   790         "Hello <b>lgo</b>: <a target=\"_blank\" href=\"https://github.com/yunabe/lgo\" >GitHub lgo</a>\n",
   791         "<div style=\"width:50px;height:50px;background-color:red\"></div>"
   792        ]
   793       },
   794       "metadata": {},
   795       "output_type": "display_data"
   796      }
   797     ],
   798     "source": [
   799      "// Display HTML\n",
   800      "_ctx.Display.HTML(\n",
   801      "    `Hello <b>lgo</b>: <a target=\"_blank\" href=\"https://github.com/yunabe/lgo\" >GitHub lgo</a>\n",
   802      "<div style=\"width:50px;height:50px;background-color:red\"></div>`,\n",
   803      "    nil)"
   804     ]
   805    },
   806    {
   807     "cell_type": "code",
   808     "execution_count": null,
   809     "metadata": {},
   810     "outputs": [
   811      {
   812       "data": {
   813        "text/plain": [
   814         "PNG Gopher"
   815        ]
   816       },
   817       "metadata": {},
   818       "output_type": "display_data"
   819      },
   820      {
   821       "data": {
   822        "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPoAAAFUCAIAAACC77ZAAAAKL2lDQ1BJQ0MgcHJvZmlsZQAASMedlndUVNcWh8+9d3qhzTDSGXqTLjCA9C4gHQRRGGYGGMoAwwxNbIioQEQREQFFkKCAAaOhSKyIYiEoqGAPSBBQYjCKqKhkRtZKfHl57+Xl98e939pn73P32XuftS4AJE8fLi8FlgIgmSfgB3o401eFR9Cx/QAGeIABpgAwWempvkHuwUAkLzcXerrICfyL3gwBSPy+ZejpT6eD/0/SrFS+AADIX8TmbE46S8T5Ik7KFKSK7TMipsYkihlGiZkvSlDEcmKOW+Sln30W2VHM7GQeW8TinFPZyWwx94h4e4aQI2LER8QFGVxOpohvi1gzSZjMFfFbcWwyh5kOAIoktgs4rHgRm4iYxA8OdBHxcgBwpLgvOOYLFnCyBOJDuaSkZvO5cfECui5Lj25qbc2ge3IykzgCgaE/k5XI5LPpLinJqUxeNgCLZ/4sGXFt6aIiW5paW1oamhmZflGo/7r4NyXu7SK9CvjcM4jW94ftr/xS6gBgzIpqs+sPW8x+ADq2AiB3/w+b5iEAJEV9a7/xxXlo4nmJFwhSbYyNMzMzjbgclpG4oL/rfzr8DX3xPSPxdr+Xh+7KiWUKkwR0cd1YKUkpQj49PZXJ4tAN/zzE/zjwr/NYGsiJ5fA5PFFEqGjKuLw4Ubt5bK6Am8Kjc3n/qYn/MOxPWpxrkSj1nwA1yghI3aAC5Oc+gKIQARJ5UNz13/vmgw8F4psXpjqxOPefBf37rnCJ+JHOjfsc5xIYTGcJ+RmLa+JrCdCAACQBFcgDFaABdIEhMANWwBY4AjewAviBYBAO1gIWiAfJgA8yQS7YDApAEdgF9oJKUAPqQSNoASdABzgNLoDL4Dq4Ce6AB2AE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50thi21rbTWouPguPD4s2+jvx064X2i+yTjZMt3Wt9Vt1HaCtuh9uz2mY74jpHO8M6BUytOdXfZdrV9b/T9kdNqp6vOyJ4pOUs4m3924VzOudnzqeenL8RdGOuO6n5wcdXF2z0BPf2XvC9duex++WKvU++5K3ZXTl+1uXrqGuNax3XL6+19Fn1tP1j80NZv2d9+w+pG503rm10DywfODjoMXrjleuvyba/b1++svDMwFDJ0dzhyeOQu++7kvaR7L+9n3J9/sOkh+mHhI6lH5Y+VHtf9qPdj64jlyJlR19G+J0FPHoyxxp7/lP7Th/H8p+Sn5ROqE42TZpOnp9ynbj5b/Wz8eerz+emCn6V/rn6h++K7Xxx/6ZtZNTP+kv9y4dfiV/Kvjrxe9rp71n/28ZvkN/NzhW/l3x59x3jX+z7s/cR85gfsh4qPeh+7Pnl/eriQvLDwG/eE8/vMO7xsAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH3AMGBSkd6mhiIQAAOlZJREFUeNrtnWesFWUax++uigVsYEUF7A1RERsWrIioWIKIIiLC2hAVVISACCiIBaMrFqwRFUUIKCgYewlYid3Yo2viB/eD2Y1fTDa5+/M++jjOae+8887MOec+/w+blXvOnJl5//POU/9PS6shNH799dfvv//+s88+e/311xctWnTXXXfNmDFj3Lhx55133mmnnda/f/+DDz64Z8+eO+ywQ9euXTt37typU6d111137bXXbvkDf//73zt06LDBBhtsuummW2+99Y477tirV69DDjnk+OOPP+ussy699NLrrrvu3nvvXb58+Zo1a7777ju7545osVvgh2+//RaqvfLKKxD69ttvnzRp0qhRo0444YQ+ffr06NGjY8eOLUnwt3Jw/O7666+/yy67HHnkkSNGjJg2bdojjzzy6quv8rDZGhndE0M26aeeemrevHnTp0+/6KKL2KHZaHfeeeeknM4TvBN4AC644IJbb7112bJln3zyiS2l0f0vYLdesmQJW/UVV1xxzjnnDBw48KCDDoLWWBQpyYdZsuWWW2KT7LXXXhwTInJwHhssE7bk0aNHX3jhhR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Mx01zEegMGftjaGZqb7ihUrAkrNGwx1TXdm1OupMLDF1sbQzHQn9I7VLqdy0UUX2doYmpnurZFY5EknnWRrY2hyusNyORV4b2tjCI56qYgUYMNoXaTofRoMAVEv7R2C2bNn69ngudryGJqZ7kgc6tkw8dWWxxAWdSG8oUCBI+AcQIMhhrpQEVMwB5Bxk3I21113nS2PISyiKmIu08azpfunn36qChyXXHKJLY8hLKKpTCY+FEx3CiEph5SzOf300215DGGBgJfSPf2YxwCDak2Bw5AdMB/+9re/CcEIAxZPd8YzydkgtGTLYwiLzz//XOZYBXEOA9D9ggsukLNBNdKWxxAWDHXTWMi1115bPN2vuuoqOZt1113XlscQFih2bbzxxkKwyZMnF093GZArsxStjsAQFt98802XLl2EYGysxdNde5rQV7LBNYawYANlorIQjGbR4umucmLgtddesxUyBAQjZjWxc/HFFxdPd9r2lO7Lly+3FTIExM8//7zTTjvVEd0XLVqkdF+4cKGtkCEskJhWOaOlS5dSt+LtIgag+7JlyzQy+vDDD9vyGMJCO+YUhCaPO+64mTNnrly5MhH1A9D9hRde0MjovHnzbHkMYXHwwQernBGTkS688EJmtRMGlH/cfvvtzz77bBqdvvzyy2zp/v7777e2dRNqZNSkgA3BQXGKsOvYY4/Vf2SkAHvreeed161bN/nr1ltvffLJJ995550h6Y7rQF378OHD99hjD1jOs8X/IcEUqkTTYIgBu0XYdcQRR5T+9ddff3311VevvPJKDeDQRwo/y8raudKdgDrjOnr16qVmOujZs6eOmwxVomkwxMCeLezChqn+yVWrVp1//vmMtpbPn3jiiWKAuNKd8stp06btuOOO8n1q03r06DFq1KglS5boZ+gxUaF3Uk62PIawOOuss4Rde+21l+NX7rnnnh122EG+ddlll9WgO7F9bH91ETbaaKPDDz+cYoFPPvmk9MNII+gE7eqWk8HgAQx0YRcB+F9++cX9i3iSGDZ88ZBDDilPd9o1KLNUEwWWz5gxgz2+emSmY8eO8nmeKlseQ1iMGTNG2LXtttuyESf9OtF6vktXRpzuWN7yNGyyySbUJziK+j7zz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hPYhs0Y0KSKeaERAscwYCfG+UOvAcub06i5c0cfWlxSdnF2Sl62OU+3pcBb0lI19yCeWC2VWbx4caPG3WVMDW9Y+U/4keglRccq9MpBd4ofIiSHlc+7CE4j/uHyAEQj03gptF3yRUKrhEfJeUFNkuH4f9tttx1MRTSKFeXg/CN/4gO8+vgwPnenTp34LtQkWpXod6MgSMUB+SGSQVyIbOGFG1rUTnJuPG8uDqtEPKVDP9N6kAzTTOwuGltlmVl1x4pIgjAwo5ARxNxrtlgWiV2cFyvnDC/LRqbzBxFYPB+eHEw77u2AAQOIUhPZwMhJk63LDryXaqopSWUrvciYW/wffKdMTylDumNts3txDbyXXR50AeaBBOavvvrqevAFmYHMkpCrwvg54YQTMDAwaXgFs1tzdQGfBN4SPFocFneTJ423DY8cAUTekFRQE6zAJcXYza3PLZQLV71amIvSOzBt2rSsTynbEjEcLFU/xdh1tPnqvDePfA1BNC4N8hE442G4+eabuTqcSDKRY8aMwaLA+MYD4wkZ3gZ2L8I+vLjZj/kAwv4EQLlYSIwrfOedd5LJJyKEM81hyQE7tqvXP3g4RQyU5zbWi8NlspeLjBz1Jo899lgO55N5vTvuudSRsnWReKsSu8SzkY/ht7UamgUQQFYWkMwa2QYiS5oTwDUP2PdTMN0FdOBK8h97DreVbUyi74TYCLueddZZuHoyidLk3psSGC29e/eOGm807PFKzDnFkV9rNj1HOp4JcmPk8ArD8RKxTGIaRQ0wMeQG9jJMGgy2oja1/wPE7a+pTjTU0gAAAABJRU5ErkJggg=="
   823       },
   824       "metadata": {},
   825       "output_type": "display_data"
   826      }
   827     ],
   828     "source": [
   829      "import (\n",
   830      "    \"fmt\"\n",
   831      "    \"io/ioutil\"\n",
   832      "    \"net/http\"    \n",
   833      ")\n",
   834      "\n",
   835      "var gopherPNG []byte\n",
   836      "{\n",
   837      "    res, err := http.Get(\"https://golang.org/doc/gopher/frontpage.png\")\n",
   838      "    if err != nil {\n",
   839      "        fmt.Printf(\"Failed to get: %v\\n\", err)\n",
   840      "        return\n",
   841      "    }\n",
   842      "    defer res.Body.Close()\n",
   843      "    gopherPNG, err = ioutil.ReadAll(res.Body)\n",
   844      "    if err != nil {\n",
   845      "        fmt.Printf(\"Failed to read: %v\\n\", err)\n",
   846      "        return\n",
   847      "    }\n",
   848      "    _ctx.Display.Text(\"PNG Gopher\", nil)\n",
   849      "    _ctx.Display.PNG(gopherPNG, nil)\n",
   850      "}"
   851     ]
   852    },
   853    {
   854     "cell_type": "code",
   855     "execution_count": null,
   856     "metadata": {},
   857     "outputs": [
   858      {
   859       "data": {
   860        "text/plain": [
   861         "Resized and highly compressed JPEG"
   862        ]
   863       },
   864       "metadata": {},
   865       "output_type": "display_data"
   866      },
   867      {
   868       "data": {
   869        "image/jpeg": "/9j/2wCEAP////////////////////////////////////////////////////////////////////////////////////8B///////////////////////////////////////////////////////////////////////////////////////AABEIAIgAZAMBIgACEQEDEQH/xAGiAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgsQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+gEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoLEQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/AJKKb1J9B+ppDt6YGfTvQA4kDrScnoMfXr+VAGPc/wCf0FLj15/z6UAJj1J/lRtHufxNLj8PpQKAE2r6CjCj2/HFKfSjFACfRs+x5/8Ar0ufXj+X50uKTrwef8/zoATcPc/QGlBB6U3dt4PPv7f40p7H6fkaAHUUUUANHBI9eRSAfMT/AJyetOIB60i9Prk0ADHHPt/M01Sc88inkf59RQAO1AC0ncfjS0wtjk/gP60ADZ5x6f15pqZz1+o/rTg2T6Ht/hTsj6UALSdx+NGR/wDqoHqaAEYcZ9Of8aPvdOnc/wBBTqReg9uPy4oAWiiigBD0P0oHQfQUHofoaB0H0oAWkwKWigBOnNIVB6/nTqTAz+FACBV7c0o7ik7fj/WnUAFFFFABTR3+pp1NHVvr/QUAOooooAQ9DQOg+gpaavT6Ej9aAHUUUUAFGM0UUAJgUtFFABRRRQAU0dW+o/kKdTR1b6j+QoAdRRRQAmSen5mkXv8AU0uCP8f/AK1IvT8T/OgB1FFFABRRRQAUUUUAFFFFABTe7c+n8qdTf4j+H9aADOPf6UbvY0u0d6No9KAFpq9Pz/madTV6D/PegB1FFFABRRRQAUUUUAFFFFABTf4j9B/WnU3+L8B/M0AOooooAKavQf5706mr0/P+dADqKKKACiiigAooooAKKKKACmj7x+gH8zTqavc+p/8ArUAOooooAKb0PseR9e9OpDjHNAC0U0E9x/n6U6gAooooAKKKKACiikz+dAAfQdTwP8fwpRxTehye/Q/0/wA9adQAUUUUAFNP+fY06mt0/KgBc9h+dJg9j+fT/wCtQvf606gBuT6fkf8AGjPsfy/+vTqKAG59j/n8aMn0/M/4Zp1FADcE9Tj6f4mlxjp1/n9aWigBpP8Ahj/P86dTf4qdQAUUUUAf/9k="
   870       },
   871       "metadata": {},
   872       "output_type": "display_data"
   873      }
   874     ],
   875     "source": [
   876      "import (\n",
   877      "    \"bytes\"\n",
   878      "    \"image\"\n",
   879      "    jpeg \"image/jpeg\"\n",
   880      "    _ \"image/png\"\n",
   881      "    \"os\"\n",
   882      "    \n",
   883      "    \"github.com/nfnt/resize\"\n",
   884      ")\n",
   885      "\n",
   886      "{\n",
   887      "    img, _, err := image.Decode(bytes.NewBuffer(gopherPNG))\n",
   888      "    if err != nil {\n",
   889      "        fmt.Fprintf(os.Stderr, \"Failed to decode: %v\", err)\n",
   890      "        return\n",
   891      "    }\n",
   892      "    img = resize.Resize(100, 0, img, resize.Lanczos3)\n",
   893      "    var buf bytes.Buffer\n",
   894      "    jpeg.Encode(&buf, img, &jpeg.Options{Quality: 1})\n",
   895      "    _ctx.Display.Text(\"Resized and highly compressed JPEG\", nil)\n",
   896      "    _ctx.Display.JPEG(buf.Bytes(), nil)\n",
   897      "}"
   898     ]
   899    },
   900    {
   901     "cell_type": "markdown",
   902     "metadata": {},
   903     "source": [
   904      "# Display ID\n",
   905      "You can use the second paramter of display methods to overwrite the existing results.\n",
   906      "See [DataDisplayer](https://godoc.org/github.com/yunabe/lgo/core#DataDisplayer) for details."
   907     ]
   908    },
   909    {
   910     "cell_type": "code",
   911     "execution_count": null,
   912     "metadata": {},
   913     "outputs": [
   914      {
   915       "data": {
   916        "text/plain": [
   917         "Quality: 1\n",
   918         "Size: 1.28kB"
   919        ]
   920       },
   921       "metadata": {},
   922       "output_type": "display_data"
   923      },
   924      {
   925       "data": {
   926        "image/jpeg": "/9j/2wCEAP////////////////////////////////////////////////////////////////////////////////////8B///////////////////////////////////////////////////////////////////////////////////////AABEIAIgAZAMBIgACEQEDEQH/xAGiAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgsQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+gEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoLEQACAQ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Psfy/+vTqKAG59j/n8aMn0/M/4Zp1FADcE9Tj6f4mlxjp1/n9aWigBpP8Ahj/P86dTf4qdQAUUUUAf/9k="
   927       },
   928       "metadata": {},
   929       "output_type": "display_data"
   930      }
   931     ],
   932     "source": [
   933      "import (\n",
   934      "    \"bytes\"\n",
   935      "    \"fmt\"\n",
   936      "    \"image\"\n",
   937      "    png \"image/png\"\n",
   938      "    jpeg \"image/jpeg\"\n",
   939      "    \"os\"\n",
   940      "    \"time\"\n",
   941      "    \n",
   942      "    \"github.com/nfnt/resize\"\n",
   943      ")\n",
   944      "\n",
   945      "{\n",
   946      "    img, err := png.Decode(bytes.NewBuffer(gopherPNG))\n",
   947      "    if err != nil {\n",
   948      "        fmt.Fprintf(os.Stderr, \"Failed to decode:\", err)\n",
   949      "        return\n",
   950      "    }\n",
   951      "    img = resize.Resize(100, 0, img, resize.Lanczos3)\n",
   952      "    var labelID, imgID string\n",
   953      "    for quality := 25; quality > 0; quality -= 1 {\n",
   954      "        var buf bytes.Buffer\n",
   955      "        jpeg.Encode(&buf, img, &jpeg.Options{Quality: quality})\n",
   956      "        size := float32(len(buf.Bytes()))/1000\n",
   957      "        _ctx.Display.Text(fmt.Sprintf(\"Quality: %d\\nSize: %.2fkB\", quality, size), &labelID)\n",
   958      "        _ctx.Display.JPEG(buf.Bytes(), &imgID)\n",
   959      "        time.Sleep(200*time.Millisecond)\n",
   960      "    }\n",
   961      "}"
   962     ]
   963    },
   964    {
   965     "cell_type": "markdown",
   966     "metadata": {},
   967     "source": [
   968      "# Compile errors"
   969     ]
   970    },
   971    {
   972     "cell_type": "markdown",
   973     "metadata": {},
   974     "source": [
   975      "## syntax errors"
   976     ]
   977    },
   978    {
   979     "cell_type": "code",
   980     "execution_count": null,
   981     "metadata": {},
   982     "outputs": [
   983      {
   984       "name": "stderr",
   985       "output_type": "stream",
   986       "text": [
   987        "3:1: expected operand, found '}'\n",
   988        "5:5: expected ';', found 'for'\n"
   989       ]
   990      }
   991     ],
   992     "source": [
   993      "{\n",
   994      "    x := 10 + 3.4 +\n",
   995      "}\n",
   996      "{\n",
   997      "    for i := 0 {}\n",
   998      "}"
   999     ]
  1000    },
  1001    {
  1002     "cell_type": "markdown",
  1003     "metadata": {},
  1004     "source": [
  1005      "## type errors"
  1006     ]
  1007    },
  1008    {
  1009     "cell_type": "code",
  1010     "execution_count": null,
  1011     "metadata": {},
  1012     "outputs": [
  1013      {
  1014       "name": "stderr",
  1015       "output_type": "stream",
  1016       "text": [
  1017        "2:10: undeclared name: undefined\n",
  1018        "6:10: invalid operation: mismatched types int and float64\n",
  1019        "10:17: non-boolean condition in for statement\n",
  1020        "8:5: unused declared but not used\n"
  1021       ]
  1022      }
  1023     ],
  1024     "source": [
  1025      "{  // L.1\n",
  1026      "    a := undefined\n",
  1027      "    \n",
  1028      "    x := 10\n",
  1029      "    y := 3.4  // L.5\n",
  1030      "    z := x + y\n",
  1031      "\n",
  1032      "    unused := 10\n",
  1033      "    \n",
  1034      "    for i := 0; i; i++ {}  // L.10\n",
  1035      "    \n",
  1036      "    _, _ = a, z\n",
  1037      "}"
  1038     ]
  1039    }
  1040   ],
  1041   "metadata": {
  1042    "kernelspec": {
  1043     "display_name": "Go (lgo)",
  1044     "language": "go",
  1045     "name": "lgo"
  1046    },
  1047    "language_info": {
  1048     "file_extension": "",
  1049     "mimetype": "",
  1050     "name": "go",
  1051     "version": ""
  1052    }
  1053   },
  1054   "nbformat": 4,
  1055   "nbformat_minor": 2
  1056  }