my ziglings
0

Configure Feed

Select the types of activity you want to include in your feed.

fix: use new randomness api

itsnoctural (Jan 9, 2026, 12:19 AM +0200) 551008ac 335aaafc

+7 -3
+2 -2
build.zig
··· 206 206 207 207 var prng = std.Random.DefaultPrng.init(blk: { 208 208 var seed: u64 = undefined; 209 - try std.posix.getrandom(std.mem.asBytes(&seed)); 209 + io.random(std.mem.asBytes(&seed)); 210 210 break :blk seed; 211 211 }); 212 212 const rnd = prng.random(); ··· 1287 1287 \\Max difference (new fn): 0.014 1288 1288 , 1289 1289 }, 1290 - .{ .main_file = "110_quiz9.zig", .output = 1290 + .{ .main_file = "110_quiz9.zig", .output = 1291 1291 \\Toggle pins with XOR on PORTB 1292 1292 \\----------------------------- 1293 1293 \\ 1100 // (initial state of PORTB)
+5 -1
test/tests.zig
··· 394 394 395 395 fn createTempPath(b: *Build) ![]const u8 { 396 396 const io = b.graph.io; 397 - const rand_int = std.crypto.random.int(u64); 397 + const rand_int = r: { 398 + var x: u64 = undefined; 399 + io.random(@ptrCast(&x)); 400 + break :r x; 401 + }; 398 402 const tmp_dir_sub_path = "tmp" ++ std.Io.Dir.path.sep_str ++ std.fmt.hex(rand_int); 399 403 const result_path = b.cache_root.join(b.allocator, &.{tmp_dir_sub_path}) catch @panic("OOM"); 400 404 try b.cache_root.handle.createDirPath(io, tmp_dir_sub_path);