SNOBOL4HOST(3)

πŸ“¦
version 2.3.1 Β· 3 versions
, in fedora 43, fedora 44, opensuse-leap 16.0

πŸ’– SNOBOL4HOST πŸ’–

okay bestie, welcome to snobol4host β€” the CSNOBOL4 manual page that's all about the SNOBOL4 host O/S functions πŸ–₯️✨ this is the page that tells you everything the HOST() function can do, and girl, it can do a lot. fifty-something things. we're listing all of them. no skipping. periodt πŸ’…


✨ SYNOPSIS ✨

    -INCLUDE 'host.sno'

yeah that's it, that's the whole vibe. drop that include and HOST() is yours 🫢


🌸 DESCRIPTION 🌸

HOST() is giving swiss army knife energy β€” it wears a bunch of different hats depending on what you hand it. some of these come from Macro SPITBOL, some from Catspaw SPITBOL, and a whole pile are pure CSNOBOL4 exclusives. let's go group by group πŸŽ€

🧚 Macro SPITBOL vibes

  • HOST() β€” returns ARCHITECTURE:OPERATING_SYSTEM:SNOBOL_VERSION. it's three parts glued together with colons: part one is the physical architecture, part two is the operating system, and part three is the language implementation's name plus version. NOTE! the architecture names come straight from the uname(3) library call, so the same physical hardware can report a different name when it's running a different operating system. iconic, honestly. examples:
amd64:FreeBSD 12.1-RELEASE-p1:CSNOBOL4B 2.2
x86_64:Linux 5.4.0-12-generic:CSNOBOL4B 2.2
  • HOST(0) β€” returns a string holding the command line parameter that got handed to the -u option, if there even was one. and if nobody gave a -u option? then HOST(0) returns the concatenation of all the user parameters that follow the input filename(s) 🫢

🐱 Catspaw SPITBOL vibes

  • HOST(1, string) β€” takes that string and passes it along to the system(3) C library function, then hands you back the subprocess exit status. so like, system() but make it SNOBOL πŸ¦‹
  • HOST(2, n) β€” for an integer n, returns the n'th command line argument as a string β€” and it genuinely does not care whether that argument was the command name, an option, a filename, or a user parameter, it's coming back as a string regardless. if n is out of range you get failure. πŸ’€
  • HOST(3) β€” returns an integer meant to be used with HOST(2), telling you which command line argument is the first one available as a user parameter. it's the little index buddy for HOST(2) πŸ₯°
  • HOST(4, I<string) β€” returns the value of the environment variable whose name is given by string. yes, env vars, we love her 🌈

πŸ‘‘ CSNOBOL4 exclusives

okay this is the long part, bestie, hydrate first πŸ’§ every single one of these is CSNOBOL4: flavored:

  • HOST(HOST_CONFIG_HOST) β€” returns host where configure script was run
  • HOST(HOST_CONFIG_DATE) β€” returns date when configure script was run
  • HOST(HOST_CONFIG_OPTIONS) β€” returns configure command line options (or fails)
  • HOST(HOST_VERSION_DATE) β€” version date (from configure script)
  • HOST(HOST_CC_IS) β€” C compiler name/id
  • HOST(HOST_BUILD_DATE) β€” returns date when snobol4 built
  • HOST(HOST_BUILD_DIR) β€” returns directory where snobol4 built
  • HOST(HOST_BUILD_FILES) β€” returns named of files ued to build snobol4
  • HOST(HOST_SNOLIB_DIR) β€” return default SNOLIB directory (for -INCLUDE, LOAD())
  • HOST(HOST_SNOLIB_FILE) β€” return default file for LOAD()
  • HOST(HOST_CC) β€” C Compiler used to build CSNOBOL4
  • HOST(HOST_COPT) β€” C Compiler optimizer flags used to build CSNOBOL4
  • HOST(HOST_SO_EXT) β€” Shared Object Library extension
  • HOST(HOST_SO_CFLAGS) β€” C Compiler flags for Shared Objects
  • HOST(HOST_SO_LD) β€” Shared Object file load command
  • HOST(HOST_SO_LDFLAGS) β€” Shared Object file load switches
  • HOST(HOST_DL_EXT) β€” Dynamic Loadable Library extension
  • HOST(HOST_DL_CFLAGS) β€” C Compiler flags for Dynamic Loadables
  • HOST(HOST_DL_LD) β€” Dynamic Loadable file load command
  • HOST(HOST_DL_LDFLAGS) β€” Dynamic Loadable file load switches
  • HOST(HOST_DIR_SEP) β€” return system directory seperator character (may be empty)
  • HOST(HOST_PATH_SEP) β€” return system PATH seperator character
  • HOST(HOST_DEF_SNOPATH) β€” default library search path
  • HOST(HOST_INCLUDE_DIR) β€” path for C headers
  • HOST(HOST_OBJ_EXT) β€” object file extension
  • HOST(HOST_SETUP_SYS) β€” setuputil system name
  • HOST(HOST_SHARED_OBJ_SUBDIR) β€” shared object subdir
  • HOST(HOST_CONFIG_CFLAGS) β€” CFLAGS from configure
  • HOST(HOST_CONFIG_CPPFLAGS) β€” C preprocessor flags from configure
  • HOST(HOST_CONFIG_LDFLAGS) β€” loader flags from configure
  • HOST(HOST_INTEGER_BITS) β€” number of bits used to represent SNOBOL4 INTEGER type
  • HOST(HOST_REAL_BITS) β€” number of bits used to represent SNOBOL4 REAL type
  • HOST(HOST_POINTER_BITS) β€” number of bits used to represent C pointer type
  • HOST(HOST_LONG_BITS) β€” number of bits used to represent C long type
  • HOST(HOST_DESCR_BITS) β€” number of bits used to represent SIL "descriptor" type
  • HOST(HOST_SPEC_BITS) β€” number of bits used to represent SIL "specifier" type
  • HOST(HOST_CHAR_BITS) β€” number of bits used to represent C char type
  • HOST(HOST_DYNAMIC_SIZE) β€” size of "dynamic" storage in descriptors
  • HOST(HOST_PMSTACK_SIZE) β€” size of pattern match stack in descriptors
  • HOST(HOST_ISTACK_SIZE) β€” size of interpreter stack in descriptors
  • HOST(HOST_SNOLIB_BASE) β€” library base directory in use
  • HOST(HOST_SNOLIB_LOCAL) β€” local, version-independant files
  • HOST(HOST_SNOLIB_VLIB) β€” distribution files (version-specific)
  • HOST(HOST_SNOLIB_VLOCAL) β€” local, version-specific files
  • HOST(HOST_SNOPATH_DIR) β€” return n'th element in search directory list
  • HOST(HOST_SNOLIB_VERS) β€” versioned base directory
and that's genuinely all of them β€” 52 ways to ask your own machine who it is πŸ’–

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the page, bestie πŸŽ€ go forth and interrogate your operating system, she loves it fr fr πŸ’…

this was CSNOBOL4B 2.3.1, dated March 31, 2022 β€” mwah, take care of her 🫢✨🌸

πŸ“¦ where this page comes from