Git Product home page Git Product logo

decomp.me's People

Contributors

1superchip avatar angheloalf avatar bates64 avatar celestialamber avatar chrisnonyminus avatar conorbobblehat avatar ellipticellipsis avatar encounter avatar entriphy avatar epochflame avatar estexnt avatar ethteck avatar fruityloops1 avatar leoetlino avatar llonsit avatar mkst avatar monsterdruide1 avatar notyourav avatar octorock avatar polybiusproxy avatar prakxo avatar r-burns avatar rainchus avatar roblabla avatar seekyct avatar simonlindholm avatar snuffysasa avatar sonicdcer avatar sozud avatar zbanks 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

decomp.me's Issues

Front-end bugs

  • when loading the page, an invalid compile request is submitted (only contains a null compiler config)
  • the scratch's compiler config is not selected in the dropdown (it's always the first one in the list)
  • selecting a new compiler config invokes the compiler command as it should, but it uses the old config, not the one that was just chosen
  • ctrl+or ctrl- to change browser zoom setting breaks the page
  • (opinion) the list of compiler configs shouldn't be reloaded every time you focus back on the webpage

Make a user-facing changelog

It would be nice to have a way to view a changelog on the site (perhaps next to the GitHub button at the top-right). Extra points if we put a little notification bubble on it if there have been unseen changelog updates since the previous visit!

Also we should consider if we really want version numbers - there's a 0.2 milestone here on GitHub but I'm unsure if version numbers are really worth it for a website.

Add an "original context" field to Scratch

The database should have a notion of "original context", which is just a copy of the originally submitted context that never changes. We'll need to be able to eventually diff against it to determine changes that were needed in the context for matching.

Sandbox the compiler

compiler_wrapper should, upon each invocation, create a sandbox for the compiler and tear it down after the process is finished. Alternatively, we could have a persistent sandbox that we use. We can try different approaches and see how it goes if we're not sure what to do

Checklist for bringing first version of decomp.me online

decomp.me code:
(deferred till next version)

  • Better parameter validation (make sure things look sane, aren't too large)
  • Limit API calls by IP and session
  • Think about security and sandboxing

Server:

  • Follow django production checklist
  • Set up postgresql on webserver
  • Set up nginx on webserver

Scratch forking

Allow users to create forks from scratches

  • Add the fork button to the scratch view and allow anyone to click it to create a fork
  • ctrl+s forks for non-owners? (I wanna ask people if this inconsistency with hotkey behavior will be confusing - probably fine though)
  • Store the parent scratch into the new scratch and provide a link to the scratch's parent on the front-end

Compiler flag customisation

Provide some pop-up interface for interactively configuring supported compiler flags, rather than just picking from a dropdown list.

e.g. select GCC or IDO, then an -O level, a -g level, and any -f flags.

Related to #27.

Add error pane to scratch view

The backend now puts stderr from the compiler into an "errors" field in the compile response object. We should add a read-only panel to the scratch view to show the user these errors.

Convert CRLF to LF

The client should change \r\n to \n upon sending requests. IDO hates \r, and so should we.

Better error handling for compilations

We should better explain to the user that a compilation failed, and perhaps why, if it's not too difficult without imposing a security risk of some kind.

Discussion: Tracking decomp time

This has been brought up as a user metric (total time spent), but I'm not sure I personally think it's a good idea to have it on the website. I was wondering what others think.

Even if we don't display time spent on the website, there may be other uses for tracking time spent on individual functions and such. However, this might be hard to do..not sure

Client/server compilation caching

Given a compiler configuration, c context, c code, and target asm (in the case of a slug-less compile request), cache the compilation result on the server and/or the client so we don't have to invoke the compiler every time this same request is recieved.

I imagine for things like trying and undoing small changes over and over, this could really dramatically improve the UX of the app. Not to mention that anyone loading a scratch page will get a near-instant result on the screen immediately, in the case of server-side caching.

Ability to update a scratch

We should take advantage of the PATCH functionality we discussed earlier on Discord and allow the owner of a scratch to update the c code, context, and/or compiler configuration. I think this would be as simple as calling the existing PATCH endpoint via a new button that is only enabled for the creator of the scratch.

Support for other arches

Add arch field to Compiler so we can begin to support other arches. We'll be able to use this when invoking asm-differ to get diffing for other arches as well

Add permuter-at-home functionality

image

Note: this issue refers to decomp.me having a 'permute' button that runs the permuter on your code, not the already-implemented permuter CLI feature that allows uploading code to decomp.me.

Avoid sending the context again if it hasn't changed from the database's context

Sometimes the context is 200kb or more, so we should really avoid sending the context to the backend if it hasn't changed.

We need to make sure the backend's version matches the front end's context in order to bypass sending it, so my idea is to have the backend to hash the context and give the hash to the front end. The front end will hash it whenever it needs to make a compile request. If the hashes match, it'll send a signal for the context instead like unchanged. When the scratch is saved, the backend can return the updated hash so the client always knows what's up.

Only allow scratch creators to update a scratch

how do

For owners (first visit to the scratch), they can save their scratch or fork it.
For non-owners, they can fork the scratch.

For now, let's consider the implementation of the fork button but perhaps not add the feature until the next iteration

Validate input upon scratch creation

When a user submits a scratch, we should make sure that we can 1. compile the context with 0 errors and 2. assemble the target asm into an object

If we don't do this and the context is broken somehow, it'd be a huge pain for the user to figure out later on

Validate c context upon scratch creation

At scratch creation time, we should compile the context in isolation and ensure we get no errors. If any errors come up, tell the user and don't create the scratch.

Adjust styling

Currently, there's not really any visual distinction between various elements of the site. We should give things borders and probably change the background to be a gray instead of solid black.

  • Visual distinction between UI elements
  • Less harsh color scheme (slightly less contrast)
  • Potentially go with less of a retro look and something more modern instead
  • Any other changes people see fit

Project awareness in scratch creation

There's a lot of potential functionality that can be added by having project awareness in scratch creation.

If decomp.me had a local clone of a github repo, it could theoretically provide the asm source and context for a function and only require the user to enter the function name. We could even index all the scratch-able functions for a repo and give the user some sort of autocomplete functionality when they're typing the function name.

This is a future thing, but I'm logging it now since it will be important for the original goal of the site.

Front end shenanigans

  • padding on .log
  • display:block on log so it can scroll (or make it so the log/diff combo itself can be scrolled?)
  • label for the source code so it doesn't look like the context label applies to it
    - [ ] "Compiling..." text on the toolbar when we are waiting for a compile request to go through
  • make compile button un-pressable and visually disabled while a compile request is going through
    - [ ] "unsaved changes" text somewhere if the scratch was changed after page load
    - [ ] maybe have a general status text field that shows "unsaved changes" / "compiling" / etc
  • #60
  • make the context window size draggable (on the bottom edge)
  • allow dragging the code vs diff slider further on both directions
  • show warnings checkbox (enabled by default) that, when disabled, hides the log except for compilation failure
  • change aesthetic (standardize fonts, remove glow, make things more uniform)
  • there are issues scrolling the code area when the context is open
  • #61
  • #62

Compiler option presets

To help people create scratches manually, we should have a preset chooser that configures the common settings for a project. Presets can be organized by compiler and listed underneath each one in a dropdown or just in a flat dropdown list of their own.

Typing 'too fast' causes cursor to jump to end of monaco editor

Easiest way for me to reproduce this is to load up a scratch and then hold down a key, e.g. / to add a bunch of slashes. After ~3 the cursor jumps to the bottom of the editor.

I feel like this has something to do with the setState value/set being shared/reused with the editor, i.e. the value of the editor is set via setCCode. If the call to setCCode is removed, then the problem disappears - however the value of cCode is not set so the value being past to the compiler, so it's not a solution.

Prune context upon scratch creation

Sometimes the client sends us a context file which has tons of unnecessary stuff. Determining what's unnecessary is a bit tricky, but I think one can at least remove all function definitions with relative certainty and replace them with function declarations. We should really be doing this, since it'll make the diff results easier to handle as well. Any other ways to prune the context should also be considered.

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.