This file contains hidden or 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
Process: finalww1 [74825] | |
Path: /Applications/WooWave Sync Pro.app/Contents/MacOS/finalww1 | |
Identifier: com.yourcompany.finalww1 | |
Version: ??? | |
Code Type: X86-64 (Native) | |
Parent Process: launchd [389] | |
User ID: 501 | |
Date/Time: 2012-09-30 17:37:56.723 -0700 | |
OS Version: Mac OS X 10.8 (12A269) |
This file contains hidden or 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
#!/usr/bin/env newlisp | |
; causes test code from blog | |
; | |
(define (LD root test) | |
(setf root (explode (string " " root))) | |
(setf test (explode (string " " test))) | |
; other code goes here | |
(setf len-root (length root)) |
This file contains hidden or 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
#!/usr/bin/newlisp | |
; A super-fast implementation of the Levenshtein Distance (Edit Distance) | |
; ; | |
; ; Requires: | |
; ; https://github.com/causes/puzzles/raw/master/word_friends/word.list | |
; ; | |
; ; http://en.wikipedia.org/wiki/Levenshtein_distance | |
; ; | |
; ; Pass in a word and get back a list |
This file contains hidden or 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
#!/usr/bin/newlisp | |
; Input: | |
; The input file (party.txt) has 1000 lines with people id's and ages | |
; (you are id 0), a separator line "--", and the rest are lines that have the | |
; relationship information (a line with [user_id1] [user_id2] means user_id1 and | |
; user_id2 know each other). | |
; Output: | |
; For each goal you should have one line with the total number of favor |
This file contains hidden or 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
#!/usr/bin/newlisp | |
; A super-fast implementation of the Levenshtein Distance (Edit Distance) algorithm | |
; | |
; Requires: | |
; https://github.com/causes/puzzles/raw/master/word_friends/word.list | |
; | |
; http://en.wikipedia.org/wiki/Levenshtein_distance | |
; | |
; Pass in a word and get back a list |
This file contains hidden or 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
; | |
; SHA | |
; | |
(global isLinux) | |
(setq isLinux (if (or (= 1 (sys-info 9)) (= 129 (sys-info 9))) true nil)) | |
(setq SHA1 (import (if isLinux "libssl.so" "/usr/lib/libssl.dylib") "SHA1")) |
This file contains hidden or 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
; | |
; Modified from the work of http://snippets.dzone.com/posts/show/2591 | |
; | |
; (load "md5.lsp") | |
; | |
; Example: | |
; > (load "md5.lsp") | |
; (lambda (str) (md5-init) (md5-update str (length str)) (md5-final) (set 'result "") | |
; (for (i 0 15 1) | |
; (set 'result (append result (format "%02x" (md5-digest i))))) result) |
This file contains hidden or 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
{ scopeName = 'source.lsp'; | |
comment = 'newLisp'; | |
fileTypes = ( 'lsp', 'qwerty' ); | |
foldingStartMarker = '^\((define(-macro)?)\s*?\(.+?\)$'; | |
foldingStopMarker = '^(?!\((define(-macro)?)\s*?\(.+?\))'; | |
patterns = ( | |
{ name = 'storage.context.lsp'; | |
match = '\b(\S+?):(\S+)\b'; | |
}, | |
{ match = '(?<=\(define-macro \()(\S+)\b'; |
This file contains hidden or 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
; | |
; http://streamtech.nl/problemset/100.html | |
; aka http://en.wikipedia.org/wiki/Collatz_conjecture | |
; | |
(define (collatz) | |
(println "Collatz Conjecture: low high (ENTER/RETURN to end)") | |
(until (= (set 'p (read-line)) "") | |
(set 'in (map int (parse p " ")) ) | |
(set 'low (in 0) 'high (in 1)) |
This file contains hidden or 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
#!/usr/bin/newlisp | |
; | |
; Two words are friends if they have a Levenshtein distance of 1. | |
; That is, you can add, remove, or substitute exactly one letter in | |
; word X to create word Y. | |
; A words social network consists of all of its friends, plus all of | |
; their friends, and all of their friends friends, and so on. | |
; | |
; Write a program to tell us how big the |