[HN Gopher] Your First THINK C Program
       ___________________________________________________________________
        
       Your First THINK C Program
        
       Author : vermilingua
       Score  : 69 points
       Date   : 2020-03-23 03:04 UTC (3 days ago)
        
 (HTM) web link (beyondloom.com)
 (TXT) w3m dump (beyondloom.com)
        
       | buserror wrote:
       | THINK C was the straight successor of Lightspeed C, and I came
       | from there, and before that from Turbo/TML Pascal on the IIgs.
       | 
       | Whatever people will say, I still miss these "one pass"
       | compilers, they were amazing and peaked with CodeWarrior, the
       | best development suite, ever, in my nearly 40 years experience.
       | 
       | Nowadays we see autoshit "configure" stuff and compilers like gcc
       | (some) or clang (oh my frigging GOD!!) trawl their way slowly and
       | painfully thru the most simple projects without even support for
       | plain basic stuff like automatic precompiled headers.
       | 
       | Wow look, we've NEARLY got Link Time Optimization working (took
       | decades), in 2020 whoohoo, I'm so delighted. I could compile
       | _hundred of thousands_ of lines of light C++ or (better) plain C
       | 25 years ago on a much, MUCH slower machine, with an simple
       | editor that used the compiler lexer output so you had
       | highlighting, real indexing it was  'just there' and always
       | right, and always blinding fast.
       | 
       | I'm pretty sure we are way worse than we were 20 years ago for
       | tooling. I'm sure some people will disagree, these people haven't
       | seen CodeWarrior chew thru hundreds and hundreds of files in
       | seconds.
        
         | destitude wrote:
         | My CodeWarrior T-shirt looks pretty ratty now.. Think Pascal
         | was just as amazing.
        
         | setpatchaddress wrote:
         | I'll do you one better and say that CodeWarrior 1.x was the
         | high water mark. 2.0 and later were slower.
         | 
         | Xcode is not bad now, though, and I think I'd miss the
         | extremely robust autocomplete.
        
       | ur-whale wrote:
       | cfg/CNFGRAPI.h:10:9: fatal error: Cocoa/Cocoa.h: No such file or
       | directory
       | 
       | also:
       | 
       | ./setup_t -t xl64 >setup.sh Unknown value for -t
       | 
       | attention to details indeed.
       | 
       | [edit]: I assume this'll only work on a Mac. Too bad, looked fun.
        
         | duskwuff wrote:
         | "lx64", not "xl64". (Article has this wrong, but documentation
         | sets it right.)
        
         | jchw wrote:
         | I haven't tried it but the bottom portion of the article seems
         | to suggest you need some slight tweaks depending on your host
         | OS, Linux apparently should work fine.
        
           | skocznymroczny wrote:
           | Unfortunately this is something I see with many articles or
           | open source projects. The building instructions are only for
           | Linux (usually apt-get some packages and run configure/make).
           | For Windows? Good luck, at most you'll get some nasty MSYS
           | setup to follow.
        
             | qayxc wrote:
             | WSL should solve that handily.
             | 
             | I use it daily and test and compile my programs on both
             | Windows and Linux.
             | 
             | On the other hand I also stay away from projects that don't
             | use cross-platform build-systems like Ninja, or CMake.
             | Shell scripts are sometimes incompatible even between
             | different distributions and shells.
             | 
             | The worst offender (that I know of) by far is GNU Octave.
             | On Windows they basically ship a snapshot of a Linux dev
             | box (complete with the whole directory tree, compiler suite
             | and everything) with userland binaries compiled for
             | Windows. So much for being "cross-platform"...
        
       | fmajid wrote:
       | My first Think C program reformatted my entire drive, requiring a
       | full reinstall...
       | 
       | There are benefits to modern operating systems with memory
       | protection.
        
       | kick wrote:
       | This is an amazing post for a _bunch_ of reasons (as soon as I
       | finished reading it a few days ago, I immediately sent it to half
       | a dozen people), but one that should immediately jump out for you
       | is that the picture of the Mac Plus is dithered using Bill
       | Atkinson 's dithering algorithm. Atkinson's done a bunch of
       | really awesome things, but most notably, he played probably the
       | biggest role in the genesis of the Macintosh.
       | 
       | Very few posts on the WWW have the same attention to detail and
       | wonderful playfulness as this one. It's an incredibly rare thing,
       | and insanely pleasant to read.
        
         | EdwardDiego wrote:
         | >the picture of the Mac Plus is dithered using Bill Atkinson's
         | dithering algorithm.
         | 
         | That explains how that it had that classic Macintosh feel.
         | Thanks!
        
           | kick wrote:
           | Glad to share what I know!
        
             | homarp wrote:
             | http://gazs.github.io/canvas-atkinson-dither/ lets you
             | dither any picture
        
         | jdiez17 wrote:
         | The mystical style mixed with computing subjects reminded me
         | very much of aphyr's excellent "technical interview" series,
         | which I very much recommend if you enjoyed the OP:
         | 
         | https://aphyr.com/posts/340-reversing-the-technical-intervie...
         | 
         | https://aphyr.com/posts/341-hexing-the-technical-interview
         | 
         | https://aphyr.com/posts/342-typing-the-technical-interview
        
         | bangonkeyboard wrote:
         | Relatedly, if you're reading the page on a high-DPI screen and
         | wondering why the pictures are so dark and blurry, try opening
         | your browser's JS console and running this:                 doc
         | ument.head.appendChild(document.createElement('style')).sheet.i
         | nsertRule('img:not(:hover) { image-rendering: crisp-edges
         | !important; }', 0)
         | 
         | Line/pixel art especially suffers from the rescaling filters
         | that came with retina displays.
        
         | pmiller2 wrote:
         | Speaking of Bill Atkinson and the Macintosh, here is a great
         | story about him:
         | https://www.folklore.org/StoryView.py?story=Negative_2000_Li...
        
           | kick wrote:
           | Lots of great stories on folklore.org! Highly recommend
           | spending an hour there for anyone bored of the current
           | Valley.
        
             | pmiller2 wrote:
             | And, for anyone who's spent that hour and still wants more,
             | the AMC show _Halt and Catch Fire_ on Netflix is, while not
             | truly historically accurate, very much in the spirit of the
             | early 80 's tech scene.
        
       | slobiwan wrote:
       | Not being an original Macintosh guy I'm having a hard time
       | getting the minivmac to boot directly into System7. I follow the
       | steps but can't figure out what "Copy the donor system folder
       | into our new boot volume, using the familiar drag-and-drop."
       | means. Any clues?
        
       | Koshkin wrote:
       | See also http://jamesfriend.com.au/pce-js/pce-js-apps/.
        
       | pjmlp wrote:
       | Ah, a trip down memory lane.
        
       | yjftsjthsd-h wrote:
       | > If you're specifically using an OLPC, the target should be
       | either lx86 for the XO-1 or larm for any subsequent ARM-based
       | models.
       | 
       | That's oddly specific. Mind, I approve; it's nice to see people
       | trying things on less-common platforms and documenting the way:)
        
       ___________________________________________________________________
       (page generated 2020-03-26 23:00 UTC)