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

Pages: 1-4041-

bλcode

Name: Anonymous 2009-06-18 12:50

D:\Projects\HaskellBBS>ghci BBCode
GHCi, version 6.10.2: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
[1 of 5] Compiling BBCode.Common    ( BBCode\Common.hs, interpreted )
[2 of 5] Compiling BBCode.Parser    ( BBCode\Parser.hs, interpreted )
[3 of 5] Compiling BBCode.Tokenizer ( BBCode\Tokenizer.hs, interpreted )
[4 of 5] Compiling BBCode.Evaluator ( BBCode\Evaluator.hs, interpreted )
[5 of 5] Compiling BBCode           ( BBCode.hs, interpreted )
Ok, modules loaded: BBCode, BBCode.Evaluator, BBCode.Common, BBCode.Parser, BBCode.Tokenizer.
*BBCode> interpret "[define=p][p/][/define][p/]"
Loading package mtl-1.1.0.2 ... linking ... done.
Loading package xhtml-3000.2.0.1 ... linking ... done.
*** Exception: stack overflow
*BBCode> ^Z
Leaving GHCi.

D:\Projects\HaskellBBS>


Looks like I need to implement more security and error handling before I integrate the bλcode interpreter into a BBS.
Anyone has any suggestions for solving the halting problem?

I also wanted to brag a bit

Name: Anonymous 2009-06-18 12:52

Yeah, could you tell us a bit less about what breaks and when? That would be really useful, thanks.

Name: Anonymous 2009-06-18 12:55

>>1
Put the code on a page that gives users porn for deciding if a program halts or not.

Name: Anonymous 2009-06-18 13:07

Easy. No loop constructs, don't let users make infinite lists, and don't let users call functions from inside functions.

Name: Anonymous 2009-06-18 13:17

>>4
I'd rather bend over and have MILKRIBS violate me.

Name: Anonymous 2009-06-18 13:19

>>4
But well, calling functions inside funtions is necessary if I want to enable something like
[define=expert][b][i][o][u]$_[/u][/o][/i][/b][/define]
Since all looping would have to be done through recursion, I'll probably just disallow calling functions which weren't declared beforehand, so that both [define=p][p/][/define] and [define=a][b/][/define][define=b][a/][/define] will fail.

Can you guys think of any scenarios where recursion/looping would be necessary?

Name: Anonymous 2009-06-18 13:26

does it compile bbcode into llvm

Name: Anonymous 2009-06-18 13:30

>>7
bλcode interpreter
interpreter

Name: Anonymous 2009-06-18 13:34

[def] fib
    [ls]n[/ls]
    [if][equal][var]n[/var] 0[/equal]
        0
        [if][equal][var]n[/var] 1[/equal]
            1
            [add]
                [fib][sub][var]n[/var] 1[/sub][/fib]
                [fib][sub][var]n[/var] 2[/sub][/fib]
            [/add]
        [/if]
    [/if]
[/def]

[fib]8[/fib]

Name: Anonymous 2009-06-18 13:45

(sine-text "expert bbcode coding!!!!!!!!!") =>
"expert bbcode coding!!!!!!!!!"

Name: Anonymous 2009-06-18 13:59

>>9
this isn't BBCode

Name: Anonymous 2009-06-18 14:21

fuck year expert sine wave

Name: Anonymous 2009-06-18 14:27

>>11
It sure isn't, but it's the best we've got so far.

Name: Anonymous 2009-06-18 14:46

>>12
Hmm... BBCode musical notation.

In before the SICP theme.

Name: Anonymous 2009-06-18 15:37

>>6
[foldr=spoiler]I AM AN EXPERT BBCODE PROGRAMMER[/foldr]

Name: Anonymous 2009-06-18 15:59

>>15
[foldr] will be already implemented as a primitive.

Name: Anonymous 2009-06-18 16:55

>>16
[def]foldr
    [ls]f x list[/ls]
    [if][empty][var]list[/var][/empty]
        [var]x[/var]
        [apply]
            [var]f[/var]
            [car][var]list[/var][/car]
            [foldr]
                [var]f[/var]
                [var]x[/var]   
                [cudder][var]list[/var][/cudder]
            [/foldr]
        [/apply]
    [/if]
[/def]

Name: Anonymous 2009-06-18 20:31

>>1
It's incredibly easy. Since these are going to be posted on a bbs, just have a timeout of like 1 second. But still no loop constructs, just recursion.

Name: Anonymous 2009-06-18 23:09

But what if I want to build enterprise bbcode applications? I demand features facilitating bbcode reuse

Name: Anonymous 2009-06-18 23:53

>>19
If we give you that then what next? Object-Oriented BBCode? The ability to seamlessly integrate with Enterprise Databases? XML libraries? JBBCode? No sir, you will just have to make do with regular BBCode and take your Enterprise Applications elsewhere.

Name: Anonymous 2009-06-19 12:34

>>17
this is some stupid shit language with bbcode syntax, NOT A VALID BBCODE

Name: Anonymous 2009-06-19 14:32

>>21
Please present some actual arguments instead of just saying it isn't BBCode.  I am open to new ideas.

Name: Anonymous 2009-06-19 15:34

>>22
[(][word]define[/word][(][word]foldr[/word][word]f[/word][word]x[/word][word]list[/word][/(]
  [(][word]if[/word][(][word]null?[/word][word]list[/word][/(]
                    [word]x[/word]
                    [(][word]f[/word][(][word]car[/word][word]list[/word][/(]
                                     [(][word]foldr[/word]
                                        [word]f[/word]
                                        [word]x[/word]
                                        [(][word]cdr[/word][word]list[/word][/(][/(][/(][/(][/(]

Name: Anonymous 2009-06-19 15:36

>>23
Get out!

Name: Anonymous 2009-06-19 16:34

>>22
[LIST]
[*]BBCode does not have DEFINE
[*]BBCode does not have ANY OF YOUR STUPID LISP/HASKELL SHIT
[*]Just taking any old language and giving it BBCode syntax DOES NOT MAKE IT A BBCODE!!
[/LIST]

Please try looking at the BBCode help tutorials on online web forums!!! If you want to learn the LANGUAGE ITSSELF INSTEAD OF JUST BLUBBLING YOUR SCHEME CRAP EVERYWERE

Name: Anonymous 2009-06-19 16:44

>>25
YHBT
SCHEME CRAP
and IHBT

Name: Anonymous 2009-06-19 16:45

>>25
BBCode does not have DEFINE
See post >>6: [define=expert][b][i][o][u]$_[/u][/o][/i][/b][/define]

That's what I am offering an alternative to.

BBCode does not have ANY OF YOUR STUPID LISP/HASKELL SHIT
BBCode does not have anything.  BBCode is simply a style of expression.

Just taking any old language and giving it BBCode syntax DOES NOT MAKE IT A BBCODE!!
What I did was take BBCode and extend it with LISP-like features.

Name: Anonymous 2009-06-19 16:54

>>23
That's seriously too messy.

>>25
Yes, it doesn't, and that's exactly the reason I'm implementing it.
My original aim was to extend BBCode enough to support http://sovietrussia.org/prog/read/19/10.

Name: Anonymous 2009-06-19 17:51

>>28
Is it going to be a real implementation or just a bunch of random non-standard BBCode tags you post that don't actually do anything? Given this is /prog/, I'm inclined to think the latter.

Name: Anonymous 2009-06-19 18:58

>>29
What do you mean by real implementation?
If I'll ever get to implementing my own BBS then I plan on using an extended BBCode instruction set, allowing some more advanced constructs.

Name: Anonymous 2009-06-19 19:07

I think I might write a x86 assembler that uses bbcode-style syntax. It would just be a front for nasm.


[mov]eax,4[/mov]
[mov]ebx,1[/mov]
[mov]ecx,msg[/mov]
[mov]edx,12[/mov]
[int]0x80[/int]

Name: Anonymous 2009-06-19 22:26

>>31
You should write it in XBB for maximum readability.

[label]
    _main
[/label]
[instruction]
    [mnemonic]
        mov
    [/mnemonic]
    [operand]
        eax
    [/operand]
    [operand]
        4
    [/operand]
[/instruction]
[comment]
    …
[/comment]

Name: Anonymous 2009-06-20 4:34

>>32
ah yes that's much clearer

Name: Anonymous 2009-06-20 5:53

Can anyone come up with some nice (compact and BBCodey) way of representing lists for LISP-style languages?

Name: Anonymous 2009-06-20 8:08

D:\
Stopped reading before and after that

Name: Anonymous 2009-06-20 9:55

How could you have stopped reading both before and after that?

Name: Anonymous 2009-06-20 10:54

D:
Stopped reading precisely while I was reading that.

Name: Anonymous 2009-06-20 10:56

>>37
D':

Name: Anonymous 2009-06-20 11:02

>>27
You shitting dick tits I how dare you fukcking hello that is prenky. Listen to me dood I have twelf thing say to do but you. ONE BBCODE IS NOT MERCLY A WAY OF EXPRESSION, IT IS AN INVDIVVUAL AND VALID FORM OF ART ON ITS OWN. YOUR IT JUST LISP WITH BBCODE SYNTAX.

Name: Anonymous 2009-06-20 11:21

>>39
Nope, it's BBCode with LISP computation.

Name: ​​​​​​​​​​ 2010-10-26 6:58

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