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
#include <stdio.h> | |
int | |
main(void) { | |
int i = 0, j = 5; | |
printf("%d, %d, %d\n", i, -~i, ~-i); // 0, 1, -1 | |
printf("%d, %d, %d\n", j, -~j, ~-j); // 5, 6, 4 | |
return 0; |
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
javascript:(function(){i=prompt("SRFI Number");window.location="http://srfi.schemers.org/srfi-"+i+"/srfi-"+i+".html";})() |
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
/* compiler output */ | |
SExp *member0_p (SExp *, SExp *); | |
SExp * | |
member0_p (SExp * x, SExp * l) | |
{ | |
SExp *ret = nil, *x2 = nil, *l3 = nil; | |
int s1 = 1; | |
while (s1) | |
{ |
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
#!/usr/bin/env perl | |
# poor person's wget; enough to satisfy apt-cyg at least. | |
# works well enough to download OCaml via apt-cyg, so that's | |
# good enough for me. | |
use strict; | |
use LWP::Simple; | |
my($opt,$dest,$file,$rc); |
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
; (hydra@eval '(if (< 3 4) "yes" "no") *tlenv*) | |
_ : Pair = '((3 4) (3 3) (9) (29 2) (3 "yes") (27 1) (3 "no")) | |
(load 3) | |
(load 4) | |
(<) | |
(compare-and-jump 2) ; jump 2 if false | |
(load "yes") | |
(jump 1) | |
(load "no") |
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
book | |
book_key | |
title text | |
author_key | |
genre_join_key | |
author | |
author_key | |
author_name | |
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
procedure TClipper.IntersectEdges(e1,e2: PEdge; | |
const pt: TIntPoint; protects: TIntersectProtects = []); | |
procedure DoEdge1; | |
begin | |
AddOutPt(e1, e2, pt); | |
SwapSides(e1, e2); | |
SwapPolyIndexes(e1, e2); | |
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
(define (hydra@load src-file) | |
"an implementation of the primitive procedure load" | |
(with f (open src-file :read) | |
(with-exception-handler | |
(fn (x) (display (format "An error occured while loading ~S: ~a\n" src-file x)) (close f)) | |
(fn () | |
(letrec ((loop (fn (expr) | |
(if (eq? expr #e) | |
#v | |
(begin |
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
$ time ./run_hydra.ss hydra_s1.ss | |
55 | |
6765 | |
832040 | |
2178309 | |
real 0m0.830s | |
user 0m0.655s | |
sys 0m0.046s |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"bufio" | |
"strings" | |
) | |
func main() { |
OlderNewer