Skip to content

Instantly share code, notes, and snippets.

View nanase's full-sized avatar
🏄
Making.

Nanase nanase

🏄
Making.
View GitHub Profile
String.fromCharCode(
((( -~-~0+~~-~0)*(-~- ~0+~~-~0)*-~-~0*-~-~0 +~~- ~0)* ((-~-~0+~~
-~0)*-~-~0*-~-~0*-~-~0 *-~ -~0 -+-~0)*-~-~0* -~-~ 0*-~-~0+~~ -~0)*-~-~0
+ ~~-~ 0,((((-~-~0 +~~ -~0) *-~-~0*-~-~0+~~-~0)*( -~- ~0+ ~~-~ 0)*
-~-~ 0*-~-~0*- ~-~0 -+- ~0) *(- ~-~0* -~-~0 +~~-~0)*-~ -~0* -~-~
0+~~ -~0 )*( -~-~ 0+~~-~0)*-~-~0,((-~-~0 *-~-~ 0*- ~-~ 0-+-~0)*
-~- ~0* -~-~ 0*- ~-~ 0*-~ -~0+ ~~-~ 0)*((-~-~0 *-~- ~0+~
~-~ 0)*(-~-~0 *-~- ~0+~~-~0)*- ~-~0*-~ -~0+ ~~-~ 0)* -~- ~0,( (-~-
~0*- ~-~ 0*-~ -~0 -+- ~0)*(-~- ~0+~ ~-~ 0)* -~-~ 0*-~
@nanase
nanase / TestHost.cs
Created September 16, 2019 15:49
Arduino MKR ZERO Serial Speed Test
using System;
using System.Diagnostics;
using System.IO.Ports;
using System.Threading;
namespace ConsoleApp
{
internal class Program
{
private static void Test(SerialPort serial, byte size)
@nanase
nanase / mkr_zero_ymf825.ino
Last active August 12, 2019 23:33
YMF825 from Arduino MKR Zero
// the code is based on:
// https://github.com/yamaha-webmusic/ymf825board/blob/master/sample1/ymf825board_sample1/ymf825board_sample1.ino
#include "SPI.h"
#define PIN_YMF825_SS 7
#define PIN_YMF825_RST 6
unsigned char TONE_DATA[] = {
0x81, // header

Formula

f = F / N (CC0 + 1)
CC0 = F / f * N - 1

where:

@nanase
nanase / sppcm.cs
Created June 3, 2018 12:07
SPPCM from C#
using System;
using System.IO.Ports;
using System.Threading;
namespace Sppcm
{
internal class Program
{
private static SerialPort _serial;
private static double _phase;
@nanase
nanase / prime.pir
Created March 19, 2016 08:01
試し割りで素数判定するParrotのプログラム書いてみた
.sub main :main
.param pmc args
$I0 = args
if $I0 >= 2 goto check1
say 'No input value specified.'
end
check1:
$S0 = args[1]
$I1 = $S0
$S1 = $I1
@nanase
nanase / lury0.1.md
Last active September 20, 2015 12:36
Lury 0.1 リリースノート

![Lury][lury] 0.1 リリースノート

Lury 0.1 実装

Lury 最初のリリース (プロトタイプ版) のため、[Lury 構想まとめ] に記述されている機能の実装はごく僅かです。

言語基盤の実装

  • [Lury Specification 0.1] の一部に対応しています(< 0.1)。
@nanase
nanase / LLVMSharp_CallingCSCode_CleanedUp.cs
Created August 14, 2015 20:32
LLVMSharpを使って、LLVMからC#のコードを動的に呼び出す処理をすこし整理したもの。
using System;
using System.Runtime.InteropServices;
using LLVMSharp;
namespace LLVMSharp_Test
{
class Program
{
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void ActType();
@nanase
nanase / LLVMSharp_CallingCSCode.cs
Created August 14, 2015 20:17
LLVMSharpを使って、LLVMからC#のコードを動的に呼び出す。
using System;
using System.Runtime.InteropServices;
using LLVMSharp;
namespace LLVMSharp_Test
{
class Program
{
[UnmanagedFunctionPointer(CallingConvention.Cdecl)]
public delegate void ActType();
@nanase
nanase / Lury-problems.md
Last active August 29, 2015 14:20
Lury 問題点と方針

![Lury][lury] 問題点と方針

ref問題

構想にて、キーワード ref は関数を参照するために用いると記述しました。Luryでは、引数のない関数を括弧なしで呼び出せます。

def func:
	return 1