Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
115 lines (115 loc) · 16.2 KB
/
Copy pathindex.html
File metadata and controls
115 lines (115 loc) · 16.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="RubyOnWASM, an online serverless static ruby interpreter running with the help of new Ruby's (3.2.0) webAssembly feature. It is a simple, minimal ruby interpreter running blazing fast entirely on browser">
<title>Ruby on WASM</title>
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link href="https://fonts.googleapis.com/css2?family=Cutive+Mono&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fomantic-ui/2.8.8/semantic.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/styles/github-dark-dimmed.min.css" />
<link rel="stylesheet" href="/assets/css/style.css" />
</head>
<body>
<nav class="ui menu">
<svg id="logo" onclick="logoAnimate()" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 352.49418 284.82143">
<g id="ruby">
<path class="cls-1" d="M467.853,475.76534c-.32067.62819-.63393,1.30293-1.231.196-1.11877-1.61943-1.39653-3.55542-2.007-5.364-5.56446-16.48682-10.81476-33.07665-16.2534-49.6049-5.81065-17.65883-11.52711-35.34886-17.2994-53.02052-5.875-17.986-11.68263-35.994-17.59687-53.96734-.93009-2.82649-1.80517-5.67336-2.69678-8.51352-.297-.946-.64449-2.00419.8356-2.37635a10.16311,10.16311,0,0,1,2.37525-.16385q54.89648-.00925,109.7857-.0088a3.44713,3.44713,0,0,0,2.4519-1.82166q8.4485-12.37588,16.90738-24.74471c9.28915-13.6032,18.58012-27.2053,28.05724-40.67886.46408-.65979.741-1.62948,1.85715-1.5369q8.78818,12.22551,17.5724,24.45388,15.38964,21.5328,30.72662,43.10317c.41706.58623,1.1402,1.05327,1.017,1.93821a6.38507,6.38507,0,0,1-3.66524.585q-44.75531.00484-89.51061.00263c-3.77814,0-3.78141.00018-4.97223,3.57328Q497.26322,388.66246,470.298,469.50159A35.38353,35.38353,0,0,1,467.853,475.76534Z" transform="translate(-312.2769 -225.33687)"/>
<path class="cls-2" d="M410.963,303.61509c.52781,3.50618,1.95472,6.75019,3.03617,10.08559q14.007,43.2004,28.145,86.35836,12.00765,36.80351,23.99511,73.61354a3.961,3.961,0,0,1,.48266,2.28876c-4.35629-4.24879-8.21245-8.95562-12.28318-13.46421-9.97275-11.04543-19.86154-22.16665-29.78065-33.26046q-27.57323-30.83882-55.14437-61.67946-16.07271-17.96709-32.174-35.90862-12.11357-13.51812-24.21182-27.04989c-.31128-.34889-1.17691-.63369-.497-1.38955a15.38626,15.38626,0,0,1,2.764-.1704q45.53469.00822,91.06938-.00533c.77635-.00028,1.88453.364,2.25156-.28338.4522-.79759-.53677-1.50757-.9982-2.17617q-19.82723-28.72934-39.69891-57.428c-1.54577-2.2266-3.07042-4.46791-4.62533-6.68835a5.00379,5.00379,0,0,1-1.09476-2.30271c.41653-.64995,1.07588-.3766,1.62405-.37682q50.84724-.02006,101.69451-.0069c.39463,0,.78926.05351,1.18389.082a.787.787,0,0,1,.03346.55663c-2.74189,4.05039-5.9652,7.72926-9.02455,11.53137q-18.2542,22.68592-36.43849,45.42765c-2.85263,3.5512-5.72968,7.08337-8.56686,10.64729A7.25047,7.25047,0,0,1,410.963,303.61509Z" transform="translate(-312.2769 -225.33687)"/>
<path class="cls-3" d="M467.853,475.76534c.21564-2.53621,1.32216-4.82076,2.109-7.18377q27.10589-81.40563,54.25439-162.79706c.46166-1.38629.90676-2.19586,2.65486-2.19221q47.74164.09948,95.48357.06277c-3.82877,4.80547-8.09189,9.229-12.1903,13.79535q-70.1716,78.1848-140.38689,156.33042C469.16227,474.46588,468.49563,475.10485,467.853,475.76534Z" transform="translate(-312.2769 -225.33687)"/>
<path class="cls-4" d="M466.70568,234.12108a1.09673,1.09673,0,0,0-.00449-.268c.72523-.02931,1.45046-.08415,2.1757-.08424q50.97952-.00633,101.959.01561c.73049.00048,1.58022-.37665,2.203.37564-2.88214,3.51814-5.30849,7.36221-7.87684,11.10132q-17.79555,25.90756-35.51748,51.86568c-1.1166,1.63087-2.28148,3.22886-3.38867,4.866-.41834.61855-.80253,1.22142-1.63754,1.281-1.28634-.15593-1.76116-1.30353-2.44562-2.11748q-16.91789-20.119-33.71834-40.33637-10.30515-12.3311-20.61653-24.65691A3.56453,3.56453,0,0,1,466.70568,234.12108Z" transform="translate(-312.2769 -225.33687)"/>
<path class="cls-4" d="M362.19874,234.15479c3.09681,3.68594,5.60227,7.79439,8.33862,11.73517q19.68207,28.34534,39.27836,56.75018a4.90508,4.90508,0,0,1,.33325.6985,3.19884,3.19884,0,0,1-2.15522.28638q-46.61823.0209-93.23643-.00409c-.7448-.00045-1.6017.34158-2.22634-.41178q21.682-30.2054,43.36694-60.40869C357.97814,239.90417,360.0975,237.036,362.19874,234.15479Z" transform="translate(-312.2769 -225.33687)"/>
<path class="cls-5" d="M466.70568,234.12108c3.66014,4.32754,7.33585,8.642,10.97669,12.98578q7.68837,9.17266,15.33541,18.37995,8.54742,10.25906,17.08985,20.52227,7.23249,8.65145,14.51085,17.26472c-.47109.52962-1.10365.35685-1.67822.35685q-55.9884-.00039-111.977-.01555c2.92555-3.73817,5.81712-7.50368,8.78335-11.2095q14.97809-18.71271,30.00432-37.38695C455.37573,248.03125,461.05238,241.08556,466.70568,234.12108Z" transform="translate(-312.2769 -225.33687)"/>
</g>
<g id="tag">
<path class="cls-6" d="M566.34564,462.95988q-.40555-2.72231-.8113-5.44459c-.92348-6.16983-1.76412-12.35369-2.8047-18.50372-.57679-3.4089-1.046-6.83252-1.62782-10.23891-.0744-.43557.06014-.58966.43739-.73366q3.64017-1.38957,7.26376-2.82236a.52116.52116,0,0,1,.76384.25048c4.62952,7.24295,9.221,14.51116,13.94341,21.69324,1.5967,2.42833,3.1503,4.88557,4.76984,7.2991.06466.09636.14579.18168.22118.27453.15947-.15464.06615-.31053.04209-.45987-.23621-1.46659-.43256-2.941-.718-4.398-1.62871-8.313-2.77283-16.7072-4.21818-25.0508-.26023-1.50224-.48062-3.01136-.72162-4.517-.04818-.301-.09455-.54121.31226-.69014,2.54694-.93239,4.98188-2.1434,7.54051-3.04994.68365-.24221.68032-.25906.776.43856,1.51993,11.08506,2.98027,22.17875,4.58317,33.25182q1.22037,8.43054,2.42129,16.86386c.06364.45089.01447.69248-.47771.8768-2.56245.95956-5.11039,1.95848-7.65358,2.96836a.58034.58034,0,0,1-.8529-.28342q-7.62909-11.94311-15.28556-23.86875c-.9515-1.48389-1.914-2.9607-2.87451-4.43881a.89076.89076,0,0,0-.5768-.4811c.19923,1.26548.39158,2.49037.585,3.71509q2.39073,15.14144,4.79517,30.28067c.07409.464-.06311.62343-.45888.77483q-3.94483,1.50892-7.87363,3.05957c-.3492.13766-.55232.12381-.77821-.21961q-13.89286-21.12036-27.8154-42.22117c-.29978-.45413-.12731-.53333.25108-.67876q3.8869-1.494,7.76155-3.01954a.53966.53966,0,0,1,.80427.264q8.84447,14.2688,17.71821,28.51946c.13286.21365.28059.418.42139.62676Z" transform="translate(-312.2769 -225.33687)"/>
<path class="cls-6" d="M642.73612,450.4839c-1.312.51-2.63216,1-3.93123,1.54089a.66226.66226,0,0,1-.9319-.26843c-2.09443-2.78455-4.21625-5.54856-6.30514-8.33724a.70882.70882,0,0,0-1.00443-.30614c-2.03823.82881-4.13675,1.51942-6.13824,2.42611-2.81661,1.276-5.73991,2.26948-8.59741,3.434a.52685.52685,0,0,0-.38889.7001c.54624,3.42173,1.05558,6.84933,1.6034,10.27079a.64654.64654,0,0,1-.49764.86115q-3.78427,1.426-7.53987,2.92769c-.4861.19373-.67.17694-.73305-.4066-.16383-1.51527-.36881-3.02712-.59818-4.53412-2.0723-13.61532-3.69369-27.29211-5.59077-40.93128-.22912-1.64727-.42705-3.299-.67014-4.9441a.508.508,0,0,1,.39433-.65359q6.46338-2.49656,12.91562-5.02186a.53389.53389,0,0,1,.73682.2311c1.498,1.96951,2.96091,3.96912,4.53385,5.87765,3.91461,4.74979,7.55234,9.713,11.32443,14.5723,5.24359,6.75493,10.44647,13.54145,15.67906,20.30494.31325.4049.21014.53331-.21135.69062C645.42965,449.42385,644.085,449.95959,642.73612,450.4839ZM619.984,438.45371c1.81082-.70377,3.61724-1.41928,5.43563-2.10291.44357-.16677.54076-.30981.24037-.72784q-5.26794-7.3312-10.50512-14.68449a.51378.51378,0,0,0-.73123-.22949c-.91381.38311-1.83682.74784-2.77177,1.07534-.4091.14331-.47524.34695-.41271.7501q1.37019,8.83372,2.70057,17.67356c.069.45947.1741.54462.61563.36656C616.357,439.848,618.17315,439.15749,619.984,438.45371Z" transform="translate(-312.2769 -225.33687)"/>
<path class="cls-7" d="M549.52628,503.34859l-17.52144,6.80971c-5.6514-14.3275-11.11871-28.72634-16.82329-43.034-7.94421-19.92479-15.45986-40.0181-23.43085-59.93377-3.89063-9.72083-7.60069-19.5139-11.40487-29.26944-.16312-.41831-.13123-.59058.32079-.76878,10.19415-4.01875,20.47511-7.81539,30.60609-11.99656,3.5-1.44449,7.05512-2.75538,10.58507-4.12729,2.93854-1.14206,5.88006-2.27656,8.81222-3.43477.41324-.16323.627-.15748.77009.31879a11.33984,11.33984,0,0,0,.95772,2.10948,16.35818,16.35818,0,0,0,26.95466,2.58563c4.00915-4.93885,4.81685-10.50631,2.60995-16.49025-.11552-.31323-.29881-.56781.2139-.77325q3.938-1.578,7.88229-3.14034c14.05657-5.53986,28.154-10.976,42.23266-16.46.4503-.1754.64809-.18328.85433.34162,5.61087,14.27952,11.08694,28.61122,16.73848,42.87553,7.6699,19.35858,15.11752,38.80523,22.66666,58.2117.08646.22227.076.51868.366.62933l11.85437,30.5014c-18.75553,7.37188-37.5829,14.55864-56.31862,21.983-19.38644,7.68225-38.86321,15.13652-58.298,22.69673C549.93262,503.06939,549.636,503.05791,549.52628,503.34859Zm16.81936-40.38871-.13748.03705c-.1408-.20872-.28853-.41311-.42139-.62676q-8.86537-14.25585-17.71821-28.51946a.53966.53966,0,0,0-.80427-.264q-3.87256,1.5306-7.76155,3.01954c-.37839.14543-.55086.22463-.25108.67876q13.92687,21.09794,27.8154,42.22117c.22589.34342.429.35727.77821.21961q3.92935-1.54881,7.87363-3.05957c.39577-.1514.533-.31085.45888-.77483q-2.41729-15.13719-4.79517-30.28067c-.19337-1.22472-.38572-2.44961-.585-3.71509a.89076.89076,0,0,1,.5768.4811c.96047,1.47811,1.923,2.95492,2.87451,4.43881q7.64975,11.92992,15.28556,23.86875a.58034.58034,0,0,0,.8529.28342c2.54319-1.00988,5.09113-2.0088,7.65358-2.96836.49218-.18432.54135-.42591.47771-.8768q-1.19046-8.43489-2.42129-16.86386c-1.6029-11.07307-3.06324-22.16676-4.58317-33.25182-.09566-.69762-.09233-.68077-.776-.43856-2.55863.90654-4.99357,2.11755-7.54051,3.04994-.40681.14893-.36044.38911-.31226.69014.241,1.5056.46139,3.01472.72162,4.517,1.44535,8.3436,2.58947,16.73778,4.21818,25.0508.28546,1.457.48181,2.93142.718,4.398.02406.14934.11738.30523-.04209.45987-.07539-.09285-.15652-.17817-.22118-.27453-1.61954-2.41353-3.17314-4.87077-4.76984-7.2991-4.72241-7.18208-9.31389-14.45029-13.94341-21.69324a.52116.52116,0,0,0-.76384-.25048q-3.624,1.43127-7.26376,2.82236c-.37725.144-.51179.29809-.43739.73366.58185,3.40639,1.051,6.83,1.62782,10.23891,1.04058,6.15,1.88122,12.33389,2.8047,18.50372Q565.94176,460.23732,566.34564,462.95988Zm76.39046-12.476c1.34892-.52426,2.69355-1.06,4.04929-1.566.42149-.15731.5246-.28572.21135-.69062-5.23259-6.76349-10.43547-13.55-15.67906-20.30494-3.77209-4.85933-7.40982-9.82251-11.32443-14.5723-1.57294-1.90853-3.03583-3.90814-4.53385-5.87765a.53389.53389,0,0,0-.73682-.2311q-6.45108,2.52814-12.91562,5.02186a.508.508,0,0,0-.39433.65359c.24309,1.64512.441,3.29683.67014,4.9441,1.89708,13.63917,3.51847,27.316,5.59077,40.93128.22937,1.507.43435,3.01885.59818,4.53412.06309.58354.247.60033.73305.4066q3.75676-1.49721,7.53987-2.92769a.64654.64654,0,0,0,.49764-.86115c-.54782-3.42146-1.05716-6.84906-1.6034-10.27079a.52685.52685,0,0,1,.38889-.7001c2.8575-1.16449,5.7808-2.158,8.59741-3.434,2.00149-.90669,4.1-1.5973,6.13824-2.42611a.70882.70882,0,0,1,1.00443.30614c2.08889,2.78868,4.21071,5.55269,6.30514,8.33724a.66226.66226,0,0,0,.9319.26843C640.104,451.48394,641.42417,450.99385,642.7361,450.48385Z" transform="translate(-312.2769 -225.33687)"/>
<path class="cls-7" d="M619.984,438.45371c-1.81081.70378-3.627,1.39427-5.42863,2.12083-.44153.17806-.54662.09291-.61563-.36656q-1.3277-8.84018-2.70057-17.67356c-.06253-.40315.00361-.60679.41271-.7501.93495-.3275,1.858-.69223,2.77177-1.07534a.51378.51378,0,0,1,.73123.22949Q620.395,428.28957,625.66,435.623c.30039.418.2032.56107-.24037.72784C623.6012,437.03443,621.79478,437.74994,619.984,438.45371Z" transform="translate(-312.2769 -225.33687)"/>
</g>
<g id="line">
<path class="cls-8" d="M393.31445,426.24414c-15.27734.001-28.59668-3.41894-37.35009-11.21484-15.84848-14.11484-21.28348-40.24951-12.95264-59.61914a45.11938,45.11938,0,0,1,6.24121-10.35959l3.3313,3.734a39.534,39.534,0,0,0-4.92017,8.4566c-7.45828,17.56421-2.36529,41.59235,11.62549,54.05371,11.064,9.85449,32.24658,12.56543,58.11816,7.44141,24.96583-4.94531,50.59083-16.52637,68.5459-30.98047.80713-.64941,1.6919-1.37988,2.65528-2.17481,10.984-9.06332,31.69647-25.00967,59.42138-27.99169a85.64888,85.64888,0,0,1,14.33863-.31678,18.286,18.286,0,0,1-2.59229,4.85175,81.02182,81.02182,0,0,0-11.27563.44256c-26.29633,2.89609-46.00791,18.04023-56.71,26.87061-.98.80859-1.88086,1.55176-2.70166,2.21289C463.80176,412.00684,424.48486,426.24414,393.31445,426.24414Z" transform="translate(-312.2769 -225.33687)"/>
<path class="cls-8" d="M541.05579,233.81854a122.75964,122.75964,0,0,0-57.64109-.01706l-12.43124-.03288a101.78349,101.78349,0,0,1,29.22555-7.82147,106.72531,106.72531,0,0,1,16.30076-.50621,117.3007,117.3007,0,0,1,38.28875,8.33482Z" transform="translate(-312.2769 -225.33687)"/>
<path class="cls-8" d="M621.33472,347.10425q-1.24485-3.20151-2.48963-6.40305a58.474,58.474,0,0,0,5.35608-21.80569c1.04175-23.63867-13.22168-40.963-18.87109-47.82471a88.88333,88.88333,0,0,0-17.3786-16.10826q-3.35962-4.70853-6.7193-9.41707a91.11195,91.11195,0,0,1,27.86938,22.24262c5.73615,6.843,21.26471,25.368,20.09375,51.35253A65.52869,65.52869,0,0,1,621.33472,347.10425Z" transform="translate(-312.2769 -225.33687)"/>
</g>
</svg>
<div class="ui secondary right menu">
<button onclick="share()" class="ui inverted violet labeled icon button">
<i class="share alternate icon"></i>
Share
</button>
<button onclick="clearConsole()" class="ui inverted green labeled icon button">
<i class="terminal icon"></i>
Clear console
</button>
</div>
<div id="mobile-menu" class="ui mini labeled icon menu">
<a href="#" onclick="clearEditor()" class="item">
<i class="times icon"></i>
Clear
</a>
<a href="#" onclick="copyCode()" class="item copy-btn">
<i class="copy icon"></i>
Copy
</a>
<a href="#" onclick="share()" class="item">
<i class="violet share alternate icon"></i>
Share
</a>
</div>
<div id="hamburger" onclick="toggleMenu()" class="item">
<i id="menu-icon" class="big bars link icon"></i>
</div>
</nav>
<div class="buttons">
<button onclick="clearEditor()" class="ui grey button">
<i class="times icon"></i>
Clear
</button>
<button id="run"
class="ui red button"
onclick="run()"
data-inverted=""
data-variation="basic mini"
data-position="bottom center"
data-tooltip="shortcut: ^R">
<i class="play icon"></i>
Run
</button>
<button onclick="copyCode()" class="ui black button copy-btn">
<i class="copy icon"></i>
Copy
</button>
</div>
<div class="ui grid">
<div class="eight wide computer eight wide tablet sixteen wide mobile column">
<label for="editor"></label>
<textarea id="editor"
oninput="highLight(this.value); sync_scroll(this);"
onscroll="sync_scroll(this);"
onkeydown="check_tab(this, event);"
placeholder="# puts RUBY_VERSION"
spellcheck="false"
autocomplete="off"></textarea>
<pre><code id="code" class="language-rb"></code></pre>
</div>
<div class="eight wide computer eight wide tablet sixteen wide mobile column">
<div id="output">
Please wait, the interpreter is loading... 🌪️
</div>
</div>
</div>
<footer>
<!-- Copyright © Sriram V 2022-->
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.11.1/gsap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.6.0/languages/ruby.min.js" ></script>
<script src="/assets/js/ruby-wasm.js"></script>
<script src="/assets/js/gsap-animations.js"></script>
<script src="/assets/js/code-editor.js"></script>
<script src="/assets/js/interpreter.js"></script>
<script src="/assets/js/button-functions.js"></script>
</body>
</html>