Skip to content

Instantly share code, notes, and snippets.

@erw7
erw7 / tut1.rst
Last active March 25, 2018 10:01

Nim Tutorial (Part I)

Author: Andreas Rumpf
Version: 0.17.2

Introduction

@erw7
erw7 / tut2.rst
Last active January 31, 2018 11:16

Nim Tutorial (Part II)

Author: Andreas Rumpf
Version: 0.17.2
@erw7
erw7 / 0002-Fix-library-path.patch
Last active January 15, 2018 10:44
Patch to fix bug in MinGW Nim of MSYS2
--- compiler/options.nim.orig 2017-09-07 15:29:38.000000000 +0900
+++ compiler/options.nim 2018-01-15 18:00:51.093056600 +0900
@@ -229,7 +229,9 @@
if prefix == "/usr": libpath = "/usr/lib/nim"
elif prefix == "/usr/local": libpath = "/usr/local/lib/nim"
else: libpath = joinPath(prefix, "lib")
- else: libpath = joinPath(prefix, "lib")
+ else:
+ libpath = joinPath(prefix, "lib", "nim")
+ if not existsDir(libpath): libpath = joinPath(prefix, "lib")
--- platform/x86_64-windows/types.conf.orig 2017-09-21 01:43:17.662461500 +0900
+++ platform/x86_64-windows/types.conf 2017-09-21 01:49:15.566973800 +0900
@@ -25,3 +25,9 @@
rbx.platform.typedef.off_t = long_long
rbx.platform.typedef.useconds_t = uint
rbx.platform.typedef._sigset_t = ulong_long
+rbx.platform.typedef.uint32_t = uint
+rbx.platform.typedef.int64_t = long_long
+rbx.platform.typedef.gid_t = ushort
+rbx.platform.typedef.uid_t = ushort
--- virtualenv.py.orig 2017-09-20 01:34:26.872489000 +0900
+++ virtualenv.py 2017-09-20 05:55:19.546230000 +0900
@@ -53,9 +53,11 @@
is_jython = sys.platform.startswith('java')
is_pypy = hasattr(sys, 'pypy_version_info')
-is_win = (sys.platform == 'win32')
+is_win = (sys.platform == 'win32' and not 'GCC' in sys.version)
is_cygwin = (sys.platform == 'cygwin')
is_darwin = (sys.platform == 'darwin')
@erw7
erw7 / build_vim.sh
Last active January 25, 2024 09:17
#!/bin/zsh
setopt extendedglob
script_dir=$0:h
__ScriptVersion="1.1"
CLEAN=0
DISTCELAN=0
DEBUG=0
diff --git a/lisp/loadup.el b/lisp/loadup.el
index c6107d3444..cf62d7bacf 100644
--- a/lisp/loadup.el
+++ b/lisp/loadup.el
@@ -271,6 +271,7 @@
(load "term/w32-win")
(load "disp-table")
(when (eq system-type 'windows-nt)
+ (load "image")
(load "w32-fns")
--- setup.py.orig 2017-09-20 20:22:46.341691400 +0900
+++ setup.py 2017-09-20 20:24:51.500711200 +0900
@@ -572,6 +572,8 @@
if not PLATFORM_IS_WINDOWS:
define_macros.append(('PSYCOPG_VERSION', '"' + PSYCOPG_VERSION_EX + '"'))
+elif'GCC' in sys.version:
+ define_macros.append(('PSYCOPG_VERSION', '\"' + PSYCOPG_VERSION_EX + '\"'))
else:
define_macros.append(('PSYCOPG_VERSION', '\\"' + PSYCOPG_VERSION_EX + '\\"'))
--- site.cfg.orig 2017-09-20 21:12:03.198127900 +0900
+++ site.cfg 2017-09-20 21:14:59.899638200 +0900
@@ -14,4 +14,4 @@
# http://stackoverflow.com/questions/1972259/mysql-python-install-problem-using-virtualenv-windows-pip
# Windows connector libs for MySQL. You need a 32-bit connector for your 32-bit Python build.
-connector = C:\Program Files (x86)\MySQL\MySQL Connector C 6.1
+connector = C:\PROGRA~1\MySQL\MYSQLC~1.1
--- setup_windows.py.orig 2017-09-20 21:05:15.952613300 +0900
+++ setup_windows.py 2017-09-20 21:09:35.621868700 +0900
diff --git a/Makefile.am b/Makefile.am
index 718cfc7..3f1296c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -173,6 +173,7 @@ dist_tmux_SOURCES = \
tty-term.c \
tty.c \
utf8.c \
+ wcwidth.c \
window-choose.c \