サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
衆院選
nakkaya.com
Static requires the leiningen build tool. Once installed, you can build Static with the following commands from within the project directory structure: $ lein deps $ lein uberjar Creating a static site usually involves the following, Set up the basic structure of the site Create some posts Run your site locally to see how it looks Deploy your site A basic static site usually looks something like t
Fractals in Clojure - Buddhabrot Fractal Buddhabrot is a special rendering of the Mandelbrot fractal. Rendering technique we will use is developed by Melinda Green. First we create a 2D array that will map to the pixel's on the screen. Next we start picking random points on the image and apply the mandelbrot formula. We iterate through the formula for points which do escape within the chosen numbe
Ferret is no longer experimental see http://dropbox.nakkaya.com/builds/ferret-manual.html for more information. Ferret is an experimental Lisp to C++ compiler, the idea was to compile code that is written in a very small subset of Clojure to be automatically translated to C++ so that I can program stuff in Clojure where JVM or any other Lisp dialect is not available. This is a literate program, th
An explorer's log24 Jun 2017Ferret Lisp FFI Notes15 Feb 2017Bare Metal Lisp - RC Control using Ferret10 Jun 2016Ferret - A Hard Real-Time Clojure for Lisp Machines07 Oct 2014Static Galleria Script26 Jan 2014Pentadactyl Configuration05 Jan 2014tmux Configuration05 Jan 2014SSH as a Hidden Service with Tor20 Nov 2013Parse S3 Logs with Goaccess23 Oct 2013Notes on Synchronization and Backup of $HOME us
A micro-manual for LISP Implemented in C Recently I had to go through some code that uses the uIP TCP/IP stack, which reminded me, it has been a long time since I did something in C so I ended up spending the weekend implementing the 10 rules John McCarthy described in his paper A Micro-Manual for Lisp - not the whole Truth. This is a literate program, the code in this document is the executable s
Clojure I/O Cookbook There are a number of ways for us to read a file. If the file is small enough and can be held in memory, simplest approach is to use slurp which will return a string containing the content of the file, For files that you can't or don't want to hold in memory, we can use BufferedReader, line-seq combo and process files on a line by line basis, (with-open [rdr (java.io.BufferedR
Path Finding Using A-Star in Clojure For a recent project, I had to implement A* (A-Star) in Clojure, since it's a very popular path finding algorithm used in gaming I thought it might be interesting to other clojurians too. AStar uses best-first search to find the the least-cost path from a given initial node to one goal node (out of one or more possible goals). Functions, g(x) - cost of getting
Consistent Hashing with Clojure Let's say you want to distribute some objects to a number of nodes. The Naive approach to this problem would be to hash the object you want to store, then using the modulus operator pick a node and store it there, (mod (hash obj) n) This scheme would work until you add or remove nodes from the cache, now because you pick nodes from a pool of (+ n 1) or (- n 1) nodes
Using Clojure to Connect to GMail via IMAP I had to dig through quite a few docs to get a couple of raw emails from my IMAP account so I am posting the snippet for future reference. I have uploaded necessary jars to clojars under the group org.clojars.nakkaya.javax.mail, in case anyone wants to play with it. (ns gmail.core (:use clojure.contrib.java-utils) (:import (javax.mail Session Folder Flags
WebDAV + SSL on DebianI was looking for a way to easily share documents between machines, since WebDAV shares can be accessed by Windows, Linux or Mac machines out of the box, I choose WebDAV over SSL. I don't use SSL for anything so WebDAV is served from DocumentRoot. I've been using it for a few days, so far it beats carrying USB sticks around. Enable relevant Apache modules, a2enmod ssl a2enmod
Applescript with Clojure Today I was experimenting with AppleScript engine thats included with Java 1.6. It makes it much easier to interact with OS X then executing osascript using Runtime. (let [mngr (javax.script.ScriptEngineManager.) engine (.getEngineByName mngr "AppleScript")] (.eval engine "say \"Hello World!\"")) For simple stuff, it is as simple as asking engine manager for the AppleScrip
A Simple Clojure IRC Client The other night I was toying with the following script, I was going to thrash it but figured it may help someone or me later on so I am dumping it here. It doesn't do anything other then to sit idle in a channel, (ns irc (:import (java.net Socket) (java.io PrintWriter InputStreamReader BufferedReader))) (def freenode {:name "irc.freenode.net" :port 6667}) (def user {:na
Etch A Sketch A small Sunday hack inspired by the classical children's toy, for this project you need two potentiometers, connected to analog pins 0 and 1, Idea behind the project is simple, we read potentiometers, turn the values read into x and y coordinates for the turtle then command turtle to go to that coordinate. (ns sketch (:use turtle) (:use clodiuno.core) (:use clodiuno.firmata) (:import
Fun with Clojure, OpenCV and Face Detection I have been meaning to play with OpenCV for a while now, the other night, I had some time to kill so I decided to play with it. OpenCV is a computer vision library originally developed by Intel. It focuses mainly on real-time image processing. I assumed by now there are a lot of Java libraries for OpenCV but as it turns out there is only one, and it is a
Unit Testing in Clojure One thing I love about Clojure is the built in unit tests. Unit tests are great for making sure your code does what it needs to do and introducing new features or bug fixes doesn't break anything. You can refactor your code anytime you want and be sure that you did not break anything. Unit tests also serve as a living documentation for your code base, newcomers can look at
このページを最初にブックマークしてみませんか?
『An explorer's log』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く