tulisp 0.29.0

An embeddable lisp interpreter.
Documentation
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

/home/sahas/code/claudecode/tulisp/benches/common/mod.rs,155
pub struct BenchResult 7,149
pub fn run(14,277
pub fn save_results(40,1020
fn print_header(59,1651
fn print_row(67,1864
pub fn print_summary(77,2086

/home/sahas/code/claudecode/tulisp/benches/fib.rs,16
fn main(21,374

/home/sahas/code/claudecode/tulisp/examples/fib-fast.lisp,21
(defun fib-fast 1,0

/home/sahas/code/claudecode/tulisp/examples/fib-tail.lisp,38
(defun fib-impl 1,0
(defun fib 5,88

/home/sahas/code/claudecode/tulisp/examples/fib.lisp,16
(defun fib 1,0

/home/sahas/code/claudecode/tulisp/examples/fizz-buzz.lisp,22
(defun fizz-buzz 1,0

/home/sahas/code/claudecode/tulisp/examples/macros.lisp,19
(defmacro inc 1,0

/home/sahas/code/claudecode/tulisp/examples/tail-recursion.lisp,18
(defun build 1,0

/home/sahas/code/claudecode/tulisp/src/bin/bench_compare.rs,86
fn print_header(9,286
fn print_row(17,505
fn parse_results(23,890
fn main(40,1600

/home/sahas/code/claudecode/tulisp/src/bin/tulisp.rs,29
fn run(6,70
fn main(15,257

/home/sahas/code/claudecode/tulisp/src/builtin/functions/comparison_of_strings.rs,59
fn string_cmp(3,83
    fn test_string_comparison(51,1623

/home/sahas/code/claudecode/tulisp/src/builtin/functions/conditionals.rs,55
fn build_binding(157,4483
fn build_bindings(181,5169

/home/sahas/code/claudecode/tulisp/src/builtin/functions/core.rs,345
fn mark_tail_calls(38,997
    fn make_symbol(114,3545
    fn impl_let(322,10739
    fn lambda(385,12884
        fn capture_inside_quoted(395,13294
        fn slice_contains(430,14843
        fn capture_symbol(439,15075
        fn capture_variables(461,15909
    macro_rules! predicate_function 659,22371
            fn $name(661,22437

/home/sahas/code/claudecode/tulisp/src/builtin/functions/equality_predicates.rs,38
    fn equal(4,115
    fn eq(10,353

/home/sahas/code/claudecode/tulisp/src/builtin/functions/errors.rs,35
    fn test_error_handling(36,981

/home/sahas/code/claudecode/tulisp/src/builtin/functions/hash_table.rs,110
struct TulispObjectEql(7,160
    fn hash<H: 10,242
    fn eq(22,607
    fn from(29,763
    fn fmt(39,965

/home/sahas/code/claudecode/tulisp/src/builtin/functions/list_elements.rs,38
    macro_rules! impl_all_cxr 19,584

/home/sahas/code/claudecode/tulisp/src/builtin/functions/numbers/arithmetic_operations.rs,76
    fn add(7,191
    fn sub(12,367
    fn mul(29,965
    fn div(34,1141

/home/sahas/code/claudecode/tulisp/src/builtin/functions/numbers/comparison_of_numbers.rs,158
fn compare_impl<F: 7,162
fn recursive_compare<F: 22,620
    fn max(61,1641
    fn min(66,1839
    fn test_numeric_equal(83,2286
    fn test_abs(95,2683

/home/sahas/code/claudecode/tulisp/src/builtin/functions/numbers/math.rs,52
    fn test_sqrt(41,1188
    fn test_expt(55,1678

/home/sahas/code/claudecode/tulisp/src/builtin/functions/sequences.rs,312
    fn test_mapconcat(202,5737
    fn test_string_join(214,6163
    fn test_seq_take(222,6479
    fn test_seq_drop(231,6829
    fn test_make_string(239,7122
    fn test_length_string(247,7411
    fn test_memql(255,7678
    fn test_memq(264,8018
    fn test_member(271,8228
    fn test_reverse(282,8514

/home/sahas/code/claudecode/tulisp/src/builtin/functions/time_operations.rs,279
    fn ticks_hz_from_obj(36,1122
    fn time_operation(59,1983
    fn format_seconds(80,2699
    fn test_current_time(198,7165
    fn test_time_less_p(220,7756
    fn test_time_equal_p(295,9909
    fn test_time_add_subtract(346,11319
    fn test_format_seconds(411,13019

/home/sahas/code/claudecode/tulisp/src/builtin/macros.rs,64
fn thread_first(7,144
fn thread_last(23,670
fn quote(39,1173

/home/sahas/code/claudecode/tulisp/src/cons.rs,264
pub struct Cons 9,155
    fn eq(15,248
    pub fn new(21,375
    pub fn push(25,471
    pub fn append(55,1278
    fn drop(90,2286
pub struct BaseIter 105,2654
    fn next(112,2774
pub struct Iter<T: 122,2997
    pub fn new(128,3157
    fn next(139,3399

/home/sahas/code/claudecode/tulisp/src/context.rs,634
    pub fn set(31,515
    pub fn remove_all(37,696
pub struct TulispContext 53,1157
    fn default(62,1444
    pub fn new(69,1581
    pub fn intern(86,2168
    pub fn tags_table(103,2720
    pub fn defspecial(187,5792
    pub fn defun<260,9091
    pub fn defmacro(322,10879
    pub fn set_load_path<P: 338,11375
    pub fn eval(351,11828
    pub fn eval_and_then<T>(358,12134
    pub fn funcall(369,12481
    pub fn map(379,12790
    pub fn filter(390,13204
    pub fn reduce(407,13712
    pub fn eval_string(422,14182
    pub fn eval_progn(436,14565
    pub fn eval_each(455,15162
    pub fn eval_file(465,15488

/home/sahas/code/claudecode/tulisp/src/context/callable.rs,1035
    fn add_to_context(16,405
macro_rules! impl_tulisp_callable 19,474
            fn add_to_context(36,1181
            fn add_to_context(62,2303
            fn add_to_context(89,3473
            fn add_to_context(115,4612
            fn add_to_context(142,5782
            fn add_to_context(169,7000
            fn add_to_context(197,8271
            fn add_to_context(234,9942
            fn add_to_context(272,11662
            fn add_to_context(310,13378
            fn add_to_context(349,15123
            fn add_to_context(387,16890
        fn add_to_context(539,24366
        fn add_to_context(554,24958
        fn add_to_context(571,25610
        fn add_to_context(587,26262
        fn add_to_context(605,26949
        fn add_to_context(622,27657
    fn test_add_functions_only_rest(639,28177
    fn test_add_functions_only_args(689,29748
    fn test_add_functions_args_and_rest(718,30614
    fn test_add_functions_args_and_optional(741,31330
    fn test_add_functions_args_optional_and_rest(769,32099

/home/sahas/code/claudecode/tulisp/src/context/plist.rs,379
pub struct Plist<T: 36,1006
    pub fn into_inner(50,1272
    fn deref(61,1410
    fn from_plist(75,1888
    fn into_plist(80,2050
macro_rules! AsPlist 142,3840
            fn from_plist(192,5175
                struct Builder 196,5354
                    fn build(201,5484
            fn into_plist(243,7114
        struct Person 266,7732
    fn test_plist(289,8412

/home/sahas/code/claudecode/tulisp/src/context/rest.rs,182
pub struct Rest<T> 18,650
enum RestEnum<T> 22,699
    fn from(28,843
    fn from_iter<I: 42,1142
pub enum RestEnumIter<T> 58,1707
    fn next(69,1918
    fn into_iter(86,2342

/home/sahas/code/claudecode/tulisp/src/error.rs,317
macro_rules! replace_expr 3,43
macro_rules! ErrorKind 11,257
        pub enum ErrorKind 17,451
            fn fmt(24,605
pub struct Error 83,2653
    pub fn throw(91,2827
    fn format_span(99,3058
    pub fn format(112,3539
    pub fn with_trace(143,4513
    pub fn kind(152,4774
    pub fn desc(161,4967

/home/sahas/code/claudecode/tulisp/src/eval.rs,218
    fn eval<'a>(11,216
    fn eval<'a>(19,399
    fn eval<'a>(29,630
fn zip_function_args<E: 37,804
fn eval_function<E: 78,2112
fn eval_lambda<E: 91,2430
fn eval_back_quote(151,4339
pub fn macroexpand(265,8636

/home/sahas/code/claudecode/tulisp/src/eval/eval_into.rs,76
    fn eval_into(28,808
    fn eval_into(33,944
    fn eval_into(62,2038

/home/sahas/code/claudecode/tulisp/src/lib.rs,59
    fn eval_string(36,565
    fn must_eval_string(41,747

/home/sahas/code/claudecode/tulisp/src/macros.rs,196
fn main(9,119
macro_rules! list 38,689
fn main(72,1637
macro_rules! destruct_bind 116,2754
macro_rules! destruct_eval_bind 176,4697
macro_rules! intern 281,7850
            fn new(292,8145

/home/sahas/code/claudecode/tulisp/src/number.rs,608
pub enum Number 6,102
    fn default(12,179
    fn from(18,266
    fn from(24,364
    fn try_from(32,501
    fn from(44,853
    fn fmt(53,1039
    fn add(64,1313
    fn add(77,1770
    fn add(88,2034
    fn sub(99,2295
    fn sub(112,2752
    fn sub(123,3016
    fn mul(134,3277
    fn mul(147,3734
    fn mul(158,3998
    fn div(169,4259
    fn div(182,4732
    fn div(193,5012
    fn rem(204,5273
    fn rem(217,5730
    fn rem(228,5994
    fn eq(237,6224
    fn eq(248,6601
    fn eq(257,6811
    fn partial_cmp(266,7017
    fn partial_cmp(277,7465
    fn partial_cmp(286,7727

/home/sahas/code/claudecode/tulisp/src/object.rs,1466
pub struct Span 13,261
    pub fn new(20,378
pub struct TulispObject 31,622
    fn default(37,753
    fn fmt(43,859
macro_rules! predicate_fn 48,1001
macro_rules! extractor_fn_with_err 58,1246
        pub fn $name(62,1389
    pub fn nil(83,2052
    pub fn t(92,2318
    pub fn cons(98,2478
    pub fn equal(110,2904
    pub fn eq(123,3347
    pub fn eql(134,3805
    pub fn base_iter(143,4042
    pub fn iter<T: 169,4785
    pub fn push(181,5220
    pub fn append(192,5566
    pub fn fmt_string(203,5930
    pub fn set(211,6229
    pub fn set_scope(223,6629
    pub fn unset(234,6965
    pub fn get(245,7248
struct TestStruct 309,9092
    fn fmt(314,9171
    pub fn span(462,13498
    pub fn deep_copy(467,13592
    fn try_from(504,14830
    fn try_from(513,15065
    fn try_from(522,15298
    fn try_from(535,15585
    fn try_from(548,15871
    fn try_from(556,16073
    fn try_from(564,16281
    fn try_from(572,16452
    fn try_from(580,16640
    fn try_from(588,16854
    fn try_from(599,17115
    fn try_from(614,17486
macro_rules! tulisp_object_from 623,17746
            fn from(626,17841
    fn from(634,18001
    fn from_iter<T: 657,18741
    fn from(666,18949
    fn from(675,19119
macro_rules! extractor_cxr_fn 683,19270
        pub fn $name(687,19467
        pub fn $name(698,19765
macro_rules! extractor_cxr_and_then_fn 708,19993
        pub fn $name<Out: 714,20227
        pub fn $name<Out: 728,20611

/home/sahas/code/claudecode/tulisp/src/object/conversions.rs,516
    fn from_tulisp(72,3295
    fn into_tulisp(77,3443
    fn from_tulisp(81,3524
    fn into_tulisp(85,3666
    fn from_tulisp(91,3798
    fn into_tulisp(95,3973
    fn from_tulisp(101,4105
    fn into_tulisp(105,4277
    fn from_tulisp(111,4410
    fn into_tulisp(114,4512
    fn from_tulisp(120,4662
    fn into_tulisp(123,4815
    fn from_tulisp(132,4985
    fn into_tulisp(139,5247
    fn from_tulisp(146,5461
    fn into_tulisp(149,5567
    fn from_tulisp(155,5668
    fn into_tulisp(158,5809

/home/sahas/code/claudecode/tulisp/src/object/wrappers.rs,913
    pub struct Shared<T: 27,556
        fn fmt(32,737
        fn clone(38,909
        pub fn new(48,1161
        pub fn downcast_ref<U: 52,1281
        pub fn downcast<U: 57,1451
        fn deref(68,1800
    pub struct SharedMut<T>(75,1933
        pub fn new(78,2026
        pub fn ptr_eq(81,2143
        pub fn borrow(85,2258
        pub fn borrow_mut(89,2353
        pub fn addr_as_usize(93,2459
        pub fn strong_count(97,2554
    pub struct Shared<T: 116,2918
        fn fmt(121,3114
        fn clone(127,3286
        pub fn new(137,3541
        pub fn downcast_ref<U: 141,3664
        pub fn downcast<U: 146,3834
        fn deref(157,4186
    pub struct SharedMut<T>(164,4319
        pub fn new(166,4413
        pub fn ptr_eq(169,4532
        pub fn borrow(173,4650
        pub fn borrow_mut(177,4764
        pub fn addr_as_usize(181,4884
        pub fn strong_count(185,4995

/home/sahas/code/claudecode/tulisp/src/parse.rs,538
struct Tokenizer<'a> 7,173
enum ParserErrorKind 15,312
struct ParserError 21,389
    fn new(28,493
    fn syntax_error(32,611
enum Token 38,753
    fn new(56,1222
    fn peek_char(66,1449
    fn next_char(70,1550
    fn read_string(81,1812
    fn read_num_ident(131,3670
    fn read_num_ident_impl(136,3852
    fn next(207,6207
struct Parser<'a,297,9816
fn recursive_update_ctxobj(307,10076
    fn new<'b,323,10509
    fn parse_list(340,10988
    fn parse_value(436,14536
    fn parse(544,19101
pub fn parse(553,19342

/home/sahas/code/claudecode/tulisp/src/value.rs,669
    fn fmt(29,516
pub struct DefunParams 39,782
    fn fmt(45,898
    fn try_from(57,1208
pub struct SymbolBindings 107,2719
    fn fmt(231,6261
pub enum TulispValue 240,6470
    fn fmt(291,7462
    fn eq(338,9605
fn fmt_list(358,10715
    fn fmt(388,11779
    pub fn into_ref(609,19468
    fn try_into(820,25171
    fn try_into(828,25312
    fn try_from(836,25451
    fn from(842,25590
    fn from(850,25739
    fn from(858,25889
    fn from(866,26046
    fn from(872,26164
    fn from(881,26351
    fn from(887,26486
    fn from_iter<T: 893,26629
macro_rules! make_cxr 904,26959
macro_rules! make_cxr_and_then 913,27160
    fn cxr(936,27786

/home/sahas/code/claudecode/tulisp/tests/tests.rs,1615
macro_rules! tulisp_assert 6,134
fn test_comparison_of_numbers(57,1746
fn test_conditionals(140,5152
fn test_defun(256,9949
fn test_tco(377,13158
fn test_eval(424,14314
fn test_strings(475,15495
fn test_cons(535,17511
fn test_quote(560,18106
fn test_lists(585,18672
fn test_backquotes(711,22032
fn test_math(742,22762
fn test_rounding_operations(811,25640
fn test_let(837,26508
fn test_lexical_binding(884,27917
fn test_setq(936,29135
fn test_defvar(950,29457
fn test_while(975,30078
fn test_sequences(984,30263
fn test_sort(1021,31155
fn test_threading_macros(1069,32634
fn test_owned_method(1157,34564
    struct Demo 1158,34610
        fn run(1162,34667
fn test_from_iter(1183,34984
fn test_typed_iter(1190,35193
fn test_any(1224,35908
    struct TestStruct 1226,35966
        fn fmt(1230,36050
        fn from_tulisp(1236,36241
        fn into_tulisp(1245,36685
fn test_load(1302,37974
fn test_macroexpand(1331,38625
fn test_hash_table(1371,39413
fn test_predicates(1395,39925
fn test_symbol_creation(1404,40142
fn test_underscore_ident(1439,41017
    fn write_temp_file(1454,41535
        struct Cleanup(1460,41881
            fn drop(1462,41957
    fn assert_tag_entry(1473,42305
    fn test_etags_defun_tracking(1482,42566
    fn test_etags_defmacro_tracking(1493,42976
    fn test_etags_multiple_definitions(1504,43391
    fn test_etags_defvar_tracking(1519,43945
    fn test_etags_builtin_functions_tracked(1535,44468
    fn test_etags_output_contains_filename(1549,44935
    fn test_etags_multiple_files(1564,45494
    fn test_etags_follow_load(1579,46192

/home/sahas/code/claudecode/tulisp/tests/good-load.lisp,0

/home/sahas/code/claudecode/tulisp/tests/bad-load.lisp,0

/home/sahas/code/claudecode/tulisp/src/builtin/mod.rs,0

/home/sahas/code/claudecode/tulisp/src/builtin/functions/numbers/rounding_operations.rs,0

/home/sahas/code/claudecode/tulisp/src/builtin/functions/numbers/mod.rs,0

/home/sahas/code/claudecode/tulisp/src/builtin/functions/mod.rs,0

/home/sahas/code/claudecode/tulisp/examples/lists.lisp,0

/home/sahas/code/claudecode/tulisp/src/lists.rs,306
pub fn length(9,214
pub fn last(24,637
pub fn nthcdr(57,1609
pub fn nth(69,1891
pub fn alist_from<const 74,2053
pub fn plist_from<const 83,2351
pub fn assoc(97,2892
pub fn alist_get(128,3948
fn assoc_find(144,4388
pub fn plist_get(164,5001
    fn test_alist(180,5449
    fn test_plist(200,6058