oecumena
Re:The $LANG Programming Language
on Wednesday January 14, 2026 @03:42PM (#46622977)
'The Lobster Programming Language (strlen.com)' is duplicated.
C++: zero-cost static initialization
Re:
on Wednesday April 23, 2025 @10:11AM (#43772465)
Analytical series for data types.
Re:
on Wednesday February 26, 2025 @10:57AM (#43184852)
Manual derivation of Hoare-triples for the long division algorithm verification.
Re:C Is Turing Complete
on Saturday August 03, 2024 @01:10AM (#41144803)
Still won't work. The Standard explicitly specifies that FILE type includes all stream attributes, including position indicator:
ISO/IEC 9899:TC3 7.19.1
FILE
which is an object type capable of recording all the information needed to control a
stream, including its file position indicator, a pointer to its associated buffer (if any), an
error indicator that records whether a read/write error has occurred, and an end-of-file
indicator that records whether the end of the file has been reached;
Hence no stream can be longer than 2^(sizeof(FILE)*CHAR_BIT) (6.2.6.1 guarantees that objects of any type cannot have "hidden" bits of state not accounted by sizeof()).
Re:C Is Turing Complete
on Friday August 02, 2024 @10:22AM (#41139016)
Sizes of stdio FILE streams are still limited, because of ftell: the standard requires that file position (as measured from the beginning of the file) is representable as long or off_t.
You can advance an argument that even though each stream is limited, you can have an infinite number of streams, but this does not work, because stream name is a string, and there is only finite number of possible strings and the standard library does not contain chdir().
Re:`find` + `mkdir` is Turing complete
on Wednesday July 31, 2024 @09:35AM (#41119036)
For any C program there is a number N, that depends on the program, compiler, architecture, etc., but does not depend on the program input, such that the program won't be able to access more than N bits of state at any moment in any of its possible executions. Hence, the program is equivalent to a finite state automaton.
Re:`find` + `mkdir` is Turing complete
on Wednesday July 31, 2024 @09:31AM (#41119023)
C is definitely not Turing complete. The standard library provides no escape, because file sizes are also limited (due to ftell (3)), and there is no chdir in the C standard library, so the total number of files is also limited. I have a recollection of an attempt to construct a possible Turing-complete interpretation of the C standard involving recursion and va_arg, but I don't think it went anywhere.
Re:"Doors" in Solaris: Lightweight RPC Using File Descriptors (1996)
on Wednesday July 24, 2024 @10:43AM (#41057612)
I did another one back in 2001: https://ldoor.sourceforge.net/ .
Don't lose your file (descriptors): escrow library
Re:Don't lose your file (descriptors): escrow library
on Monday April 15, 2024 @08:00AM (#40039373)
File descriptor escrow library: provides an interface to send process file descriptors to a separate process ("escrow daemon", "escrowd"). The descriptors can be retrieved later by the sender or another process.
Re:Archaeologists Uncover 9,500-Year-Old Woven Baskets and Europe’s Ol...
on Wednesday October 04, 2023 @06:22PM (#37772615)
So that's where I put them!
Re:The End of Matter (1906) by Henri Poincaré
on Tuesday April 04, 2023 @11:52AM (#35441588)
What is really funny is that eventually our understanding circled back and now the rest mass of particles is attributed to their interaction with the Higgs field, by effectively the same basic mechanism that Poincare-Lorentz-Abraham invented.
Re:How We Knew Space Was a Vacuum
on Monday March 13, 2023 @12:52AM (#35131239)
Newton explicitly checks in Principia that the orbital parameters of the moons of Jupiter are consistent with the "empty space" hypothesis.
Re:An Implementation of the Solaris Doors API for Linux (1998) [pdf]
on Tuesday January 31, 2023 @06:31PM (#34603933)
I agree that the direct hand-off that Solaris shuttles provide is more efficient than general wakeup, but it is less efficient than switching MM context of the client thread. The latter results in twice fewer threads, twice fewer scheduler lock acquisitions, etc. Note that for the kernel-level door servers, Solaris does not use server threads, it directly calls the server entry point function.
Re:An Implementation of the Solaris Doors API for Linux (1998) [pdf]
on Tuesday January 31, 2023 @02:26AM (#34592315)
Original Solaris doors use server thread pools: https://github.com/illumos/illumos-gate/blob/master/usr/src/...
Re:An Implementation of the Solaris Doors API for Linux (1998) [pdf]
on Sunday January 29, 2023 @10:22PM (#34575443)
I made a similar doors api implementation for Linux in 2001 (https://ldoor.sourceforge.net/). It eliminated the cost of having a thread pool and context switches by re-using client thread and replacing its MM context with the server context, so that the thread magically finds itself within another process.
Re:
on Friday October 07, 2022 @07:08PM (#33128068)
A simple experimental implementation of coroutines alternative to well-known "stackless" and "stackful" methods.
Re:3-Lisp: an infinite tower of meta-circular interpreters
on Wednesday August 24, 2022 @12:13PM (#32581469)
A 3-lisp program is executed by an interpreter written in 3-lisp that is itself executed by an interpreter written in 3-lisp and so on ad infinitum.
3-Lisp: an infinite tower of meta-circular interpreters
Re:Treadmill garbage collector by H. Baker
on Tuesday July 26, 2022 @11:09AM (#32239416)
If there are no pointers from "old" to "new" objects, then there are no cycles and (compiler-assisted) reference counting will handle it.
Re:Treadmill garbage collector by H. Baker
on Tuesday July 26, 2022 @02:14AM (#32234928)
Variable size objects are addressed at the very end of the post: "Support for variable-sized objects requires a separate cyclic list for each size...".
Re:Treadmill garbage collector by H. Baker
on Tuesday July 26, 2022 @12:04AM (#32234123)
That's true, the worst case is bad. But if mutator locality of reference is reasonable, the scanner will preserve it. After all, Baker rejected his earlier copying design for a reason.
Re:Treadmill garbage collector by H. Baker
on Monday July 25, 2022 @11:52PM (#32234059)
I guess it is not more widely used, because more complex generational collectors are often more efficient.
Re:Treadmill garbage collector by H. Baker
on Monday July 25, 2022 @11:49PM (#32234038)
The Scheme-79 chip (https://dspace.mit.edu/handle/1721.1/6334) was doing GC in microcode. According to Steel & Sussman it typically spent 80% of time collecting. :-) RMS invented "phantom stacks" to reduce the amount of garbage due to closures, not sure this was ever implemented anywhere.
Re:Treadmill garbage collector by H. Baker
on Monday July 25, 2022 @11:44PM (#32234010)
Double-linked list (Baker calls it "Knuth's double-linked list") allows O(1) insertions and deletions (hence moving) without actually moving objects and without additional indirection. Each object has a header that contains pointers to the next and previous objects in the list. To remove obj from the list do { obj->next->prev, obj->prev->next = obj->prev, obj->next } (I use "parallel assignment" for simplicity), similarly for insertion, see https://en.wikipedia.org/wiki/Doubly_linked_list . So the circles in the diagram are not actual address space (in the sense that object addresses are not increasing monotonically as you go clockwise), but there is no additional indirection because the header with the forward and backward pointers is part of the object.
Re:Treadmill garbage collector by H. Baker
on Monday July 25, 2022 @10:13PM (#32233473)
Treadmill is a "real-time" in-place garbage collection algorithm designed by H. Baker. It is simple, elegant, efficient and surprisingly little known.