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
printf x="printf x=%c%s%c,34,x,34",34,x,34 |
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
# Methods `a' and `b' will print out each other when called | |
def a;x="def a;x=";q=34;printf"def b;x=%cdef b;x=%c;q=34;"+(y="printf%c%s%%c%s%%c;q=34;%c(y=%c%s%c),q,q,q,x,x,q,q,y,q end"),q,q,q,x,x,q,q,y,q end | |
def b;x="def b;x=";q=34;printf"def a;x=%cdef a;x=%c;q=34;"+(y="printf%c%s%%c%s%%c;q=34;%c(y=%c%s%c),q,q,q,x,x,q,q,y,q end"),q,q,q,x,x,q,q,y,q end | |
# Slightly (8 bytes) shorter version | |
def a;x="def a;x=";printf"def b;x=%cdef b;x=%c;"+(y="printf%c%s%%c%s%%c;%c+y=%c%s%c),34,34,34,x,x,34,34,y,34 end"),34,34,34,x,x,34,34,y,34 end | |
def b;x="def b;x=";printf"def a;x=%cdef a;x=%c;"+(y="printf%c%s%%c%s%%c;%c+y=%c%s%c),34,34,34,x,x,34,34,y,34 end"),34,34,34,x,x,34,34,y,34 end |
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
def fiber_manager(j, g) | |
fiber_manager((nf = Fiber.new do |i, f| | |
print "#{i} " | |
while (n = f.resume) % i == 0; end | |
Fiber.yield(n) | |
loop do | |
n = f.resume | |
Fiber.yield(n) if n % i != 0 | |
end | |
end).resume(j, g), nf) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Cardioid</title> | |
<style> | |
input { | |
width: 3em; | |
} | |
</style> | |
<script> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Koch snowflake</title> | |
<style type='text/css'> | |
input { | |
width: 4em; | |
} | |
</style> | |
<script type='text/javascript' src='http://code.jquery.com/jquery-1.4.3.min.js'></script> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Function space</title> | |
<style> | |
canvas { | |
float: left; | |
margin: 10px; | |
} | |
</style> |
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
(use srfi-27) | |
(use srfi-42) | |
(define-macro (swap! a b) | |
(let1 t (gensym) | |
`(let1 ,t ,a | |
(set! ,a ,b) | |
(set! ,b ,t)))) | |
(define (bubble-sort v) |
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
;;; herbert-parser.scm - parsing Herbert programs | |
;;; | |
;;; Usage (the result is indented manually): | |
;;; | |
;;; % cat test.hervert | |
;;; a(X,Y,Z):b(X-12+13-Y+Z,X)ccsslr | |
;;; b(X):cccc | |
;;; c:s | |
;;; ss | |
;;; % gosh herbert-parser.scm < test.hervert |
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
(use gauche.threads) | |
(use math.const) | |
(use srfi-42) | |
(use gl) | |
(use gl.glut) | |
(define a 40) | |
(define A 10) | |
(define f 1) | |
; v = 3/4 fa |
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
#compdef evince | |
local arguments | |
arguments=( | |
'(-h --help --help-all --help-sm-client --help-gtk)'{-h,--help}'[show help options]' | |
'(-h --help --help-sm-client --help-gtk)--help-all[show all help options]' | |
'(-h --help --help-all --help-gtk)--help-sm-client[show session management options]' | |
'(-h --help --help-all --help-sm-client)--help-gtk[show GTK+ Options]' | |
'--sm-client-disable[disable connection to session manager]' | |
'--sm-client-state-file=[specify file containing saved configuration]' |
OlderNewer