1 day ago · Tech · hide · 0 comments

This week I completed the update to Zig 0.17 and released Kiesel 0.4.0! It contains 64 commits across 2.5 months, see the changelog for the full list of user-facing changes.Kiesel.args / Kiesel.envI mostly build rather than use this project, and it shows — beyond the core language implementation only a few APIs needed for real-world programs are available. We did have file I/O for a while, and with the addition of arguments and environment reading a simple cat(1) clone becomes feasible:#!/usr/bin/env kiesel const [_exe, _script, ...files] = Kiesel.args; if (files.length === 0) { const contents = Kiesel.readStdin(); Kiesel.print(contents, { newline: false }); } else { for (const file of files) { const contents = Kiesel.readFile(file); Kiesel.print(contents, { newline: false }); } }$ ./cat.js cat.jsEven More Iterator HelpersOver the last few years JS has rapidly advanced the usability of iterators from just providing the basic protocol at the language level to a large collection of…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.