glotcode / glot Goto Github PK
View Code? Open in Web Editor NEWCode playground
Home Page: https://glot.io/
Code playground
Home Page: https://glot.io/
Is there anything stopping this project adding nix language support?
There is a container that supports https://hub.docker.com/r/nixos/nix
and seem to work well.
I see that your using nix to build the https://github.com/glotcode/glot-www
be really nice to have nix pastebin!
Sorry, I see that it's available on the website, but couldn't find any real API examples. Is it a thing (specifying custom run command)?
Dear glot.io team:
Can you include an option that can import the git repository from github or the gist file in glot?
Saludos
Disable php function "SYSTEM"!
It would be good to have "Elm-Tests" and "Elm-Fuzz" at glot.io.
{
message: "Invalid request body: Error in $.files[0].content: parsing FileContent failed, expected String, but encountered Object"
}
The version that glot.io is using is 2018.04, but 2018.12 (or 2018.10 for rakudo star) has been released.
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,
When using Python's input()
call, the runner throws an exception EOFError
without letting the user specify any input.
It'd be great if we could add imports such as
import org.json.JSONObject;
Hi, thanks for this wonderful project!
Please allow hard tab in Ace editor, otherwise the Makefile won't work due to "missing separator" error.
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
Is it possible to add Zig support?
Currently Zig is still under development. Development versions of Zig 0.10 are available on https://ziglang.org/download/.
The binary for Linux is statically linked.
Like Go, Zig supports the zig run
command.
Zig logo is available at https://github.com/ziglang/logo.
Thanks.
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:
Also when requested from a Node.js function, I get this error:
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
This exploit can affect existing containers, too. For example, if you had a host with 10 nginx containers using a shared image, and the attacker modified the nginx.conf file in one, it would instantly change the files in the others, too, as long as they were still using the file from the underlying image. (https://blog.aquasec.com/cve-2022-0847-dirty-pipe-linux-vulnerability)
How to get code runtime and memory usage?
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
}
}
}
It seems like one being used is something older that 8.6.5 - we're currently at 8.8.1.
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"
0.18.0
0.19.6
https://nim-lang.org/blog/2019/02/01/version-0194-released.html
Very impressive service. Quick question at the creator @prasmussen ? How are you able to keep this service as free?
Very good product , and is open !
I because of capacity problems , I don't know how to do it .
Hope to have a copy of the installation steps document !
Hey, I tried to code in the Glot feature is awesome. I tried Python, Dart, and so on.
But, when I use Kotlin language, sometimes the Glot does not show the output. It always Failed. Can you fix it?
You can run the code from my snippet here: https://glot.io/snippets/gopmoymeul.
Currently, assembly works only with 64-bit can you add 32-bit version as well?
hey, does glot api has any limits??
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!
NimVersion.echo
shows the version is 0.17.2, but latest for now is 0.18.0.
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.
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?
Perl 6 was renamed to Raku and it'd be great to see glot.io reflects this. Thanks!
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
Any plans to support PHP 8+?
When I want to save a snippet, I'm used to use the Ctrl+S key, but I found that it will pop up and let me to save the page instead. What a embarrassed experience.
When to support php7?
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?
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.
{
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
Is there something that needs to be refreshed? I'm still not quite sure how all the pieces fit together.
glot.io's Perl 6 appears to be running an old version from January (2017.01).
say $*VM; # moar (2017.01) on glot.io
glot-containers/perl6/latest/Dockerfile pulls from rakudo-star:lastest. When I use that Docker file I get Rakudo Star 2107.10 (from October).
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)
cannot access my plaintext snippets anymore and cannot find it as a snippet option on the main page
Hi,
IMHO a good features will be the option to fetch STDOUT through a "Copy" or "Save as" button.
BR,
Antelox
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.