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

Pages: 1-4041-

URGENT NOTICE

Name: Anonymous 2007-08-16 12:33 ID:v5wQUxJL

======= URGENT NOTICE ======

/PROG/ HAS BEEN DEHABILITATED BY C++ USING FAGGOTS

HOLY SHIT WHAT DO WE DO????????????????????????????

====== URGENT NOTICE =======

Name: Anonymous 2007-08-16 12:39 ID:Heaven

using namespace std;

Name: Anonymous 2007-08-16 12:41 ID:13L/tB94

KILL IT WITH FIRE!!!

Name: Anonymous 2007-08-16 13:09 ID:248XR471

I'd write something in Python to take care of it, but it wouldn't run fast enough.

Name: Anonymous 2007-08-16 18:14 ID:H+/yVI6e

>>4
Same here, only I'd write it in Haskell, but then I'd be a gigantic fag.

Name: Anonymous 2007-08-16 18:27 ID:FQZLN20o

>>5
``ABSTRACT BULLSHITE'' approaching!

[spoiler]module BBCode where

data Tag = Tag String Tag
         | Text String

instance Show Tag where
    show (Tag t v) = "[" ++ t ++ "]" ++ show v ++ "[/" ++ t ++ "]"
    show (Text v)  = v

b       = Tag "b"
code    = Tag "code"
i       = Tag "i"
o       = Tag "o"
spoiler = Tag "spoiler"
u       = Tag "u"

expert = b.i.o.u

nest _ 0 x = x
nest t n x = nest t (n-1) (Tag t x)

sub = nest "sub"
sup = nest "sup"

pos scale pos | pos < 0.0 = sub $ abs amt
              | otherwise = sup amt
    where amt = round $ pos * scale[/spoiler]

Name: Anonymous 2007-08-16 20:33 ID:v5wQUxJL

"module BBCode" was enough to make me lol

Name: Anonymous 2007-08-17 0:12 ID:12FmFBPw

>>6
But how do you convert back from that???

Name: Anonymous 2007-08-17 2:16 ID:zLNOcqv+

>>8
You don't!

Name: Anonymous 2007-08-17 3:35 ID:8eFf7Q6e

>>6
Truly sharp and scientific.  Now we can logically reason about posts using BBCode formalism.

Name: Anonymous 2007-08-17 6:44 ID:y7jA2KvV

>>6
More like module Language.BBCode, to follow the already existing namespaces.

Also, nice misuse of show!  GRR!

Also, you shouldn't call the Tag datatype just that as it compasses both Tag and Text.  Check some HTML specs for what they might be using -- try finding some big word, if you misuse it it's still ok.

Name: Anonymous 2007-08-17 7:09 ID:Heaven

test

Name: Anonymous 2007-08-17 7:10 ID:Heaven

lol found the size tag

Name: Anonymous 2007-08-17 7:10 ID:Heaven

this is awesome

Name: Anonymous 2007-08-17 8:33 ID:Heaven

[expert]SAGE[/expert]

Name: Anonymous 2007-08-17 8:40 ID:Heaven

That's not the size tag!

Name: Anonymous 2007-08-17 8:48 ID:y7jA2KvV

I always wanted to learn Parsec, so I wrote a BBCode parser!
module Language.BBCode.Parser
  (BBCode(..),
   -- A fast monadic BBCode parser utilizing the industrial
   -- strength combinator library Parsec.
   parseBBCode)
  where

import Text.ParserCombinators.Parsec

-- Belongs in another module.
data BBCode = Element String [BBCode]
            | Text String

-- An optimizing BBCode rendering machine.
-- Belongs in another module.
render (Element e []) = ""
render (Element e bs) = "[" ++ e ++ "]" ++
                        (concatMap render bs) ++
                        "[/" ++ e ++ "]"
render (Text s) = s

bbcode = many (bbcodeElement <|> bbcodeText)
bbcodeElement = do element <- try bbcodeOpenElement
                   content <- bbcode
                   bbcodeCloseElement element
                   return (Element element content)
bbcodeOpenElement = do char '['
                       s <- many1 letter
                       char ']'
                       return s
bbcodeCloseElement s = string ("[/" ++ s ++ "]")
bbcodeText = many1 (noneOf "[") >>= return . Text

parseBBCode bb = case parse bbcode "" bb of
                   Left  e  -> error $ show e
                   Right bs -> bs

-- A simple test case.
testbb = "[b][u][o]EXPERT PROGRAMMER[/o][/u][/b] " ++
         "[spoiler][i]Read SICP![/i][/spoiler]"
test = do putStrLn testbb
          putStrLn $ concatMap render $ parseBBCode testbb

Name: Anonymous 2007-08-17 11:10 ID:jO5rLUKX

>>16
That's amazing!

Name: Anonymous 2007-12-14 1:14

a

Name: Anonymous 2007-12-14 1:15

aaaa

Name: Anonymous 2007-12-14 1:16

[green]a[/green]

Name: Anonymous 2007-12-14 1:20

wtf
no color

Name: Anonymous 2008-02-09 5:43

>>6
Where do I put this?

Name: Anonymous 2008-02-09 6:23

>>23
C:\ntldr or /dev/hda

Name: Anonymous 2008-02-09 9:48

>>6
You receive the misuse-of-Show award!

Name: Anonymous 2008-02-09 9:53

>>6
Oh wow. My BBCode module. Were the recent sinewavefags using this or has someone come up with something better?

Name: Anonymous 2008-02-09 10:09

>>26
Nah, I use a custom one, it's pretty much the same though... and for the second version of my plotter I just write out the opening and closing tags :/

Name: Anonymous 2008-02-09 10:35

>>27
I want to cum all over your face

Name: Anonymous 2008-02-09 11:07

>>28
I want to cum all over your face
I wouldn't mind ;)

Anyway, I need to write some stuff here so I can finish my BBCode disassembler.

cud'r

A
B
C

asd harbl [b]copcks[/b]
also dicksp

Name: Anonymous 2008-02-09 11:08

>>24
C++:\ntldr

Name: Anonymous 2008-02-09 11:12

>>30
Did you mean:

======= URGENT NOTICE ======
C++:\ntldr
======= URGENT NOTICE ======

Name: Anonymous 2008-02-09 12:52

A quick test to see if you can use /prog/

Linux is good because ...?

If you answered anything but "it keeps the morons off the Lisp machines", get out.

Name: Anonymous 2008-02-09 13:28

Linux is good because it sucks donkey balls and makes OpenBSD look better.

Name: Anonymous 2008-02-09 13:33

>>33
OpenBSD does not run on Lisp machines, please leave.

Name: Anonymous 2008-02-09 13:38

>>33
Theo De Raadt is your SP

Name: Anonymous 2008-02-09 13:51

>>34
Yes it does.  Lisp machines are Touring-complete.

Name: Anonymous 2009-03-06 7:33


The address of the   scoping rules are   optional Python tried   to rip this   off but failed.

Name: Anonymous 2010-08-17 13:43

How is >>6 misuse of show?

Name: Anonymous 2010-08-17 14:37

>>38
It just is!

Name: Anonymous 2010-08-17 18:51

>>38
Show is really supposed to give representations that can be read back in.  It pissed me off when I'm at the GHCi console and I want to see what's inside a url:


someURL
http://dis.4chan.org/prog/
goddamn it show me the structure fields
<interactive>1:0: Not in scope: `goddamn'
...


Uh, yeah.  I'd rather have "toString" function than piss all over how "Show" is supposed to work.  I can't remember which URL library did this (there are too many), I think it's the one that HTTP uses.

Name: Anonymous 2010-08-18 4:31

>>36
I know this post is over two and a half years old, but do Lisp machines really have infinite storage?

Name: Anonymous 2010-08-18 4:54

>>41
How else could they be Turing-complete?

Name: Anonymous 2010-08-18 5:30

>>42
I don't know, perhaps they could use finite storage along with FrozenVoid's infinite compression algorithm.

Name: Anonymous 2010-08-18 9:24

>>43
Masterful.

Name: Anonymous 2010-12-06 9:42

Back to /b/, ``GNAA Faggot''

Name: Anonymous 2010-12-17 1:32

Are you GAY?
Are you a NIGGER?
Are you a GAY NIGGER?

If you answered "Yes" to all of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!

Name: Anonymous 2011-02-04 13:55

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