Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-4041-

Comment operator

Name: Anonymous 2010-03-06 8:43

Is it BBCODE?
It does not follow BBCODE's naming convention, yet BBCODE is required to multiquote.

Also, [o] is the only tag subject
to operator overloading.

Name: Anonymous 2010-03-06 11:10

>>1

Also, [o] is the only tag subject
to operator overloading.
What? Please explain.

Actually your fist point doesn't make a lot of sense either.

Name: Anonymous 2010-03-06 11:25

>>2
Not overloading, the other thing, I apologise. Context-sensitivity. Usually it is overline, but when used in quotes it makes a quote multiline.

Quoting (> ) should not be BBCODE as it does not use brackets.
But they must be, as they interact with BBCODE directly to produce multiquotes.

Name: Anonymous 2010-03-06 14:01

>>3
Perhaps you should not philosophize about bbcode when all you know of it is what's found in you're script-kiddie ``guide''.

Name: Anonymous 2010-03-06 14:48

>>4
There is no philosophy. ``you're'' - HIBT?

Name: Anonymous 2010-03-06 15:20





Name: Anonymous 2010-03-06 15:21










Name: Anonymous 2010-03-06 15:23

My new inspiration is to create either a BBCode quadratic function creator, or an ASCII grapher.

Name: Anonymous 2010-03-06 16:13

well fucker its wat bbcode should'a have'been, fully-automatic autoclosing (but with it's own twist of needing the space)

the [] shitte is unforgiving, however you stick a "> " in any anus and you dont have to pull out ant it still works (kinda nice right)

and you're multiline bullshite doesnt exist it just exploits one of the many bugs this shitte has

next thing you know is somebody talking about a "put all posts beyond in italics" operator thats just insane

Name: Anonymous 2010-03-06 16:34

hi
> > bye

Name: Anonymous 2010-03-06 21:59

BBcode would be better if it got rid of bracket notation, and ending tags. There's no need for it at all. If you're providing an HTML abstraction, actually abstract it.

/b/bold/b/: bold
/i/italic/i/: italic
/c/code/c/: code

/sup/superscript/sup*/superscript/sup*/superscript/sup/: [sub]superscript[sup]superscript[sup]superscript[/sub][/sub][/sub]

it would be a lot more difficult to bbcode fail that way. in fact, i might write a parser for this.

Name: Anonymous 2010-03-06 22:00

oh wow, fail.

/sup/superscript/sup*/superscript/sup*/superscript/sup/: [sub]superscriptsuperscriptsuperscript[/sup]

i wonder if there's anything that can be done to prevent those types of fail, besides not being a retard

Name: Anonymous 2010-03-06 22:05

i know:
/up/ and /down/

but obviously i just realized what if someone doesn't want to end all at once with a final /sup/. so here would be my suggestion:

/base+1/superscript/base+1/superscripted twice/base-3/subscripted 3 times/base/back to normal: superscriptsuperscripted twicesubscripted 3 timesback to normal

Name: Anonymous 2010-03-06 22:09

revision:

/base+1/superscript/base+1/superscripted twice/base-3/subscripted 3 times/base=2/explicit baseline set/base=-1/other way/base/back to normal (default = 0): superscriptsuperscripted twicesubscripted 3 timesexplicit baseline setother wayback to normal

Name: Anonymous 2010-03-06 22:43

>>11
Wow. All of the downsides of HTML/XML without any actual benefits. At least use sex-pressions.

Name: Anonymous 2010-03-06 22:45

>>15
So, no more brackets or tag matching errors is no benefits to you? Cool story bro

Name: Anonymous 2010-03-06 23:01

>>16
Replacing brackets with slashes adds no benefit. You aren't avoiding tag matching errors. Any problems you think you're solving are better dealt with by S-expressions.

Name: Anonymous 2010-03-06 23:11

>>17
First of all, you no longer need to deal with matching of any form. No longer will you need left-or-right anything. Brackets, tags, none whatever.

Secondly, (you (and your s-expressions) (can (go fuck yourself))). You won't have the benefit of whitespace (or an ide, even) to help you match parens. They would be a fucking nightmare to deal with when trying to write a paragraph, IHBT.

Name: Anonymous 2010-03-06 23:18

Rev. 3

|b|bold|-b|
|i|[i]italic[i]|-i|
|c|code|-c|

|up=2|text|up+1|text|up-10;b|text|down+1|text|up+1||b|text|down=0;up=0;-b|text
texttexttexttexttexttext

Name: Anonymous 2010-03-06 23:22

>>18
I think S-expressions would be fine (no worse than BBCode), if a bit cumbersome (no worse than BBCode).

What I want is L^AT_EX.

Name: Anonymous 2010-03-07 3:09

>>16
Cool story bro
Back to the imageboards, please

Name: ‮suomynonA 2010-03-07 3:58

>>21
Fuck off, ``faggot''.

Name: Anonymous 2010-03-07 3:58

>>22
Little child.

Name: Anonymous 2010-03-07 4:02

>>18
You seriously can't balance parentheses (it's not hard (unless you're a mental invaled)) without help?

Name: Anonymous 2010-03-07 5:12

>>24
a mental invaled
IHBT

Name: Anonymous 2010-03-07 5:28

>>11-14
\b{you}
\i{you}
\o{are}
\u{retarded}
\sup{how \sub{the \sup{hell \sub{are \sup{you \sub{meant \sup{to \sub{nest \sup{that \sub{retarded \sup{slashes \sub{shit}}}}}}}}}}}}

Name: Anonymous 2010-03-07 9:10

>>18
First of all, you no longer need to deal with matching of any form.
You're several kinds of idiot. Your syntax has closing tags. Because of your shit planning, the difference between a closing tag and an opening tag can't even be seen without tracking through the text, so it's actually worse than BBCode.

>>26
I like that, though I'd use regular parentheses over curly braces.

Name: Anonymous 2010-03-07 9:35

Just write a BBCODE compiler.
Then you can go and write stuff like:

(with-bbcoeds
  (b (u (i (o (string-upcase "enterprise"))))))

Name: Anonymous 2010-03-07 10:01

>>28

(sexp->bbcode `(b (u (i (o ,(string-upcase "enterprise")))))

is the more functional way to do it.

Name: Anonymous 2010-03-07 11:08

>>28,29
That still involves typing (whatever-bbcode ) around everything, which will get tiresome.

Name: 28 2010-03-07 11:33

Out of bredom, I went ahead and implemented this macro as my previous BBCODE compiler was incomplete:

(defmacro with-bbcoeds (&body body)
  "Macro/S-EXP-based (A)BBCODE compiler. Function names are the same
   as BBCODE ones, with the exception of `rem' and `#' which have been
   renamed to no-text and comment, to avoid shadowing standard CL forms,
   and dispatch macro characters. Quotes are not yet supported."
  (labels ((downcase (s)
             (string-downcase (string s)))
           (canonicalize-wrapper-name (name)            
             (etypecase name
               (symbol
                (values name nil (downcase name)))
               (list
                (destructuring-bind
                      (function-name &key
                                     (single nil)
                                     (literal nil literal-present-p))
                    name
                  (values function-name single
                          (if literal-present-p literal
                              (downcase function-name)))))))   
           (tag-wrapper (name)
             (with-gensyms (args)
               (multiple-value-bind (name single literal)
                   (canonicalize-wrapper-name name)    
                 `(,name ,@(if single
                               `(() `(make-tag ,',literal))
                               `((&body ,args)
                                 `(wrap-tag ,',literal ,@,args)))))))
           (tag-wrappers (names body)
             `(macrolet ,(mapcar #'tag-wrapper names)               
                ,@body)))
    `(labels ((append-strings (&rest strings)
                (apply #'concatenate 'string (mapcar #'string strings)))
              (make-tag (tag)
                (append-strings "[" tag "]"))
              (make-end-tag (tag)
                (append-strings "[/" tag "]"))
              (wrap-tag (name &rest args)
                (append-strings
                 (make-tag name)
                 (apply #'append-strings args)
                 (make-end-tag name))))
       ,(tag-wrappers '(b u i o s m code spoiler sup sub aa
                        (no-text :literal "rem")
                        (comment :literal #\#)
                        (br :single t))
                      body))))


Usage example:

(with-bbcoeds t
  (b (u (i (o (string-upcase "enterprise"))))))
=> "ENTERPRISE"

;;; rewrote some old implementation of FBS
;;; it's broken in its handling of spaces, but i'm too lazy to fix it now

(defun make-circular-list (list &aux (list (copy-list list)))
  (setf (cdr (last list)) list))

(defun cycle-functions (&rest functions)  
  (let ((fns (make-circular-list functions)))       
    (lambda (&rest args)     
      (apply (pop fns) args))))

(defun fibonacci-buttsort (string)
  (with-bbcoeds nil
    (b (i (with-output-to-string (s)
            (mapc (lambda (x) (princ x s))
                  (map 'list (cycle-functions #'o #'u) string)))))))


(with-bbcoeds t
  (m (fibonacci-buttsort (string-upcase "what now"))))
=> "WHAT NOW"

Name: >>28 2010-03-07 11:37

Aw fuck, I posted an older version, here's the latest:
(defmacro with-gensyms (names &body body)
  `(let ,(loop for name in names collect `(,name (gensym ,(string name))))
     ,@body))

(defmacro with-bbcoeds (macro-based &body body)
  "S-EXP-based (A)BBCODE compiler. Function names are the same
   as BBCODE ones, with the exception of `rem' and `#' which have been
   renamed to no-text and comment, to avoid shadowing standard CL forms,
   and dispatch macro characters. Quotes are not yet supported."
  (labels ((downcase (s)
             (string-downcase (string s)))
           (canonicalize-wrapper-name (name)            
             (etypecase name
               (symbol
                (values name nil (downcase name)))
               (list
                (destructuring-bind
                      (function-name &key
                                     (single nil)
                                     (literal nil literal-present-p))
                    name
                  (values function-name single
                          (if literal-present-p literal
                              (downcase function-name)))))))   
           (tag-wrapper (name)
             (with-gensyms (args)
               (multiple-value-bind (name single literal)
                   (canonicalize-wrapper-name name)    
                 `(,name ,@(if single
                               (if macro-based
                                   `(() `(make-tag ,',literal))
                                   `(() (make-tag ,literal)))
                               (if macro-based
                                   `((&body ,args)
                                     `(wrap-tag ,',literal ,@,args))
                                   `((&rest ,args)
                                     (apply #'wrap-tag ,literal ,args))))))))
           (tag-wrappers (names body)
             `(,(if macro-based 'macrolet 'labels) ,(mapcar #'tag-wrapper names)               
                ,@body)))
    `(labels ((append-strings (&rest strings)
                (apply #'concatenate 'string (mapcar #'string strings)))
              (make-tag (tag)
                (append-strings "[" tag "]"))
              (make-end-tag (tag)
                (append-strings "[/" tag "]"))
              (wrap-tag (name &rest args)
                (append-strings
                 (make-tag name)
                 (apply #'append-strings args)
                 (make-end-tag name))))
       ,(tag-wrappers '(b u i o s m code spoiler sup sub aa
                        (no-text :literal "rem")
                        (comment :literal "#")
                        (br :single t))
                      body))))

Name: Anonymous 2010-03-07 11:41

>>30
My code defines them as local functions or macros(depending on option used), so you can use them within the lexical scope of the macro and mix it with normal code.

Name: Anonymous 2010-03-07 12:51

>>28
Thats similar to how I did it, but if I was doing it today, I would use PLTs Scribble. It's not (quite) sexps, but it solves all the other issues relating to strings, and you don't need to "" everything.

Name: Anonymous 2010-03-07 13:07

You fucking neckbreads, the solution is in front of you're fat faces and you don't even see it.

Watch and learn, this is how you do it: http://img408.imageshack.us/img408/7331/perfectbbcodeeditor.png

Name: Anonymous 2010-03-07 13:22

>>35
Back to /g/, please

Name: Anonymous 2010-03-07 13:30

>>35
lol windoze

Name: Anonymous 2010-03-07 16:59

Added quoting support, but it's not ideal (adds unneeded newlines, to fix this I would have to change most of the code to use a stream instead and use FRESH-LINE in the QUOTE* local function):
[m](defmacro with-bbcoeds (macro-based &body body)
  "S-EXP-based (A)BBCODE compiler. Function names are the same
   as BBCODE ones, with the exception of `rem', `#' and `>' which have been
   renamed to no-text, comment and quote*, to avoid shadowing standard CL forms,
   and dispatch macro characters."
  (labels ((downcase (s)
           (string-downcase (string s)))
         (canonicalize-wrapper-name (name)          
           (etypecase name
             (symbol
            (values name nil (downcase name)))
             (list
            (destructuring-bind
                  (function-name &key
                             (single nil)
                             (literal nil literal-present-p))
                name
              (values function-name single
                    (if literal-present-p literal
                        (downcase function-name)))))))   
         (tag-wrapper (name)
           (with-gensyms (args)
             (multiple-value-bind (name single literal)
               (canonicalize-wrapper-name name)    
             `(,name ,@(if single
                         (if macro-based
                           `(() `(make-tag ,',literal))
                           `(() (make-tag ,literal)))
                         (if macro-based
                           `((&body ,args)
                             `(wrap-tag ,',literal ,@,args))
                           `((&rest ,args)
                             (apply #'wrap-tag ,literal ,args))))))))
         (tag-wrappers (names body)
           `(,(if macro-based 'macrolet 'labels) ,(mapcar #'tag-wrapper names)           
            ,@body)))
    `(labels ((append-strings (&rest strings)
            (apply #'concatenate 'string (mapcar #'string strings)))
            (make-tag (tag)
            (append-strings "[" tag "]"))
            (make-end-tag (tag)
            (append-strings "[/" tag "]"))
            (wrap-tag (name &rest args)
            (append-strings
             (make-tag name)
             (apply #'append-strings args)
             (make-end-tag name)))
            (add-[o]-break (string)
            (let ((pos (position #\Newline string)))
              (cond (pos               
                   (append-strings
                    (subseq string 0 pos)
                    (wrap-tag "o" (subseq string pos))))
                  (t string))))
            (quote* (&rest args)
            (append-strings #\Newline "> "
              (add-[o]-break (apply #'append-strings args))  #\Newline)))
       ,(tag-wrappers '(b u i o s m code spoiler sup sub aa
                  (no-text :literal "rem")
                  (comment :literal "#")
                  (br :single t))
                  body))))[/m]

Name: sage 2010-03-07 17:02

Oops, I fail at escaping BBCode.

Added quoting support, but it's not ideal (adds unneeded newlines, to fix this I would have to change most of the code to use a stream instead and use FRESH-LINE in the QUOTE* local function):

(defmacro with-bbcoeds (macro-based &body body)
  "S-EXP-based (A)BBCODE compiler. Function names are the same
   as BBCODE ones, with the exception of `rem', `#' and `>' which have been
   renamed to no-text, comment and quote*, to avoid shadowing standard CL forms,
   and dispatch macro characters."
  (labels ((downcase (s)
           (string-downcase (string s)))
         (canonicalize-wrapper-name (name)          
           (etypecase name
             (symbol
            (values name nil (downcase name)))
             (list
            (destructuring-bind
                  (function-name &key
                             (single nil)
                             (literal nil literal-present-p))
                name
              (values function-name single
                    (if literal-present-p literal
                        (downcase function-name)))))))   
         (tag-wrapper (name)
           (with-gensyms (args)
             (multiple-value-bind (name single literal)
               (canonicalize-wrapper-name name)    
             `(,name ,@(if single
                         (if macro-based
                           `(() `(make-tag ,',literal))
                           `(() (make-tag ,literal)))
                         (if macro-based
                           `((&body ,args)
                             `(wrap-tag ,',literal ,@,args))
                           `((&rest ,args)
                             (apply #'wrap-tag ,literal ,args))))))))
         (tag-wrappers (names body)
           `(,(if macro-based 'macrolet 'labels) ,(mapcar #'tag-wrapper names)           
            ,@body)))
    `(labels ((append-strings (&rest strings)
            (apply #'concatenate 'string (mapcar #'string strings)))
            (make-tag (tag)
            (append-strings "[" tag "]"))
            (make-end-tag (tag)
            (append-strings "[/" tag "]"))
            (wrap-tag (name &rest args)
            (append-strings
             (make-tag name)
             (apply #'append-strings args)
             (make-end-tag name)))
            (add-o-break (string)
            (let ((pos (position #\Newline string)))
              (cond (pos               
                   (append-strings
                    (subseq string 0 pos)
                    (wrap-tag "o" (subseq string pos))))
                  (t string))))
            (quote* (&rest args)
            (append-strings #\Newline "> "
              (add-o-break (apply #'append-strings args))  #\Newline)))
       ,(tag-wrappers '(b u i o s m code spoiler sup sub aa
                  (no-text :literal "rem")
                  (comment :literal "#")
                  (br :single t))
                  body))))

Name: Anonymous 2010-03-07 17:09

NECKBREADS

Name: Anonymous 2010-03-07 17:21

NECKBEADS

Name: Anonymous 2010-03-07 17:27

nigger operator

Name: Anonymous 2010-03-07 17:31

>>42
* African American

Name: Anonymous 2010-03-07 17:41

NECKBEDS

Name: Anonymous 2010-03-07 17:43

NECKS

Name: Anonymous 2010-03-07 17:56

NICKBEARDS

Name: Anonymous 2010-11-14 4:19

Name: Anonymous 2011-02-04 11:29

Name: barbour mens classic duffle 2011-12-01 22:38

There are many brands of <a href="http://www.barbourjackets-uk.org/"><strong>barbour fusilier</strong></a> in the market today. Each of the brand promises to bring out something new to the customers.

Don't change these.
Name: Email:
Entire Thread Thread List