Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Priyadarshan priyadarshan

🎯
Focusing
Block or report user

Report or block priyadarshan

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
@priyadarshan
priyadarshan / README.md
Last active Jan 3, 2020
Install WSL/Debian and tools
View README.md

To select Debian as default distro:

wslconfig /s debian
View scoop-bucket-list.txt
> scoop bucket list
Ash258
extras
java
main
nonportable
rasa
z-dodorz
@priyadarshan
priyadarshan / braille-pixels.lisp
Created Nov 17, 2019 — forked from Goheeca/braille-pixels.lisp
Braille pixels images using cl-charms (@ SBCL)
View braille-pixels.lisp
#!/usr/bin/sbcl --script
#|
Usage
=====
$ ./braille-pixels.lisp [path]
Main
====
@priyadarshan
priyadarshan / threads.lisp
Created Nov 17, 2019 — forked from Goheeca/threads.lisp
Bordeaux Threads test
View threads.lisp
(require :asdf)
(require :bordeaux-threads)
(defun color-formatter (color)
(format nil "~a[~am~~?~a[m" #\Esc color #\Esc)) ; The formatter function wants a simple-string.
(defun message (color i thread)
(let ((color-format (color-formatter color))
(thread-name (bt:thread-name thread)))
(format t "~&Hello for the ~? time from the ~? thread.~%"
@priyadarshan
priyadarshan / ob-powershell.el
Created Oct 22, 2019 — forked from cbilson/ob-powershell.el
Rough draft: execute poweshell from emacs src blocks
View ob-powershell.el
;;; ob-powershell.el --- org-babel functions for powershell evaluation
;; Authors: Chris Bilson
;; Keywords: literate programming, reproducible research
;; Homepage: http://orgmode.org
;;; Commentary:
;; Org-Babel support for evaluating powershell source code.
@priyadarshan
priyadarshan / eshell.org
Created Aug 28, 2019 — forked from ralt/eshell.org
my eshell config
View eshell.org

Eshell

eshell is the shell I’ve tried using over time, and in the end just never stick with it. Let’s try one more time with a couple of tricks. The first tricks are mostly documentation:

  • M-& in a tramp-aware session means you run commands in a new buffer, without a TTY. Great for things like tailf.
  • for ncurses-like applications, “visual commands” is the missing context. Applications like top are in the default list by default,
@priyadarshan
priyadarshan / README.md
Created Aug 28, 2019 — forked from ralt/README.md
horse-html: extension to Parenscript
View README.md

My main gripe with who-ps-html is that it generates a string, which means that you don't have a real DOM object to play with; you must wait to render that object before being able to do things on it.

horse-html fixes that by generating real DOM elements in JavaScript, and returning those.

The absolute best feature of horse-html is that the closures also magically work. If you define an onclick on an element, the JavaScript will use the closures generated wherever your code is defining that onclick attribute.

PS: the code can definitely be improved. I suck. But for the little use cases I have, it works. Feedback definitely welcome. I'm notably not a fan of the nested functions, but couldn't figure out a better way.

@priyadarshan
priyadarshan / ccl.md
Last active Aug 26, 2019
class-v-struct.lisp CCL bench (Thinkpad x1 Extreme)
View ccl.md
? (load "/home/lisp/class-v-struct.lisp")
#P"C:/home/lisp/class-v-struct.lisp"
? (run-test-suite)

(LOOP FOR I FROM 1 TO RUN-TIMES DO (SET-RANDOM-CLASS MY-CLASS-INSTANCE))
took 72,604,000 microseconds (72.604000 seconds) to run.
During that period, and with 12 available CPU cores,
     72,593,750 microseconds (72.593750 seconds) were spent in user mode
              0 microseconds ( 0.000000 seconds) were spent in system mode
@priyadarshan
priyadarshan / lambda.txt
Created Jul 11, 2019
lambda.txt -- the ultimate fortune file
View lambda.txt
This is the file LAMBDA.TXT, version 11.
Last Edit: 2005-Sep-13
To install on systems using BSD fortune(6), rename this file "lambda" and
store it in the appropriate fortunes directory, usually /usr/games/fortune
or /usr/share/fortune or something like that. Then in that directory run
strfile(8) on the "lambda" file which should produce a "lambda.dat". To
test, go to some other directory with no file called "lambda" in it, and
say "fortune lambda". If you get a lispy fortune you win. If not you lose.
To install on other systems simply find a fortune program, install it, and
@priyadarshan
priyadarshan / slow.lisp
Created May 20, 2019 — forked from j3pic/slow.lisp
Program to test the performance of Lisp file I/O.
View slow.lisp
;; It is often said that Lisp macros need not be used for optimization purposes. This
;; is an exception. SBCL issued the following warning when compiling the MAKE-ARRAY call
;; below:
;; ; note: unable to optimize because: ELEMENT-TYPE is not constant.
;; I don't want to lose the ability to decide which ELEMENT-TYPE to use by using
;; an :ELEMENT-TYPE argument, so I have to arrange for this argument to be processed
;; at compile time.
You can’t perform that action at this time.