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
import scalalib._ | |
import mill._ | |
import mill.define.Sources | |
import mill.api.PathRef | |
import $ivy.`com.twitter::scrooge-generator:19.11.0` | |
object example extends Cross[ExampleModule]("2.12.8") | |
class ExampleModule(val crossScalaVersion: String) extends CrossSbtModule { |
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-113) | |
(define (main args) | |
(let ([a (list->set equal-comparator '(0 1))] | |
[b (list->set equal-comparator '(1 0))]) | |
#?=(set=? a b) | |
#?=(set-size (set set-comparator a b))) | |
(let ([a (list->set equal-comparator '((2 . 1) (1 . 1) (0 . 2) (0 . 0)))] | |
[b (list->set equal-comparator '((2 . 1) (1 . 1) (0 . 0) (0 . 2)))]) | |
#?=(set=? a b) |
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]' |
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
;;; 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 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
<!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
<!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>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
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) |
NewerOlder