diff options
| author | Taylan Kammer <taylan.kammer@gmail.com> | 2025-03-28 21:14:12 +0100 |
|---|---|---|
| committer | Taylan Kammer <taylan.kammer@gmail.com> | 2025-03-28 21:14:12 +0100 |
| commit | 5025f9acf31cd880bbff62ff47ed03b69a0025ee (patch) | |
| tree | 866f9365ae87315b0d5e41a8fe27435b803ce706 /src/main.zig | |
| parent | 615e400ff150a3c355086664c7f9de512b5859dc (diff) | |
| parent | 2cbfacaedcc77e28e0a0473045cac689fb43a8ef (diff) | |
Merge branch 'new-parser'
Diffstat (limited to 'src/main.zig')
| -rw-r--r-- | src/main.zig | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/main.zig b/src/main.zig index c9a5404..24c7959 100644 --- a/src/main.zig +++ b/src/main.zig @@ -1,11 +1,6 @@ -//! By convention, main.zig is where your main function lives in the case that -//! you are building an executable. If you are making a library, the convention -//! is to delete this file and start with root.zig instead. - const std = @import("std"); -/// This imports the separate module containing `root.zig`. Take a look in `build.zig` for details. -const zisp = @import("zisp_lib"); +const zisp = @import("libzisp"); pub fn main() !void { const T = extern union { @@ -33,6 +28,19 @@ pub fn main() !void { x.*.double = f1.* / f2.*; std.debug.print("-0/0: {x}\n", .{x.*.bits}); + for (0..1000000) |i| { + _ = i; + const p = zisp.value.pair.cons( + zisp.value.fixnum.pack(0), + zisp.value.fixnum.pack(1), + ); + std.mem.doNotOptimizeAway(p); + // std.debug.print("fx: {}\n", .{zisp.value.pair.car(p)}); + } + + const istr = zisp.value.istr.intern("foo", false); + std.debug.print("istr: {s}\n", .{zisp.value.istr.getHeader(istr).bytes()}); + // // Prints to stderr (it's a shortcut based on `std.io.getStdErr()`) // std.debug.print("All your {s} are belong to us.\n", .{"codebase"}); |
