Skip to content

Instantly share code, notes, and snippets.

View ashok-khanna's full-sized avatar
🏠
Working from home

Ashok Khanna ashok-khanna

🏠
Working from home
View GitHub Profile
@ashok-khanna
ashok-khanna / package.json
Created April 10, 2022 02:08 — forked from sunilw/package.json
ebuild simple project
{
"name": "react tut",
"version": "0.0.1",
"description": "Steps towards a more sufficient build pipeline",
"main": "index.js",
"watch": {
"sass": {
"patterns": [
"./src/sass"
],
@ashok-khanna
ashok-khanna / gcloud-tramp.el
Created March 26, 2022 06:34 — forked from jackrusher/gcloud-tramp.el
Tramping into GCloud instances from within emacs
;; make sure you've set your default project with:
;; gcloud config set project <project-name>
(require 'tramp)
(add-to-list 'tramp-methods
'("gcssh"
(tramp-login-program "gcloud compute ssh")
(tramp-login-args (("%h")))
(tramp-async-args (("-q")))
(tramp-remote-shell "/bin/sh")
@ashok-khanna
ashok-khanna / capi-editor.lisp
Created February 12, 2022 20:46
CAPI Editor Example
;;;;****************************************************************************
;;; Editor Example
;;;;****************************************************************************
(in-package "CL-USER")
(defvar *editor-text*
";;----------------------------------------------------------------------------
;;;;****************************************************************************
;;;; SPECIALIZING SLOTS WITH THE DEFINE-CLASS MACRO
;;;;****************************************************************************
;;;;***** RATIONALE ************************************************************
;;; In this file, we introduce a DEFINE-CLASS macro that proposes a particular
;;; approach to defining CLOS classes such that type information is retained
@ashok-khanna
ashok-khanna / irc.txt
Created October 30, 2021 08:00 — forked from nikodemus/irc.txt
Notes re. debugging Common Lisp with SBCL and Slime
Context from IRC logs for future reference.
[12:36] <kushal> nikodemus, can you point me to some tutorial on debugging on sbcl ?
[12:37] * andreer (andreer@flode.pvv.ntnu.no) has joined #quicklisp
[12:38] <nikodemus> kushal: no really good ones actually exist at the moment. i'm planning on writing one before the year is out, but... in the meanwhile, i can give some pointers
[12:38] <nikodemus> a couple of questions: is this a general question, or do you have a specific issue you need to debug?
[12:39] <kushal> right now , general, managed to debug the specific issue somehow :)
[12:39] <nikodemus> ok. are you using slime?
[12:39] <kushal> nikodemus, yes and no both
[12:40] <nikodemus> good. :)
@ashok-khanna
ashok-khanna / filename.md
Created October 22, 2021 17:41
How to get file name of a defined function?
@ashok-khanna
ashok-khanna / tfidf.lisp
Created October 9, 2021 10:20 — forked from death/tfidf.lisp
tfidf
;; Suppose we have a collection of N documents.
;; Define Fij to be the frequency of term i in document j.
;; Define TFij to be Fij/max(k,Fkj),
;; that is, the term frequency of term i in document j is Fij
;; normalized by dividing it by the maximum number of occurrences
;; of any term in the same document.
;; Define IDFi to be log2(N/ni).
;; The TF.IDF score for term i in document j is then defined to be
;; TFij x IDFi. The terms with the highest TF.IDF score are often
;; the terms that best characterize the topic of the document.
@ashok-khanna
ashok-khanna / cl-history.txt
Created October 6, 2021 08:44 — forked from agumonkey/cl-history.txt
Detailed account and personal insights on the history of common-lisp
From welch@thor.oar.net Thu Oct 20 16:53:41 EDT 1994
Article: 15160 of comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!usenet.eel.ufl.edu!usenet.cis.ufl.edu!caen!math.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!ns.mcs.kent.edu!kira.cc.uakron.edu!malgudi.oar.net!malgudi.oar.net!welch
From: welch@thor.oar.net (Arun Welch)
Newsgroups: comp.lang.lisp
Subject: CL History (was Re: Why do people like C?)
Date: 20 Oct 94 15:34:10
Organization: OARnet
Lines: 3244
Message-ID: <WELCH.94Oct20153410@thor.oar.net>
@ashok-khanna
ashok-khanna / gist:36f4732018661d84dc0687a7ecf969d6
Created October 1, 2021 19:03 — forked from romainl/gist:1f93db9dc976ba851bbb
Vim: available lowercase key pairs in normal mode…
cd cm co cp cq cr cs cu cv cx cy cz
dc dm dq dr ds du dv dx dy dz
gb gc gl gs gy
vc vd vm vo vp vq vr vs vu vv vx vy vz
yc yd ym yo yp yq yr ys yu yv yx yz
@ashok-khanna
ashok-khanna / test.lisp
Created September 29, 2021 18:25
common lisp implementation limits
CL-USER> (values call-arguments-limit lambda-parameters-limit multiple-values-limit (lisp-implementation-type))
4611686018427387903 (62 bits, #x3FFFFFFFFFFFFFFF)
4611686018427387903 (62 bits, #x3FFFFFFFFFFFFFFF)
4611686018427387903 (62 bits, #x3FFFFFFFFFFFFFFF)
"SBCL"
CL-USER> (values call-arguments-limit lambda-parameters-limit multiple-values-limit (lisp-implementation-type))
65536
4096
200