68 karma · joined March 8, 2015
I've had to deal with the problems of EINTR for so long. SA_RESTART seems nice, but you can't rely on it, and it only begins to scratch the surface of what would actually be "better".
How about you can call anything in a signal handler?
How about any code, user or kernel, be safely re-entered?
Of course you can't magically solve every concurrency and resource contention problem, but having functional style, and things like unwind-protect, language support for safety, etc. goes a surprisingly long way.
How about you can have arbitrarily many signal handlers for any condition and have arbitrarily many places to continue on the stack, which can receive arbitrary data?
How about I can call a system call from inside a signal handler, from inside the debugger, from inside a signal handler, inside a system call, and pop up a UI to ask the user what they want?
How about every piece of code can be moved around and called from anywhere?
How about you can pass around an objects that can resume a function or a system call in the middle?
How about the thing reading trashy network packets doesn't have absolute power, while my user process doesn't have permission to close the lid or play audio?
Not just Lisp code, but a large fraction of modern languages that have things like GC and bignums, have to make sure it's safe to do anything, even in the middle of adding a number. So why can't we have these things that have been well known for over 40 years? But I'm sure you're familiar with the relatively small set of crews that designed most the stuff we use. vmlinux, kernel32.dll, and even shabby xnu, might be cute, like the jerq is a cute joke on the perq, if we didn't have to actually rely on them for real stuff.
Unfortunately, it's not hard to see that the worse-is-better culture is a result of larger human culture, which is pushed around by the same typical things. But the good thing is that culture being intangible, it only takes the mostly mental acts of skepticism, education, and personal communication, to change it.
It's also surprising that the first version of bash committed source code suicide via a bug in globbing, which makes it's name seem more poignant, and was why there was a file named "-i" in it's source tree for many years.
http://www.lispworks.com/documentation/HyperSpec/Body/f_cerr...
http://www.lispworks.com/documentation/HyperSpec/Body/m_rst_...
(Please keep in mind, most or all the words following are incorrect, in a way reminiscent of recounting the history of earth by saying: "A fish walked out of the water and became the emperor of China.")
We can imagine our local universe is a thing like a multidimensional boiling bubble. It recursively sub-divides itself, which makes it interesting, and also creates space-time. The start of our local universe's time is the so-called "big bang", which is when it started this wild and lovely fractal. After a little bit there was enough complexity to implement something like the physics we can observe now.
It turns out, a lovely universe can be created from just recursive subdivision. We're smart enough now that we've defined computability in terms of this, for example S K combinitors, etc. Math and physics will eventually catch on. (The astute reader will notice there are things we can imagine, that are uncomputable, math that is un-representable, and physics that won't work with this system. Which isn't really a problem yet.) Thankfully, this configuration happens to be very interesting.
But wait. How did time start? Well, um, it didn't. What we note as time is the constant, change (adding new nodes), expansion, and complexification of recursive subdivision, which happens in units of the "things" dividing, which is like the quantization that we observe in time, matter, and energy. It's "frequency" is also somewhat dependent on it's local environment, since it's "pulled on" by what attached and intertwined with, exhibiting the relativistic effects of gravity and motion.
Perhaps you've heard of the universe described as the three dimensional surface of a four dimensional sphere. But what's inside that sphere? Actually it's the past. Sitting there right now, for real, probably just as it was, fully connected. Of course we're zooming away from it a varying rates, but pretty fast, with the "force" of the universal expansion behind it.
So if the past is actually sitting right there, not that far away from us, we could just go to it right? Well, maybe. It would take a lot of "energy", and stretch the "universal surface" out of whack. But perhaps one could. But what about those paradoxes? Date your mom and your hand starts fading away? Accidentally kill your grandpa and poof out of existence, or not? Well, thankfully those paradoxes can't happen, because even if you're altering the physical past, you still lived through the past you lived through. The altered future that it creates will be "forever" behind your present. Another way to think about it is: any time you effect the past of this universe, it pushes it slightly in the direction of another dimension, in which there is a whole "copy" (or copy-on-write) of the universe with just that thing altered (so far).
This still doesn't answer why we don't bump into a lot of time travelers. Are we doing this the first time through? Or is it just really expensive, boring and useless to muck about in the past? Or are none of neighbors from the universes next door interested? This presupposes that you can re-run through the time dimension. Only at the edge are we "moving", or are new nodes being added. You would have to fork a whole other universe starting at that time slice, which is probably unfeasible unless you have "massive" extra-"universal" compute power. Is it really that important? Especially given that due to the fractal nature of nature, you can fork another sub-universe in this universe! Much easier. Or even better, just take the tiny part you want and copy and paste. Done. Or just get it right the first time. Come on now people.
Of course the future doesn't exist. Which makes it fun when we can seem to predict it using such things as Newton's old equations, and speculative execution.
(defparameter *comments* nil)
(defun comment-saver (stream char)
(declare (ignore char))
(push
(list
*load-pathname*
(stream-file-position stream)
(with-output-to-string (str)
(loop :with c :while (char/= #\newline (setf c (read-char stream)))
:do (write-char c str))))
*comments*)
(values))
(set-macro-character #\; #'comment-saver)
With apologies for boring the non-Lisp infatuated. (defun button-bar (name)
(let ((i 0))
(with-html-output (*page*)
(:div
(do-query (button-name)
(select [button-name]
:from [tools]
:where [= [bar] name])
(htm (:button
(format nil "~@r. ~a" (incf i) button-name))))))))Those of you complaining about RMS's curmudgeonly demeanor, perhaps you would rather be using Apple iEmacs™ and “Microsoft Visual Emacs 2013”, with about the same freedom as you have with macOS / iOS, Android, TiVo, etc., which would play about as well together as ntfs on mac and hfs+ on linux? (or maybe that alternate universe would be Google Mosaic on FranklinOS?). While you're at it, you should thank the couterpointedly curmudgeonly jwz that Emacs is not tty only, and you have at least one viable non-corporate(-ish) browser choice.
Or you could just run emacs in your iTerm. Or you could get all the big software pimps (Apple, Microsoft, Google, Adobe, and maybe the W3C) to agree on a good (please not bitmaped) format, then patch Freetype, again. But I really hope it's already being worked on? I'm sure Emacs will work with it then.