tarantool / try Goto Github PK
View Code? Open in Web Editor NEWtry.tarantool.org scripts
License: Other
try.tarantool.org scripts
License: Other
That is the reason why we use a custom delimiter in build-in tutorial. This make things more complex and I hope we can fix it.
Moved from tarantool/tarantool#619
tarantool> a = "&"
---
- error: '[string "a = ""]:1: unfinished string near ''<eof>'''
from the command line:
tarantool> a = "&"
---
...
tarantool> a
---
- '&'
...
Please add a buildslave to try.tarantool.org to rebuild container images on each change in https://github.com/tarantool/tarantool repository. A script to regenerate is already made (see tool.sh cron) and installed in /etc/cron.daily to automatically regenerate container image once a day. Please add buildslave and remove image generation from cron.
Please add docker
, tarantool-1.6.3-240
, tarantool-http-module
as tarantool-try-module dependencies.
Please switch Dockerfile to official tarantool/tarantool:1.7 Docker images based on Alpine Linux.
We should eat our own dog food.
It is also worth mentioning that tarantool-try
images are regenerated automatically by cron.
As result try.tarantool.org always has the latest version of Tarantool.
If the screen is full it does not scroll automatically and it is impossible to do so youself. Using try.tarantool.org
We want to let the English-speaking part of the community to have used the Try Tarantool service. The current version of the frontend module can't fetch different files for different types of language.
We've already translated the tutorial and separated tutorial files into two subfolders: 'ru' and 'en'. See "/front/tutorial/en/" path.
Preinstall http/shard/queue/expirationd rocks in try
Currently, the usage of "require" command is disabled on Try due to security issues. This ruins most examples from Tutorial, e.g.:
Please move all JS requirements to our web server.
Like on https://godbolt.org or https://jsfiddle.net
Sometimes input spans multiple lines, ex: function declarations. There is a delimiter thing but it is less then convenient. Tarantool implemented delimiter-less parsing.
In try.tarantool.org
a different method is used. Shift+Enter
starts a new line without submitting the input. However the information about this feature is nowhere to be seen. The only way one can find about it is invoking console.delimiter()
: in try
the function prints a tip about Shift+Enter
and does nothing besides that.
This is not reliable anymore, since normally console.delimiter()
is unnecessary and no one is going to know about it.
It is especially useful feature of interactive console.
I see a lot of errors in the server log:
2016-02-01 15:22:56.084 [27721] main/123/server/127.0.0.1:52734 utils.c:928 E> LuajitError: builtin/socket.lua:86: attempt to use closed socket
2016-02-01 15:23:01.702 [27721] main/124/server/127.0.0.1:52736 I> GET /
2016-02-01 15:23:01.703 [27721] main/124/server/127.0.0.1:52736 utils.c:928 E> LuajitError: builtin/socket.lua:86: attempt to use closed socket
Enabled by #32
Page: https://try-cartridge.tarantool.io/
Crowdin: https://crowdin.com/project/try-tarantool
Words:
Reviewer:
Сначала нужно, чтобы в репозитории разделили файлы на ./en/ и ./ru/. Подробности тут https://www.notion.so/tarantool/e70da95c62484eb8a82f48aa7518c227
Конфиг будет выглядеть как-то так:
files:
- source: /foo/en/*.md
translation: /foo/ru/%file_name%.md
To make some people less mad, sandbox the container:
Add this:
os.execute = nil
os.exit = nil
os.rename = nil
os.tmpname = nil
os.remove = nil
io = nil
require = nil
package = nil
to:
https://github.com/tarantool/try/blob/master/try/container/container.lua
check that tutorial still works.
function is_prime(x) for i = 2,x-1 do if x % i == 0 then return false end end return true end
for i = 2,10000000 do if is_prime(i) then primes[i] = true end end
primes = {}
for i = 2,10000000 do if is_prime(i) then primes[i] = true end end
Error:
Attention! The server has stopped your tarantool machine. Please wait for restart or update the web page.
But this works:
a = {} for i = 2,10000000 do a[i] = true end
From my /etc/inputrc:
# map "page up" and "page down" to search history based on current cmdline
"\e[5~": history-search-backward
"\e[6~": history-search-forward
This is default on Gentoo and the feature I use very-very often to speed up my work. Don't know whether other distros have it enabled by default.
link: http://try.tarantool.org/tarantool
You will get
Unhandled error: /usr/share/tarantool/try/init.lua:224: attempt to concatenate local 'command' (a nil value)
stack traceback:
/usr/local/share/lua/5.1/http/server.lua:623: in function 'process_client'
/usr/local/share/lua/5.1/http/server.lua:1045: in function 'handler'
builtin/socket.lua:976: in function <builtin/socket.lua:974>
Request:
GET /tarantool? HTTP/1.0
Host: try.tarantool.org
Accept-language: en-US,en;q=0.8,ru;q=0.6,es;q=0.4
Cookie: id=185%2E6%2E245%2E156%2F%2F41933; __utma=131076618.589583111.1415806752.1415812884.1415868252.3; __utmc=131076618; __utmz=131076618.1415806752.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); id=185%2E6%2E245%2E156%2F%2F41933; _ga=GA1.2.589583111.1415806752
Connection: close
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-encoding: gzip, deflate, sdch
X-real-ip: 194.186.63.185
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36
if you open it.
Please isolate try.tarantool.org containers from network.
Asked by Mail.Ru security team.
tarantool> console = require("console"); console.delimiter("!")
---
- error: '[string "console = require("console"); console.deli..."]:1: attempt to call
global '' require'' (a nil value)'
Apparently LuaJIT doesn't recognize the unicode character sent for space as a whitespace character.
Removing spaces around = sign fixes the problem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.