Skip to content

Instantly share code, notes, and snippets.

Shen, copyright (C) 2010-2015 Mark Tarver
www.shenlanguage.org, Shen 20.1
running under Scheme, implementation: chez-scheme
port 0.16 ported by Bruno Deferrari
(0-) (datatype any
X : Type;
________
X : (mode any -);
(3-) (datatype globals
_______________________
(value *proof*) : proof;)
<1> Inputs to shen.mu_reduction
[[shen.mu [mode V1189 +] [[shen.mu [mode V1190 +] [shen.rename shen.the shen.variables in [Context_1957] and shen.then [call shen.the shen.continuation [[unify [cons V1189 [cons V1190 []]] [cons [cons [cons value [cons *proof* []]] [cons : [cons [cons list [cons [cons [cons list [cons [cons [cons list [cons wff []]] [cons * [cons wff []]]] []]] [cons * [cons [cons [cons list [cons [cons [cons list [cons wff []]] [cons * [cons wff []]]] []]] [cons --> [cons [cons list [cons [cons [cons list [cons wff []]] [cons * [cons wff []]]] []]] []]]] []]]] []]] []]]] [cons Context_1957 []]]]]]]] V1192]] V1191], +, ==>
<2> Inputs to shen.mu_reduction
[[shen.mu V1189 [[shen.mu [mode V1190 +] [shen.rename shen.the shen.variables in [Context_1957] and shen.then [call shen.the shen.continuation [[unify [cons V1189 [cons V1190 []]] [cons [cons [cons value [cons *proof* []]] [cons : [cons [cons list [cons [
diff -u -w ../Shen 17.3/Sources/macros.shen shen-sources/macros.shen
--- ../Shen 17.3/Sources/macros.shen 2015-03-02 17:34:22.000000000 -0200
+++ shen-sources/macros.shen 2015-03-15 12:48:45.000000000 -0300
@@ -176,7 +176,7 @@
(define function-abstraction-help
F 0 Vars -> [F | Vars]
F N Vars -> (let X (gensym (protect V))
- [/. X (function-abstraction-help F (- N 1) (append Vars [X]))]))
+ [lambda X (function-abstraction-help F (- N 1) (append Vars [X]))]))
diff -u -r -d -w Shen 17.2/Sources/macros.shen shen-chibi/shen-sources/macros.shen
--- Shen 17.2/Sources/macros.shen 2015-02-12 13:09:50.000000000 -0200
+++ shen-chibi/shen-sources/macros.shen 2015-03-02 19:03:33.000000000 -0200
@@ -176,7 +176,7 @@
(define function-abstraction-help
F 0 Vars -> [F | Vars]
F N Vars -> (let X (gensym (protect V))
- [/. X (function-abstraction-help F (- N 1) (append Vars [X]))]))
+ [lambda X (function-abstraction-help F (- N 1) (append Vars [X]))]))
class Eq a where
(==) :: a -> a -> Bool
(/=) :: a -> a -> Bool
x /= y = not (x == y)
instance Eq Integer where
x == y = compareIntegers x y
instance Eq Float where
x == y = compareFloats x y
@tizoc
tizoc / test.ml
Last active August 29, 2015 13:56
let r = ref 0
let h n m = n + m
let f = h 1
let g = fun n -> h 1 n
let () =
for i = 1 to 100000000 do
r := (f i)
done;
#!/usr/bin/perl
use CGI qw/:standard -debug/;
my $value = param("B1");
print "HTTP/1.0 200 OK\n";
print "Content-type: text/html\n\n";
print <<HTML;
<html>
<head>
import re
pattern = re.compile(r'\\\'([0-9a-fA-F]{2})')
def fix(s):
return unicode(chr(int(s.group(1), base=16)), encoding='mac_roman')
s = unicode(
r"\'f2ltimo d\'92a de las negociaciones por Siria, que se reanudar\'87n el 10 de febrero")
<!doctype html5>
<html>
<head><title>Form Submission Test</title></head>
<body>
<form method="POST" action="http://localhost:9999/submit">
<button name="button1" value="button1">BUTTON1</button>
<button name="button2" value="button2">BUTTON2</button>
<button name="submit" value="button1">BUTTON1</button>
<button name="submit" value="button2">BUTTON2</button>
#!/usr/bin/perl
print "HTTP/1.0 200 OK\n";
print "Content-type: text/html\n\n";
print <<HTML;
<html>
<head>
<title>A Simple Perl CGI</title>
</head>
<body>