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 isInteger (n) | |
(= (round n) n)) | |
(defun isPentagonalNumber (p) | |
(let ((solution (/ (+ 1 (sqrt (+ 1 (* 24 p)))) 6))) | |
(isInteger solution))) | |
(defun test (p) | |
(/ (+ 1 (sqrt (+ 1 (* 24 p)))) 6)) |
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 test (p) | |
(/ (+ 1 (sqrt (+ 1 (* 24 p)))) 6)) |
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
dev-java/sun-jre-bin |
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
$ java -version | |
java version "1.6.0_18" | |
OpenJDK Runtime Environment (IcedTea6 1.8.1) (Gentoo build 1.6.0_18-b18) | |
OpenJDK Server VM (build 16.0-b13, mixed mode) |
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
philip@philip-VirtualBox:~/tmp$ cake new test | |
[new] Creating a new project based on ~/.cake/templates/default | |
[new] Copying 4 files to /home/philip/tmp/test | |
[new] Copied 4 empty directories to 1 empty directory under /home/philip/tmp/test | |
[new] Renaming directories with +project+ in their name | |
[new] Replacing +project+ with 'test' in all files. | |
philip@philip-VirtualBox:~/tmp$ cd test | |
philip@philip-VirtualBox:~/tmp/test$ vim project.clj | |
philip@philip-VirtualBox:~/tmp/test$ cat project.clj | |
(defproject test "0.0.1-SNAPSHOT" |
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
philip@philip-VirtualBox:~/tmp$ cake new test | |
[new] Creating a new project based on ~/.cake/templates/default | |
[new] Copying 4 files to /home/philip/tmp/test | |
[new] Copied 4 empty directories to 1 empty directory under /home/philip/tmp/test | |
[new] Renaming directories with +project+ in their name | |
[new] Replacing +project+ with 'test' in all files. | |
philip@philip-VirtualBox:~/tmp$ cd test/ | |
philip@philip-VirtualBox:~/tmp/test$ cake -v | |
[cake] running from git checkout | |
[start] starting cake jvm |
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
uint32_t l2b32 (uint32_t x) | |
{ | |
uint8_t *p = &x; | |
return p[0] + p[1] << 8 + p[2] << 16 + p[3] << 24; | |
} | |
uint2_t b2l32_t (uint32_t x) | |
{ | |
uint8_t *p = &x; | |
return p[3] + p[2] << 8 + p[1] << 16 + p[0] << 24; |
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
#ifndef FRAGMENT_PROGRAM_H | |
#define FRAGMENT_PROGRAM_H | |
// | |
// Graphics Framework. | |
// Copyright (C) 2007 Department of Computer Science, University of Copenhagen | |
// | |
#include <iostream> | |
#include <iomanip> | |
#include "graphics/graphics.h" | |
#include <cmath> |
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
(require :bordeaux-threads) | |
(defparameter *tmp* nil) | |
(defun threadfun () | |
(declare (ignorable *tmp*)) | |
(princ "printing *tmp*") | |
(print *tmp*) | |
(finish-output) | |
*tmp*) |
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
(require :bordeaux-threads) | |
(defparameter *tmp* 40) | |
(defun threadfun () | |
(format t "*tmp*: ~A~%" *tmp*)) | |
(defun bob () | |
(let* ((bordeaux-threads:*default-special-bindings* | |
(acons '*tmp* 42 |
OlderNewer