Giter VIP home page Giter VIP logo

try's People

Contributors

amdrozdov avatar artembo avatar bigbes avatar bloomerwd avatar dokshina avatar esha- avatar kostja avatar lenkis avatar rtsisyk avatar totktonada avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

try's Issues

Multiline commands do not work

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.

Integrate with buildbot

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.

Switch to official Tarantool Docker images (Alpine Linux)

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.

Scrolling does not work

If the screen is full it does not scroll automatically and it is impossible to do so youself. Using try.tarantool.org

[8pt] Support English language for the tutorial tab

Motivation

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.

What needs to do

  • Support to show tutorial with user's browser language. As I understand we can fetch this data via JavaScript and change the language in realtime. If the user's language is missing by default show the tutorial in Russian.
  • Add language selector for users who want to select the more appropriate language.

Allow loading extra modules via require

Currently, the usage of "require" command is disabled on Try due to security issues. This ruins most examples from Tutorial, e.g.:

  1. we cannot set custom delimiters and, subsequently, all multi-line examples in the Tutorial don't work (Ctrl+Enter for line breaks doesn't work on Try either, so there's no known work-around)
  2. we cannot load sockets, etc
    Please enable the usage of "require".

display a tip about Shift+Enter near the input area

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.

LuajitError: builtin/socket.lua:86: attempt to use closed socket

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

[2pt] Create a Crowdin-project for try-tarantool

Сначала нужно, чтобы в репозитории разделили файлы на ./en/ и ./ru/. Подробности тут https://www.notion.so/tarantool/e70da95c62484eb8a82f48aa7518c227

Конфиг будет выглядеть как-то так:

files:
  - source: /foo/en/*.md
    translation: /foo/ru/%file_name%.md

Strange error on a huge tables

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

PgUp / PgDn history search does not work

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.

Scroll is broken

With latest site updates scroll for "try frame" was broken.
No scrollbar, mousewheel is useless

image

Unhandled Exception

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.

copy-pasting an example fro the tutorial doesn't work

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.