Skip to content

Instantly share code, notes, and snippets.

Kaushal Modi kaushalmodi

Block or report user

Report or block kaushalmodi

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
View strfmt.rst

The most important functions and macros provided are:

  1. the format functions to render a single value as a string,
  2. the fmt macro to construct a string containing several formatted values
  3. the writefmt and printfmt family of macros to write a formatted string to a file and stdout, respectively
  4. the interp and $$ string interpolation macros to render expressions embedded in the string itself
@kaushalmodi
kaushalmodi / emacs_module_sample__bug.c
Created Jun 28, 2018
Regression caused by vm support for ref types commit
View emacs_module_sample__bug.c
/* Generated by Nim Compiler v0.18.1 */
/* (c) 2018 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: Linux, amd64, gcc */
/* Command for C compiler:
gcc -c -w -I/home/kmodi/usr_local/apps/6/emacs/master/bin -std=gnu99 -fPIC -I/home/kmodi/stow/pkgs/nim/bad/lib -o /home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/misc/nim-emacs-module/test/nimcache/emacs_module_sample.o /home/kmodi/stow/pub_dotfiles/emacs/dot-emacs.d/misc/nim-emacs-module/test/nimcache/emacs_module_sample.c */
#define NIM_NEW_MANGLING_RULES
#define NIM_INTBITS 64
#include "nimbase.h"
View nim_mybuild.sh
#!/usr/bin/env bash
# Time-stamp: <2018-06-23 22:16:08 kmodi>
# Usage: ./mybuild.sh # Installs using upstream/devel
# ./mybuild.sh --rev v0.18.0
# ./mybuild.sh --rev upstream/master
set -euo pipefail # http://redsymbol.net/articles/unofficial-bash-strict-mode
IFS=$'\n\t'
View emacs-module.h
/* emacs-module.h - GNU Emacs module API.
Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
View noinit_global_local.c
/* Generated by Nim Compiler v0.18.1 */
/* (c) 2018 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: Linux, amd64, gcc */
/* Command for C compiler:
gcc -c -w -O3 -fno-strict-aliasing -I/home/kmodi/stow/pkgs/nim/devel/lib -o /home/kmodi/sandbox/nim/noinit/nimcache/noinit_global_local.o /home/kmodi/sandbox/nim/noinit/nimcache/noinit_global_local.c */
#define NIM_NEW_MANGLING_RULES
#define NIM_INTBITS 64
#include "nimbase.h"
View nbuild.nim
# Time-stamp: <2018-05-17 10:38:18 kmodi>
# Generic build script
# It would be simple to just do:
#
# import os, strformat, terminal
#
# Note that ospaths gets imported implicitly in this case.
# But I am still doing the below here so that so that I realize the number of
# procs that I am using, and also where they come from.
View stow_it.sh
#!/usr/bin/env bash
# Time-stamp: <2018-05-11 15:59:07 kmodi>
# Script to stow packages from ${STOW_PKGS_ROOT} to ~/stowed
# Usage: stow_it.sh (That's it; from any directory)
# This script uses the unofficial strict mode as explained in
# http://redsymbol.net/articles/unofficial-bash-strict-mode
# Also checks have been done with www.shellcheck.net to have a level of
View keybase.md

Keybase proof

I hereby claim:

  • I am kaushalmodi on github.
  • I am kaushalmodi (https://keybase.io/kaushalmodi) on keybase.
  • I have a public key whose fingerprint is B581 7A1B 93A7 68C5 4CD4 BFC5 3D54 2F6D CD3C 8277

To claim this, I am signing this object:

View webmention-badge.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View indieweb-badge.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.