Jump to content
uddfl

Possible posting format upgrade for LISP and other code

Recommended Posts

Strix

is there a benefit to doing it that way?

 

*takes migrane for a lie-down* :wink:

Share this post


Link to post
Share on other sites
azzro10

yeh i think im missing something, doesnt really help much

Share this post


Link to post
Share on other sites
uddfl

Jeez, sorry I brought it up

 

WhySoSerious.jpg

Share this post


Link to post
Share on other sites
CmdrDuh

Speaking neither vietnamese or whatever the first page was, the first question I would have is what software were those 2 forums using? We have vBulletin here, which may not have that functionality.

Share this post


Link to post
Share on other sites
uddfl
Speaking neither vietnamese or whatever the first page was, the first question I would have is what software were those 2 forums using? We have vBulletin here, which may not have that functionality.
That's basically what I'm wondering.

 

Edit: The first one is in Portuguese, a Brazilian site that's been around a long time.

Share this post


Link to post
Share on other sites
chelsea1307

Ive seen on some sites (dont remember which ones now though) theres an option at the bottom of a code section to be able to download directly, I know copying and pasting from the page really isnt hard, but people have had problems with copying and missing an ( or ) accidentally. dont know if it is avaliable on vbulitien but it would be nice if it was

Share this post


Link to post
Share on other sites
fuccaro

It's up to the poster to upload a LSP or a ZIP file for the reader's convenience.

Share this post


Link to post
Share on other sites
David Bethel

Just to clarify a bit, the code here is BBC.

 

I can automate LSP to BBC but the files get quite large quickly. Correct me if I'm wrong, but there is a 10KB limit in [ code] [ /code] brackets.

 

I prefer some of the older style color coding where nesting is by various colors, not the vlide simply red scheme

 

In plain code 307 bytes

(setq ss (ssget "X" (list (cons 0 "INSERT")
                         (cons 2 block_name)
                         (cons 66 1)
                         (if (getvar "CTAB")
                             (cons 410 (getvar "CTAB"))
                             (cons 67 (- 1 (getvar "TILEMODE")))))))

In Color 1,169 Bytes

 

[b][color=BLACK]([/color][/b]setq ss [b][color=FUCHSIA]([/color][/b]ssget [color=#2f4f4f]"X"[/color] [b][color=NAVY]([/color][/b]list [b][color=MAROON]([/color][/b]cons 0 [color=#2f4f4f]"INSERT"[/color][b][color=MAROON])[/color][/b]
                         [b][color=MAROON]([/color][/b]cons 2 block_name[b][color=MAROON])[/color][/b]
                         [b][color=MAROON]([/color][/b]cons 66 1[b][color=MAROON])[/color][/b]
                         [b][color=MAROON]([/color][/b]if [b][color=GREEN]([/color][/b]getvar [color=#2f4f4f]"CTAB"[/color][b][color=GREEN])[/color][/b]
                             [b][color=GREEN]([/color][/b]cons 410 [b][color=BLUE]([/color][/b]getvar [color=#2f4f4f]"CTAB"[/color][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b]
                             [b][color=GREEN]([/color][/b]cons 67 [b][color=BLUE]([/color][/b]- 1 [b][color=RED]([/color][/b]getvar [color=#2f4f4f]"TILEMODE"[/color][b][color=RED])[/color][/b][b][color=BLUE])[/color][/b][b][color=GREEN])[/color][/b][b][color=MAROON])[/color][/b][b][color=NAVY])[/color][/b][b][color=FUCHSIA])[/color][/b][b][color=BLACK])[/color][/b]

What it looks like in ASCII With an extra space after each [

 

[ b][ color=BLACK]([ /color][ /b]setq ss [ b][ color=FUCHSIA]([ /color][ /b]ssget [ color=#2f4f4f]"X"[ /color] [ b][ color=NAVY]([ /color][ /b]list [ b][ color=MAROON]([ /color][ /b]cons 0 [ color=#2f4f4f]"INSERT"[ /color][ b][ color=MAROON])[ /color][ /b]

[ b][ color=MAROON]([ /color][ /b]cons 2 block_name[ b][ color=MAROON])[ /color][ /b]

[ b][ color=MAROON]([ /color][ /b]cons 66 1[ b][ color=MAROON])[ /color][ /b]

[ b][ color=MAROON]([ /color][ /b]if [ b][ color=GREEN]([ /color][ /b]getvar [ color=#2f4f4f]"CTAB"[ /color][ b][ color=GREEN])[ /color][ /b]

[ b][ color=GREEN]([ /color][ /b]cons 410 [ b][ color=BLUE]([ /color][ /b]getvar [ color=#2f4f4f]"CTAB"[ /color][ b][ color=BLUE])[ /color][ /b][ b][ color=GREEN])[ /color][ /b]

[ b][ color=GREEN]([ /color][ /b]cons 67 [ b][ color=BLUE]([ /color][ /b]- 1 [ b][ color=RED]([ /color][ /b]getvar [ color=#2f4f4f]"TILEMODE"[ /color][ b][ color=RED])[ /color][ /b][ b][ color=BLUE])[ /color][ /b][ b][ color=GREEN])[ /color][ /b][ b][ color=MAROON])[ /color][ /b][ b])[ /color][ /b][ b])[ /color][ /b][ b])[ /color][ /b]

-David

Share this post


Link to post
Share on other sites
Lee Mac

It is far easier to read though David.

Share this post


Link to post
Share on other sites
David Bethel

Lee,

 

It is a fairly simple program. The program itself does not format well between the [ code] [ /code] tags. -David

LSP2BBC.LSP

Share this post


Link to post
Share on other sites
Lee Mac

Many thanks for posting that LISP - very generous of you David.

 

I shall look into posting my codes in colour from now on :P

 

Thanks

 

Lee

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×