Git Product home page Git Product logo

carc.in's People

Contributors

dependabot[bot] avatar jhass avatar sija avatar wooster0 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

carc.in's Issues

Problem testing network code

I'm trying to run this example to test the network performance (because in my computer it seems to be a little slow on IO#gets method) but it seems to be impossible to share the result on carc.in, am I right?

https://carc.in/#/r/16wj

This is based on Crystal's examples of tcp server/client.

Issue when trying to run this code

When I try to run this crystal code:

io = IO::Memory.new

IO::ByteFormat::LittleEndian.encode(5, io)

puts io

In Brave, it sends me back to the homepage with an empty field. In firefox and safari, it sends me back to the main page with the original code still in.

Using latest browsers on macOS Catalina compiling crystal 0.32.1

Stored XSS

The source code renders directly to the DOM without filtering, which leads to a possible XSS attack vector via forged documents.

POC - Corrupted image which fails to load directly executes some stored JavaScript code.

Even if the online compiler doesn't contain user information one could still use the available attack vector for something malicious.

For testing purposes this list can be used, 90% of it will work since the DOM is rendered directly.

Cheers.

Show the full error trace with Cr 0.30.0+

With Crystal 0.30.0+, a compilation error only shows the last frame, e.g:

Showing last frame. Use --error-trace for full trace.

In /usr/lib/crystal/json/from_json.cr:136:13

 136 | yield T.new(pull)
               ^--
Error: wrong number of arguments for 'M.new' (given 1, expected 0)

Overloads are:
 - Reference.new()

When the full error trace would be:

In some_file.cr:31:5

 31 | p Q.from_json(json_queue)
          ^--------
Error: instantiating 'Array(M).class#from_json(String)'


In /usr/local/Cellar/crystal/0.30.1/src/json/from_json.cr:13:3

 13 | new parser
      ^--
Error: instantiating 'new(JSON::PullParser)'


In /usr/local/Cellar/crystal/0.30.1/src/json/from_json.cr:128:3

 128 | new(pull) do |element|
       ^--
Error: instantiating 'new(JSON::PullParser)'


In /usr/local/Cellar/crystal/0.30.1/src/json/from_json.cr:135:8

 135 | pull.read_array do
            ^---------
Error: instantiating 'JSON::PullParser#read_array()'


In /usr/local/Cellar/crystal/0.30.1/src/json/from_json.cr:135:8

 135 | pull.read_array do
            ^---------
Error: instantiating 'JSON::PullParser#read_array()'


In /usr/local/Cellar/crystal/0.30.1/src/json/from_json.cr:136:13

 136 | yield T.new(pull)
               ^--
Error: wrong number of arguments for 'M.new' (given 1, expected 0)

Overloads are:
 - Reference.new()

Which provides much more intel on the actual error.

Download code link

I think it would be nice to have a download code link.
It will allow to use carc.in for sharing code in a gist manner.

Thoughts?

Support Crystal nightlies

It would be nice if you could run code with the nightly build of the Crystal compiler.

With the new CI setup there are nightly builds of Crystal master available. Currently it seems the only feasible way to access them is using the docker tag crystal:nightly, though.

I don't know how hard it would be to integrate into the sandbox system.

Pressing tab should give 2 spaces

Currently when you use Crystal, Ruby or C in carc.in, pressing tab gives you an actual tab.
But in Crystal and Ruby you indent with 2 spaces so pressing tab should probably give 2 spaces in Crystal and Ruby and just give a real tab in C.

XML Tags Not Shown in Code Preview

When carc.in is given the code

puts "<something />"

the run output is accurately

<something />

but the code preview shows

puts ""

If the tag is expanded and given contents, like

puts "<something>something</something>"

the run output is still accurate, but the code preview only shows the contents:

puts "something"

Shouldn't be able to run Ruby code

I'm OK with Crystal and C. I'd be fine you add C++, Clojure, Clang, Coffescript, C# and Ceylon. But Ruby... it somehow feels out of place.

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.