Skip to content

Instantly share code, notes, and snippets.

View nikki93's full-sized avatar

Nikhilesh S nikki93

View GitHub Profile
nikki@pop-os:~/Development/castle-xyz/castle-client/core
$ ./run.sh release
-- Configuring done
-- Generating done
-- Build files have been written to: /home/nikki/Development/castle-xyz/castle-client/core/build/release
[0/2] Re-checking globbed directories...
[2/2] Linking CXX executable castle-core
time: 1.727592139999615
sum: -1840446080
nikki@pop-os:~/Development/castle-xyz/castle-client/core
const request = require('request');
const fs = require('fs');
const deckIds = [
'dDhaN6EmR',
'GXW_KkKzT',
'ae5b8c7e-fd3a-4835-b972-fbf0bed2b81c',
'cbWFJghWo',
'z3NzziPIo',
];
tyObject_Sprite__6SI7Z6JkNJk4bH48mDwq9cg* T130_ = get__bgv7mB0Sx5tgxteTqul5yQkernel(ker__eVw9bIwosa9afHPUbhTNIC9cA, (*colonenv_).ent1);
if (!(T130_ == NIM_NIL)) goto LA131_;
{ {
elemOpenStart__jT9ak2GPlr8vyAtdF8LS2Dw(ui__42p17lckjk2cbmvFNLln6Q, TM__S749agSB2nly9aXIEQy7X8iA_143);
class__Wcf4LbCEN0DO6tvGHX0ibA(ui__42p17lckjk2cbmvFNLln6Q, TM__S749agSB2nly9aXIEQy7X8iA_144);
attr__xEhvO6yxNDrF9bpDFyTym9ag(ui__42p17lckjk2cbmvFNLln6Q, TM__S749agSB2nly9aXIEQy7X8iA_145, TM__S749agSB2nly9aXIEQy7X8iA_146);
elemOpenEnd__oldwKjbyvASfe4As2cufZw_2(ui__42p17lckjk2cbmvFNLln6Q);
{
NI T135_ = JS_uiEventCount("click");
NI countX60gensym173_ = T135_;
const std = @import("std");
const console = @import("console.zig");
const gl = @import("gfx.zig").gl;
const timing = @import("timing.zig");
const ui = @import("ui.zig");
// Rect demo
//
const rect_demo = struct {
proc loadEffect*(gfx: var Graphics, path: static string): Effect =
## Load an `Effect` based on the shader source file at the given path.
## The path must be statically known. The file should be present
## alongside the source code files of the application and is read at
## compile time.
# Constant code string with preamble based on platform
proc prepareCode(path: static string): string =
when defined(emscripten):
result.add("""#version 100
import std/[math, random]
import boot
import timing, graphics, events, kernel
type
Depth = object
depth: float
@nikki93
nikki93 / main.nim
Created November 3, 2020 19:47
able to see an unexported field from 'other' in 'main'; in code passed to a template
import other
echo thing.exported
#echo thing.notexported
other.doStuff:
echo thing.exported
echo thing.notexported
import options
type
Thingy = object
name: string
age: int
proc maybeMake(should: bool, name: sink string, age: int): Option[Thingy] =
import asyncdispatch
import jester
routes:
get "/":
resp "hello, world!"
runForever()
#pragma once
#include "precomp.h"
#include "graphics.h"
#include "kernel.h"
#include "timing.h"
using Vec2 = cpVect;