Welcome to the CHICKEN Scheme pasting service

Digraph website text for DerGuteMoritz pasted by andyjpb on Sun Nov 27 13:30:23 2011


Host your own (di)graph pastebin

I just had some time to procrastinate away, so I built a little open source graph pastebin web application called Instagraph. It’s based on GraphViz, PHP, MySQL and Apache. At least the first three need to be installed on your web server, and the fourth one is necessary unless you tweak your way around using the included .htaccess file (which makes use of mod_rewrite).

I’ve been wanting to write something like this for ages. Often enough I want to explain concepts in IRC and find myself struggling to present all the relationships between different things in an understandable way. Now I can just use a private Instagraph instance to make a nice picture that will speak a thousand words for me. Awesome.

Instagraph is woefully underdocumented but shouldn’t be too hard to set up. It’s also extremely simple and has no user interface to speak of.

Now, if you understand GraphViz’s dot syntax, you can turn this:

a -- b -- c

Into this:

(Graph generated from the above example code)
Get it

You can get Instagraph at http://github.com/jast/instagraph where you will find a download button as well as the Git repository URL.

Public graph pastebins

    * I run Instagraph at http://g.jk.gs/. Feel free to use it for casual stuff, but it would be extremely nice of you if you didn’t directly link to the generated images from super-high-traffic sites. Thanks!

If you plan to host another pastebin (doesn’t even have to be the original Instagraph, just something comparably simple and with the same syntax) somewhere, let me know so I can list it here.

This entry was posted on Monday, 2010-05-24 at 00:34 by Jan and is filed under Development. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

proof-of-concept read syntax for hash tables added by aranhoide on Tue Nov 26 23:27:56 2013

(define (is-whitespace? char)
  (or (eqv? char #\space) (eqv? char #\newline)))

(define (read-to-end-brace port)
  (let loop ()
    (read-token is-whitespace? port)
    (if (eqv? (peek-char port) #\} )
      (begin (read-char port) '())
      (cons (read port) (loop)))))

(define (group2 lst)
  (if (null? lst)
    '()
    (cons (list (car lst) (cadr lst))
          (group2 (cddr lst)))))

(set-read-syntax! #\{
  (lambda (port)
    (let ((table-name (gensym)))
      `(let ((,table-name (make-hash-table)))
         ,@(map (lambda (pair) `(hash-table-set! ,table-name ,@pair))
                (group2 (read-to-end-brace port)))
         ,table-name))))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which module provides `load-relative'?
Visually impaired? Let me spell it for you (wav file) download WAV