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
/* Mono (minimam Lisp interpreter) | |
written by kenichi sasagawa 2011/12 | |
*/ | |
#define HEAPSIZE 10000000 | |
#define FREESIZE 50 | |
#define STACKSIZE 30000 | |
#define SYMSIZE 256 | |
#define BUFSIZE 256 |
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
/* Mono (minimam Lisp interpreter) | |
written by kenichi sasagawa 2011/12 | |
*/ | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <ctype.h> |
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
/* (simple Scheme interpreter) | |
written by kenichi sasagawa 2011/12start | |
*/ | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <ctype.h> |
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
/* Poly (simple Scheme interpreter) | |
written by kenichi sasagawa 2011/12 | |
*/ | |
#define CELLSIZE 1000000 | |
#define HEAPSIZE 799999 | |
#define CONTSTK 800000 | |
#define PALASTK 900000 |
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
;;Sapphire for r7rs test version | |
(import (scheme base) | |
(scheme char) | |
(scheme complex) | |
(scheme eval) | |
(scheme file) | |
(scheme inexact) | |
(scheme lazy) | |
(scheme repl) | |
(scheme process-context) |
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
;;Sapphire preprocessor | |
;;Meta-language | |
(define tokens '()) | |
(define tokens1 '()) ;;for look ahead | |
(define cc #f) | |
(define semicolon-end? #f) | |
(define period-end? #f) | |
(define bracket-end? #f) | |
(define then-end? #f) |
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
# for adagrad test | |
defnetwork init_network4(_x) do | |
_x |> f(10,10) |> flatten | |
|> w(361,300) |> b(300) |> relu | |
|> w(300,100) |> b(100) |> relu | |
|> w(100,10) |> b(10) |> softmax | |
end | |
def all(m,n) do | |
IO.puts("preparing data") |
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
tarai(X,Y,_,Y):- | |
X=<Y,!. | |
tarai(X,Y,Z,R):- | |
X1 is X-1,Y1 is Y-1,Z1 is Z-1, | |
tarai(X1,Y,Z,R1),tarai(Y1,Z,X,R2),tarai(Z1,X,Y,R3),tarai(R1,R2,R3,R). |
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
Elxlog ver0.05 | |
?- X is elx_tarai(12,6,0). | |
X = 12 | |
true | |
?- | |
def tarai(x, y, z) do | |
cond do | |
x <= y -> y | |
true -> tarai(tarai(x - 1, y, z), tarai(y - 1, z, x), tarai(z - 1, x, y)) |
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
# for CNN test for Fashion-MNIST | |
defnetwork init_network9(_x) do | |
_x | |
# |> visualizer(1,1) | |
|> f(5, 5, 1, 12, {1, 1}, 1, 0.1, 0.001) | |
|> pooling(2, 2) | |
|> f(3, 3, 12, 12, {1, 1}, 1, 0.1, 0.001) | |
|> f(2, 2, 12, 12, {1, 1}, 1, 0.1, 0.001) | |
|> pooling(2, 2) | |
|> f(3, 3, 12, 12, {1, 1}, 0, 0.1, 0.001) |
OlderNewer