|
4 | 4 | "cell_type": "markdown", |
5 | 5 | "metadata": {}, |
6 | 6 | "source": [ |
7 | | - "### Welcome to this sample Raku Jupyter notebook!\n", |
| 7 | + "# Welcome to this sample Raku Jupyter notebook!\n", |
8 | 8 | "\n", |
9 | 9 | "To run a cell: select it, and press ctrl-return.\n", |
10 | 10 | "\n", |
11 | 11 | "To add a new empty cell, press the `+` button on the menu bar.\n", |
12 | 12 | "\n", |
13 | 13 | "To run a cell and add a new one after it: press alt-return.\n", |
14 | 14 | "\n", |
15 | | - "For documentation about Raku, go to http://docs.raku.org.\n", |
| 15 | + "For documentation about [Raku](https://raku.org/), go to http://docs.raku.org.\n", |
16 | 16 | "\n", |
17 | | - "For documentation about this Jupyter Kernel, go to http://github.com/bduggan/p6-jupyter-kernel.\n", |
| 17 | + "For documentation about this Jupyter Kernel, go to https://github.com/bduggan/raku-jupyter-kernel.\n", |
18 | 18 | "\n", |
19 | 19 | "Have fun!" |
20 | 20 | ] |
21 | 21 | }, |
22 | 22 | { |
23 | 23 | "cell_type": "code", |
24 | | - "execution_count": 1, |
| 24 | + "execution_count": null, |
25 | 25 | "metadata": { |
26 | 26 | "scrolled": true |
27 | 27 | }, |
28 | | - "outputs": [ |
29 | | - { |
30 | | - "data": { |
31 | | - "text/plain": [ |
32 | | - "hello, world" |
33 | | - ] |
34 | | - }, |
35 | | - "execution_count": 1, |
36 | | - "metadata": {}, |
37 | | - "output_type": "execute_result" |
38 | | - } |
39 | | - ], |
| 28 | + "outputs": [], |
40 | 29 | "source": [ |
41 | 30 | "\"hello, world\"" |
42 | 31 | ] |
43 | 32 | }, |
44 | 33 | { |
45 | 34 | "cell_type": "code", |
46 | | - "execution_count": 2, |
| 35 | + "execution_count": null, |
47 | 36 | "metadata": {}, |
48 | | - "outputs": [ |
49 | | - { |
50 | | - "data": { |
51 | | - "text/plain": [ |
52 | | - "170141183460469231731687303715884105727" |
53 | | - ] |
54 | | - }, |
55 | | - "execution_count": 2, |
56 | | - "metadata": {}, |
57 | | - "output_type": "execute_result" |
58 | | - } |
59 | | - ], |
| 37 | + "outputs": [], |
60 | 38 | "source": [ |
61 | 39 | "# To type this, you can type '2 **' and then press tab to help type exponents.\n", |
62 | 40 | "my $n = 2¹²⁷ - 1;" |
63 | 41 | ] |
64 | 42 | }, |
65 | 43 | { |
66 | 44 | "cell_type": "code", |
67 | | - "execution_count": 3, |
| 45 | + "execution_count": null, |
68 | 46 | "metadata": {}, |
69 | | - "outputs": [ |
70 | | - { |
71 | | - "data": { |
72 | | - "text/plain": [ |
73 | | - "True" |
74 | | - ] |
75 | | - }, |
76 | | - "execution_count": 3, |
77 | | - "metadata": {}, |
78 | | - "output_type": "execute_result" |
79 | | - } |
80 | | - ], |
| 47 | + "outputs": [], |
81 | 48 | "source": [ |
82 | 49 | "# _ refers to the last output\n", |
83 | 50 | "is-prime( _ )" |
84 | 51 | ] |
85 | 52 | }, |
86 | 53 | { |
87 | 54 | "cell_type": "code", |
88 | | - "execution_count": 4, |
| 55 | + "execution_count": null, |
89 | 56 | "metadata": {}, |
90 | | - "outputs": [ |
91 | | - { |
92 | | - "data": { |
93 | | - "text/plain": [ |
94 | | - "127" |
95 | | - ] |
96 | | - }, |
97 | | - "execution_count": 4, |
98 | | - "metadata": {}, |
99 | | - "output_type": "execute_result" |
100 | | - } |
101 | | - ], |
| 57 | + "outputs": [], |
102 | 58 | "source": [ |
103 | 59 | "( Out[2] + 1).log(2); # you can also refer to Out[...]" |
104 | 60 | ] |
105 | 61 | }, |
106 | 62 | { |
107 | 63 | "cell_type": "code", |
108 | | - "execution_count": 5, |
| 64 | + "execution_count": null, |
109 | 65 | "metadata": {}, |
110 | | - "outputs": [ |
111 | | - { |
112 | | - "data": { |
113 | | - "text/plain": [ |
114 | | - "[...]" |
115 | | - ] |
116 | | - }, |
117 | | - "execution_count": 5, |
118 | | - "metadata": {}, |
119 | | - "output_type": "execute_result" |
120 | | - } |
121 | | - ], |
| 66 | + "outputs": [], |
122 | 67 | "source": [ |
123 | 68 | "my @fib = 1, 1, * + * ... ∞" |
124 | 69 | ] |
125 | 70 | }, |
126 | 71 | { |
127 | 72 | "cell_type": "code", |
128 | | - "execution_count": 6, |
| 73 | + "execution_count": null, |
129 | 74 | "metadata": {}, |
130 | | - "outputs": [ |
131 | | - { |
132 | | - "data": { |
133 | | - "text/plain": [ |
134 | | - "(1 1 2 3 5 8 13 21 34 55 89)" |
135 | | - ] |
136 | | - }, |
137 | | - "execution_count": 6, |
138 | | - "metadata": {}, |
139 | | - "output_type": "execute_result" |
140 | | - } |
141 | | - ], |
| 75 | + "outputs": [], |
142 | 76 | "source": [ |
143 | 77 | "@fib[0..10]" |
144 | 78 | ] |
145 | 79 | }, |
146 | 80 | { |
147 | 81 | "cell_type": "code", |
148 | | - "execution_count": 7, |
| 82 | + "execution_count": null, |
149 | 83 | "metadata": {}, |
150 | | - "outputs": [ |
151 | | - { |
152 | | - "name": "stdout", |
153 | | - "output_type": "stream", |
154 | | - "text": [ |
155 | | - "this goes to stdout\n" |
156 | | - ] |
157 | | - }, |
158 | | - { |
159 | | - "data": { |
160 | | - "text/plain": [ |
161 | | - "42" |
162 | | - ] |
163 | | - }, |
164 | | - "execution_count": 7, |
165 | | - "metadata": {}, |
166 | | - "output_type": "execute_result" |
167 | | - } |
168 | | - ], |
| 84 | + "outputs": [], |
169 | 85 | "source": [ |
170 | 86 | "say \"this goes to stdout\";\n", |
171 | 87 | "42 # this is an output expression" |
|
186 | 102 | } |
187 | 103 | }, |
188 | 104 | "nbformat": 4, |
189 | | - "nbformat_minor": 2 |
| 105 | + "nbformat_minor": 4 |
190 | 106 | } |
0 commit comments