add dictionaries
This commit is contained in:
@@ -1 +1,65 @@
|
||||
term.log(()=10)
|
||||
let knownContentTypes = {}
|
||||
knownContentTypes["html"] = "text/html"
|
||||
knownContentTypes["css"] = "text/css"
|
||||
knownContentTypes["js"] = "application/javascript"
|
||||
knownContentTypes["json"] = "application/json"
|
||||
knownContentTypes["png"] = "image/png"
|
||||
knownContentTypes["jpg"] = "image/jpeg"
|
||||
knownContentTypes["jpeg"] = "image/jpeg"
|
||||
knownContentTypes["gif"] = "image/gif"
|
||||
knownContentTypes["svg"] = "image/svg+xml"
|
||||
knownContentTypes["ico"] = "image/x-icon"
|
||||
knownContentTypes["txt"] = "text/plain"
|
||||
knownContentTypes["md"] = "text/markdown"
|
||||
knownContentTypes["xml"] = "application/xml"
|
||||
knownContentTypes["pdf"] = "application/pdf"
|
||||
knownContentTypes["zip"] = "application/zip"
|
||||
knownContentTypes["gz"] = "application/gzip"
|
||||
knownContentTypes["tar"] = "application/x-tar"
|
||||
knownContentTypes["ogg"] = "audio/ogg"
|
||||
knownContentTypes["mp3"] = "audio/mpeg"
|
||||
knownContentTypes["mp4"] = "video/mp4"
|
||||
knownContentTypes["webm"] = "video/webm"
|
||||
knownContentTypes["webp"] = "image/webp"
|
||||
knownContentTypes["woff"] = "font/woff"
|
||||
knownContentTypes["woff2"] = "font/woff2"
|
||||
knownContentTypes["ttf"] = "font/ttf"
|
||||
knownContentTypes["otf"] = "font/otf"
|
||||
knownContentTypes["eot"] = "application/vnd.ms-fontobject"
|
||||
knownContentTypes["sfnt"] = "application/font-sfnt"
|
||||
knownContentTypes["wasm"] = "application/wasm"
|
||||
knownContentTypes["csv"] = "text/csv"
|
||||
knownContentTypes["tsv"] = "text/tab-separated-values"
|
||||
knownContentTypes["rtf"] = "application/rtf"
|
||||
knownContentTypes["7z"] = "application/x-7z-compressed"
|
||||
knownContentTypes["rar"] = "application/x-rar-compressed"
|
||||
knownContentTypes["bz"] = "application/x-bzip"
|
||||
knownContentTypes["bz2"] = "application/x-bzip2"
|
||||
knownContentTypes["xz"] = "application/x-xz"
|
||||
knownContentTypes["exe"] = "application/x-msdownload"
|
||||
knownContentTypes["swf"] = "application/x-shockwave-flash"
|
||||
knownContentTypes["flv"] = "video/x-flv"
|
||||
knownContentTypes["wmv"] = "video/x-ms-wmv"
|
||||
knownContentTypes["avi"] = "video/x-msvideo"
|
||||
knownContentTypes["mpg"] = "video/mpeg"
|
||||
knownContentTypes["mpeg"] = "video/mpeg"
|
||||
knownContentTypes["mov"] = "video/quicktime"
|
||||
knownContentTypes["weba"] = "audio/webm"
|
||||
knownContentTypes["wav"] = "audio/wav"
|
||||
knownContentTypes["flac"] = "audio/flac"
|
||||
knownContentTypes["midi"] = "audio/midi"
|
||||
knownContentTypes["mid"] = "audio/midi"
|
||||
knownContentTypes["m4a"] = "audio/m4a"
|
||||
knownContentTypes["m4v"] = "video/m4v"
|
||||
knownContentTypes["3gp"] = "video/3gpp"
|
||||
knownContentTypes["3g2"] = "video/3gpp2"
|
||||
knownContentTypes["ogv"] = "video/ogg"
|
||||
knownContentTypes["m3u8"] = "application/vnd.apple.mpegurl"
|
||||
knownContentTypes["ts"] = "video/mp2t"
|
||||
knownContentTypes["flv"] = "video/x-flv"
|
||||
knownContentTypes["wmv"] = "video/x-ms-wmv"
|
||||
|
||||
term.log(()=10)
|
||||
term.log((x)=10)
|
||||
term.log((x,y)=10)
|
||||
term.log((x,y,z)=10)
|
||||
16
tests/diff.ar
Normal file
16
tests/diff.ar
Normal file
@@ -0,0 +1,16 @@
|
||||
let h = 1e-1000
|
||||
let diff(f) = (x) = (f(x + h) - f(x)) / h
|
||||
|
||||
|
||||
let f(x) = x*x*x*x*x*x*x*x*x*x+2*x*x*x*x*x*x*x*x*x+3*x*x*x*x*x*x*x*x+4*x*x*x*x*x*x*x+5*x*x*x*x*x*x+6*x*x*x*x*x+7*x*x*x*x+8*x*x*x+9*x*x+10*x+11
|
||||
let x = 100
|
||||
let d = 0
|
||||
|
||||
do
|
||||
while (true) do
|
||||
let n = f(x)
|
||||
term.log("f"+string(d)+"("+string(x)+") = "+string(n))
|
||||
if (n) do
|
||||
f = diff(f)
|
||||
d = d + 1
|
||||
else return
|
||||
@@ -1,4 +1,4 @@
|
||||
term.log(global)
|
||||
let i = 1e8
|
||||
let i = 1e7
|
||||
while (i) do
|
||||
i=i-1
|
||||
@@ -1,6 +1,6 @@
|
||||
let i = 10
|
||||
let x = 1
|
||||
let n = 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000 * 1e1000000
|
||||
while (i) do
|
||||
x = x * 1e100000000
|
||||
term.log(i=i-1)
|
||||
term.log(x)
|
||||
x = x*n
|
||||
term.log(i=i-1)
|
||||
Reference in New Issue
Block a user