Git Product home page Git Product logo

pasterack's Introduction

pasterack

An evaluating pastebin for Racket.

pkg dependencies: ring-buffer, redis, irc, memoize, graph, lang-file

pasterack's People

Contributors

leifandersen avatar stchang avatar suzannesoy avatar takikawa 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

Watchers

 avatar  avatar  avatar  avatar  avatar

pasterack's Issues

eval with a #lang other than racket doesnt work

For example, try:

lang typed/racket

(: my-sqr (Real -> Real))
(define (my-sqr x)
(* x x))
(my-sqr 42)

Currently, I use the #:lang keyword argument in make-base-eval, but it complains about an import conflict with pretty.rkt.

Pasterack fails to run module+ in splicing-let

The following code that uses module+ and splicing let fails to run even though it should work perfectly well:

#lang racket

(require racket/splicing)

(splicing-let ()
  (module+ test
    5))

The issue is that the syntax-local-context inside of a splicing-let is a top-level-context, even though it 'should' be a module-context.

Feature Request: Add API

It would be great if there was an restfull API we could use so that we can have a button in DrRacket that submits to pasterack.

no output when using define-match-expander

#lang racket

(require (for-syntax syntax/parse))

(define-match-expander let:
  (lambda (stx)
    (syntax-parse stx
      [(_ ([e pat] ...) body)
       #`(and (app (lambda (x)
                     (match x [body e]))
                   pat)
              ...)])))

(match (list 2)
  [(let: ([(* y y) x])
     `(,y))
   x])

Sandbox mode

I've found myself making experimental pastes to poke at Racket's behavior when I have a local change in my own installation. It'd be nice to not add to the noise and take server space with throw-away programs. Will you add a checkbox that just evaluates the given code but doesn't paste it?

Captcha and text/racket mode

I just went to PasteRack and tried a simple example. The problem is that I automatically marked the checkbox/captcha without reading the text "To paste as plaintext, check the box:".

I wanted to run the example and I vas very confused when I saw it as only plain text.

I think that the selection of the text/racket mode should be decoupled of the captcha.

filter out pastes based on ip using known spammer lists

A quick scan of the logs shows that most spam posts are from known spammer ips. Eg

        "128.70.36.116"
        "93.186.31.112" ; 78462                                                 
        "8.37.227.32"   ; 62710
        "41.203.67.164" ; 40338
        "41.203.67.164" ; 65175                                                 
        "41.203.67.168" ; 39202                                                 
        "70.39.187.244" ; 44180                                                 
        "8.37.224.8"    ; 38778                                                 
        "8.37.227.147"  ; 62694                                                 
        "41.140.8.173"  ; 91555                                                  
        "70.39.185.182" ; 29288                                                 
        "93.186.23.114" ; 27429                                                 
        "93.186.31.112" ; 26228                                                 
        "93.186.23.96"  ; 70131                                                  
        "93.186.31.113" ; 36938                                                 
        "93.186.31.96"  ; 53146                                                  
        "93.186.31.81"  ; 48601                                                  
        "93.186.31.82"  ; 99040                                                  
        "93.186.23.80"  ; 80496                                                  
        "41.71.185.31"  ; 51208                                                  
        "23.236.124.165" ; 91179                                                
        "199.190.46.75" ; 49259                                                 
        "199.190.46.75" ; 60459                                                 
        "199.190.46.75" ; 83624                          

The site should automatically delete posts from known spammer ip addresses, perhaps using a service like this: https://www.stopforumspam.com/usage

report error on invalid syntax?

Right now when pasting something that can't be read, it is treated as plain text.

This makes is hard to debug when accidentally making a syntax error in your program.

some concurrency issues

  1. redis connection seems to fall out of sync when making too many consecutive paste retrieval requests
  2. creating multiple image-generating pastes fails because scribble always writes to the same file name

Issue with the IRC alerting?

For some days now whenever I have attempted to use the 'Alert channel' option on pasterack.org I get the following:

Exception
The application raised an exception with the message:

tcp-write: error writing
  system error: Broken pipe; errno=32

Stack trace:
<empty box appears here>

The paste is still added to the list, and I can access it by backing up to the main page and looking at the top link in the queue, generally, but no channel alert is sent.

eval of plot returns "gtk initialization" error

For example:

lang racket ; draw a graph of cos

(require plot) ; and deriv^3(cos)
(define ((deriv f) x)
(/ (- (f x) (f (- x 0.001))) 0.001))
(define (thrice f) (lambda (x) (f (f (f x)))))
(plot (list (function ((thrice deriv) sin) -5 5)
(function cos -5 5 #:color 'blue)))

gives error Gtk initialization failed for display "0"

Maybe related to Racket PR12465?

programs that evaluate to pics is broken

Because scribble re-uses the same filename.

Try drawing serpinski, and then another circle in another paste and see that the serpinski image is used instead of a circle.

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.