It's semi-automated at worse, automated at best
open browser
open inspector on console
copy paste, enter
wait
It's semi-automated at worse, automated at best
open browser
open inspector on console
copy paste, enter
wait
I have been working on a modern typing training application for the last couple of days. One of the main motivations was to build an app with a modern UI and minimal distractions, enabling to fully focus on the training aspect. You can read more about the original idea and thought process here as well as some notes on iterating over the details here.
After adding some minimal auto close functionalities for the code training section, you can read about it here, another important feature was to make the text training part more entertaining.
Imagine you need to implement (integer) mulitplication in code. Maybe you are on a system which doesn't have it or something. How to do this, and what is the minimal set of operators that are required?
The most obvious way to do multiplition is through repeated addition. To get the answer to 56 x 67 you add 56 to itself 67 times (or 67, 56 times - the order doesn't matter).
This is simple to implement if we assume for the moment that both a
and b
are positive (we will deal with negative integers later)
const E = enum(u12) { | |
Int = 0xFFF, | |
String = 0xFFE, | |
Pointer = 0xFFD, | |
} | |
const P = packed union(?e){ | |
const this = @This(); | |
Int: packed struct { |
rqlited \ | |
-auth rqlite.json \ | |
-fk \ | |
-node-id 1 \ | |
-http-addr localhost:4001 \ | |
-raft-addr localhost:4002 \ | |
./node.1 | |
rqlited \ | |
-auth rqlite.json \ |
THIS GIST IS OUT OF DATE! Please use my new project template here to get started with Zig on Playdate: | |
https://github.com/DanB91/Zig-Playdate-Template | |
The rest of this is preservied for historical reasons: | |
This is a small snippet of some code to get you started for developing for the Playdate on Zig. This code should be used as a starting point and may not compile without some massaging. This code has only been tested out on macOS and you'll need to modify the addSharedLibrary() portion of build.zig to output a .dll or .so instead of a .dylib, depending on you platform. | |
This code will help you produce both an executable for the Playdate simulator and also an executable that actually run on the Playdate hardware. |
data_dir = "/opt/nomad/data" | |
bind_addr = "0.0.0.0" | |
server { | |
enabled = true | |
bootstrap_expect = 2 | |
encrypt = "+HT7OPk+vyPzXQ=" | |
} |
There are two types of rays being traced: shadow and "gbuffer". The latter return gbuffer-style information from hit points, and don't recursively launch more rays. Lighting is done in a deferred way. There is just one light: the sun.
irradiance cache: usually fewer than 16k cache entries:
sun shadow pass: 1/pixel shadow ray
final gather done at half-res; every third frame is a ReSTIR validation frame, and instead of tracing new candidates, it checks the old ones, and updates their radiance. in addition to that, the validation frame also traces very short contact rays; on paper it seems like it would be doing more work, but it's actually slightly cheaper, so I'm counting conservatively here:
const std = @import("std"); | |
const io = std.io; | |
const assert = std.debug.assert; | |
// This example shows one possible way to approach Polymorphism in Zig | |
// using dynamic dispatch. | |
// | |
// Largely inspired by: | |
// - std/mem/Allocator.zig | |
// https://github.com/ziglang/zig/blob/77836e08a2384450b5e7933094511b61e3c22140/lib/std/mem/Allocator.zig#L55 |