|
You are here |
rust.godbolt.org | ||
| | | | |
joellaity.com
|
|
| | | | | ||
| | | | |
nickjanetakis.com
|
|
| | | | | VSCode has a ton of great extensions and useful settings. Here's a list of extensions that I have installed and how VSCode is configured. | |
| | | | |
zig.godbolt.org
|
|
| | | | | const std = @import("std"); const testing = std.testing; const utfValidator = struct { const State = enum(u6) { ok, one, two, three, fail, }; fn step(char: u8, state: State) State { return switch (state) { .ok => switch (char) { 0x00...0x7f => .ok, 0xc0...0xdf => .one, 0xe0...0xef => .two, 0xf0...0xf7 => .three, else => .fail, }, .one => switch (char) { 0x80...0xbf => .ok, else => .fail, }, .two => switch (char) { 0x80...0xbf => .one, else => .fail, }, .three => switch (char) { 0x80...0xbf => .two, else => .fail, }, .fail => .fail, }; } }; fn pext(val: u64, mask: u64) callconv(.Inline) u64 { return asm("pext %[m],%[v],%[r]":[r] "=r" (-> u64) : [v] "r" (val), [m] "r" (mask)); } pub fn is_utf8(data: []const u8) bool { const table1 = comptime init: { var tmp = ... | |
| | | | |
blog.logrocket.com
|
|
| | | Learn how to use ESLint and Prettier together to automatically format and fix JavaScript code in your projects. | ||