Perl: the Markov chain saw | |
PerlMonks |
perl 2.01 on Cygwinby rje (Deacon) |
on Mar 26, 2019 at 23:02 UTC ( [id://1231721]=CUFP: print w/replies, xml ) | Need Help?? |
Even though I haven't programmed in C for a long time, I could get Perl2 compiled and running (a 387k binary!) in just a couple hours this afternoon on Cygwin. .Can I throw out the in-house malloc and other hand-rolled memory management code? What else can I do away with? How about all of the variant hardware #defines Larry had to make? Can't I simplify the code by aiming for one modern OS (Linux?) and Dockerizing it? And how about all that K&R C? Boy does that take me back... Can I shrink the binary by modernizing the code?
I needed GCC, make, and byacc (softlinked to 'yacc'). Then, I had to make a few edits: 1. stab.c: commented out extern errno and replaced it with: int errno; 2. perl.h: commented out the #ifdef that declared sprintf(). 3. perl.h: commented out the declaration of times(). 4. perly.c: I changed the -v message to look more Perl-like. I might have made two earlier edits, but they were along the same lines of removing conflicting or redundant declarations. And now, as a reward, I've got perl 2 running on Cygwin on my laptop! I have to say, it was worth the effort! Onward to hack!
Back to
Cool Uses for Perl
|
|