This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -i | |
# Draws a mandelbrot set. | |
# Author: Benjamin Staffin | |
# | |
# Modifications by Elias Mårtenson to remove dependency on the terminal type | |
# | |
# Simulates floating point by using big integers. Flagrantly uses two integers | |
# instead of complex numbers. I couldn't be arsed to calculate infinity limits | |
# of logarithmic functions in bash, so this just uses escape time values for | |
# colors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Mandelbrot in plain sh without any bash-specific features | |
# | |
# Original version by Benjamin Staffin: | |
# https://gist.github.com/benley/4984040 | |
# | |
L=99 | |
P=100000000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(usocket:with-client-socket (socket stream "encrypted.google.com" 443) | |
(let* ((enc (cl+ssl:make-ssl-client-stream stream)) | |
(crypto (cl+ssl::ssl-stream-handle enc)) | |
(cert (cl+ssl::ssl-get-peer-certificate crypto)) | |
(subj (cl+ssl::x509-get-subject-name cert))) | |
(format t "entry count: ~s~%" (cl+ssl::x509-name-entry-count subj)) | |
(cffi:with-foreign-pointer (buf 10240) | |
(let ((result (cl+ssl::x509-name-get-text-by-nid subj 13 buf 10240))) | |
(if (= result -1) | |
(format t "Could not find nid~%") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
em-desktop$ sbcl | |
This is SBCL 1.1.15.39-4878c26, an implementation of ANSI Common Lisp. | |
More information about SBCL is available at <http://www.sbcl.org/>. | |
SBCL is free software, provided as is, with absolutely no warranty. | |
It is mostly in the public domain; some portions are provided under | |
BSD-style licenses. See the CREDITS and COPYING files in the | |
distribution for more information. | |
* (ql:quickload "iolib") | |
To load "iolib": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
elias@tiger:~/prog/clouchdb$ ab -n 100 'http://127.0.0.1:5984/foo' | |
This is ApacheBench, Version 2.3 <$Revision: 1528965 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking 127.0.0.1 (be patient).....done | |
Server Software: CouchDB/1.6.0 | |
Server Hostname: 127.0.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun make-simplex-noise-generator () | |
(flet ((dot-prod (g x y) | |
(declare (optimize (speed 3) (safety 1)) | |
(type (simple-vector 3) g) | |
(type double-float x y)) | |
(+ (* (the (double-float -1d0 1d0) (aref g 0)) x) | |
(* (the (double-float -1d0 1d0) (aref g 1)) y)))) | |
(let ((grad3 #(#(1d0 1d0 0d0) #(-1d0 1d0 0d0) #(1d0 -1d0 0d0) #(-1d0 -1d0 0d0) | |
#(1d0 0d0 1d0) #(-1d0 0d0 1d0) #(1d0 0d0 -1d0) #(-1d0 0d0 -1d0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defpackage :clctest | |
(:use :cl)) | |
(in-package :clctest) | |
(defparameter *test-values1* | |
'((:INSERT (90024546449273/62500 . 1)) | |
(:REMOVE (90024546449273/62500 . 1)) | |
(:INSERT (720196371606183/500000 . 2)) | |
(:REMOVE (720196371606183/500000 . 2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defclass rbt-empty-node (red-black-node) | |
()) | |
(defmethod (setf rbt-color) (new-value (obj rbt-empty-node)) | |
(error "Empty nodes can't be changed")) | |
(defmethod (setf left-child) (new-value (obj rbt-empty-node)) | |
(error "Empty nodes can't be changed")) | |
(defmethod (setf right-child) (new-value (obj rbt-empty-node)) |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(declaim (optimize (safety 3) (speed 0) (debug 3))) | |
(defparameter *rbtree-special-test-data* | |
'((:INSERT (720255619831889/500000 . 1)) | |
(:INSERT (180063904958453/125000 . 101)) | |
(:INSERT (1440511239667639/1000000 . 102)) | |
(:INSERT (720255619833821/500000 . 103)) | |
(:INSERT (1440511239667643/1000000 . 104)) | |
(:INSERT (360127809916911/250000 . 105)) | |
(:INSERT (720255619833823/500000 . 106)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clang-linux.compile.c++.without-pth ../../src/main/bin/clang-linux-linux/release/gc-boehm/program-clasp/corePackage.o | |
In file included from ../../src/core/corePackage.cc:62: | |
In file included from ../../include/clasp/main/generated/initClasses_inc.h:247: | |
In file included from /home/emartenson/src/clasp/src/asttooling/include/astVisitor.h:30: | |
In file included from /usr/include/clang/AST/RecursiveASTVisitor.h:17: | |
In file included from /usr/include/clang/AST/Attr.h:18: | |
In file included from /usr/include/clang/AST/Decl.h:17: | |
In file included from /usr/include/clang/AST/APValue.h:21: | |
In file included from /usr/include/llvm/ADT/PointerUnion.h:18: | |
In file included from /usr/include/llvm/ADT/DenseMapInfo.h:17: |
OlderNewer