This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use crate::*; | |
pub trait Relation | |
where Self: Component + From<Self::Entities>, | |
for<'a> &'a Self::Entities: IntoIterator<Item = &'a Entity>, | |
{ | |
type Entities: PartialEq; | |
fn entities(&self) -> &Self::Entities; | |
fn disassociate(&mut self, _entity: Entity) {} | |
fn set_entities(&mut self, entities: Self::Entities); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
,------------------, | |
,--------' Popr Interpreter '--------, | |
| Copyright 2012-2020 Dustin DeWeese | | |
'------------------------------------' | |
type :help for help - https://popr.dev | |
Load lib.ppr (lib, num, list, stack, control, logic, algorithm, io) | |
Load tests.ppr (tests) | |
Importing all modules (algorithm, control, io, lib, list, logic, num, stack, tests) | |
: :bc add: + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use bevy::{ | |
prelude::*, | |
render::{ | |
pipeline::PrimitiveTopology, | |
wireframe::{Wireframe, WireframeConfig, WireframePlugin}, | |
mesh::{Mesh, Indices}, | |
}, | |
wgpu::{WgpuFeature, WgpuFeatures, WgpuOptions}, | |
}; | |
use facet::{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// To compile: clang++ -std=c++11 ptrdiff.cpp -o ptrdiff | |
// To run: ./ptrdiff | |
#include <vector> | |
#include <numeric> | |
#include <cassert> | |
#include <iostream> | |
int main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Download from a Nix cache to a tarball | |
# -------------------------------------- | |
# This script takes the part of the store path after /nix/store as the argument to specify what to download | |
# You can find this in the build details page on Hydra under "Output store paths". | |
# Requirements: nix, curl, xz (zxdec) | |
set -e |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Info: Packing constants.. | |
Info: Inserting IO buffers.. | |
Info: IO port 'clk' driven by IBUF '$iopadmap$top.clk' | |
Info: IO port 'di' driven by IBUF '$iopadmap$top.di' | |
Info: IO port 'do' driven by OBUF '$iopadmap$top.do' | |
Info: IO port 'stb' driven by IBUF '$iopadmap$top.stb' | |
Info: Constraining 'clk' to site 'IOB_X1Y26' | |
Info: Constraining 'di' to site 'IOB_X0Y11' | |
Info: Constraining 'do' to site 'IOB_X0Y43' | |
Info: Constraining 'stb' to site 'IOB_X0Y3' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module converter ( | |
input clk, | |
input nrst, | |
input [N-1:0] in, | |
input in_valid, | |
output in_ready, | |
output [2*N-1:0] out, | |
output out_valid, | |
input out_ready | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ pkgs ? import <nixpkgs> {} }: | |
# https://sid-kap.github.io/posts/2018-03-08-nix-pipenv.html | |
let manyLinuxFile = | |
pkgs.writeTextDir "_manylinux.py" | |
'' | |
print("in _manylinux.py") | |
manylinux1_compatible = True | |
''; | |
in (pkgs.buildFHSUserEnv rec { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# command line go links | |
# just copy this to ~/.go.bash and source it | |
# add new commands below | |
function go () { | |
# self update | |
source ~/.go.bash | |
# indirect call | |
NAME="$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module top ( | |
input clk, | |
input [15:0] in, | |
output [15:0] out | |
); | |
reg [15:0] out_buf; | |
reg [3:0] addr; | |
reg [15:0] ring_in; | |
reg [15:0] ring_out; |
NewerOlder