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
/* | |
* original code: https://github.com/shinh/elvm/blob/master/tools/bfopt.cc | |
* usage: | |
* compile and run | |
* $ node bfopt.js src.bf | |
* compile only | |
* $ node bfopt.js -c src.bf | |
*/ | |
const MEM_SIZE = 30000; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
(defun f1 (z) (* z #C(1/2 1/2))) | |
(defun f2 (z) (- 1 (* z #C(1/2 -1/2)))) | |
(defun c2p (z) (list (realpart z) (imagpart z))) | |
(defun gen (n) | |
(let ((b (expt 2 (ash (1+ n) -1)))) | |
(loop | |
for i from 0 to n | |
for s = (list (list 0 1)) | |
then (mapcan (lambda (l) (list (mapcar #'f1 l) (mapcar #'f2 l))) s) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
;;; EQUALINE Mission 23 solver | |
(defstruct kifu | |
(boards (list #(1 :+ 1 :+ 1 :+ 1 :+ 1))) ; 盤面のリスト (逆順) | |
(routes nil) ; 指し手(int list)のリスト (逆順) | |
) | |
(defun print-kifu (k) | |
(loop for b in (reverse (kifu-boards k)) | |
for r in (cons nil (reverse (kifu-routes k))) |
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
Texture2D shaderTexture; | |
SamplerState samplerState; | |
cbuffer PixelShaderSettings { | |
float Time; | |
float Scale; | |
float2 Resolution; | |
float4 Background; | |
}; |
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
Texture2D shaderTexture; | |
SamplerState samplerState; | |
cbuffer PixelShaderSettings { | |
float Time; | |
float Scale; | |
float2 Resolution; | |
float4 Background; | |
}; |
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
;;; -*- mode:lisp; package:xyttr -*- | |
;;; ref. http://otanews.livedoor.biz/archives/51944341.html | |
(in-package :xyttr) | |
(defparameter *alpha* "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz") | |
(defparameter *ente* "AZYXEWVTISRLPNOMQKJHUGFDCBazyxewvtisrlpnomqkjhugfdcb") | |
(defun en-to-ente-popup () |
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
# ref. https://www.cs.ox.ac.uk/people/jeremy.gibbons/publications/spigot.pdf | |
i=2:1+i | |
q=1:10*q*i*~1-2*i | |
r=180:10*u*(q*~2-5*i)+r-y*t | |
t=60:t*u | |
u=6+i*27+i*27 | |
y=((q*~12-27*i)+5*r)/5*t | |
c='0+1001[y | |
([c):'.:>c |
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
@echo off | |
call grasspile quine-base.ml -P 1000000 >quine-base.grass | |
if ERRORLEVEL 1 ( | |
echo compile failed [exitcode=%ERRORLEVEL%] | |
exit /b 1 | |
) | |
ruby mkquine.rb >quine.grass |
NewerOlder