Coder Social home page Coder Social logo

glot's Introduction

glot

an open source pastebin with runnable snippets and API.

Components

Name Description
glot-www glot.io website and API
docker-run Code runner api
glot-images Docker images
code-runner Code runner

Overview

                   glot.io
┌────────────────────────────────────────────┐
│                  glot-www                  │
└────────────────────────────────────────────┘
          │                         │
          │                         │
          ▼                         ▼
┌──────────────────┐      ┌──────────────────┐
│    postgresql    │      │    docker-run    │
└──────────────────┘      └──────────────────┘
                                    │
                                    │
                                    ▼
                       ┌─────────────────────────┐
                       │         docker          │
                       │  ┌───────────────────┐  │
                       │  │    glot-images    │  │
                       │  │  ┌─────────────┐  │  │
                       │  │  │ code-runner │  │  │
                       │  │  └─────────────┘  │  │
                       │  └───────────────────┘  │
                       └─────────────────────────┘

glot's People

Contributors

prasmussen avatar

Stargazers

 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

glot's Issues

Tab/Space in Ace Editor

Hi, thanks for this wonderful project!

Please allow hard tab in Ace editor, otherwise the Makefile won't work due to "missing separator" error.

Instalation steps

I am amazed at this project. I really wanted to have an opportunity to have it running on my computer.
Can anyone point me to where I can get the installation steps tutorial?

Out of disk space

This isn't the appropriate medium for this, however I see nowhere else to report things like this.
I've tried to save a public snippet four or five times and keep being told that the hard disk is full.

https://cl.ly/18342c082w1a

Running test?

Is it possible to run tests via the API? If a docker image would contain a testing framework, could the API return results of the unit tests?

language versions

Whenever I make a request to get the language versions it returns the latest version without an array as shown in the example response

{
    "url": "https://glot.io/api/run/python/latest",
    "version": "latest"
}

I have confirmed this happens on multiple languages

api failed?

I follow the api docs, but can not make the post work
image

Cant get output

{
stdout: "",
error: "",
stderr: ""
}
my code is :
const glotData = {"files": [{"name": "main.py", "content": "print('Hello World!')"}]}

let data = JSON.stringify(glotData);
glot.runCode("python",data,url, (response) =>{
res.send(response)
});

getting empty object while run code ....
any help please

.NET Client for glot

Hello,

I am building a .NET Client for glot. I named it GlotSharp.
I have implemented the Run API and I plan to do the Snippet too. Feel free to share any comment about the project.

Cheers,

Upgrade Perl 6

The version that glot.io is using is 2018.04, but 2018.12 (or 2018.10 for rakudo star) has been released.

plaintext removed?

cannot access my plaintext snippets anymore and cannot find it as a snippet option on the main page

PHP

Disable php function "SYSTEM"!

The servers are down?

Hi!
I'm using your API and I find it to be very good. Thank you for the awesome API! :)
But I'm having issues these last 2 days (smth around that). Are the servers down?

Running the Hello World example here: https://glot.io/new/c
results in "Internal Server Error"

No way to use stdin in scripts

When using Python's input() call, the runner throws an exception EOFError without letting the user specify any input.

Consider to improve code sharing feature.

Dear glot.io team:

Currently, I have to manually tweak the width and height of the <iframe> tag, seeing it live by rendering it on real pages. I think it may leave something to improve further.

Still much thanks for your great platform. You implemented even Perl 6 in your site, nice!

Michael

combined docker images

It would be really awesome if instead of (or in addition to) separate image for each language there was an image that had all (or at least any two) languages at the same time, so you can run scenarios that require interaction between the two languages
(use-case I'm thinking of is multiplayer puzzles where each player is free to use their own language)

getting error

{
message: "Invalid request body: Error in $.files[0].content: parsing FileContent failed, expected String, but encountered Object"
}

PHP 8

Any plans to support PHP 8+?

[Documentation] Unity 2018.2 Example

here is a working example of using the glot.io API in C# for Unity 2018.2 which may be helpful to someone. I'm sure there is a more efficient way to do some of this and suggestions are welcome but this works as our first iteration :-)

Especially the part that extracts the content should probably be a regexp or something. Ideally there would be like a raw.glot.io/snippets to get only the content but I couldn't find a way to do this.

public static void SaveToPastebin()
	{
		BlockManager.Instance.StartCoroutine(SaveToPastebinHelper());
	}

public static void LoadFromPastebin(string key)
	{
		BlockManager.Instance.StartCoroutine(LoadFromPastebinHelper(key));
	}

private static IEnumerator SaveToPastebinHelper()
	{
		string json = BlocksToCondensedJson(); // converts our save data to json
		json = json.Replace("\"", "\\\""); //escape quotes
		string data = "{\"language\": \"json\", \"title\": \"test\", \"public\": true, \"files\": [{\"name\": \"mystage.json\", \"content\": \""+json+"\"}]}";

		using (UnityWebRequest www = new UnityWebRequest("https://snippets.glot.io/snippets", "POST"))
		{
			www.uploadHandler = new UploadHandlerRaw(Encoding.UTF8.GetBytes(data));
			www.downloadHandler = new DownloadHandlerBuffer();
			www.SetRequestHeader("Authorization", "Token paste-your-token-key-here");
			www.SetRequestHeader("Content-Type", "application/json");
			www.chunkedTransfer = false;
			yield return www.SendWebRequest();

			if (www.isNetworkError)
			{
				Debug.Log("Network Error:" + www.error);
				Debug.Log(www.downloadHandler.text);
			}
			else if (www.isHttpError)
			{
				Debug.Log("HTTP Error:" + www.error);
				Debug.Log(www.downloadHandler.text);
			}
			else
			{
				// Show results as text
				Debug.Log(www.downloadHandler.text);

				// retrieve results as binary data
				byte[] results = www.downloadHandler.data;
			}
		}
	}

	private static IEnumerator LoadFromPastebinHelper(string key)
	{
		using (UnityWebRequest www = UnityWebRequest.Get("https://snippets.glot.io/snippets/"+key))
		{
			www.downloadHandler = new DownloadHandlerBuffer();
			www.SetRequestHeader("Content-Type", "application/json");
			www.chunkedTransfer = false;
			yield return www.SendWebRequest();

			if (www.isNetworkError)
			{
				Debug.Log("Network Error:" + www.error);
				Debug.Log(www.downloadHandler.text);
			}
			else if (www.isHttpError)
			{
				Debug.Log("HTTP Error:" + www.error);
				Debug.Log(www.downloadHandler.text);
			}
			else
			{
				// Show results as text
				Debug.Log(www.downloadHandler.text);

				// retrieve results as binary data
				byte[] results = www.downloadHandler.data;
				string stripped = Encoding.UTF8.GetString(results);
				stripped = stripped.Substring(stripped.IndexOf("\"content\":")+11);
				stripped = stripped.Substring(0, stripped.Length-4);
				stripped = stripped.Replace("\\\"", "\"");
				BlocksFromJsonStream(Encoding.UTF8.GetBytes(stripped)); //restores data from the glot.io paste
			}
		}
	}

API disallow cors

First of all, AWESOME glot, great work!

Can your enable api allow cors? I am writing a plugin obsidian-code-emitter that allow run code in markdown. Some of language want to use glot api.

import gist page

Dear glot.io team:

Can you include an option that can import the git repository from github or the gist file in glot?

Saludos

Text editor unusable on mobile/tablet

Hey guys, really loving Glot on the desktop, but the other day I attempted to use it on my iPhone for a quick code test and I was disappointed that the text editor doesn't work properly on iOS (Safari). The keyboard input does not go through and the selecting and highlighting is pretty flaky/unusable. The same thing goes for my iPad. Both my external keyboard nor the OS keyboard work properly. If you guys can fix the mobile compatibility, I would be very thankful :). Thanks!

php7?

When to support php7?

SSL certification problem

Hi, I am trying to create snippets with your API described at glot-snippets.

Using the example bash code you have provided I get following error:
image

Also when requested from a Node.js function, I get this error:
image

I did a little research and everything I found hints to a misconfiguration on your server. Could you maybe take your time to look into the issue? 😊

Here's a very good StackOverflow answer for this topic which also includes further links https://stackoverflow.com/a/60020493

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.