Jump to content

Possible posting format upgrade for LISP and other code


Recommended Posts

Posted

is there a benefit to doing it that way?

 

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

Posted

yeh i think im missing something, doesnt really help much

Posted

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.

Posted
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.

Posted

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

Posted

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

Posted

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

Posted

Lee,

 

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

LSP2BBC.LSP

Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...