皆様おはようございます。@plasma_effector です。この記事はAizuアドベントカレンダー4日目です。
#自己紹介
数学系の3回生です。何も考えず登録した後Aizuとあんま関係ないと気付きましたが気にせずやります。
普段はC++とC#でなんか作ってます。たまにTypeScriptでゲームを作ります。
#やること
C++のconstexprには様々な可能性が存在します。
多倍長整数をコンパイル時に使えたらいいなぁって思ったのでconstexprな多倍長整数を作ろうって思いました。
#補足 constexprとは
※この項は普段C++使ってる方は読み飛ばしてもらって構いません
C++11で追加された定数評価に関する指定子です。gccとclangとmsvcでは使えます。
- javascript:alert(origin)
- @maple3142
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
const recurr = (fn => fn( | |
(f => f(f)) | |
(self => | |
x => | |
fn(self(self))(x) | |
) | |
)) | |
recurr( | |
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
MOVED TO: https://github.com/jspenguin2017/Snippets/tree/master |
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
version: '3' | |
services: | |
ide: | |
image: chinodesuuu/coder:latest | |
volumes: | |
- /home/coder/projects | |
ports: | |
- '9000:9000' |
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 5.012; | |
use strict; | |
use warnings; | |
use File::Temp qw(tempfile); | |
use IPC::System::Simple qw(capture system); | |
use LWP::UserAgent; | |
use URI::QueryParam; | |
use Win32::GUI; | |
use Data::Dumper; | |
use integer; |
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
// 'beforescriptexecute' event [es5] | |
// original version: https://gist.github.com/jspenguin2017/cd568a50128c71e515738413cd09a890 | |
;(function() { | |
;('use strict') | |
function Event(script, target) { | |
this.script = script | |
this.target = target | |
this._cancel = false |
This is a simple utility script for cleaning up Firebase Hosting versions, leaving a specified number of versions remaining. This is primarily done to conserve storage usage, but may have other uses.
USE AT YOUR OWN RISK. NO WARRANTY IS PROVIDED. THIS SCRIPT DOES DELETE STUFF PERMANENTLY
node cleanupVersions.js [commit]
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
#!/bin/bash | |
# Description: | |
# Delete all `greenkeeper/*` branches of your remote. | |
# Instructions: | |
# Run the script with the `--help` flag. | |
ORIGIN=origin | |
DRY_RUN=0 | |
THIS=`basename "$0"` |
After months of discussions in a dedicated group, it's clear to me NodeJS is still stuck in finding a way to deliver native ESM to its users.
The "usual few" won't hear anything different from .mjs
, but .mjs
has been demonstrated to be not a solution neither.
Following few cases not covered by .mjs
:
- evaluation of any string, via CLI, or on demand, where there is no extension
- tools that convert their syntax into JS, since it always worked to date (thanks to transpilers, bundlers, and loaders)
OlderNewer