Skip to content

Instantly share code, notes, and snippets.

Working from home

aiya000 aiya000

Working from home
Block or report user

Report or block aiya000

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile

negatable index to positive index


[1, 2, 3][-2] == 2
[1, 2, 3, 4, 5][-4] == 2
[1, 2, 3, 4, 5][-2] == 4
View Test.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
char* get_repeated_single_quotes(char* x, int has_previous) {
char* p;
char* result;
size_t result_length;
size_t i;
View Test.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int is_closing_quote(char *template, int is_literal_string, int has_previous)
if (!is_literal_string)
// is not \"

私が現在、誠意開発中の静的型付きプログラミング言語「Time script」の概要について発表します。

Time scriptとは?

  • 出力先をVim scriptにした静的型付き言語、及びそのトランスパイラ―
  • JavaScriptに対するTypeScriptと同じ
  • Time scriptは先進性と整合性・書きやすさに倒すつもり
    • Vim script(Vim)は後方互換性の保守に特化しているので、差別化するため

Time scriptの目標

aiya000 /
Last active Sep 8, 2019
会話風「キャラクター + ふきだし」 in Re:VIEW css-typesetting
= 始まり
View gina-status.vim
let b:undo_ftplugin = 'setl ' . join([
\ 'cursorline<',
\ ])
setl cursorline
function s:force_show_git_stash_size_into_top(_) abort
let status = getline(1)
if (status ==# '')
call timer_start(50, function('s:force_show_git_stash_size_into_top'))
View Test.ts
async function foo(): Promise<never> {
throw new Error('foo')
async function main(): Promise<void> {
try {
foo() // awaitし忘れ
// await foo()
View emoji.snip
# The MIT License (MIT)
# Copyright (c) 2019 aiya000
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
View c-2-product.xml
<mxfile modified="2019-07-29T13:14:43.638Z" host="" agent="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.121 Electron/5.0.6 Safari/537.36" etag="ZYEIn5kEyled3fCkZ_z-" version="10.9.6" type="device"><diagram id="VkgY1u3xcfLAzun05OE7" name="Page-1">5Zhdc6IwFIZ/DZd1AuHz0qptd7Z2d8e26lUnAxFoI3FjFOyv3yChQEG37mhpt14wnjcnITlPzgmgwN48uWRoEQyph4miAS9RYF/RNNO2xTUVNpkAgZoJPgu9TCoJo/AZSxFIdRV6eFlx5JQSHi6qokujCLu8oiHGaFx1m1FSvesC+bgmjFxE6uo49HiQqToAhX6FQz/I72zLhjnKfeUIywB5NM6krQ8cKLDHKOXZv3nSwyQNXR6WbKCLHa0v82I44m/pwAZXv8dPv7rwDvlDeuuedeNvZ3KUNSIruV7FBJMHVVzlrPkmj4QYTgRdGOdxEHI8WiA3bYkFdqEFfE6EpYq/9Znlt8GM46QkyZleYjrHnG2Ei2yVawFy06iqldlxgcCQLkEp+rrUkITuvwxcBEb8kbHZEVg86d8+/0zim+7aHt4nzLoanKn1cDC6ijycdgJizZTxgPo0QuSa0oUMxCPmfCO3NFpxWg0TTkI+Sbt3DGlNSy39RI68NTa5EYnVlDql5rTcVnTbWnk/Dy2D7Vz38lnSFXPxvjDIBETMx3yPn575Ya+SW3XaDBPEw3U11Y4PTz0hvMPRqYeAOyqrfSXgo7DS6nVHzGwkzYhGaQE6Gj71HzKvNXyNfs7Hwtd0nkzbPk1Uy6geJ6Dl0wS+6yYv16jisDmoShWnzdE3uv4565TeWp16M0LQIsJPUKv0Xc++Pag41uRBa71s

==31475== Memcheck, a memory error detector ==31475== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al. ==31475== Using Valgrind-3.14.0 and LibVEX; rerun with -h for copyright info ==31475== Command: ../vim -f -u unix.vim -U NONE --noplugin --not-a-term -S runtest.vim test_template_string.vim --cmd au\ SwapExists\ *\ let\ v:swapchoice\ =\ "e" ==31475== Parent PID: 31474 ==31475== ==31475== ==31475== HEAP SUMMARY: ==31475== in use at exit: 709,046 bytes in 2,120 blocks ==31475== total heap usage: 6,911 allocs, 4,791 frees, 3,027,334 bytes allocated

You can’t perform that action at this time.