// Using Deno :P | |
import { z } from 'npm:zod' | |
const User = z.object({ | |
username: z.string(), | |
email: z.string().email() | |
}) | |
function getMissingFields(error: z.ZodError): string[] { | |
const missingFields: string[] = [] |
My name is Andreas Pardeike, aka Brrainz, or the creator of Harmony. This guide is my personal attempt to help everyone through the journey of upgrading their mods. I am not affiliated with LUDEON studios or with developing RimWorld. It's just a personal thank you from me to the community.
This guide will help modders to update their C# mod to RimWorld 1.1. I will tell you how you upgrade to Harmony 2 and why. It will also serve as a guide to common changes that I encountered while I upgraded my own Camera+ mod. During the guide, I will use Visual Studio 2019. It's community edition is free. If you use a different IDE, please adapt your changes.
This proposal describes a new composable type system for Go. It follows the design ideas of the already built-in composable types map
and chan
and should be understood as an alternative way to implement basic generic data structures.
The following is an example of a queue implemented as a composable type (boring code has been removed):
func main() {
// compose a queue of integers
q := comp[int]Queue{}
<?php | |
require ' vendor/autoload.php ' ; | |
/** | |
* Handles an HTTP request that contains information for registering/unregistering | |
* a FNA application. |
About
A hopefully easy tutorial on how to make a Transpiler with Harmony
Based on patching a method in the game RimWorld
Introduction
Writing transpilers is like writing a book about how to rewrite a cookbook to make it work for the age of microwave even if that cookbook was written before microwave ovens were invented. It requires good knowledge about the language the cookbook is written in and the topics and information models the cookbook author uses.
As such, writing a transpiler is way more complex and low level than writing a simple method that prefixes, postfixes or replaces an existing method. It is required to have good understanding in general C# programming and how to manipulate abstract data structures with respect to references and relative positioning. It also requires to know the language, in this case CIL, so you can manipulate the instructions without it to get into an illegal state.
package join | |
import ( | |
"fmt" | |
"strings" | |
"testing" | |
) | |
var ( | |
testData = []string{"a", "b", "c", "d", "e"} |
using Microsoft.Xna.Framework; | |
namespace DreamersDesign | |
{ | |
public class Camera | |
{ | |
public Camera( int viewportWidth, int viewportHeight, Vector2 cameraPosition, ClockManager clockManager ) | |
{ | |
ViewportWidth = viewportWidth; | |
ViewportHeight = viewportHeight; |
GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.