💾 Archived View for blitter.com › apl-books › apl.maxhost.org › README.txt captured on 2024-05-10 at 11:32:21.
⬅️ Previous capture (2022-07-16)
-=-=-=-=-=-=-
> I think all of us have been looking for the source code for "YALE APL" since it > came out long ago. I seem to have stumbled upon it just a few days back. > Check out - > https://archive.org/details/UnixV6WithApl.tar This file is a tape archive of four Dec RK05 disk image files. Although you can open this tar file with Winzip or one of those, what is interesting are the contents of the individual disk image files tucked away inside, named RK0 through RK3. As far as I know, there is no commonly available utility which will "unzip" the contents of the image files inside. However, that is not hard to do. There are copies of APL\11 C code in RK0 and RK3, I only looked at RK0. To extricate the files, try the following using your favourite APL: 1. Download and unzip the above file and store the files in a directory on your hard disk. I am using Windoze today and stored mine in d:\unix 2. Prepare a destination directory for APL\11, I used d:\apl11 3. In APL, define the following functions. I used Dyalog APL. ∇ me save rows;⎕IO;t;dir [1] ⎕IO←0 [2] dir←'d:\apl11\' [3] t←,' ',RK0[rows;] [4] t←t~⎕AV[0] ⍝ get rid of padding [5] ⍝ ((t=⎕TC[2])/t)←⎕TC[1] ⍝ apl char vector edit friendly [6] t←(t,(t+.=⎕TC[2])⍴⎕TC[1])[⍋(⍳⍴t),¯1+(t=⎕TC[2])/⍳⍴t] ⍝ cr, lf [7] t←(t,(3×t+.=⎕AV[9])⍴' ')[⍋(⍳⍴t),3/(t=⎕AV[9])/⍳⍴t] ⍝ tabs -> 3 spaces [8] t←t~⎕AV[9] ⍝ get rid of excess tabs [9] (dir,me)⎕NCREATE ¯42 [10] t ⎕NAPPEND ¯42 [11] ⎕NUNTIE ¯42 ∇ ∇ apl11;⎕IO [1] ⎕IO←0 [2] 'a0.c'save 3170 3173 3176 3179 3182 3185 3188 3191 3195 3198 3201 3204 3207 3210 3213 3193 3196 3199 [3] 'a1.c'save 3202 3205 3208 3211 3214 3194 3197 3200 3206 3209 [4] 'a2.c'save 3212 3215 3216 3219 3222 [5] 'a3.c'save 3225 3228 [6] 'a4.c'save 3231 3234 3237 3217 3220 [7] 'a5.c'save 3223 3226 3229 3232 [8] 'a6.c'save 3235 3238 3218 [9] 'a7.c'save 3221 3224 3227 3230 [10] 'a8.c'save 3233 3236 3239 3240 3243 3246 3249 3252 3258 [11] 'a9.c'save 3261 3241 3244 [12] 'aa.c'save 3138 3116 3119 3120 [13] 'ab.c'save 3123 3126 3129 3132 3135 [14] 'ac.c'save 3141 3121 [15] 'ad.c'save 3124 3127 3130 3133 [16] 'ae.c'save 3136 3139 [17] 'af.c'save 3142 3122 [18] 'ag.c'save 3125 3128 [19] 'ah.c'save 3131 3134 3137 3140 [20] 'ai.c'save 3143 3144 3147 3150 3153 3156 3159 [21] 'aj.c'save 3162 3165 3145 3148 3151 3154 [22] 'ak.c'save 3157 3160 3163 3166 [23] 'al.c'save 3146 3149 3152 3155 3158 3161 3164 [24] 'an.c'save 3167 [25] 'ao.c'save 3168 3171 3174 3177 3180 3183 3186 3189 3172 3175 [26] 'aq.c'save 3264 3267 3270 [27] 'aw.c'save 3273 3276 3279 3282 3285 3265 [28] 'ax.s'save 3268 [29] 'apl.h'save 3178 3181 3184 3187 3190 3247 3250 [30] 'apl.y'save 3253 3256 3259 3262 3242 3245 3248 3251 3257 3260 3263 [31] 'lex.c'save 3271 3274 3277 3280 3283 3286 3266 [32] 'tab.c'save 3275 3278 3281 3284 3287 3288 [33] 'y.tab.c'save 3292 3291 3294 3297 3300 3303 3306 3309 3295 3298 3301 3304 3307 3310 3290 3293 3296 3299 3302 [34] 'install'save 3272 ∇ This version produces a notepad-friendly text file for Windows. []av[0] are nulls (padding) while []av[9] are tabs. My []ml is 3 and []io is 0. 4. Read the RK0 text file in, then reshape it by 512 byte blocks. Be sure you end up with 4090 blocks. You should be able to browse the file contents in APL. 'd:\unix\RK0' ⎕ntie ¯13 RK0←⎕nread ¯13 82,⎕nsize ¯13 ⎕nuntie ¯13 ⍝ check its size ⍴RK0 2094080 ⍝ number of blocks (⍴RK0)÷512 4090 ⍝ reshape accordingly RK0←4090 512⍴RK0 ⍝ final shape ⍴RK0 4090 512 5. Run apl11, you should have your directory populated with the files. Last and certainly least, this code is around 40 years old and is a good example of C anthropology and computing history. Your C compiler will let you know what it thinks. I haven't attempted to compile it yet. As an interpreter, it is fairly rudimentary and reflects a version of APL somewhere around APL\360, though there are scans and domino. It's a good first project, I would probably eventually move it to D. Personally, I'm interested in the yacc usage here (apl.y, yacc generated C code in y.tab.c).