Skip to content

Instantly share code, notes, and snippets.

View Comamoca's full-sized avatar
💭
🍜

Comamoca Comamoca

💭
🍜
View GitHub Profile
@AumyF
AumyF / 2021-12-04-tech-which-isnt-present.md
Last active August 2, 2022 13:01
Pythonみたいな文法でCにトランスパイルされる言語に入門

Pythonみたいな文法でCにトランスパイルされる言語に入門

レポート締め切りがすぐそばに迫っていて浪人どころか高校卒業すら怪しいオタク,おーみーです.

この gist は 存在しない技術 Advent Calendar 2021 の4日目の記事です.主催者のmomeemtさんから,存在する技術について書くとその技術が消滅するとの公式見解を頂いたので,氏の推し言語であるNimを消していきます.

Nim やる前の印象

第二プログラミング言語として Rust はオススメしません Nim をやるのです」「イケてないのに人気がある golang vs イケてるのに人気がない Nim」の印象がめちゃくちゃ強いです.私はこれら3言語の中ではRust派で,これらの記事には同意できないところが多い[^1]のですが,大事なブログをはてなブックマークとTwitterで炎上させてまでage(死語)たい,その手の人たちには大規模構造を隔てているとさえ感じさせる,Nimという言語はいったいどんなものなのかということが気になりました.

@kujirahand
kujirahand / parser.go.y
Created June 4, 2020 11:09
goyaccの一番簡単なサンプル
%{
// プログラムのヘッダを指定
package main
import (
"os"
"fmt"
)
%}
%union {
num int
@voluntas
voluntas / erlang_webrtc_quic.rst
Last active June 6, 2025 03:25
Erlang/OTP で WebRTC と QUIC
@hata6502
hata6502 / gitwitter
Last active May 21, 2022 09:12
git push して Twitter に通知します。
#!/bin/bash
url=`git config --get remote.origin.url`
domain=${url#*@}
domain=${domain#https://}
domain=${domain/:/}
branch=`git rev-parse --abbrev-ref HEAD`
tweet=""
if git rev-parse --verify origin/${branch} >/dev/null 2>&1
@yorickvP
yorickvP / wl-clipboard.el
Created March 14, 2019 11:02
teach emacs to use wl-copy
(setq wl-copy-process nil)
(defun wl-copy (text)
(setq wl-copy-process (make-process :name "wl-copy"
:buffer nil
:command '("wl-copy" "-f" "-n")
:connection-type 'pipe))
(process-send-string wl-copy-process text)
(process-send-eof wl-copy-process))
(defun wl-paste ()
(if (and wl-copy-process (process-live-p wl-copy-process))
@bketelsen
bketelsen / ktest.nim
Created November 15, 2018 23:34
Karax + Litz = Web Components in Nim
import
dom, jsffi, jsconsole, macros, strutils,
nes
class Ticker:
tickerTempl = html_templ:
d(data={"key1": "value1", "key2": "value2"}):
h1: "Hello, World!"
h2: "It is ${new Date().toLocaleTimeString()}."
@ysaito8015
ysaito8015 / hello.cpp
Last active November 30, 2022 22:46 — forked from snaka/hello.cpp
"Hello world" する LLVM assembly code を生成する C++ コード
#include <llvm/IR/LLVMContext.h>
#include <llvm/IR/Module.h>
#include <llvm/IR/BasicBlock.h>
#include <llvm/IR/CallingConv.h>
#include <llvm/IR/Constants.h>
#include <llvm/IR/Function.h>
#include <llvm/IR/GlobalVariable.h>
#include <llvm/IR/Instructions.h>
#include <llvm/IR/PassManager.h>
#include <llvm/IR/Verifier.h>

なぜ Vim はいきなり文字を入力できないのか

2017-07-20 Fablic.vim #2

@pocari
pocari / neovim_terminal.vim
Last active February 20, 2022 15:53
neovim の terminal
if has('nvim')
" exitフックを指定して:terminalを開く
function! s:termopen_wrapper(on_exit) abort
" https://github.com/neovim/neovim/pull/5529
" でvimのpartialがneovimに取り込まれて以降は、
" on_existに設定するコールバックが関数名でなく、
" 関数値そのもの?(function('関数名'))ようなので、古いneovimの場合注意
"
" 7.4.1577が当たっているかどうかで切り分ける
if has('patch-7.4.1577')