Skip to content

Instantly share code, notes, and snippets.

@plasma-effect
plasma-effect / a.md
Last active April 4, 2019 12:25
plasma.ADTの紹介

おはようございます。@plasma_effector だよ。この記事はC++アドベントカレンダー8日目の記事です。

この記事ではC++で使える代数的データ型ライブラリplasma.ADT(の最新ver willing)の紹介をしていきます。

What is plasma.ADT

9月下旬に作り始めた代数的データ型のライブラリです。C++で簡単に「ML系言語のデータ型」っぽい型を作ることができ、さらにパターンマッチっぽいことをすることができます。

#include"adt_willing.hpp"
#include<iostream>

using namespace adt_willing;
@plasma-effect
plasma-effect / a.md
Created December 3, 2015 18:23
constexpr多倍長整数

皆様おはようございます。@plasma_effector です。この記事はAizuアドベントカレンダー4日目です。 #自己紹介 数学系の3回生です。何も考えず登録した後Aizuとあんま関係ないと気付きましたが気にせずやります。
普段はC++とC#でなんか作ってます。たまにTypeScriptでゲームを作ります。 #やること C++のconstexprには様々な可能性が存在します。
多倍長整数をコンパイル時に使えたらいいなぁって思ったのでconstexprな多倍長整数を作ろうって思いました。 #補足 constexprとは ※この項は普段C++使ってる方は読み飛ばしてもらって構いません
C++11で追加された定数評価に関する指定子です。gccとclangとmsvcでは使えます。

@plasma-effect
plasma-effect / adt_willing.hpp
Last active December 9, 2015 15:58
plasma.ADT willing
#pragma once
// Copyright plasma-effect 2015
// Distributed under the Boost Software License, Version 1.0.
// (See http://www.boost.org/LICENSE_1_0.txt)
#include<tuple>
#include<utility>
#include<memory>
#include<type_traits>
import { Rx } from '@cycle/core'
import { h } from '@cycle/dom'
import CodeMirror from 'codemirror'
class CodeMirrorRenderer {
constructor(events) {
this.events = events;
}
hook(node, propertyName, previousValue) {
@johnbintz
johnbintz / simple-capistrano-docker-deploy.rb
Last active April 3, 2023 08:23
Simple Capistrano deploy for a Docker-managed app
# be sure to comment out the require 'capistrano/deploy' line in your Capfile!
# config valid only for Capistrano 3.1
lock '3.2.1'
set :application, 'my-cool-application'
# the base docker repo reference
set :name, "johns-stuff/#{fetch(:application)}"
@pasberth
pasberth / README.md
Created April 22, 2014 13:15
Procedural example

procedural.lthstx というファイルで構文を定義しています。 まだ処理系は公開していませんが、現在これが期待した通りに動作するよう実装できています。

構文は完全に宣言的に定義されているので、それ自体が構文仕様になります。