Talk:Library (computing)

message: This article is a mix of high-level gloss and a sampling of nitty-gritty details. It talks little about traditional libraries (I just added a couple of sentences at the top). Partially as a result, it has some inaccuracies and potential for people to misunderstand the things that are accurate. I think it needs a rework into a structure something like this:
:* What libraries are and the purposes [modularity, code reuse, etc]
:* The history
:* Types of libraries today
:* Any nitty-gritty details necessary.
I like your work so you have my encouragement to proceed. Daniel.Cardenas 13:39, 17 July 2006 (UTC)
thread_title: Problems with this article

message: I agree with the "clarification needed" marking on the first sentence.  While it is highly general, I think it be rather opaque to most readers.
I would suggest something not as general, but much more concrete:
     In computer science, a library is a set of routines that are made available for use in multiple programs.
(Though I'm much more doubtful that editors would want to include text such the following) this may also be helpful:
     The term arose by analogy to a traditional library that loans books to many patrons.  In a traditional library,
     when one patron has finished using a book, they return it, and it can be used by another patron.  (Of course, for
     a library of computer routines, there is generally no need for programs to wait their turn.  Any number of
     programs could have simultaneously pulled out a copy of the routine for their use, and they do not need to
     "check the routine back in" when they have finished with it.  Editing and altering a routine is a different
     matter.  For that activity, one would generally need to control access.)
     J Donovan, in Systems Programming (C) 1972, McGraw-Hill, p. 8 refers to a "card library", which was
     actually used in the early days very much as a traditional library would be used.
MarkGoldfain (talk) 23:32, 12 July 2013 (UTC)
thread_title: =============

message: I moved this from the article, since it really belogs here:
:* Application Programming Interface
:* relationships among linkers, loaders, dynamically linked library, statically linked library, application binary interface
:* Common styles of library organization (GUI toolkits, data structure/collection frameworks, I/O libraries, functional programming combinators, metaprogramming protocols, etc.)
:* Perhaps a section on Prebinding?
:* Need to mention template libraries or generic programming, where most (if not all) of the library code resides in header files.  This is distinct from static libraries, as the library code is directly incorporated (and hence intertwined) with user code.
—Frecklefoot 18:36, 18 Sep 2003 (UTC)
replies: text: Protocol in this context means method or workflow.  One metaprogramming protocol is direct metaprogramming where the programmer writes a program-writing program.  A second protocol might be genetic programming where the programmer writes some form of specification and the computer tries to create a program to fulfill it. A third protocol might be indirect metaprogramming via a metaprogramming tool such as Bison where the programmer writes a specification which the tool uses to generate a program. This third protocol is probably what is meant above. -- Derek Ross
----
Are static linking and dynamic linking supposed to be subtopics of library linking? If so the hierarchy is all skew. --BozMo|talk 15:17, 16 Aug 2004 (UTC)
thread_title: Partial list of topics to fill in

message: "Dynamic linking systems place the majority of the linker code in the underlying operating system, in which case it is known as a loader."
What does "it" refer to in the sentence above?
:This should read something along the lines of the following.
::In dynamic linking, the operating system and its libraries contain a run-time linker that resolves the dynamic links in exectuables and dynamic libraries when the application is loaded. Resolution of dynamic links may occure before the application begins execution, or during execution as each link is first executed. In dynamic linking, the term loader is often synonymous with the term linker.
:Jsmethers 21:52, 6 December 2005 (UTC)
thread_title: A question

message: In the section about Dynamic Linking you say:
  Unix-based systems use a PATH variable of "places to look", which tends to be robust as the PATH rarely changes.
It sounds like you are reffering to the shell PATH variable.
As far as I'm aware, none of the common UNIX variants uses the PATH environment variable to lookup shared objects (aka Dynamic Libraries).
Instead there are:
1. Pre-defined, system-wide paths configured in files (e.g. /etc/ld.so.conf on Linux. See ldconfig(8) for more)
2. Possibly other environment variables to override/add to the directories in (1) (e.g. LD_LIBRARY_PATH,
LD_PRELOAD and others on Linux).
The only resemblance to PATH in the above is that the environment variables, if defined,
are usually in the format of the standard PATH variable used by the bourne-shell to lookup
programs (i.e. directory names separated by commas).
I remember seeing somewere a list of the variations on this theme (of LD_LIBRARY_PATH
equivalents on "exotiq" systems like HPUX and AIX) but can't find it right now,
maybe a good place to begin digging is GNU libtool).
I'm adding this here because I'm not sure how to edit the article itself.
Thanks.
Penedo 02:35, 28 Apr 2005 (UTC)
replies: text: BTW, this has been changed in the article (it doesn't refer to PATH on Unix). Some part of this discussion would probably be interesting to include. Nils 17:38, 25 Oct 2005 (UTC)

text: (3)  afaik hardcoded library paths in the binary are also possible ( --rpath parameter, or via libtool)   88.159.74.100 09:10, 9 July 2007 (UTC)
replies: text:  You mean "--rpath or its equivalent, or via libtool" - not every Un*x on the planet uses GNU ld; some use linkers where the flag is "-R", for example. Guy Harris 17:05, 9 July 2007 (UTC)

text: Dynamic library loading came fairly late to UNIX.  Someone should track down the history of this.  As I recall, the library path originally was just used during compilation ot specify static libraries. DonPMitchell (talk) 05:33, 13 January 2008 (UTC)

text: LD_LIBRARY_PATH originally came from SunOS 4.0's dynamic linking mechanism; that mechanism, complete with LD_LIBRARY_PATH, was passed on to System V Release 4 and thus to Solaris.  Linux, FreeBSD and NetBSD also inherited it from those sources when they re-implemented the SunOS 4.0 and/or SVR4 shared library mechanisms, and it passed on to OpenBSD and DragonFly BSD from the BSDs from which they forked. Guy Harris (talk) 19:20, 13 January 2008 (UTC)
thread_title: UNIX PATH envariable is not used to lookup dynamic libraries

message: This article is nice. I want to put it in the Project's hierarchy up toward the top. We need more participants so I'm going to keep spamming discussion pages on articles like this one till we get some momentum going. Please JOIN Today!:
:Computer_Science_Club | CS-WikiProject | CS-Clubhouse | Posted by Quinobi 17:05, 12 July 2005 (UTC)
thread_title: Computer science project

message: This article should probably be trimed down to the history of libraries in computer science in general and an introduction to specific types of computer libraries. Information about specific types of computer libraries and implemenations of libaries on specific platforms should probably be seperated out into other pages. For example, information about static libraries, shared libraries, and dynamic libraries should be merged into their respective articles. Information about Microsoft's Dynamic Link Libraries should be merged into the respective article.
Jsmethers 02:40, 6 December 2005 (UTC)
thread_title: Article's Direction

message: At the bottom of the "Dynamic Linking" section:
"OpenStep used a more flexible system, collecting up a list of libraries from a number of kno or if an incompatible version of the DLL is copied to a place that is earlier in the search, the executable could malfunction or even fail to load. On Windows this is commonly known as DLL hell."
It seems that the text after the letters "kno" has been removed.
BTW -- excellent article
Jsminch 07:04, 16 December 2005 (UTC)
thread_title: Bad Edit?

message: Library (computer science) → Library (computing) – This is not an academic topic, so a more general name is appropriate. – Smyth\talk 20:39, 25 September 2006 (UTC)
thread_title: Requested move

message: Add "* Support" or "* Oppose" followed by an optional one-sentence explanation, then sign your opinion with ~~~~
* Support – Smyth\talk 20:40, 25 September 2006 (UTC)
thread_title: Survey

message: Add any additional comments
This article has been renamed as the result of a move request. Vegaswikian 19:29, 2 October 2006 (UTC)
thread_title: Discussion

message: The current section on Relocation reads as follows (italics are mine):
:One wrinkle that the loader must handle is that the location in memory of the actual library data cannot be known until after the executable and all dynamically linked libraries have been loaded into memory. This is because the memory locations used depend on which specific dynamic libraries have been loaded. It is not possible to store the absolute location of the data in the executable, nor even in the library, since conflicts between different libraries would result: if two of them specified the same or overlapping addresses, it would be impossible to use both in the same program. This might change with increased adoption of 64-bit architectures, which offer enough virtual memory addresses to give every library ever written its own unique address range.
That last statement seems absurd to me.  There would be have to be some regulatory system established to ensure that "[every version of] every library ever written" used a unique memory address range, such that there was no overlap.  And when you add in my comment ("every version of") it readily becomes apparent that exhaustion of the (constantly-shrinking available portion of the) 64-bit address space wouldn't take that long.  Not to mention that the overhead of having the operating system perform a virtual <==> physical address mapping for every operation of every library call would probably nullify any benefit such a system would provide.  I think the statement was just a whimsical addition, and unless it can be grounded by some reputable citations, I think it should be removed.—Kbolino 04:35, 20 March 2007 (UTC)
thread_title: Relocation in 64-bit systems

message: A "standard library" is no library, but a set of requirements a library must adhere to. IOW it's more analogous to POSIX being a set of OS requirements than POSIX being an OS. 88.159.74.100 09:08, 9 July 2007 (UTC)
thread_title: Standard Library

message: The link: Shared Libraries - 'Linkers and Loaders' by John R. Levine (http://www.iecc.com/linker/linker09.html) does not seem to be working.
It would be interesting to find a replacement. I'm not able to propose anything else because I don't know the exact content of the article, sorry.
Seriousch 09:19, 19 August 2007 (UTC)
replies: text: Works fine now. :) Indeterminate (talk) 10:31, 21 January 2008 (UTC)
thread_title: Broken link

message: Why are libraries called libraries? Who invented them? When did they first appear? When were they first standardised?
Alksentrs (talk) 01:04, 25 November 2007 (UTC)
replies: text: I can't find out why they're called "libraries" (you try doing a google search for "history of libraries" :) ), but I dug up a little bit of information. Indeterminate (talk) 10:31, 21 January 2008 (UTC)

text: The above appears to be correct: Wheeler's team built the first documented subroutine library that saw practical use. A few people speculated about the idea before that at least as early as 1947. I've added this to the beginning of the history section. But, it does not jive with the statement "the earliest programming concepts analogous to libraries were intended to separate data definitions from the program implementation" that then goes on to talk about stuff from 1957. I'll be removing that soon unless someone can explain how it fits.Jno.skinner (talk) 03:46, 27 February 2021 (UTC)
thread_title: History?

message: Article sez:
OpenStep used a more flexible system, collecting a list of libraries from a number of known locations (similar to the PATH concept) when the system first starts. Moving libraries around causes no problems at all, although there is a time cost when first starting the system.
So this is "more flexible" than what?  Presumably "everything else", I guess...:-)
"causes no problems at all" feels just a wee bit glib as well.  It's been a long time since I touched Nextstep/OpenStep, so I can't remember exactly what problem this is solving, and why, if the list is only collected at boot time, this means moving libraries around would not cause a problem.  Does the kernel detect library or parent directory mvs and automatically update its link path?  Does it track libraries by inode or equivalent?  How about installing new libraries?  Or is what this really is doing is hashing library locations for faster runtime loading?  Can individual programs override this if they choose?  I'm not feeling the "flexible" here from the information provided.--NapoliRoma (talk) 21:54, 1 January 2008 (UTC)
thread_title: OpenStep?

message: 
:69.140.152.55 (talk) 05:21, 11 June 2008 (UTC)
thread_title: merge talk pages

message: This edit undid a considerable amount of copyediting, along with making the article less future-proof by giving specific examples of Unix-like OSes instead of generalising the issue to all modern instances. It should be reverted. Chris Cunningham (not at work) - talk 18:09, 2 March 2009 (UTC)
replies: text: I've put some of the changes in question back.  It's not "all modern instances", though - not all use .so (e.g., OS X uses .dylib and I think HP-UX uses .sl for 32-bit libraries), and AIX, well, it's AIX, what else can I say. :-))  That section requires some more work.  Guy Harris (talk) 00:03, 3 February 2011 (UTC)
thread_title: Recent revert

message: Nowhere on this page, the concept of Incremental Linking is described.
I would like to know what that concept is, but could not find it.  —Preceding unsigned comment added by 209.139.213.73 (talk) 22:20, 1 April 2009 (UTC)
replies: text: I seem to remember “incremental linking” being a special feature of the Quick C linker (computing) where it was meant to speed up the linking stage if only a small number of object files had changed or something. But this is probably more relevant on one of those two pages rather than here. Vadmium (talk) 03:19, 24 August 2011 (UTC)
thread_title: Missing stuff on Incremental Linking

message: :"Some operating systems can only link in a library at loadtime, before the process starts executing; others can wait until after the process has started to execute and link in the library just when it is actually referenced (i.e., during runtime). The latter is often called "delay loading" or "deferred loading". In either case, such a library is called a dynamically linked library."
I guess what is meant in the last sentence is dynamic loading. As dynamically linked libraries can imho also be pure program-startup-time-type libraries (vs. program-runtime-type libraries), the given sentence may even be wrong. --Abdull (talk) 11:15, 3 March 2010 (UTC)
thread_title: Dubious

message: The Multics system, where dynamic linking was invented, was able to dynamically link to segments that were not in a library at all. While there was a Binder, its use was optional; it allowed you to bundle related segments for reasons of configuration management or efficiency. Shmuel (Seymour J.) Metz Username:Chatul (talk) 20:13, 12 July 2010 (UTC)
thread_title: Decouple dynamic linking from DLL's

message: Imagine there is a shared library with a static variable. This static variable is used by one or more subroutines within this shared library. Now imagine, two or more programs use this shared library. How will these programs handle the static variable? Will these programs share it and mess with each other program's state? Or will every program make its own local copy of the variable? Thanks, --Abdull (talk) 22:47, 12 August 2010 (UTC)
replies: text: I'm pretty sure that in a Windows DLL each program will create its own static variable. But, this is not the right forum for such a technical question ;) Stevebroshar (talk) 10:54, 5 April 2024 (UTC)
thread_title: Shared libraries and static variable

message: Historically, libraries have been used to store a wide variety of objects, e.g., documentation, source code, test data. This is still common on, e.g., IBM mainframes. Shmuel (Seymour J.) Metz Username:Chatul (talk) 19:31, 16 August 2010 (UTC)
replies: text: I'm talking about an operational entity rather than one used for backup or transport, e.g., a partitioned data set (PDS) in OS/360 and successors. Shmuel (Seymour J.) Metz Username:Chatul (talk) 13:13, 28 June 2012 (UTC)
replies: text: I'm not sure what you're referring to when you say "one used for backup or transport", but ar is an operational entity, not one used for backup or transport.  You might be thinking of tar, which is used for backup and transport; ar is used to construct "static" libraries on UN*Xes (and, I think, dynamic libraries on AIX), so it might be what you're describing as an "operational entity". Guy Harris (talk) 15:31, 28 June 2012 (UTC)

text: Anyhow, I’d support moving this article to something like Library (software) (apparently renamed away from that in 2003) or Program library, unless the topic is extended to cover these more general libraries. Vadmium (talk) 03:19, 24 August 2011 (UTC)
replies: text: I've updated the introduction to reflect that and removed the  tag. Shmuel (Seymour J.) Metz Username:Chatul (talk) 13:13, 28 June 2012 (UTC)
thread_title: The definition is for a narrow subset

message: “A fundamental flaw of Microsoft Windows is that it can only link in a library at loadtime, before the process starts executing; others can wait until after the process has started to execute and link in the library just when it is actually referenced (i.e., at runtime).”
Microsoft added delayed loading of statically linked libraries in VC++ 6.0 ; (which is more than 10 years ago) note that this was an addition to VC++ and not to the windows kernel, which indicates that this "fundamental flaw" probably has never existed, and is speculation at best.
If Microsoft Windows did in fact not support linking a library at runtime, I'd like to see a reference or citation.
84.48.103.151 (talk) 17:45, 20 December 2010 (UTC)
replies: text: The LoadLibrary call was possibly introduced with Win 3.0 beta, so more than 20 years ago.  Therefore, the quoted statement is false.  I would remove that sentence from the main article.  —Preceding unsigned comment added by 99.91.182.150 (talk) 21:15, 2 February 2011 (UTC)
replies: text: There's automatic loading of a library when the first reference to a routine in that library is made, rather than loading it at startup time, and there's programmatic loading of a dynamically-loadable module by an explicit call.  I think the statement about the "fundamental flaw" is referring to the former; LoadLibrary(), dlopen(), and company are the latter.  The cited reference in 84.48.103.151's comment appears to be referring to the former (although it speaks of "static linking" in a way that can be confusing to those coming from UNIX, where "static linking" means linking with a non-dynamic version of a library - for those coming from Windows, think linking with a .lib rather than a .dll).  In any case, the first reference seems to indicate to me that the quoted statement has been false dating back at least as far as VC++ 6.0).  (As for "VC++ vs. the Windows kernel", that's another thing confusing to those coming from UNIX - in most UNIX systems, the C library and C startup code are part of the OS, not the compiler - the compiler is often a bundled part of the OS, but even when it's not, the libraries are - but it might be that the C startup/C library code does the dynamic loading of libraries in Windows, or can handle at least the loading of libraries after startup time, so that might've been done by changing the C startup and library code.)  In any case, I'll remove the statement. Guy Harris (talk) 22:47, 2 February 2011 (UTC)
thread_title:  Dynamic Linking 

message: The static library article discusses libraries that, when linked with a program, have modules from the library copied into the executable image of the program.  The "static libraries" section mostly discusses that process.
There were, in System V Release 3, a form of shared library that, as I remember, was not as dynamic as the SunOS 4.0 shared library mechanism from which the System V Release 4 shared library mechanism, as used by SVR4 derivatives such as Solaris as well as Linux distributions and BSD systems that adopted the ELF executable image format.  I think Linux had a shared-library mechanism before the adoption of the SVR4 shared library mechanism; I don't know how dynamic it was.
My memories of this, from when I was at Sun and Sun and AT&T were engaged in the discussions that led to SVR4, are a bit faded; I can try digging up information about the SVR3 shared library mechanism, but if anybody's memories are better than mine, if they could contribute, that might be nice. Guy Harris (talk) 21:00, 23 August 2011 (UTC)
thread_title:  "Static libraries" vs. "statically-linked shared libraries" 

message: "a library is a collection of implementations of behavior, written in terms of a language, that has a well-defined interface by which the behavior is invoked"
What the hell kind of opening sentence is that? It doesn't tell me at all what a computer library is.  — Preceding unsigned comment added by 169.139.19.173 (talk) 22:08, 14 August 2013 (UTC)
replies: text: Your comment is off-putting. Please be more civil. IOW no swearing please. Thanks. Stevebroshar (talk) 10:50, 5 April 2024 (UTC)
thread_title:  Behavior in a language that is invoked by behavior of whaaaa? 

message: Hello fellow Wikipedians,
I have just modified 2 external links on Library (computing). Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
*Added archive https://web.archive.org/web/20050313025901/http://www.csa.iisc.ernet.in/resources/documentation/hypertext/bfd/bfd_toc.html to http://www.csa.iisc.ernet.in/resources/documentation/hypertext/bfd/bfd_toc.html
*Added archive https://web.archive.org/web/20060618065018/http://lcsd.cs.tamu.edu/2006/ to http://lcsd.cs.tamu.edu/2006/
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
Cheers.—InternetArchiveBot (Report bug) 08:55, 15 May 2017 (UTC)
thread_title:  External links modified 

message: I find this page somewhat forbidding (IBM OS/360? in the lead???) and a bit of a hairball. 
For my personal wiki, I created a subpage "Linkable code library" for the portions of this page which relates to program linkage concerns (presently with subtopics static library and dynamic-link library). 
That probably doesn't work here, but it sure makes my own wiki nicer than this one. :-) — MaxEnt 18:47, 13 September 2017 (UTC)
replies: text: Use of hairball is confusing. Must mean something to you, but not me. Please be less colorful and more clear. Thanks. ... I too think the IBM 360 sentence does not belong in the lead. Question: Why didn't you move it yourself? IMO you are complaining about something you have control to change. Another question: are there other things you find forbidding? Or just that one? ... I do not understand the point you are trying to make about your personal wiki. Please explain. Stevebroshar (talk) 10:48, 5 April 2024 (UTC)
thread_title:  A bit of a hairball 

message: is a detailed example of how to build a shared library on some operating systems, oriented towards ELF-based systems and, in particular, Linux systems.  It doesn't apply to non-ELF-based UNIXes (macOS and AIX), it assumes use of gcc, and it assumes a requirement for running ldconfig to update the shared library cache, which I think may not have been necessary in some if not all versions of Solaris.
On top of that, it appears to read like "a "how-to" style" item, to use the description of what doesn't belong in Wikipedia from WP:NOTHOWTO.
So, while it might be a useful tutorial, I don't see it as being worthy of inclusion on Wikipedia (which is not intended to be a collection of all useful information of all types (as per the existence of Wikipedia:What Wikipedia is not). Guy Harris (talk) 21:12, 22 July 2023 (UTC)
replies: text: Thanks. I am removing the changes I added. Wikieditor 2027 (talk) 21:25, 22 July 2023 (UTC)
thread_title:  Creation and Execution of Shared Library in Linux/Unix - [[WP:NOTHOWTO]]? 

message: When I see the diffs someone has removed quite a large amount of content from this article.
Is this intentional? Wikieditor 2027 (talk) 07:08, 29 July 2023 (UTC)
replies: text: If you remove the "re" from "removed", the remaining word tells you what happened to that content.  Note that the first edit of the sequence of edits you saw has the edit summary "Material WP:SPLIT to Shared library".  Having read that, you might want to look at Shared library. Guy Harris (talk) 07:48, 29 July 2023 (UTC)
thread_title:  Did some content of this article get removed? 

message: Some recent changes to this history section about verb tense got me to read the section carefully. It did have a mix of verb tense. But even with the latest changes it still does. I see the challenge with historical info. Does Simula have classes or did it have classes? IDK, but I do think that consistent is better; easier to read.
but ... the paragraph about Simula seems off topic for the most part. Seems to be a primer on Simula. What does "its classes are nearly identical to the modern concept as used in Java, C++, and C#" have to do with libraries? I think this paragraph needs a total re-write. I think the interesting and on-topic idea is that classes could be included in a library as soon as the concept of class was realized in a language. Stevebroshar (talk) 12:50, 7 April 2024 (UTC)
thread_title:  History verb tense and focus