Author Topic: Source code eyecatchers  (Read 3855 times)

0 Members and 1 Guest are viewing this topic.

Offline cncjerryTopic starter

  • Supporter
  • ****
  • Posts: 1282
Source code eyecatchers
« on: November 24, 2018, 12:21:55 am »
Remember in the old days there would be large eye-catchers at the beginning of source code routines made
out of text characters like:

RRRRRRR
RRRRRRRR
RR         RR
RR        RR           OOOOOO
RRRRRRR           OOO       OO
RRRRRRR           OO          OO
RR       RR          OO          OO
RR        RR           OO      OO
RR         RR           OOOOO

Is there any code out there that creates these?

Thanks,

Jerry

 

Offline rhodges

  • Frequent Contributor
  • **
  • Posts: 306
  • Country: us
  • Available for embedded projects.
    • My public libraries, code samples, and projects for STM8.
Re: Source code eyecatchers
« Reply #1 on: November 24, 2018, 12:29:42 am »
Look up the "banner" program. ("man banner") It should be on most Unix-like systems.
Currently developing STM8 and STM32. Past includes 6809, Z80, 8086, PIC, MIPS, PNX1302, and some 8748 and 6805. Check out my public code on github. https://github.com/unfrozen
 

Offline radar_macgyver

  • Frequent Contributor
  • **
  • Posts: 698
  • Country: us
Re: Source code eyecatchers
« Reply #2 on: November 24, 2018, 12:35:07 am »
 
The following users thanked this post: oPossum, Mr. Scram

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Source code eyecatchers
« Reply #3 on: November 24, 2018, 01:40:20 am »
Look up the "banner" program. ("man banner") It should be on most Unix-like systems.

On my mac:

tchotchke2:~ andy$ banner Hulk
                              ####                                                                                   ####
                              ####                                                                                   ####
                              ####                                                                                   ####
                              ####                                                                                   ####
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ####                                              ####                                 ####
                              ####                                              ####                                 ####
                              ####                                              ####                                 ####
                              ####                                              ####                                 ####
                                                                                ####
                                                                                ####
                                                                                ####
                                                                                ####
                                                                                ####
                                                                                ####
                                                                                ####
                                                                                ####
                                                                                ####
                                                                                ####
                                                                                ####
                                                                                ####
                              ####                                              ####                                 ####
                              ####                                              ####                                 ####
                              ####                                              ####                                 ####
                              ####                                              ####                                 ####
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ####                                                                                   ####
                              ####                                                                                   ####
                              ####                                                                                   ####
                              ####                                                                                   ####
                                                                                                                         
                                                                                ####
                                                                                ####
                                          ##########################################
                                      ##############################################
                                   #################################################
                                 ###################################################
                                ####################################################
                               #####################################################
                               #####################################################
                              ######################################################
                              ############
                              #########
                              ########
                              #######
                              #######
                               ######
                               ######
                                ######
                                 #####
                                  #####
                                   #####                                        ####
                                     #####                                      ####
                              ######################################################
                              ######################################################
                              ######################################################
                              ######################################################
                              ######################################################
                              ######################################################
                              ######################################################
                              ######################################################
                              ####
                              ####
                                   
                              ####                                                                                   ####
                              ####                                                                                   ####
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ####
                              ####
                                   
                              ####                                                                                   ####
                              ####                                                                                   ####
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ###########################################################################################
                              ####                       #########
                              ####                     ############
                                                    #################
                                                  ####################
                                                ########################
                                              ###########################
                                            #####################    ######
                                         ######################       ######    ####
                              ####     #####################            ######  ####
                              ####  ######################               ###########
                              ##########################                   #########
                              #######################                       ########
                              #####################                           ######
                              ###################                              #####
                              ################                                  ####
                              ##############                                    ####
                              ############
                              ##########
                              #######
                              #####
                              ####
                              ####
                                   
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Source code eyecatchers
« Reply #4 on: November 24, 2018, 03:41:09 am »
EMACS has "Picture Mode" that is useful for editing such things."Ascii Art" is a searchable topic - lots of stuff that you can snarf.  There might be tools for creating it, too ("Rexpaint"?  Assorted "text to ascii art" and even "image to ascii art" tools...
(I wonder if you can still find stuff to generate the 5x over-printed, 6-page wide, line printer art that used to so upset the line printer owners?)
 

Online cv007

  • Frequent Contributor
  • **
  • Posts: 825
Re: Source code eyecatchers
« Reply #5 on: November 24, 2018, 05:39:07 am »
google 'online ascii art' ,first link
create what you want, copy&paste
 

Offline cncjerryTopic starter

  • Supporter
  • ****
  • Posts: 1282
Re: Source code eyecatchers
« Reply #6 on: November 24, 2018, 05:45:14 am »
using the term "Banner" was what I needed and found the one below.  I remember years ago a centerfold printed on continuous form paper using an IBM 1403 chain printer.

https://www.ascii-art-generator.org/


Thanks,

Jerry
 

Offline Jan Audio

  • Frequent Contributor
  • **
  • Posts: 820
  • Country: nl
Re: Source code eyecatchers
« Reply #7 on: November 24, 2018, 01:32:14 pm »
google 'online ascii art' ,first link

Every person gets different results,
they see how fast you type, etc.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Source code eyecatchers
« Reply #8 on: November 24, 2018, 01:46:12 pm »
Is there any code out there that creates these?

a lot of Linux programs can be compiled with the "asciiart" flag, which includes a library that does what you are asking.

Personally, I have never used because I want my source the neatest possible!
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Source code eyecatchers
« Reply #9 on: November 25, 2018, 03:16:22 am »
There is this particularly famous one

/* Copyright (c) 1983 University of Maryland Computer Science Department */

/* Ultra-hot screen management package
   Original code copyright (c) James Gosling, January 1980 */

/* Severe munging and destruction by Chris Torek, 1982,1983 */

/****************************************************************



                         /-------------\
                        /               \
                       /                 \
                      /                   \
                      |   XXXX     XXXX   |
                      |   XXXX     XXXX   |
                      |   XXX       XXX   |
                      \         X         /
                       --\     XXX     /--
                        | |    XXX    | |
                        | |           | |
                        | I I I I I I I |
                        |  I I I I I I  |
                         \             /
                          --         --
                            \-------/
                    XXX                    XXX
                   XXXXX                  XXXXX
                   XXXXXXXXX         XXXXXXXXXX
                          XXXXX   XXXXX
                             XXXXXXX
                          XXXXX   XXXXX
                   XXXXXXXXX         XXXXXXXXXX
                   XXXXX                  XXXXX
                    XXX                    XXX

                          **************
                          *  BEWARE!!  *
                          **************

                        All ye who enter here:
                    Most of the code in this module
                       is twisted beyond belief!

                           Tread carefully.

                    If you think you understand it,
                              You Don't,
                            So Look Again.

 ****************************************************************/
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Source code eyecatchers
« Reply #10 on: November 25, 2018, 03:20:54 am »
There is this particularly famous one

Code: [Select]
                          **************
                          *  BEWARE!!  *
                          **************

                        All ye who enter here:
                    Most of the code in this module
                       is twisted beyond belief!

                           Tread carefully.

                    If you think you understand it,
                              You Don't,
                            So Look Again.


this should be applied to the source of EMACS  :-DD
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: Source code eyecatchers
« Reply #11 on: November 25, 2018, 04:02:34 am »
Quote
this should be applied to the source of EMACS
You do know that that's where it's from, right?  Although RMS claims that none of Gosling's code remains in the current versions (as of long ago, in fact.  It was a point of some contention, probably partly responsible for FSF/Gnu's OSSW philosophy.)
I was just thinking how different things are now.  The last time someone had to optimize text screen output using ANSI escape sequences (and similar) so that it would be usable over 1200bps dialup modems was ... way back when.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6253
  • Country: fi
    • My home page and email address
Re: Source code eyecatchers
« Reply #12 on: November 28, 2018, 04:55:31 pm »
(I wonder if you can still find stuff to generate the 5x over-printed, 6-page wide, line printer art that used to so upset the line printer owners?)
Oh man, that brings up memories.  I had a Star LC-10 dot matrix printer, and wrote a program to print a PCX image at "very high resolution" (vertically) by printing each strip at least twice. It was horribly slow, but I really liked the output.  It could have been the first program I ever wrote that was actually useful in the real world: I remember printing some diagrams and a map of Zimbabwe for my older brother's presentation at school (for use with an opaque projector).  I think he even colored them in by hand...
 

Offline In Vacuo Veritas

  • Frequent Contributor
  • **
  • !
  • Posts: 320
  • Country: ca
  • I like vacuum tubes. Electrons exist, holes don't.
Re: Source code eyecatchers
« Reply #13 on: November 28, 2018, 07:06:28 pm »
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Source code eyecatchers
« Reply #14 on: November 28, 2018, 07:39:16 pm »
How does this look like?

Code: [Select]
--------------------------------------------------------------------------------
-- @file HelloAX301.vhd
--------------------------------------------------------------------------------
-- @brief AX301 physical layout file.
--
-- @description
-- This file describes the physical layout of Alinx AX301 FPGA learning kit.
--
-- @note
-- When building this module with the matching pinout of the board, make sure
-- the dual-use pins are properly set to FPGA fabric mode.
--
-- @author Max Chan <max@example.org>
-- @date Nov. 11, 2018
-- @version v0r2
--------------------------------------------------------------------------------

I haven't figured out how to get doxygen to work with VHDL yet, but this is cray to me that I ended up typing out this thing.
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6253
  • Country: fi
    • My home page and email address
Re: Source code eyecatchers
« Reply #15 on: November 28, 2018, 08:03:53 pm »
technix, at least seven of those sixteen lines contains very useful information; that makes it packed with information, compared to an average file 8)

I personally need to start adding SPDX license comments to my examples, like // SPDX-License-Identifier: CC0-1.0 . I've always hated adding the legalese blurbs.
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Source code eyecatchers
« Reply #16 on: November 28, 2018, 08:37:26 pm »
Insight costs 250 euro for a single minimal license but it handles this very neatly. It introduces a way to express headers and footnote in a text file by a sort of magic words which make the tool able to visualize the text (talking about C code, VHDL code, whatever is a source code) on the screen with the proper font and size. Brilliant!

 

Offline bsudbrink

  • Frequent Contributor
  • **
  • Posts: 406
  • Country: us
Re: Source code eyecatchers
« Reply #17 on: November 28, 2018, 08:38:35 pm »
Code: [Select]
        VV        VV    MM        MM
        VV        VV    MMM      MMM
        VV        VV    MMMM    MMMM
        VV        VV    MM MM  MM MM
 3333333333     777777777777MMMM  00000000
333333333333    77777777777  MM  0000000000
33      VV33    77VV    77      00MM      00
         V33     VV    77M      00MM      00
          33    VV    77MM      00MM      00
       3333VV  VV    77 MM      00MM      00
       3333 VVVV     77 MM      00MM      00
          33 VV      77 MM      00MM      00
          33         77         00        00
33        33         77         00        00
333333333333         77          0000000000
 3333333333          77           00000000
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Source code eyecatchers
« Reply #18 on: November 28, 2018, 08:46:42 pm »
I personally need to start adding SPDX license comments to my examples

yup, no doubt it's so really boring that you risk forgetting it done.

For publishing C code on the web in the form of HTML, I have created a C tool that creates an HTML page

Code: [Select]
myC-2-html file.c file.html

I have also added a special flag to add a header concerning the license

Code: [Select]
myC-2-html file.c file.html --header license.txt

if not specified, it loads and applies a default license (BSD).

You can do the same, even by a simple cat license.txt file.c > going_to_be_published_file.c_gtbp
I use the file extension c_gtbp to remember that the file already contains the license in its header

so you cannot be wrong :D
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14464
  • Country: fr
Re: Source code eyecatchers
« Reply #19 on: November 29, 2018, 12:46:44 am »
For publishing C code on the web in the form of HTML, I have created a C tool that creates an HTML page

Does it implement syntax highlighting? ;D
 

Offline legacy

  • Super Contributor
  • ***
  • !
  • Posts: 4415
  • Country: ch
Re: Source code eyecatchers
« Reply #20 on: November 29, 2018, 02:18:05 am »
For publishing C code on the web in the form of HTML, I have created a C tool that creates an HTML page

Does it implement syntax highlighting? ;D

currently no, it's super simple, but it can be added.
Do you want the code? I might put it on DTB!
 

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: Source code eyecatchers
« Reply #21 on: November 29, 2018, 02:49:54 pm »
What I miss are the color ASCII-art animations which used to unroll when you connected to old dial up BBSs.

(Not the same as viewing ASCII-art video in a frame buffer - Now we have libcaca, etc. not the same).

"What the large print giveth, the small print taketh away."
 

Offline Nominal Animal

  • Super Contributor
  • ***
  • Posts: 6253
  • Country: fi
    • My home page and email address
Re: Source code eyecatchers
« Reply #22 on: November 29, 2018, 03:25:14 pm »
You mean ANSI art, cdev?  ;) The "animation" was basically just later parts of the output moving the cursor around, and overwriting stuff, using ANSI escape codes for colors and moving the cursor; and non-ASCII characters. CP-437 with box drawing and block elements was one common one used, if I recall correctly. Because of low modem baud rates, it felt like animation.
 
The following users thanked this post: cdev

Offline SparkyFX

  • Frequent Contributor
  • **
  • Posts: 676
  • Country: de
Re: Source code eyecatchers
« Reply #23 on: November 29, 2018, 03:44:17 pm »
Yeah, at some point those animations got too fast to keep reading it while it scrolled down the screen. And so "more" was born.
Support your local planet.
 

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: Source code eyecatchers
« Reply #24 on: November 30, 2018, 11:00:33 pm »
Yes, thank you!

of course that (ANSI-escape-code-art) is what I meant.

Now you all can tell. I am very very old. ;)

You mean ANSI art, cdev?  ;) The "animation" was basically just later parts of the output moving the cursor around, and overwriting stuff, using ANSI escape codes for colors and moving the cursor; and non-ASCII characters. CP-437 with box drawing and block elements was one common one used, if I recall correctly. Because of low modem baud rates, it felt like animation.
« Last Edit: November 30, 2018, 11:02:28 pm by cdev »
"What the large print giveth, the small print taketh away."
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf