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
// SPDX-License-Identifier: MIT | |
// SPDX-FileCopyrightText: 2017-2021 Mark Wubben <mark@novemberborn.net> | |
// SPDX-FileCopyrightText: 2017-2023 Segment.io | |
// SPDX-FileCopyrightText: 2023 Austin Seipp <aseipp@pobox.com> | |
// Implementation of KSUIDs, a K-Sortable Globally Unique IDentifier, as defined | |
// by https://github.com/segmentio/ksuid -- this is a port of the upstream | |
// project to typescript/deno, with some modifications. | |
// | |
// External API based on the one from https://github.com/novemberborn/ksuid, |
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
#include <stddef.h> | |
char get_first_cap(const char *in, int size) { | |
const char *first_cap = NULL; | |
if (size == 0) | |
return ' '; | |
for (int i = 0 ; i++ < size && *in != 0; in++) { | |
if (*in >= 'A' && *in <= 'Z') { | |
first_cap = in; |
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
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE ImplicitParams #-} | |
{-# LANGUAGE TypeFamilies #-} | |
module Assert | |
( assertProperty | |
, initialAssume | |
, getReset | |
) where | |
import Clash.Prelude |
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
with Ada.Command_Line; | |
with Ada.Text_IO; | |
procedure Hello_World is | |
You : constant String := | |
-- Change to strict inequality below to prove | |
(if Ada.Command_Line.Argument_Count >= 0 then | |
Ada.Command_Line.Argument (1) | |
else "世界"); | |
begin |
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
//! this program exists only to launch RPCS3, pointed to the Tekken Tag | |
//! Tournament 2 ROM on my hard drive, with Steam Remote Play. there are a very | |
//! weird set of circumstances leading to this: | |
//! | |
//! as a prerequisite: modern Steam supports a full userspace gamepad input | |
//! device stack, called "Steam Input". games launched by steam have the Steam | |
//! Overlay injected into them, which also handles Steam Input. in effect, Steam | |
//! Input allows arbitrary gamepads, such as PS4 DualShocks or Nintendo Joycons, | |
//! or even exotic devices like Hitbox/PS4 Hori Fightpads, to be registered and | |
//! control mapped on the system, entirely through Steam and without any other |
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
{-# OPTIONS_GHC -Wall #-} | |
{-# LANGUAGE DeriveAnyClass #-} | |
{-# LANGUAGE DeriveDataTypeable #-} | |
{-# LANGUAGE LambdaCase #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE PartialTypeSignatures #-} | |
module RegAlloc1 | |
( -- * Types | |
Var |
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
# Setup compilation | |
set QSYS_SIMDIR ../prj | |
source $QSYS_SIMDIR/mentor/msim_setup.tcl | |
dev_com | |
com | |
# add sources, but skip the top level BSP since its unused | |
foreach f [glob -type f path/to/sources/*.sv] { | |
vlog -sv -work work "$f" | |
} |
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
#include <stdint.h> | |
#include <stddef.h> | |
#include <stdbool.h> | |
#ifndef __wasm__ | |
#define LLVM_MCA_BEGIN(l) __asm__ __volatile__("# LLVM-MCA-BEGIN " l); | |
#define LLVM_MCA_END(l) __asm__ __volatile__("# LLVM-MCA-END " l); | |
#else | |
#define LLVM_MCA_BEGIN(_) | |
#define LLVM_MCA_END(_) |
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
{ useMusl ? false | |
}: | |
let | |
nixpkgs = import (builtins.fetchTarball { | |
url = "https://github.com/NixOS/nixpkgs/archive/004cb5a694e39bd91b27b0adddc127daf2cb76cb.tar.gz"; | |
sha256 = "0v5pfrisz0xspd3h54vx005fijmhrxwh0la7zmdk97hqm01x3mz4"; | |
}) {}; | |
pkgs = if useMusl then nixpkgs.pkgsMusl else nixpkgs; |
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 bluetcl | |
# bsc-libdir: a tcl script that looks up Verilog primitives for | |
# the bluespec compiler, and emits them to stdout. this tool | |
# is more useful when combined with `bsc-rpc`, but might be | |
# of use on its own. | |
# | |
# usage: | |
# | |
# $ bluetcl bsc-libdir RegUN > RegUN.v |