-
Notifications
You must be signed in to change notification settings - Fork 0
/
MathLink.nb
1502 lines (1376 loc) · 71.8 KB
/
MathLink.nb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 11.0' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[ 158, 7]
NotebookDataLength[ 71886, 1494]
NotebookOptionsPosition[ 66946, 1333]
NotebookOutlinePosition[ 67335, 1350]
CellTagsIndexPosition[ 67292, 1347]
WindowFrame->Normal*)
(* Beginning of Notebook Content *)
Notebook[{
Cell[BoxData[
RowBox[{"Quit", "[", "]"}]], "Input",
CellChangeTimes->{{3.690979952937765*^9, 3.6909799546319575`*^9}}],
Cell[BoxData[
RowBox[{
RowBox[{"SetDirectory", "@",
RowBox[{"NotebookDirectory", "[", "]"}]}], ";"}]], "Input",
CellChangeTimes->{{3.6908482281748796`*^9, 3.6908482391002893`*^9}, {
3.691014596904335*^9, 3.6910146052683024`*^9}}],
Cell[BoxData[
RowBox[{
RowBox[{"Off", "[",
RowBox[{
RowBox[{"Part", "::", "partd"}], ",",
RowBox[{"Part", "::", "pspec1"}], ",",
RowBox[{"Message", "::", "name"}]}], "]"}], ";"}]], "Input",
CellChangeTimes->{{3.690861158564393*^9, 3.6908611693205395`*^9},
3.6908620912711315`*^9, {3.6909647491690693`*^9, 3.690964749832082*^9}}],
Cell[BoxData[
RowBox[{"(*", " ",
RowBox[{"_", "\[Rule]", "$"}], " ", "*)"}]], "Input",
CellChangeTimes->{{3.691239827506945*^9, 3.691239828829615*^9}, {
3.7044474000422416`*^9, 3.70444740388594*^9}}],
Cell[CellGroupData[{
Cell["Python", "Subsection",
CellChangeTimes->{{3.6912852466158957`*^9, 3.6912852613970118`*^9}}],
Cell[BoxData[
RowBox[{
RowBox[{"Install", "[",
RowBox[{"\"\<cmd /k python \>\"", "<>",
RowBox[{"NotebookDirectory", "[", "]"}], "<>",
"\"\<Python\\\\PythonLink.py\>\""}], "]"}], ";"}]], "Input",
CellChangeTimes->{{3.6911532812405777`*^9, 3.691153289657504*^9}, {
3.6911543286140175`*^9, 3.691154328913003*^9}, {3.691154455483714*^9,
3.691154455983735*^9}, {3.6911545372377796`*^9, 3.6911545795124516`*^9}, {
3.6911546595203*^9, 3.6911546662537937`*^9}, 3.6911946482339163`*^9,
3.6911949539960203`*^9, {3.691278958330598*^9, 3.6912789587908955`*^9}, {
3.691305195786273*^9, 3.691305197473256*^9}, {3.70444741585114*^9,
3.7044474292226925`*^9}}],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{"x", "=",
RowBox[{"Py", "[",
RowBox[{"{",
RowBox[{"1", ",", "2", ",", "3"}], "}"}], "]"}]}], "\n",
RowBox[{"{",
RowBox[{
RowBox[{"x", "@",
RowBox[{"$", "[", "0", "]"}]}], ",",
RowBox[{"x", "@",
RowBox[{"$", "[",
RowBox[{"0", ",", "4"}], "]"}]}], ",", "x"}], "}"}]}], "Input",
CellChangeTimes->{{3.6913557651427917`*^9, 3.69135581243296*^9}}],
Cell[BoxData["\<\"[1L, 2L, 3L]\"\>"], "Output",
CellChangeTimes->{{3.691355770996683*^9, 3.6913558137766047`*^9}, {
3.6913560001750975`*^9, 3.691356015177075*^9}, 3.691356074152464*^9,
3.7044474879517145`*^9}],
Cell[BoxData[
RowBox[{"{",
RowBox[{"1", ",", "Null", ",", "\<\"[4L, 2L, 3L]\"\>"}], "}"}]], "Output",
CellChangeTimes->{{3.691355770996683*^9, 3.6913558137766047`*^9}, {
3.6913560001750975`*^9, 3.691356015177075*^9}, 3.691356074152464*^9,
3.7044474879517145`*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{"x", "=",
RowBox[{"Py", "[",
RowBox[{"\[LeftAssociation]",
RowBox[{
RowBox[{"1", "\[Rule]", "100"}], ",",
RowBox[{"\"\<b\>\"", "\[Rule]", "200"}]}], "\[RightAssociation]"}],
"]"}]}], "\n",
RowBox[{"{",
RowBox[{
RowBox[{"x", "@",
RowBox[{"$", "[", "1", "]"}]}], ",",
RowBox[{"x", "@",
RowBox[{"$", "@", "b"}]}]}], "}"}]}], "Input",
CellChangeTimes->{{3.691355664902313*^9, 3.691355702837985*^9}}],
Cell[BoxData["\<\"{1L: 100L, u'b': 200L}\"\>"], "Output",
CellChangeTimes->{{3.6913556916498575`*^9, 3.6913557032315626`*^9},
3.6913560840302887`*^9, 3.704447489889226*^9}],
Cell[BoxData[
RowBox[{"{",
RowBox[{"100", ",", "200"}], "}"}]], "Output",
CellChangeTimes->{{3.6913556916498575`*^9, 3.6913557032315626`*^9},
3.6913560840302887`*^9, 3.704447489889226*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{"x", "=."}], "\[IndentingNewLine]",
RowBox[{"Py", "[", "\"\<x=[1,2]\>\"", "]"}], "\[IndentingNewLine]",
RowBox[{"Py", "[",
RowBox[{"x", "@",
RowBox[{"$", "[", "1", "]"}]}], "]"}], "\[IndentingNewLine]",
RowBox[{"Py", "[",
RowBox[{"x", "@",
RowBox[{"$", "[",
RowBox[{"0", ",", "3"}], "]"}]}], "]"}], "\[IndentingNewLine]",
RowBox[{"Py", "[", "x", "]"}]}], "Input",
CellChangeTimes->{{3.6913210226369023`*^9, 3.691321040964198*^9}, {
3.691321074630229*^9, 3.69132108977211*^9}}],
Cell[BoxData["2"], "Output",
CellChangeTimes->{
3.691321090580065*^9, 3.6913217882329416`*^9, 3.691321975009961*^9,
3.6913227215268097`*^9, 3.6913227625620704`*^9, 3.691322841100642*^9,
3.6913229231054263`*^9, 3.6913229686017127`*^9, {3.691355974046815*^9,
3.691356003114148*^9}, 3.691356084951273*^9, 3.6913561443160763`*^9,
3.7044474987929416`*^9}],
Cell[BoxData["\<\"[3L, 2]\"\>"], "Output",
CellChangeTimes->{
3.691321090580065*^9, 3.6913217882329416`*^9, 3.691321975009961*^9,
3.6913227215268097`*^9, 3.6913227625620704`*^9, 3.691322841100642*^9,
3.6913229231054263`*^9, 3.6913229686017127`*^9, {3.691355974046815*^9,
3.691356003114148*^9}, 3.691356084951273*^9, 3.6913561443160763`*^9,
3.7044474988085814`*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{"Py", "[", "3", "]"}], "\[IndentingNewLine]",
RowBox[{"x", "=."}], "\[IndentingNewLine]",
RowBox[{"Py", "[",
RowBox[{"x", ",", "10"}], "]"}], "\[IndentingNewLine]",
RowBox[{"Py", "[", "x", "]"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"ClearAll", "[", "str", "]"}], ";"}], "\[IndentingNewLine]",
RowBox[{"str", "=",
RowBox[{"PyObject", "[", "str", "]"}]}], "\[IndentingNewLine]",
RowBox[{"str", "@",
RowBox[{"{",
RowBox[{"find", ",", "\"\<__doc__\>\""}], "}"}]}], "\[IndentingNewLine]",
RowBox[{"str", "@",
RowBox[{"{",
RowBox[{"find", ",", "\"\<__repr__\>\""}], "}"}]}], "\[IndentingNewLine]",
RowBox[{"str", "@",
RowBox[{"find", "@",
RowBox[{"\"\<__repr__\>\"", "[", "]"}]}]}]}], "Input"],
Cell[BoxData["3"], "Output",
CellChangeTimes->{
3.6913058867948985`*^9, 3.691305970730196*^9, {3.691306005570572*^9,
3.6913060190876217`*^9}, 3.6913060827440357`*^9, 3.6913061580071144`*^9,
3.6913062192736025`*^9, {3.691306249389253*^9, 3.691306262983344*^9}, {
3.6913063064021807`*^9, 3.6913063550039463`*^9}, 3.6913065097845826`*^9,
3.6913067056238728`*^9, {3.6913068212898407`*^9, 3.69130684659295*^9},
3.6913068781308165`*^9, {3.6913069394084435`*^9, 3.6913069550993013`*^9},
3.69130700099846*^9, 3.691307130115664*^9, 3.6913072016489162`*^9,
3.691307243885848*^9, 3.691307277231384*^9, 3.6913074802221155`*^9,
3.6913200712286754`*^9, 3.6913201113448043`*^9, 3.6913202876550784`*^9,
3.691321096998535*^9, 3.6913217945808487`*^9, 3.691321978637983*^9,
3.6913228458437376`*^9, 3.691322971600961*^9, 3.6913562326198006`*^9,
3.70444750348044*^9}],
Cell[BoxData["10"], "Output",
CellChangeTimes->{
3.6913058867948985`*^9, 3.691305970730196*^9, {3.691306005570572*^9,
3.6913060190876217`*^9}, 3.6913060827440357`*^9, 3.6913061580071144`*^9,
3.6913062192736025`*^9, {3.691306249389253*^9, 3.691306262983344*^9}, {
3.6913063064021807`*^9, 3.6913063550039463`*^9}, 3.6913065097845826`*^9,
3.6913067056238728`*^9, {3.6913068212898407`*^9, 3.69130684659295*^9},
3.6913068781308165`*^9, {3.6913069394084435`*^9, 3.6913069550993013`*^9},
3.69130700099846*^9, 3.691307130115664*^9, 3.6913072016489162`*^9,
3.691307243885848*^9, 3.691307277231384*^9, 3.6913074802221155`*^9,
3.6913200712286754`*^9, 3.6913201113448043`*^9, 3.6913202876550784`*^9,
3.691321096998535*^9, 3.6913217945808487`*^9, 3.691321978637983*^9,
3.6913228458437376`*^9, 3.691322971600961*^9, 3.6913562326198006`*^9,
3.70444750348044*^9}],
Cell[BoxData["10"], "Output",
CellChangeTimes->{
3.6913058867948985`*^9, 3.691305970730196*^9, {3.691306005570572*^9,
3.6913060190876217`*^9}, 3.6913060827440357`*^9, 3.6913061580071144`*^9,
3.6913062192736025`*^9, {3.691306249389253*^9, 3.691306262983344*^9}, {
3.6913063064021807`*^9, 3.6913063550039463`*^9}, 3.6913065097845826`*^9,
3.6913067056238728`*^9, {3.6913068212898407`*^9, 3.69130684659295*^9},
3.6913068781308165`*^9, {3.6913069394084435`*^9, 3.6913069550993013`*^9},
3.69130700099846*^9, 3.691307130115664*^9, 3.6913072016489162`*^9,
3.691307243885848*^9, 3.691307277231384*^9, 3.6913074802221155`*^9,
3.6913200712286754`*^9, 3.6913201113448043`*^9, 3.6913202876550784`*^9,
3.691321096998535*^9, 3.6913217945808487`*^9, 3.691321978637983*^9,
3.6913228458437376`*^9, 3.691322971600961*^9, 3.6913562326198006`*^9,
3.704447503496067*^9}],
Cell[BoxData["\<\"<type 'str'>\"\>"], "Output",
CellChangeTimes->{
3.6913058867948985`*^9, 3.691305970730196*^9, {3.691306005570572*^9,
3.6913060190876217`*^9}, 3.6913060827440357`*^9, 3.6913061580071144`*^9,
3.6913062192736025`*^9, {3.691306249389253*^9, 3.691306262983344*^9}, {
3.6913063064021807`*^9, 3.6913063550039463`*^9}, 3.6913065097845826`*^9,
3.6913067056238728`*^9, {3.6913068212898407`*^9, 3.69130684659295*^9},
3.6913068781308165`*^9, {3.6913069394084435`*^9, 3.6913069550993013`*^9},
3.69130700099846*^9, 3.691307130115664*^9, 3.6913072016489162`*^9,
3.691307243885848*^9, 3.691307277231384*^9, 3.6913074802221155`*^9,
3.6913200712286754`*^9, 3.6913201113448043`*^9, 3.6913202876550784`*^9,
3.691321096998535*^9, 3.6913217945808487`*^9, 3.691321978637983*^9,
3.6913228458437376`*^9, 3.691322971600961*^9, 3.6913562326198006`*^9,
3.704447503496067*^9}],
Cell[BoxData["\<\"S.find(sub [,start [,end]]) -> int\\n\\nReturn the lowest \
index in S where substring sub is found,\\nsuch that sub is contained within \
S[start:end]. Optional\\narguments start and end are interpreted as in slice \
notation.\\n\\nReturn -1 on failure.\"\>"], "Output",
CellChangeTimes->{
3.6913058867948985`*^9, 3.691305970730196*^9, {3.691306005570572*^9,
3.6913060190876217`*^9}, 3.6913060827440357`*^9, 3.6913061580071144`*^9,
3.6913062192736025`*^9, {3.691306249389253*^9, 3.691306262983344*^9}, {
3.6913063064021807`*^9, 3.6913063550039463`*^9}, 3.6913065097845826`*^9,
3.6913067056238728`*^9, {3.6913068212898407`*^9, 3.69130684659295*^9},
3.6913068781308165`*^9, {3.6913069394084435`*^9, 3.6913069550993013`*^9},
3.69130700099846*^9, 3.691307130115664*^9, 3.6913072016489162`*^9,
3.691307243885848*^9, 3.691307277231384*^9, 3.6913074802221155`*^9,
3.6913200712286754`*^9, 3.6913201113448043`*^9, 3.6913202876550784`*^9,
3.691321096998535*^9, 3.6913217945808487`*^9, 3.691321978637983*^9,
3.6913228458437376`*^9, 3.691322971600961*^9, 3.6913562326198006`*^9,
3.704447503496067*^9}],
Cell[BoxData["\<\"<method-wrapper '__repr__' of method_descriptor object at \
0x000000000251E188>\"\>"], "Output",
CellChangeTimes->{
3.6913058867948985`*^9, 3.691305970730196*^9, {3.691306005570572*^9,
3.6913060190876217`*^9}, 3.6913060827440357`*^9, 3.6913061580071144`*^9,
3.6913062192736025`*^9, {3.691306249389253*^9, 3.691306262983344*^9}, {
3.6913063064021807`*^9, 3.6913063550039463`*^9}, 3.6913065097845826`*^9,
3.6913067056238728`*^9, {3.6913068212898407`*^9, 3.69130684659295*^9},
3.6913068781308165`*^9, {3.6913069394084435`*^9, 3.6913069550993013`*^9},
3.69130700099846*^9, 3.691307130115664*^9, 3.6913072016489162`*^9,
3.691307243885848*^9, 3.691307277231384*^9, 3.6913074802221155`*^9,
3.6913200712286754`*^9, 3.6913201113448043`*^9, 3.6913202876550784`*^9,
3.691321096998535*^9, 3.6913217945808487`*^9, 3.691321978637983*^9,
3.6913228458437376`*^9, 3.691322971600961*^9, 3.6913562326198006`*^9,
3.704447503496067*^9}],
Cell[BoxData["\<\"<method 'find' of 'str' objects>\"\>"], "Output",
CellChangeTimes->{
3.6913058867948985`*^9, 3.691305970730196*^9, {3.691306005570572*^9,
3.6913060190876217`*^9}, 3.6913060827440357`*^9, 3.6913061580071144`*^9,
3.6913062192736025`*^9, {3.691306249389253*^9, 3.691306262983344*^9}, {
3.6913063064021807`*^9, 3.6913063550039463`*^9}, 3.6913065097845826`*^9,
3.6913067056238728`*^9, {3.6913068212898407`*^9, 3.69130684659295*^9},
3.6913068781308165`*^9, {3.6913069394084435`*^9, 3.6913069550993013`*^9},
3.69130700099846*^9, 3.691307130115664*^9, 3.6913072016489162`*^9,
3.691307243885848*^9, 3.691307277231384*^9, 3.6913074802221155`*^9,
3.6913200712286754`*^9, 3.6913201113448043`*^9, 3.6913202876550784`*^9,
3.691321096998535*^9, 3.6913217945808487`*^9, 3.691321978637983*^9,
3.6913228458437376`*^9, 3.691322971600961*^9, 3.6913562326198006`*^9,
3.704447503496067*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{"x", "=."}], "\[IndentingNewLine]",
RowBox[{"Py", "[",
RowBox[{"x", ",", "10"}], "]"}], "\[IndentingNewLine]",
RowBox[{"Py", "[", "x", "]"}], "\[IndentingNewLine]",
RowBox[{"Py", "[",
RowBox[{"meval", "[",
RowBox[{"x", "!"}], "]"}], "]"}], "\[IndentingNewLine]",
RowBox[{"Py", "[",
RowBox[{
RowBox[{"mfunc", "[", "\"\<Factorial\>\"", "]"}], "[", "x", "]"}],
"]"}]}], "Input",
CellChangeTimes->{{3.6913010736552234`*^9, 3.691301096366581*^9}, {
3.691301271870244*^9, 3.6913012724782305`*^9}, {3.6913013057437706`*^9,
3.691301321087119*^9}, {3.6913014251065044`*^9, 3.691301430214739*^9}, {
3.691301976763262*^9, 3.6913019805130424`*^9}, {3.691303037707389*^9,
3.6913030393776455`*^9}}],
Cell[BoxData["10"], "Output",
CellChangeTimes->{{3.691301079136544*^9, 3.6913010968008814`*^9},
3.6913012728444386`*^9, {3.6913013218781652`*^9, 3.691301340057695*^9}, {
3.6913014221073074`*^9, 3.6913014310956297`*^9}, 3.6913017753524227`*^9, {
3.691301971546262*^9, 3.6913019810422096`*^9}, {3.6913030229622936`*^9,
3.691303040978394*^9}, 3.6913031183440647`*^9, 3.691303149968337*^9,
3.691305606702417*^9, 3.691306266334073*^9, 3.691306515326928*^9,
3.6913069590821667`*^9, 3.6913070051266203`*^9, 3.6913201221683354`*^9,
3.6913211027630086`*^9, 3.6913218040511866`*^9, 3.691322859692628*^9,
3.6913229750633183`*^9, 3.7044475069802184`*^9}],
Cell[BoxData["10"], "Output",
CellChangeTimes->{{3.691301079136544*^9, 3.6913010968008814`*^9},
3.6913012728444386`*^9, {3.6913013218781652`*^9, 3.691301340057695*^9}, {
3.6913014221073074`*^9, 3.6913014310956297`*^9}, 3.6913017753524227`*^9, {
3.691301971546262*^9, 3.6913019810422096`*^9}, {3.6913030229622936`*^9,
3.691303040978394*^9}, 3.6913031183440647`*^9, 3.691303149968337*^9,
3.691305606702417*^9, 3.691306266334073*^9, 3.691306515326928*^9,
3.6913069590821667`*^9, 3.6913070051266203`*^9, 3.6913201221683354`*^9,
3.6913211027630086`*^9, 3.6913218040511866`*^9, 3.691322859692628*^9,
3.6913229750633183`*^9, 3.7044475069802184`*^9}],
Cell[BoxData["3628800"], "Output",
CellChangeTimes->{{3.691301079136544*^9, 3.6913010968008814`*^9},
3.6913012728444386`*^9, {3.6913013218781652`*^9, 3.691301340057695*^9}, {
3.6913014221073074`*^9, 3.6913014310956297`*^9}, 3.6913017753524227`*^9, {
3.691301971546262*^9, 3.6913019810422096`*^9}, {3.6913030229622936`*^9,
3.691303040978394*^9}, 3.6913031183440647`*^9, 3.691303149968337*^9,
3.691305606702417*^9, 3.691306266334073*^9, 3.691306515326928*^9,
3.6913069590821667`*^9, 3.6913070051266203`*^9, 3.6913201221683354`*^9,
3.6913211027630086`*^9, 3.6913218040511866`*^9, 3.691322859692628*^9,
3.6913229750633183`*^9, 3.7044475069802184`*^9}],
Cell[BoxData["3628800"], "Output",
CellChangeTimes->{{3.691301079136544*^9, 3.6913010968008814`*^9},
3.6913012728444386`*^9, {3.6913013218781652`*^9, 3.691301340057695*^9}, {
3.6913014221073074`*^9, 3.6913014310956297`*^9}, 3.6913017753524227`*^9, {
3.691301971546262*^9, 3.6913019810422096`*^9}, {3.6913030229622936`*^9,
3.691303040978394*^9}, 3.6913031183440647`*^9, 3.691303149968337*^9,
3.691305606702417*^9, 3.691306266334073*^9, 3.691306515326928*^9,
3.6913069590821667`*^9, 3.6913070051266203`*^9, 3.6913201221683354`*^9,
3.6913211027630086`*^9, 3.6913218040511866`*^9, 3.691322859692628*^9,
3.6913229750633183`*^9, 3.7044475069802184`*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{"Py", "[", "\"\<def f(x): return x**2\>\"",
"]"}], "\[IndentingNewLine]",
RowBox[{"f", "=."}], "\[IndentingNewLine]",
RowBox[{"Py", "[",
RowBox[{"f", "[", "10", "]"}], "]"}]}], "Input",
CellChangeTimes->{{3.6912853493942146`*^9, 3.691285351004602*^9}, {
3.691285384045616*^9, 3.691285388495138*^9}, {3.69128869592414*^9,
3.691288715807849*^9}, 3.6912895243061*^9, {3.691289610434324*^9,
3.6912896354217834`*^9}, {3.691301781627053*^9, 3.691301792356144*^9}, {
3.691301994986389*^9, 3.691301998601845*^9}}],
Cell[BoxData["100"], "Output",
CellChangeTimes->{{3.691301785866111*^9, 3.691301792759986*^9}, {
3.691301989455038*^9, 3.691301999038512*^9}, 3.6913030238605795`*^9,
3.691303159174158*^9, 3.691305622436672*^9, 3.6913069615212917`*^9,
3.6913070069914026`*^9, 3.691321103698073*^9, 3.691321806432232*^9,
3.6913228606141005`*^9, 3.691322976063402*^9, 3.7044475091989985`*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"Py", "[", "\"\<hehe\>\"", "]"}]], "Input",
CellChangeTimes->{{3.6912886282114687`*^9, 3.691288631310172*^9}}],
Cell[BoxData[
RowBox[{"Error", "[",
RowBox[{"\<\" File \\\"<string>\\\", line 1, in <module>\"\>",
",", "\<\"NameError: name 'hehe' is not defined\"\>"}], "]"}]], "Output",
CellChangeTimes->{{3.691288631624383*^9, 3.6912886510942783`*^9},
3.691289235221743*^9, 3.6912895269681654`*^9, 3.691289638017889*^9,
3.6912897662652617`*^9, 3.6912902772542777`*^9, 3.6913002672039146`*^9,
3.691301294637197*^9, 3.6913017939382734`*^9, 3.691301999998431*^9,
3.691303024561489*^9, 3.6913031599543023`*^9, 3.6913069641606493`*^9,
3.6913070077299805`*^9, 3.691321104783058*^9, 3.6913218079223824`*^9,
3.6913228612904663`*^9, 3.6913229771269865`*^9, 3.704447511179387*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{"x", "=",
RowBox[{"Py", "[", "\"\<{'a':3,'b':4}\>\"", "]"}]}], "\[IndentingNewLine]",
RowBox[{"$", "@", "x"}]}], "Input",
CellChangeTimes->{{3.6913203495186014`*^9, 3.691320377611045*^9}}],
Cell[BoxData["\<\"{'a': 3, 'b': 4}\"\>"], "Output",
CellChangeTimes->{3.6913203508721776`*^9, 3.691320399702362*^9,
3.691320505328362*^9, 3.691320648171793*^9, 3.691321113499915*^9,
3.6913218390740757`*^9, 3.6913229044865756`*^9, 3.6913229941406155`*^9,
3.7044475133226137`*^9}],
Cell[BoxData[
RowBox[{"\[LeftAssociation]",
RowBox[{
RowBox[{"a", "\[Rule]", "3"}], ",",
RowBox[{"b", "\[Rule]", "4"}]}], "\[RightAssociation]"}]], "Output",
CellChangeTimes->{3.6913203508721776`*^9, 3.691320399702362*^9,
3.691320505328362*^9, 3.691320648171793*^9, 3.691321113499915*^9,
3.6913218390740757`*^9, 3.6913229044865756`*^9, 3.6913229941406155`*^9,
3.7044475133226137`*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{"x", "=",
RowBox[{"Py", "[", "\"\<[1,2]\>\"", "]"}]}], "\[IndentingNewLine]",
RowBox[{"$", "@", "x"}]}], "Input",
CellChangeTimes->{{3.6911950452831945`*^9, 3.69119505591321*^9}, {
3.6911951042131357`*^9, 3.691195118675044*^9}, {3.691277524004605*^9,
3.6912775246518297`*^9}, {3.691320319787163*^9, 3.6913203211908245`*^9}, {
3.6913203865523095`*^9, 3.6913203870410013`*^9}}],
Cell[BoxData["\<\"[1, 2]\"\>"], "Output",
CellChangeTimes->{
3.6911951195995674`*^9, 3.6911998863442755`*^9, 3.691276863774705*^9,
3.691277525086322*^9, 3.691278895452989*^9, {3.6912789796554465`*^9,
3.6912789893460765`*^9}, 3.6912852312063847`*^9, 3.691289675478093*^9,
3.691290312633253*^9, 3.691300285975154*^9, 3.691301798488354*^9,
3.691302003899171*^9, 3.691303028384674*^9, 3.691307034296278*^9,
3.6913072971682243`*^9, {3.6913202995769644`*^9, 3.6913203216547146`*^9},
3.691320405823083*^9, 3.6913206569393597`*^9, 3.691321114417052*^9,
3.6913218404894733`*^9, 3.691322905442865*^9, 3.6913229949699287`*^9,
3.7044475156219378`*^9}],
Cell[BoxData[
RowBox[{"{",
RowBox[{"1", ",", "2"}], "}"}]], "Output",
CellChangeTimes->{
3.6911951195995674`*^9, 3.6911998863442755`*^9, 3.691276863774705*^9,
3.691277525086322*^9, 3.691278895452989*^9, {3.6912789796554465`*^9,
3.6912789893460765`*^9}, 3.6912852312063847`*^9, 3.691289675478093*^9,
3.691290312633253*^9, 3.691300285975154*^9, 3.691301798488354*^9,
3.691302003899171*^9, 3.691303028384674*^9, 3.691307034296278*^9,
3.6913072971682243`*^9, {3.6913202995769644`*^9, 3.6913203216547146`*^9},
3.691320405823083*^9, 3.6913206569393597`*^9, 3.691321114417052*^9,
3.6913218404894733`*^9, 3.691322905442865*^9, 3.6913229949699287`*^9,
3.7044475156219378`*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"x", "@", "\"\<__doc__\>\""}]], "Input",
CellChangeTimes->{{3.6912790107763186`*^9, 3.691279038136238*^9}}],
Cell[BoxData["\<\"list() -> new empty list\\nlist(iterable) -> new list \
initialized from iterable's items\"\>"], "Output",
CellChangeTimes->{{3.6912790171365323`*^9, 3.6912790387988944`*^9},
3.6912852319450645`*^9, 3.6912896761280484`*^9, 3.691290315962016*^9,
3.691300286766667*^9, 3.6913017992617025`*^9, 3.69130200482714*^9,
3.6913030291326604`*^9, 3.6913070370742855`*^9, 3.6913072980028715`*^9,
3.691320301731353*^9, 3.6913211153670993`*^9, 3.691321841903216*^9,
3.6913229063829517`*^9, 3.691322999040117*^9, 3.704447516731343*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"x", "@",
RowBox[{"$", "[", "0", "]"}]}]], "Input",
CellChangeTimes->{{3.6913211191981735`*^9, 3.691321121302345*^9}}],
Cell[BoxData["1"], "Output",
CellChangeTimes->{
3.6912789900427084`*^9, 3.691285233306241*^9, 3.691289676898116*^9,
3.691290317064528*^9, 3.6913002875341687`*^9, 3.6913018000023613`*^9,
3.6913020055392895`*^9, 3.691303029844136*^9, 3.691307044124504*^9,
3.691307301661893*^9, 3.6913203029144163`*^9, {3.691321116328836*^9,
3.691321121931137*^9}, 3.6913218429399905`*^9, 3.6913229120692215`*^9,
3.691322999998043*^9, 3.704447517528208*^9}]
}, Open ]],
Cell[BoxData[
RowBox[{"x", "@",
RowBox[{"reverse", "[", "]"}]}]], "Input",
CellChangeTimes->{{3.6912775258434925`*^9, 3.691277568745325*^9},
3.6912788970500064`*^9}],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"x", "@",
RowBox[{"$", "[", "0", "]"}]}]], "Input",
CellChangeTimes->{{3.691278901036245*^9, 3.6912789307287893`*^9}, {
3.6912789816683474`*^9, 3.691278981977048*^9}, 3.691321126062766*^9}],
Cell[BoxData["2"], "Output",
CellChangeTimes->{{3.691278901354876*^9, 3.69127893116815*^9}, {
3.6912789823449545`*^9, 3.6912789915353985`*^9}, 3.6912852353336*^9,
3.69128967815724*^9, 3.691290318245322*^9, 3.691300288725877*^9,
3.6913018015136485`*^9, 3.691302006724186*^9, 3.6913030312756433`*^9,
3.691307303151266*^9, 3.6913211269038506`*^9, 3.691321844362419*^9,
3.691322913281665*^9, 3.6913230010969677`*^9, 3.7044475191688166`*^9}]
}, Open ]],
Cell[BoxData[{
RowBox[{
RowBox[{"Uninstall", "@",
RowBox[{"Last", "@",
RowBox[{"Links", "[", "\"\<*PythonLink.py*\>\"", "]"}]}]}],
";"}], "\[IndentingNewLine]",
RowBox[{
RowBox[{"LinkClose", "/@",
RowBox[{"Links", "[", "\"\<*PythonLink.py*\>\"", "]"}]}], ";"}]}], "Input",
CellChangeTimes->{{3.691307412501192*^9, 3.691307416850932*^9},
3.7044475363889194`*^9}]
}, Closed]],
Cell[CellGroupData[{
Cell["Lua", "Subsection",
CellChangeTimes->{{3.6912852466158957`*^9, 3.6912852509958506`*^9}}],
Cell[BoxData[
RowBox[{
RowBox[{"Install", "[",
RowBox[{"\"\<cmd /k \>\"", "<>",
RowBox[{"NotebookDirectory", "[", "]"}], "<>",
"\"\<Lua\\\\luajit.exe \>\"", "<>",
RowBox[{"NotebookDirectory", "[", "]"}], "<>",
"\"\<Lua\\\\LuaLink.lua\>\""}], "]"}], ";"}]], "Input",
CellChangeTimes->{{3.704447583985406*^9, 3.704447626175969*^9}, {
3.7044476685344386`*^9, 3.7044476693939266`*^9}, {3.704447750247059*^9,
3.7044477510908594`*^9}}],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"x", "=",
RowBox[{"Lua", "[",
RowBox[{"\[LeftAssociation]",
RowBox[{
RowBox[{"1", "\[Rule]", "100"}], ",",
RowBox[{"\"\<b\>\"", "\[Rule]", "200"}]}], "\[RightAssociation]"}],
"]"}]}]], "Input",
CellChangeTimes->{{3.6913550665166817`*^9, 3.6913550877961555`*^9}, {
3.6913551702285337`*^9, 3.6913551995358763`*^9}, {3.6913554301172557`*^9,
3.691355432760255*^9}}],
Cell[BoxData["\<\"table: 0x0113c6c8\"\>"], "Output",
CellChangeTimes->{
3.6913551999491224`*^9, 3.691355248509396*^9, 3.6913553538278756`*^9, {
3.691355420788639*^9, 3.691355434206337*^9}, 3.704447759934367*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"{",
RowBox[{
RowBox[{"x", "[", "1", "]"}], ",",
RowBox[{"x", "@", "b"}]}], "}"}]], "Input",
CellChangeTimes->{{3.6913552074511023`*^9, 3.6913552171578417`*^9}, {
3.6913552516814594`*^9, 3.691355257206354*^9}, {3.6913554360205855`*^9,
3.6913554606335664`*^9}}],
Cell[BoxData[
RowBox[{"{",
RowBox[{"100", ",", "200"}], "}"}]], "Output",
CellChangeTimes->{{3.6913554216483293`*^9, 3.6913554610305576`*^9},
3.7044477627312155`*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"Lua", "[",
RowBox[{"Null", "[", "\"\<3\>\"", "]"}], "]"}]], "Input",
CellChangeTimes->{{3.691023499807246*^9, 3.691023510221385*^9}, {
3.6910251600919533`*^9, 3.6910251603026905`*^9}}],
Cell[BoxData[
RowBox[{"Null", "[", "\<\"3\"\>", "]"}]], "Output",
CellChangeTimes->{{3.6910235051559343`*^9, 3.6910235105458155`*^9},
3.6910251606107635`*^9, 3.6910259839246044`*^9, 3.6910260740349374`*^9,
3.691026260631303*^9, 3.691026507594057*^9, 3.6910550171412134`*^9,
3.6910557645743866`*^9, 3.6910565523703947`*^9, 3.6910578230735793`*^9,
3.6910581906425962`*^9, 3.691058419231435*^9, 3.691058509656001*^9,
3.691059176119842*^9, 3.6910607851346684`*^9, 3.691060944381398*^9,
3.6910614592885733`*^9, 3.6911074773421335`*^9, 3.691114615169905*^9,
3.6911168107950196`*^9, 3.6912943012757225`*^9, 3.691294425195168*^9,
3.6913211740652895`*^9, 3.7044477639812145`*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{"x", "=."}], "\[IndentingNewLine]",
RowBox[{"Lua", "[",
RowBox[{"x", ",", "10"}], "]"}], "\[IndentingNewLine]",
RowBox[{"Lua", "[",
RowBox[{"tonumber", "@",
RowBox[{
RowBox[{"mfunc", "[", "\"\<Factorial\>\"", "]"}], "[", "x", "]"}]}],
"]"}]}], "Input",
CellChangeTimes->{{3.6910260200850143`*^9, 3.6910260223919473`*^9}, {
3.6910261154366155`*^9, 3.6910261156793346`*^9}, {3.691026557749514*^9,
3.691026558487259*^9}, {3.6910265934948406`*^9, 3.691026604030532*^9}, {
3.691052733912874*^9, 3.6910527698762712`*^9}, {3.691054980254535*^9,
3.691054981624118*^9}, {3.6910557685071187`*^9, 3.6910557692304893`*^9}, {
3.691059311368246*^9, 3.6910594080789194`*^9}, {3.6910594713697586`*^9,
3.6910595164037447`*^9}, {3.691059650513908*^9, 3.6910596602730317`*^9}, {
3.6910608397664824`*^9, 3.6910608566079087`*^9}, {3.6910611805235257`*^9,
3.691061249030249*^9}, {3.6911018690567193`*^9, 3.691101889071503*^9}}],
Cell[BoxData["10"], "Output",
CellChangeTimes->{
3.691026022664689*^9, 3.691026076245652*^9, 3.6910261160128365`*^9,
3.6910262614807825`*^9, 3.6910265029451027`*^9, 3.6910265615115623`*^9, {
3.6910265952049217`*^9, 3.691026615968032*^9}, {3.691052737752308*^9,
3.691052770215475*^9}, 3.6910550198409543`*^9, 3.6910557703853292`*^9,
3.691056550403895*^9, 3.691058255280662*^9, 3.691058647288844*^9, {
3.691059304646575*^9, 3.691059340789196*^9}, {3.691059374553195*^9,
3.691059408463294*^9}, {3.691059473756616*^9, 3.6910595171876874`*^9}, {
3.6910596441766*^9, 3.691059668103174*^9}, {3.6910608448706183`*^9,
3.6910608613745785`*^9}, 3.691060945310276*^9, 3.691060983325683*^9, {
3.691061181892858*^9, 3.6910612498755617`*^9}, 3.6910614572130146`*^9, {
3.6911018759460735`*^9, 3.6911018969364614`*^9}, 3.6911032136987953`*^9,
3.691106836363028*^9, 3.6911146664845343`*^9, 3.691115509395919*^9,
3.691116808841896*^9, 3.691294302198518*^9, 3.691294425942233*^9,
3.691321175168434*^9, 3.704447765103784*^9}],
Cell[BoxData["3.6288`*^6"], "Output",
CellChangeTimes->{
3.691026022664689*^9, 3.691026076245652*^9, 3.6910261160128365`*^9,
3.6910262614807825`*^9, 3.6910265029451027`*^9, 3.6910265615115623`*^9, {
3.6910265952049217`*^9, 3.691026615968032*^9}, {3.691052737752308*^9,
3.691052770215475*^9}, 3.6910550198409543`*^9, 3.6910557703853292`*^9,
3.691056550403895*^9, 3.691058255280662*^9, 3.691058647288844*^9, {
3.691059304646575*^9, 3.691059340789196*^9}, {3.691059374553195*^9,
3.691059408463294*^9}, {3.691059473756616*^9, 3.6910595171876874`*^9}, {
3.6910596441766*^9, 3.691059668103174*^9}, {3.6910608448706183`*^9,
3.6910608613745785`*^9}, 3.691060945310276*^9, 3.691060983325683*^9, {
3.691061181892858*^9, 3.6910612498755617`*^9}, 3.6910614572130146`*^9, {
3.6911018759460735`*^9, 3.6911018969364614`*^9}, 3.6911032136987953`*^9,
3.691106836363028*^9, 3.6911146664845343`*^9, 3.691115509395919*^9,
3.691116808841896*^9, 3.691294302198518*^9, 3.691294425942233*^9,
3.691321175168434*^9, 3.704447765103784*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{"x", "=", "4"}], "\[IndentingNewLine]",
RowBox[{"Lua", "[",
RowBox[{"meval", "[",
RowBox[{"\"\<x\>\"", ",", "3"}], "]"}],
"]"}], "\[IndentingNewLine]", "x"}], "Input",
CellChangeTimes->{{3.691056976069313*^9, 3.6910570130025835`*^9}, {
3.6910587789660206`*^9, 3.6910588139372625`*^9}, {3.69105926402411*^9,
3.691059289496769*^9}, {3.6910608672883186`*^9, 3.691060868013069*^9}}],
Cell[BoxData["4"], "Output",
CellChangeTimes->{{3.6910570135145464`*^9, 3.691057020694821*^9},
3.6910578694803247`*^9, {3.6910581937415595`*^9, 3.691058196512562*^9},
3.691058424436186*^9, 3.6910585116854353`*^9, {3.6910587813579717`*^9,
3.691058814232503*^9}, {3.6910592758962355`*^9, 3.6910592898241963`*^9}, {
3.6910595843558517`*^9, 3.691059602414233*^9}, 3.691060869989006*^9,
3.6910609840535583`*^9, 3.691061252020954*^9, 3.691061454731676*^9,
3.6911032160979176`*^9, 3.6911068569703918`*^9, 3.6911146680223217`*^9,
3.691115510733808*^9, 3.691116807163622*^9, 3.6912943030611506`*^9,
3.691294426731124*^9, 3.691321207673417*^9, 3.704447768012691*^9}],
Cell[BoxData["3"], "Output",
CellChangeTimes->{{3.6910570135145464`*^9, 3.691057020694821*^9},
3.6910578694803247`*^9, {3.6910581937415595`*^9, 3.691058196512562*^9},
3.691058424436186*^9, 3.6910585116854353`*^9, {3.6910587813579717`*^9,
3.691058814232503*^9}, {3.6910592758962355`*^9, 3.6910592898241963`*^9}, {
3.6910595843558517`*^9, 3.691059602414233*^9}, 3.691060869989006*^9,
3.6910609840535583`*^9, 3.691061252020954*^9, 3.691061454731676*^9,
3.6911032160979176`*^9, 3.6911068569703918`*^9, 3.6911146680223217`*^9,
3.691115510733808*^9, 3.691116807163622*^9, 3.6912943030611506`*^9,
3.691294426731124*^9, 3.691321207673417*^9, 3.704447768012691*^9}],
Cell[BoxData["3"], "Output",
CellChangeTimes->{{3.6910570135145464`*^9, 3.691057020694821*^9},
3.6910578694803247`*^9, {3.6910581937415595`*^9, 3.691058196512562*^9},
3.691058424436186*^9, 3.6910585116854353`*^9, {3.6910587813579717`*^9,
3.691058814232503*^9}, {3.6910592758962355`*^9, 3.6910592898241963`*^9}, {
3.6910595843558517`*^9, 3.691059602414233*^9}, 3.691060869989006*^9,
3.6910609840535583`*^9, 3.691061252020954*^9, 3.691061454731676*^9,
3.6911032160979176`*^9, 3.6911068569703918`*^9, 3.6911146680223217`*^9,
3.691115510733808*^9, 3.691116807163622*^9, 3.6912943030611506`*^9,
3.691294426731124*^9, 3.691321207673417*^9, 3.704447768012691*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{"x", "=."}], "\[IndentingNewLine]",
RowBox[{"x", "=",
RowBox[{
"Lua", "[", "\"\<{{1,2},{3,4},a=3}\>\"", "]"}]}], "\[IndentingNewLine]",
RowBox[{"x", "[",
RowBox[{"2", ",", "1"}], "]"}], "\[IndentingNewLine]",
RowBox[{"$", "@", "x"}], "\[IndentingNewLine]",
RowBox[{"x", "[",
RowBox[{
RowBox[{"{",
RowBox[{"1", ",", "1"}], "}"}], ",", "3"}], "]"}], "\[IndentingNewLine]",
RowBox[{"$", "@", "x"}], "\[IndentingNewLine]",
RowBox[{"$$", "@", "x"}]}], "Input",
CellChangeTimes->{{3.6911068576886196`*^9, 3.6911068828694057`*^9}, {
3.6911069209832754`*^9, 3.6911069287028184`*^9}, {3.691114681074388*^9,
3.691114695381197*^9}, {3.691114801830942*^9, 3.691114805810528*^9}}],
Cell[BoxData["\<\"table: 0x0113ef28\"\>"], "Output",
CellChangeTimes->{{3.691106857897008*^9, 3.6911068831653075`*^9}, {
3.6911069155506353`*^9, 3.6911069291140695`*^9}, {3.6911146723636656`*^9,
3.6911146957384033`*^9}, 3.6911148063548775`*^9, 3.691115511924947*^9,
3.6912943043719883`*^9, 3.6912944279256744`*^9, 3.6913212089296074`*^9,
3.7044477700303216`*^9}],
Cell[BoxData["1"], "Output",
CellChangeTimes->{{3.691106857897008*^9, 3.6911068831653075`*^9}, {
3.6911069155506353`*^9, 3.6911069291140695`*^9}, {3.6911146723636656`*^9,
3.6911146957384033`*^9}, 3.6911148063548775`*^9, 3.691115511924947*^9,
3.6912943043719883`*^9, 3.6912944279256744`*^9, 3.6913212089296074`*^9,
3.7044477700459414`*^9}],
Cell[BoxData[
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{"1.`", ",", "2.`"}], "}"}], ",", "1"}], "}"}]], "Output",
CellChangeTimes->{{3.691106857897008*^9, 3.6911068831653075`*^9}, {
3.6911069155506353`*^9, 3.6911069291140695`*^9}, {3.6911146723636656`*^9,
3.6911146957384033`*^9}, 3.6911148063548775`*^9, 3.691115511924947*^9,
3.6912943043719883`*^9, 3.6912944279256744`*^9, 3.6913212089296074`*^9,
3.7044477700459414`*^9}],
Cell[BoxData["3"], "Output",
CellChangeTimes->{{3.691106857897008*^9, 3.6911068831653075`*^9}, {
3.6911069155506353`*^9, 3.6911069291140695`*^9}, {3.6911146723636656`*^9,
3.6911146957384033`*^9}, 3.6911148063548775`*^9, 3.691115511924947*^9,
3.6912943043719883`*^9, 3.6912944279256744`*^9, 3.6913212089296074`*^9,
3.7044477700615664`*^9}],
Cell[BoxData[
RowBox[{"{",
RowBox[{
RowBox[{"{",
RowBox[{"3", ",", "2.`"}], "}"}], ",", "1"}], "}"}]], "Output",
CellChangeTimes->{{3.691106857897008*^9, 3.6911068831653075`*^9}, {
3.6911069155506353`*^9, 3.6911069291140695`*^9}, {3.6911146723636656`*^9,
3.6911146957384033`*^9}, 3.6911148063548775`*^9, 3.691115511924947*^9,
3.6912943043719883`*^9, 3.6912944279256744`*^9, 3.6913212089296074`*^9,
3.7044477700615664`*^9}],
Cell[BoxData[
RowBox[{"\[LeftAssociation]",
RowBox[{
RowBox[{"1.`", "\[Rule]",
RowBox[{"\[LeftAssociation]",
RowBox[{
RowBox[{"1.`", "\[Rule]", "3"}], ",",
RowBox[{"2.`", "\[Rule]", "2.`"}]}], "\[RightAssociation]"}]}], ",",
RowBox[{"2.`", "\[Rule]", "1"}], ",",
RowBox[{"a", "\[Rule]", "3.`"}]}], "\[RightAssociation]"}]], "Output",
CellChangeTimes->{{3.691106857897008*^9, 3.6911068831653075`*^9}, {
3.6911069155506353`*^9, 3.6911069291140695`*^9}, {3.6911146723636656`*^9,
3.6911146957384033`*^9}, 3.6911148063548775`*^9, 3.691115511924947*^9,
3.6912943043719883`*^9, 3.6912944279256744`*^9, 3.6913212089296074`*^9,
3.704447770077196*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{"x", "=."}], "\[IndentingNewLine]",
RowBox[{"Lua", "[",
RowBox[{"x", ",",
RowBox[{"{",
RowBox[{"1", ",", "2"}], "}"}]}], "]"}], "\[IndentingNewLine]",
RowBox[{"Lua", "[",
RowBox[{"x", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}],
"]"}], "\[IndentingNewLine]",
RowBox[{"Lua", "[",
RowBox[{"x", ",", "\"\<{1,2}\>\""}], "]"}], "\[IndentingNewLine]",
RowBox[{"Lua", "[",
RowBox[{
RowBox[{"x", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], ",",
"3"}], "]"}], "\[IndentingNewLine]",
RowBox[{"Lua", "@",
RowBox[{"$", "@", "x"}]}]}], "Input",
CellChangeTimes->{{3.690980651213526*^9, 3.6909806602981987`*^9}, {
3.690980713436822*^9, 3.6909807144974337`*^9}, 3.6909807459954395`*^9, {
3.690980796633633*^9, 3.690980801704097*^9}, {3.6909808319537826`*^9,
3.6909808387167454`*^9}, {3.6909812154359307`*^9, 3.69098124363957*^9}, {
3.6909813963908606`*^9, 3.690981399720134*^9}, {3.6909814436405907`*^9,
3.690981465968916*^9}, {3.6909815032580223`*^9, 3.6909815150076036`*^9}, {
3.690982856373048*^9, 3.690982870335206*^9}, {3.6909834215304875`*^9,
3.69098343184851*^9}, {3.6909838575549917`*^9, 3.690983859374126*^9}, {
3.6909843949886417`*^9, 3.690984462479464*^9}, {3.6910557965874443`*^9,
3.6910558205374446`*^9}, {3.6910558602810144`*^9,
3.6910558662552843`*^9}, {3.6910558988857574`*^9, 3.691055920153674*^9}, {
3.6910559914578238`*^9, 3.691055999465413*^9}, {3.691056544157034*^9,
3.6910565453097377`*^9}, {3.691060878293985*^9, 3.691060881525459*^9}, {
3.691061436250923*^9, 3.6910614479351683`*^9}}],
Cell[BoxData[
RowBox[{"{",
RowBox[{"1", ",", "2"}], "}"}]], "Output",
CellChangeTimes->{{3.6909815050021706`*^9, 3.690981515574913*^9},
3.690982870660531*^9, {3.690983422336813*^9, 3.6909834321830297`*^9},
3.6909835192593255`*^9, 3.6909836048039837`*^9, 3.69098368001022*^9,
3.690983776562686*^9, 3.690983859815755*^9, 3.6909839283308845`*^9,
3.690983975085397*^9, {3.6909843749102273`*^9, 3.6909844628595924`*^9},
3.690985611707285*^9, 3.690986487692686*^9, 3.6909868428922005`*^9,
3.6910146140630603`*^9, 3.691015146761704*^9, 3.6910153474393797`*^9,
3.691015476377177*^9, 3.691015825387634*^9, 3.6910258750452876`*^9,
3.6910259939162335`*^9, {3.6910261203749104`*^9, 3.691026128836755*^9},
3.6910262623734164`*^9, 3.691026370121276*^9, 3.6910264251304445`*^9,
3.6910265008673606`*^9, 3.6910550241025515`*^9, {3.691055773566061*^9,
3.6910558209665365`*^9}, 3.691055866501964*^9, {3.69105590017994*^9,
3.6910559204763145`*^9}, {3.6910559942625675`*^9, 3.691055999878162*^9}, {
3.6910565415875807`*^9, 3.691056555442193*^9}, 3.691058712351423*^9,
3.691059415541848*^9, 3.6910595075800676`*^9, 3.6910608824105806`*^9,
3.6910609849027205`*^9, {3.6910614238873625`*^9, 3.6910614487332616`*^9},
3.691102016623665*^9, 3.6911032178362994`*^9, 3.691103625283311*^9,
3.691106939212201*^9, 3.6911147288135195`*^9, 3.691115514811895*^9,
3.6911167979610233`*^9, 3.691294430814349*^9, 3.691321212148179*^9,
3.6913212543369007`*^9, 3.7044477711926703`*^9}],
Cell[BoxData["1"], "Output",
CellChangeTimes->{{3.6909815050021706`*^9, 3.690981515574913*^9},
3.690982870660531*^9, {3.690983422336813*^9, 3.6909834321830297`*^9},
3.6909835192593255`*^9, 3.6909836048039837`*^9, 3.69098368001022*^9,
3.690983776562686*^9, 3.690983859815755*^9, 3.6909839283308845`*^9,
3.690983975085397*^9, {3.6909843749102273`*^9, 3.6909844628595924`*^9},
3.690985611707285*^9, 3.690986487692686*^9, 3.6909868428922005`*^9,
3.6910146140630603`*^9, 3.691015146761704*^9, 3.6910153474393797`*^9,
3.691015476377177*^9, 3.691015825387634*^9, 3.6910258750452876`*^9,
3.6910259939162335`*^9, {3.6910261203749104`*^9, 3.691026128836755*^9},
3.6910262623734164`*^9, 3.691026370121276*^9, 3.6910264251304445`*^9,
3.6910265008673606`*^9, 3.6910550241025515`*^9, {3.691055773566061*^9,
3.6910558209665365`*^9}, 3.691055866501964*^9, {3.69105590017994*^9,
3.6910559204763145`*^9}, {3.6910559942625675`*^9, 3.691055999878162*^9}, {
3.6910565415875807`*^9, 3.691056555442193*^9}, 3.691058712351423*^9,
3.691059415541848*^9, 3.6910595075800676`*^9, 3.6910608824105806`*^9,
3.6910609849027205`*^9, {3.6910614238873625`*^9, 3.6910614487332616`*^9},
3.691102016623665*^9, 3.6911032178362994`*^9, 3.691103625283311*^9,
3.691106939212201*^9, 3.6911147288135195`*^9, 3.691115514811895*^9,
3.6911167979610233`*^9, 3.691294430814349*^9, 3.691321212148179*^9,
3.6913212543369007`*^9, 3.7044477711926703`*^9}],
Cell[BoxData["\<\"table: 0x01145240\"\>"], "Output",
CellChangeTimes->{{3.6909815050021706`*^9, 3.690981515574913*^9},
3.690982870660531*^9, {3.690983422336813*^9, 3.6909834321830297`*^9},
3.6909835192593255`*^9, 3.6909836048039837`*^9, 3.69098368001022*^9,
3.690983776562686*^9, 3.690983859815755*^9, 3.6909839283308845`*^9,
3.690983975085397*^9, {3.6909843749102273`*^9, 3.6909844628595924`*^9},
3.690985611707285*^9, 3.690986487692686*^9, 3.6909868428922005`*^9,
3.6910146140630603`*^9, 3.691015146761704*^9, 3.6910153474393797`*^9,
3.691015476377177*^9, 3.691015825387634*^9, 3.6910258750452876`*^9,
3.6910259939162335`*^9, {3.6910261203749104`*^9, 3.691026128836755*^9},
3.6910262623734164`*^9, 3.691026370121276*^9, 3.6910264251304445`*^9,
3.6910265008673606`*^9, 3.6910550241025515`*^9, {3.691055773566061*^9,
3.6910558209665365`*^9}, 3.691055866501964*^9, {3.69105590017994*^9,
3.6910559204763145`*^9}, {3.6910559942625675`*^9, 3.691055999878162*^9}, {
3.6910565415875807`*^9, 3.691056555442193*^9}, 3.691058712351423*^9,
3.691059415541848*^9, 3.6910595075800676`*^9, 3.6910608824105806`*^9,
3.6910609849027205`*^9, {3.6910614238873625`*^9, 3.6910614487332616`*^9},
3.691102016623665*^9, 3.6911032178362994`*^9, 3.691103625283311*^9,
3.691106939212201*^9, 3.6911147288135195`*^9, 3.691115514811895*^9,
3.6911167979610233`*^9, 3.691294430814349*^9, 3.691321212148179*^9,
3.6913212543369007`*^9, 3.7044477712083073`*^9}],
Cell[BoxData["3"], "Output",
CellChangeTimes->{{3.6909815050021706`*^9, 3.690981515574913*^9},
3.690982870660531*^9, {3.690983422336813*^9, 3.6909834321830297`*^9},
3.6909835192593255`*^9, 3.6909836048039837`*^9, 3.69098368001022*^9,
3.690983776562686*^9, 3.690983859815755*^9, 3.6909839283308845`*^9,
3.690983975085397*^9, {3.6909843749102273`*^9, 3.6909844628595924`*^9},
3.690985611707285*^9, 3.690986487692686*^9, 3.6909868428922005`*^9,
3.6910146140630603`*^9, 3.691015146761704*^9, 3.6910153474393797`*^9,
3.691015476377177*^9, 3.691015825387634*^9, 3.6910258750452876`*^9,
3.6910259939162335`*^9, {3.6910261203749104`*^9, 3.691026128836755*^9},
3.6910262623734164`*^9, 3.691026370121276*^9, 3.6910264251304445`*^9,
3.6910265008673606`*^9, 3.6910550241025515`*^9, {3.691055773566061*^9,
3.6910558209665365`*^9}, 3.691055866501964*^9, {3.69105590017994*^9,
3.6910559204763145`*^9}, {3.6910559942625675`*^9, 3.691055999878162*^9}, {
3.6910565415875807`*^9, 3.691056555442193*^9}, 3.691058712351423*^9,
3.691059415541848*^9, 3.6910595075800676`*^9, 3.6910608824105806`*^9,
3.6910609849027205`*^9, {3.6910614238873625`*^9, 3.6910614487332616`*^9},
3.691102016623665*^9, 3.6911032178362994`*^9, 3.691103625283311*^9,
3.691106939212201*^9, 3.6911147288135195`*^9, 3.691115514811895*^9,
3.6911167979610233`*^9, 3.691294430814349*^9, 3.691321212148179*^9,
3.6913212543369007`*^9, 3.7044477712083073`*^9}],
Cell[BoxData[
RowBox[{"{",
RowBox[{"3", ",", "2.`"}], "}"}]], "Output",
CellChangeTimes->{{3.6909815050021706`*^9, 3.690981515574913*^9},
3.690982870660531*^9, {3.690983422336813*^9, 3.6909834321830297`*^9},
3.6909835192593255`*^9, 3.6909836048039837`*^9, 3.69098368001022*^9,
3.690983776562686*^9, 3.690983859815755*^9, 3.6909839283308845`*^9,
3.690983975085397*^9, {3.6909843749102273`*^9, 3.6909844628595924`*^9},
3.690985611707285*^9, 3.690986487692686*^9, 3.6909868428922005`*^9,
3.6910146140630603`*^9, 3.691015146761704*^9, 3.6910153474393797`*^9,
3.691015476377177*^9, 3.691015825387634*^9, 3.6910258750452876`*^9,
3.6910259939162335`*^9, {3.6910261203749104`*^9, 3.691026128836755*^9},
3.6910262623734164`*^9, 3.691026370121276*^9, 3.6910264251304445`*^9,
3.6910265008673606`*^9, 3.6910550241025515`*^9, {3.691055773566061*^9,
3.6910558209665365`*^9}, 3.691055866501964*^9, {3.69105590017994*^9,
3.6910559204763145`*^9}, {3.6910559942625675`*^9, 3.691055999878162*^9}, {
3.6910565415875807`*^9, 3.691056555442193*^9}, 3.691058712351423*^9,
3.691059415541848*^9, 3.6910595075800676`*^9, 3.6910608824105806`*^9,
3.6910609849027205`*^9, {3.6910614238873625`*^9, 3.6910614487332616`*^9},
3.691102016623665*^9, 3.6911032178362994`*^9, 3.691103625283311*^9,
3.691106939212201*^9, 3.6911147288135195`*^9, 3.691115514811895*^9,
3.6911167979610233`*^9, 3.691294430814349*^9, 3.691321212148179*^9,
3.6913212543369007`*^9, 3.7044477712083073`*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[{
RowBox[{"ffi", "=",
RowBox[{"Lua", "[",
RowBox[{"ffi", ",",
RowBox[{"require", "[", "\"\<ffi\>\"", "]"}]}],
"]"}]}], "\[IndentingNewLine]",
RowBox[{"Lua", "[",
RowBox[{
RowBox[{"ffi", "::", "cdef"}], "[", "\"\<double floor(double);\>\"", "]"}],
"]"}], "\[IndentingNewLine]",
RowBox[{"Lua", "[",
RowBox[{
RowBox[{"ffi", "::", "C", "::", "floor"}], "[", "3.14", "]"}],
"]"}]}], "Input",
CellChangeTimes->{{3.690891955024665*^9, 3.6908919654035263`*^9},
3.6909840493793736`*^9, {3.690984478455515*^9, 3.690984495719926*^9}, {
3.6909845529051156`*^9, 3.690984556666891*^9}, {3.691015173113576*^9,
3.6910151740284986`*^9}, {3.691017978281917*^9, 3.6910179788356752`*^9}, {
3.691116736551051*^9, 3.6911167370070953`*^9}}],
Cell[BoxData["\<\"table: 0x0112a2d8\"\>"], "Output",
CellChangeTimes->{{3.6909844792222834`*^9, 3.6909844972923717`*^9},
3.690984557327665*^9, 3.690986488678858*^9, 3.690986843692281*^9,
3.691014615162332*^9, {3.6910151493527517`*^9, 3.69101517447546*^9},
3.691015349640613*^9, 3.6910177018501883`*^9, 3.6910178546430902`*^9,
3.6910179441767716`*^9, 3.6910179795953617`*^9, 3.691025877775363*^9,
3.6910265100954585`*^9, 3.6910550264124365`*^9, 3.6910560099546227`*^9,
3.6910565386011863`*^9, 3.691058721097085*^9, 3.691059417457449*^9,
3.6910595085221972`*^9, 3.691060886393729*^9, 3.691060986259338*^9,
3.6910614213882556`*^9, 3.6911032203357725`*^9, 3.691103563489269*^9,
3.691106963369684*^9, 3.6911147400603094`*^9, 3.6911155184277353`*^9, {
3.6911167226267767`*^9, 3.691116739090165*^9}, 3.6912944399553194`*^9,
3.691321257743789*^9, 3.70444777413976*^9}],
Cell[BoxData["3.`"], "Output",
CellChangeTimes->{{3.6909844792222834`*^9, 3.6909844972923717`*^9},
3.690984557327665*^9, 3.690986488678858*^9, 3.690986843692281*^9,
3.691014615162332*^9, {3.6910151493527517`*^9, 3.69101517447546*^9},
3.691015349640613*^9, 3.6910177018501883`*^9, 3.6910178546430902`*^9,
3.6910179441767716`*^9, 3.6910179795953617`*^9, 3.691025877775363*^9,
3.6910265100954585`*^9, 3.6910550264124365`*^9, 3.6910560099546227`*^9,
3.6910565386011863`*^9, 3.691058721097085*^9, 3.691059417457449*^9,
3.6910595085221972`*^9, 3.691060886393729*^9, 3.691060986259338*^9,
3.6910614213882556`*^9, 3.6911032203357725`*^9, 3.691103563489269*^9,
3.691106963369684*^9, 3.6911147400603094`*^9, 3.6911155184277353`*^9, {
3.6911167226267767`*^9, 3.691116739090165*^9}, 3.6912944399553194`*^9,
3.691321257743789*^9, 3.7044477741866317`*^9}]
}, Open ]],
Cell[CellGroupData[{
Cell[BoxData[
RowBox[{"$$", "@", "ffi"}]], "Input",
CellChangeTimes->{{3.6911167402565794`*^9, 3.6911167451104956`*^9}}],
Cell[BoxData[
RowBox[{"\[LeftAssociation]",
RowBox[{
RowBox[{"new", "\[Rule]", "\<\"function: builtin#186\"\>"}], ",",
RowBox[{"cast", "\[Rule]", "\<\"function: builtin#187\"\>"}], ",",
RowBox[{"typeof", "\[Rule]", "\<\"function: builtin#188\"\>"}], ",",
RowBox[{"sizeof", "\[Rule]", "\<\"function: builtin#191\"\>"}], ",",
RowBox[{"alignof", "\[Rule]", "\<\"function: builtin#192\"\>"}], ",",
RowBox[{"istype", "\[Rule]", "\<\"function: builtin#190\"\>"}], ",",