Code Monkey home page Code Monkey logo

pgetinker's People

Contributors

moros1138 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

Watchers

 avatar  avatar  avatar  avatar

pgetinker's Issues

Error when trying to run TEST_QuickGUI.cpp

Describe the bug
I'm trying to run the TEST_QuickGUI.cpp from OLC repo.
https://github.com/OneLoneCoder/olcPixelGameEngine/blob/master/examples/TEST_QuickGUI.cpp

To Reproduce
Steps to reproduce the behavior:

  1. Connect on pgetinker
  2. Copy raw file to editor
  3. Click run

Expected behavior
Expected to see the output. But I see an error

Screenshots
image

2 error seen in browser console

emscripten_set_main_loop_timing: Cannot set timing mode for main loop since a main loop does not exist! Call emscripten_set_main_loop first to set one up. [srcdoc:4286:12](about:srcdoc)
    _emscripten_set_main_loop_timing about:srcdoc:4286
    _eglSwapInterval about:srcdoc:5618
    x about:srcdoc:7040
    <anonymous> about:srcdoc line 893 > WebAssembly.instantiate:0
    <anonymous> about:srcdoc line 893 > WebAssembly.instantiate:659005
    <anonymous> about:srcdoc line 893 > WebAssembly.instantiate:610473
    <anonymous> about:srcdoc line 893 > WebAssembly.instantiate:296304
    <anonymous> about:srcdoc line 893 > WebAssembly.instantiate:355676
    <anonymous> about:srcdoc line 893 > WebAssembly.instantiate:15941
    <anonymous> about:srcdoc line 893 > WebAssembly.instantiate:68961
    x about:srcdoc:7072
    createExportWrapper about:srcdoc:859
    callMain about:srcdoc:7905
    doRun about:srcdoc:7955
    run about:srcdoc:7966
    (Async: setTimeout handler)
    run about:srcdoc:7962
    runCaller about:srcdoc:7890
    removeRunDependency about:srcdoc:793
    receiveInstance about:srcdoc:939
    receiveInstantiationResult about:srcdoc:957
    (Async: promise callback)
    instantiateArrayBuffer about:srcdoc:894
    instantiateAsync about:srcdoc:906
    createWasm about:srcdoc:976
    <anonymous> about:srcdoc:7458
Uncaught TypeError: GLctx is undefined
    _glCreateShader about:srcdoc:6446
    x about:srcdoc:7040
    x about:srcdoc:7072
    createExportWrapper about:srcdoc:859
    callMain about:srcdoc:7905
    doRun about:srcdoc:7955
    run about:srcdoc:7966
    setTimeout handler*run about:srcdoc:7962
    runCaller about:srcdoc:7890
    removeRunDependency about:srcdoc:793
    receiveInstance about:srcdoc:939
    receiveInstantiationResult about:srcdoc:957
    promise callback*instantiateArrayBuffer about:srcdoc:894
    instantiateAsync about:srcdoc:906
    createWasm about:srcdoc:976
    <anonymous> about:srcdoc:7458

Desktop (please complete the following information):

  • OS: Manjaro
  • Browser Firefox
  • Version 127.0.1

Smartphone (please complete the following information):
NA

Additional context
NA

Bug in Version: 4346b0d

Describe the bug
The Share URL and Copy button overflow the Share dialog view.

To Reproduce

  1. Visit PGEtinker from a smartphone, or any sufficiently narrow/portrait display
  2. Tap the Hamburger Icon top right
  3. Tap "Share" button
  4. When the Share Dialog appears, see the bug

Expected behavior
The Share URL and Copy button should display in a manner that doesn't break the share dialog view.

Screenshots
Screenshot 2024-06-19 at 01-16-35 PGEtinker

PGEtinker Uncaught Error: Can't create config, layout not yet initialised

Replication steps are:

  1. Open up PGETinker.
  2. Click the maximize button on either window.
  3. Reload or open another tab of PGETinker.
  4. Layout fails to load.

PGEtinker is no longer useable after these steps and the browser settings have to be cleared to reset everything.

Tested on Microsoft Edge/Windows 11 and Firefox/Debian

Add intellisense or intellisense-like functionality

Is your feature request related to a problem? Please describe.
n/a

Describe the solution you'd like
In traditional IDEs, when coding an application you're able to get hinting and completion from the files you have loaded, or files you reference. It'd be nice to have that functionality present for the PGE related functions, etc.

Describe alternatives you've considered
n/a

Additional context
n/a

Scrolling back up in the console while data continues to be written to stdout

Is your feature request related to a problem? Please describe.
As I work on applications in PGEtinker, occasionally I want to output data to the console repeatedly to monitor values. If I don't include a way to stop monitoring values, I have no way to scroll back up while my program continues to add info to the Console.

Describe the solution you'd like
When I start scrolling back up in the Console window, the window won't immediately put the scrollbar focus back to the bottom of the panel (since it's still being updated and written to constantly)

Describe alternatives you've considered
As I mentioned before, it's currently on the user to implement a way to stop producing debugging outputs everytime they want to test per-frame debugging, but gets quite annoying after constant use of it.

Additional context
For an example, see: https://beta.pgetinker.com/s/TUGKC3iS9N1

As it outputs an incrementing counter number, I cannot scroll the Console window back up to look at previous values.

(As a side note, when the scrollbar is already at the bottom, the window can continue scrolling on its own. There are just some instances where interrogating a specific value while the console continues outputting would be handy.)

Relies on local file storage in production

While not a bug for a single instance deployment, PGEtinker currently relies on the local filesystem for both caching the compiler output, caching remotely include source files, and for workspace storage.

For a deployment, it must be possible to use remotely hosted storage for compiler cache, otherwise when a containerized version of PGEtinker is destroyed, the cache data will be lost as well. This is not ideal.

A possible solution might be to self-host an s3 bucket and utilize Laravel's built-in s3 storage support.

Link to Github repo+issues

Is your feature request related to a problem? Please describe.
Right now there's no clear way for a user of PGEtinker to report a problem, or to request a new feature other than to visit the OLC discord and discuss it hoping the developers notice.

Describe the solution you'd like
Create a new navigation menu, which can include various links, including the links to the github repo+issues

Describe alternatives you've considered
n/a

Additional context
n/a

Bug in Version: 92bea0d. Non existant header error indication

Describe the bug
Adding non existent header include shows no error indication, and is stuck on "Compiling".
Example of non existent header:

#include "olcPixelGameEngine_.h"

To Reproduce
Steps to reproduce the behavior:

  1. Add #include "olcPixelGameEngine_.h" at the top of source code
  2. Click Build & Run.

Expected behavior
Some kind of error indication.

image

Desktop (please complete the following information):

  • Firefox

Build Information/Problems window "At a glance" info

With the new use for the Build Information window showing all the LSP's issues and warnings, it might be useful to show a little count of all the warnings and errors in the title of the window, so even when it's not open, you can still see the stats at a glance.

Here's a mock-up:
image

Inspired by JetBrains, except there, it's in the top right:
image
(Along with spelling and grammar errors, but PGETinker doesn't need to concern itself with those)
I felt like inserting them into the title of the window might be the best spot for them.
Although maybe you can think of a better spot, which is also perfectly fine, of course!

#define OLC_PGE_APPLICATION line can have miscellaneous text surrounding it (No Side Effects) - Bug in Version: aee3eb2

Describe the bug
Typing anything before or after #define OLC_PGE_APPLICATION is considered legal, but does not appear to have any other consequences.

To Reproduce
Steps to reproduce the behavior:

  1. Start PGEtinker with the default code.
  2. On the top line with #define OLC_PGE_APPLICATION, write any text of your desires either before or after it.
  3. Click Run and see that it builds fine with no side effects.

Expected behavior
Probably should error with an invalid name/type/symbol error of some sort from the compiler?

Additional context
Here is an example PGEtinker share demonstrating the "problem": https://beta.pgetinker.com/s/L-YwkrmuLLV

Bug in Version: 8899c14

Describe the bug
On the News and Update modal, the text of the version overflows the modal window. See screenshot

Screenshot_20240609_011047

Easy solution, cut it down to 7 digits, like the bug version...

Progress Steps

Reason

The hall idea of this webpage : developed programming skills.

IDEA

###description
"Step Tabs". As easy as possible, but to be able to switch between them to compile and see the result.

If tutorial is developed, to be able to save separately stages, similar to GitHub, but in our case, just simple text : Step 1, Step 2, Step 3, etc
It is (copy, paste is slow and inconvenient :) )

Last

Using opportunity to say Thank You, this is awesome :)

Make a more fleshed out landing for the "I disagree" clickers.

Is your feature request related to a problem? Please describe.
Right now, first time viewers of PGEtinker are prompted to acknowledge and agree to the terms of use. Currently, upon clicking "I Disagree" it strips the entire app from the page leaving it blank white.

Describe the solution you'd like
Create a new landing page, with more helpful information and perhaps some persuasive language to help alleviate the privacy concerns of those who disagree with the terms, therefore being unable to use PGEtinker.

Describe alternatives you've considered
A dedicated landing page that contains an embedded video of Rick Astley performing his hit 80s song "Never gonna give you up"

Additional context
n/a

better indicators for compiling

Is your feature request related to a problem? Please describe.
not really a problem, more that it's ugly, currently

Describe the solution you'd like
some sorta spinning indicator on the player panel, indication compiling,
some sorta red x, circle, or something to indicate failed compiling

Describe alternatives you've considered
n/a

Additional context
n/a

user receieves no error when trying to compile while the "service is down"

Describe the bug

To Reproduce
Steps to reproduce the behavior:

  1. load the page
  2. wait for the service to be down
  3. click build
  4. see failed to build error frowny face but no message

Expected behavior
everything above, but with a clear message informing the user that the service has gone offline

Screenshots
n/a

Desktop (please complete the following information):
n/a

Smartphone (please complete the following information):
n/a

Additional context
n/a

keyboard shortcut for building

Is your feature request related to a problem? Please describe.
a keyboard shortcut for building, so one need not continue to click the mouse all over the place

Describe the solution you'd like
Control+Enter, it's good enough for compiler explorer

Describe alternatives you've considered
also F5 or Control + R

Additional context
n/a

Bug in Version: 23c0cb0

Describe the bug
When attempting to use Draw functions with olcUTIL_Geometry2D.h included, programs no longer compile.

To Reproduce
Steps to reproduce the behavior:

  1. Start with a default code template in PGEtinker.
  2. Add the line: #include "olcUTIL_Geometry2D.h" before #include "olcPixelGameEngine.h"
  3. Click the "Build & Run" button.
  4. Observe that linker errors appear for any draw functions that are using the olc vector types:
wasm-ld: error: pgetinker.o: undefined symbol: olc::PixelGameEngine::FillCircle(olc::v_2d const&, int, olc::Pixel)
wasm-ld: error: pgetinker.o: undefined symbol: olc::PixelGameEngine::Draw(olc::v_2d const&, olc::Pixel)

Expected behavior
The program would run and compile as normal, showing the standard PGEtinker application.

  • OS: Windows 11
  • Browser: Microsoft Edge (Tested on Google Chrome as well)

Providing a non-existent #include causes POST 400 error Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'startLineNumber')

When typo'ing an include, PGEtinker fails to build, the player window stays on the green screen and the Build & Run function no longer works.

Sample code to try in PGEtinker (Note: Typo intentional):

#include <iostream>
#include <fdjsaiovdj>

int main()
{
    std::cout<<"Hello World!"<<std::endl;
    return 0;
}

Result: Green screen and the following error messages in browser's console:

POST https://bixxy.pgetinker.com/api/compile 400 (Bad Request)
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'startLineNumber')

Add a Problems/Warnings/Errors panel

Currently when you edit code, the language server provides hinting and code completion to the editor. However, one must scroll through the source, and hover, in order to read the details of any given problem reported by the language server.

Describe the solution you'd like
A panel, or perhaps repurpose the "Build Information" panel to contain a clickable list of the problem reported by the language server that navigates you to where the problem is occurring, within the editor.

Describe alternatives you've considered
This is the only way! Trust me!

After disagreeing the terms and pressing back tinker loads infinitely.

If you disagree to the terms then press back it doesn't present the terms again. Tinker just loads infinitely on the homepage.
I got this by going to the website, pressing disagree, I reached the you've disagreed page and then pressed back on my browser. Happens in both Firefox on desktop in Windows and Safari on iOS.

You can get it back by pressing the logo.
image

PGEtinker build hangs when including a PGEX

When trying to utilize a PGEX, the build just hangs with a 400 error in the browser console and the player shows a green screen. The Build & Run button also no longer is useable, and the user is forced to refresh the page.

Sample code (trying to include the splash screen. Utilizing any PGEX results in a similar problem.)

#define OLC_PGE_APPLICATION
#include "olcPixelGameEngine.h"
#include "olcPGEX_SplashScreen.h"

#if defined(__EMSCRIPTEN__)
#include <emscripten.h>
#define FILE_RESOLVE(url, file) emscripten_wget(url, file); emscripten_sleep(0)
#else
#define FILE_RESOLVE(url, file)
#endif

// Override base class with your custom functionality
class Example : public olc::PixelGameEngine
{
public:
    Example()
    {
        // Name your application
        sAppName = "Splash Screen Example";
    }

    olc::SplashScreen splash;
    
public:
    bool OnUserCreate() override
    {
        // Called once at the start, so create things here
        
        // built with emscripten, maps the url to the virtual filesystem and makes it
        // available to the standard C/C++ file i/o functions without change!
        //
        // built with any other native toolchain, the macro does nothing and all file
        // access is done just as it would in any other normal scenario.
        FILE_RESOLVE("https://i.imgur.com/KdWjkwC.png", "assets/gfx/broken.png");
        
        renBroken.Load("assets/gfx/broken.png");

        color = RandomColor();
        return true;
    }
    
    bool OnUserUpdate(float fElapsedTime) override
    {
        // Called once per frame, draws random coloured pixels
        if(GetMouse(0).bPressed)
            color = RandomColor();
        
        Clear(color);
        DrawRect(0,0,ScreenWidth()-1, ScreenHeight()-1, olc::YELLOW);
        DrawString(6,  6, "Hello, PGE", olc::BLACK);
        DrawString(5,  5, "Hello, PGE", olc::WHITE);
        DrawString(6, 26, "Mouse position SHOULD match\nclosely to the circle.\n\nYellow borders should ALWAYS\nbe visible\n\nLEFT MOUSE to change color.", olc::BLACK);
        DrawString(5, 25, "Mouse position SHOULD match\nclosely to the circle.\n\nYellow borders should ALWAYS\nbe visible\n\nLEFT MOUSE to change color.", olc::WHITE);
        
        DrawSprite(5, 100, renBroken.Sprite());

        DrawString(6, 221, GetMousePos().str(), olc::BLACK);
        DrawString(5, 220, GetMousePos().str(), olc::WHITE);
        FillCircle(GetMousePos(), 3, olc::RED);
        Draw(GetMousePos(), olc::WHITE);
        return true;
    }
    
    olc::Pixel RandomColor()
    {
        return olc::Pixel(rand() % 128, rand() % 128, rand() % 128);
    }
    
    olc::Pixel color;
    olc::Renderable renBroken;
};

int main()
{
    Example demo;
    if (demo.Construct(256, 240, 2, 2))
        demo.Start();
    return 0;
}

csrf token mismatch when sessions run longer than 2 hours

Describe the bug
session guarded api endpoints csrf token mismatch when sessions run longer than 2 hours

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'pgetinker.com'
  2. Idle for over 2 hours
  3. Click 'Run'
  4. See error

Expected behavior
Run the program as usual.

Desktop (please complete the following information):

  • All supported platforms

Add abilty to #include files via https URLs

Is your feature request related to a problem? Please describe.
It would be convenient to be able to use the #include macro to bring in source that is public facing, an example might be other github repos, or just any public facing source repo.

Describe the solution you'd like
The idea I currently have involves adding on to the existing filter looking for URLs in the includes. Using something akin to the curl library to determine sniff the header of the response of trying to GET the provided URL, and if it matches certain critera (size and type) it can be downloaded to the isolated compiler environment and compiled along with the rest of the code, as it would normally.

Describe alternatives you've considered
n/a

Additional context
n/a

imgur images when Sharing no longer appears in generated screenshots. Bug in Version: 82b4113

Describe the bug
Shared screenshots generated using imgur links seem to have become broken. See the two PGEtinker instances I included below and the sample screenshots that were shown to me when clicking Share.

Note that other image hosting sites I tried such as imgbb appear to work fine (using a sample URL like https://i.ibb.co/9qnkzjD/tile.png)

To Reproduce
Steps to reproduce the behavior:

  1. Start with default code in PGEtinker.
  2. Replace Line 31 that reads:
FILE_RESOLVE("https://pit.pgetinker.com/MwpptUlwPhnc.png", "assets/gfx/broken.png");

with an imgur URL. Example:

FILE_RESOLVE("https://i.imgur.com/zewMrBN.png", "assets/gfx/broken.png");
  1. Hover over the Sharing button on the toolbar and select the Share option.
  2. Observe that images hosted from imgur appear fine when running in the browser, but do not appear in the screenshot preview.

Expected behavior
The screenshot is generated normally.

Additional context

Screenshot for PGEtinker code: https://pgetinker.com/s/27nwcNhhbTJ

Running Image

image

Generated Image

Screenshot for PGEtinker code: https://pgetinker.com/s/RxsW55OAA0l

Running Image

image

Generated Image

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.