It seems corona-chan has finally taken my body. I felt like
death for two days, but now if I were to complain it would
basically just be whinging. I understand there are many
regional variants and different personal situations. For
those two days though, I slept fitfully and was a bit
delerious. I only developed a bit of phlegm now that I am
basically better (I have sequestered myself to protect
others to the extent possible).
But! Enough about me. I feel like it's been a while since I
just made a long sequence of posts that are just me reading
nm03's phloging.
By the way, nm03 (doubtless also reading my phlog), given
the systematic layout of your phlog I thought it might be
interesting if you added a gopher cgi to search particular
time ranges or something. The web link on peteyboy's phlog
saying that it's ecumenically forbidden seems to be dead to
me. I do recall that /ftp/pub/gopher-tutorial.txt seemed out
of date, and what helped me a lot was
gopher://sdf.org/0/users/yargo/scripts/chag.sh
The current post as of me writing talks about how GNU-cobol
produces C, and what that means viz compilation. As I
attempted to write this post in my corona-delerium I
realised it is a modestly subtle topic. I will make a
follow-up part ii post tomorrow-ish.
What follows is some trivial disassembly from different lisp
compilers specifically under 'compile and not 'compile-file,
which do different things in lisp. I'm going to take a rest.
$ ecl
> (ext:install-bytecodes-compiler)
> (disassemble (lambda () (print 'foo)))
Name: NIL
0 NOMORE
1 PUSH 'FOO
3 CALLG 1,PRINT
6 EXIT
> (ext:install-c-compiler)
(disassemble (lambda () (print 'foo)))
/* function definition for GAZONK */
/* optimize speed 3, debug 0, space 0, safety 2 */
static cl_object L1c__gazonk()
{
cl_object env0 = ECL_NIL;
const cl_env_ptr cl_env_copy = ecl_process_env();
cl_object value0;
ecl_cs_check(cl_env_copy,value0);
{
TTL:
value0 = ecl_print(VV[1],ECL_NIL);
cl_env_copy->nvalues = 1;
return value0;
}
}
But sbcl does not go via C:
* (disassemble (lambda () (print 'foo)))
; disassembly for (lambda ())
; I elided some stuff/memory addresses.
; MOV RAX, [R13+16]
; MOV [RBP-8], RAX
; MOV RDX, [RIP-67] ; 'FOO
; MOV ECX, 2
; PUSH QWORD PTR [RBP+8]
; MOV EAX, #x.. ; #<FDEFN PRINT>
; JMP RAX
; INT3 16 ; trap