Skip to content

Instantly share code, notes, and snippets.

View trickster's full-sized avatar
🎯
Focusing

Sivaram Konanki trickster

🎯
Focusing
  • Tokyo
  • 20:40 (UTC +09:00)
View GitHub Profile
@trickster
trickster / zebra-logic.ss
Created March 23, 2018 14:51
Zebra logic in Scheme
; who owns the zebra
; 1 There are five houses.
; 2 The Englishman lives in the red house.
; 3 The Spaniard owns the dog.
; 4 Coffee is drunk in the green house.
; 5 The Ukrainian drinks tea.
; 6 The green house is immediately to the right of the ivory house.
; 7 The Old Gold smoker owns snails.
; 8 Kools are smoked in the yellow house.
@trickster
trickster / test.clj
Last active March 23, 2018 15:33
Learning Clojure (core.logic too)
(println "Hello")
(let [x 1
y 2]
(print "foo")
(str 1 2
3 4 5))
(defproject uncomp-1 "0.1.0-SNAPSHOT"
:description "Example project showcasing uncomplicate power"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0"]
[uncomplicate/neanderthal "0.18.0" :exclusions [[org.jcuda/jcuda-natives]
[org.jcuda/jcublas-natives]]]]
:main ^:skip-aot uncomp-1.core
:target-path "target/%s"
@trickster
trickster / .spacemacs.el
Created March 29, 2018 08:13
My spacemacs config file
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
;; Connected to nREPL server - nrepl://localhost:58389
;; CIDER 0.17.0snapshot (package: 20180319.1204), nREPL 0.2.13
;; Clojure 1.9.0, Java 1.8.0_151
;; Docs: (doc function-name)
;; (find-doc part-of-name)
;; Source: (source function-name)
;; Javadoc: (javadoc java-object-or-class)
;; Exit: <C-c C-q>
;; Results: Stored in vars *1, *2, *3, an exception in *e;
;; ======================================================================
(defproject uncomp-1 "0.1.0-SNAPSHOT"
:description "Example project showcasing uncomplicate power"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.9.0"]
[uncomplicate/neanderthal "0.18.0" :exclusions [[org.jcuda/jcuda-natives]
[org.jcuda/jcublas-natives]]]]
:main ^:skip-aot uncomp-1.core
:target-path "target/%s"
;;; init.el --- Spacemacs Initialization File
;;
;; Copyright (c) 2012-2017 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <[email protected]>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@trickster
trickster / gist:b0c02e318e38ef93ecbb7a3121cce62f
Created April 4, 2018 08:45 — forked from shriphani/gist:8675874
Racket code for the little schemer
#lang racket
;; Code for the little schemer
(define (atom? x)
(and (not (pair? x))
(not (null? x))))
(define (lat? l)
(cond ((null? l) #t)
Welcome to Racket v6.12.
racket@>
racket@>
racket@>
racket@>
racket@>
racket@> (display "hello")
helloracket@> (newline)
racket@> (println "wer")