This repository has been archived by the owner on Jul 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
icfp2000-log.html
4978 lines (4978 loc) · 289 KB
/
icfp2000-log.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<HTML>
<HEAD>
<META HTTP-EQUIV="content-type" CONTENT="text/html">
<META NAME="Generator" CONTENT="enCoreXpress/2.1.1">
<META NAME="Description" CONTENT="This page was generated by the Gentleman Loser enCoreXpress/2.1.1 web server on August 29. 2000 at 23:58:08, /et">
<META NAME="Keywords" CONTENT="enCore, enCore Xpress, Gentleman Loser, MOO, CypherText">
<META NAME="Copyright" CONTENT="High Wired enCore and enCore Xpress is Copyright (C) 1997-2000 of enCore Open Source MOO Project. All Rights Reserved.">
<TITLE>idle_chat (Gentleman Loser)</TITLE>
</HEAD>
<BODY BGCOLOR="White" BACKGROUND="" TEXT="Black" LINK="blue" ALINK="red" VLINK="purple">
<FONT FACE="Arial" SIZE="5" COLOR="Black">
idle_chat<BR>
</FONT>
<FONT FACE="Arial" SIZE="3" COLOR="Black">
-- Start log: Saturday, August 26, 2000 2:22:20 am Gentleman Loser time --<BR>
<BR>
Bruce says, "in both cases, you seem to have to stop recording in order to see what's there"<BR>
Bruce says, "i know that corresponds to a real tape recorder, but sometimes you can carry modelling the real world tooo far"<BR>
andreas says, "Yes. But I think the log already exists somewhere out there. Sec..."<BR>
andreas says, "Ok. Since I started the recording, the object is owned by me. When you clock on "edit" in the toolbar, you can list your objects there. There will be an object test_log, which is the one you created. This has a property text with the text."<BR>
andreas teleports idle_chat in.<BR>
andreas says, "Ok, here is the log file I`ve created. Just click on idle_chat to see the text."<BR>
Bruce says, "there's no "edit" in my tool bar"<BR>
andreas says, "Then you have to reconnect. You only get that as a programmer."<BR>
Bruce says, "tap tap .. is this mike live?"<BR>
Bruce says, "aaah .. it *is* live"<BR>
andreas says, "MOOs are by far the most dynamic environments I know."<BR>
Bruce says, "more so than Squeak et al?"<BR>
andreas says, "Yes. MOO comes out of XEROX, just as Smalltalk."<BR>
andreas says, "But in Smalltalk there is no permission system, so you cannot have hundreds of programmers work on the same image."<BR>
igor waves.<BR>
Bruce waves back<BR>
andreas says, "hi igor..."<BR>
Bruce says, "so it's lunchtime Saturday here, Andreas is probably ready for bed in the next hour or so, and igor is the middle of Friday evening..."<BR>
andreas says, "so since you two are awake and I`m going to sleep soon, will anybody of you look into the parser/lexer stuff?"<BR>
Bruce says, "who do we know in India or something :-)"<BR>
Bruce says, "I'm building a generic Dylan app package in the format they want"<BR>
Bruce says, ".. basically a modification of make-dylan-app"<BR>
igor says, "So, can we check our 'contest app' somewhere? I don't think we'll need more than one library..."<BR>
Bruce says, "the parser needed last year was simple enough to hand-code in a couple of hours using recursive descent. The chances are that this year will heva no more difficult a parsing task"<BR>
igor nods.<BR>
Bruce says, "I agree -- one library but possibly several source files"<BR>
igor says, "Probably ad-hoc is our best bet, as anything more than that could end up causing us more trouble than we need..."<BR>
Bruce says, " we may want to be able to explore different avenues, though"<BR>
andreas says, "yes. one library, types only where neccessary for dispatch, nor for speed."<BR>
Bruce says, ".. and we need to be able to rename the project at a late stage :-)"<BR>
igor nods. (or to use the free type checks)<BR>
Bruce says, "types for speed when we get it *working*, and the deadline looms"<BR>
You hear a quiet popping sound; Wizard has disconnected.<BR>
Bruce says, "I also 8very* much doubt that we'll get a task where parser speed is a rate-limiter"<BR>
Bruce says, ".. or even I/O speed in general, so our crappy I/O libs don't matter."<BR>
Bruce says, "basically we should get C-like speed, but without the memory management hassles. Our only downside against some of the languages is pattern matching"<BR>
Bruce says, "we've got awesome macros that we can likely use to good advantage"<BR>
andreas says, "Though the macro system still has bugs. The getopt macros don`t work currently for instance."<BR>
Bruce says, "GFs can be pretty expressive as pattern matchers, but I suspect not too fast compared to some other mechanisms"<BR>
andreas says, "But that won`t stop us to use macros."<BR>
Bruce says, " .. with the curren timplementation at least ... if we had that new Cecil algorithm we'd be pretty sweet there too"<BR>
andreas says, "Ok, I go to bed now."<BR>
andreas waves.<BR>
You hear a quiet popping sound; andreas has disconnected.<BR>
Bruce thinks "in fact, with the Cecil dispatch algorithm, last year's challenge could have been implemented simply as one big GF, and let the compiler optomise it for us!!!!<BR>
Bruce says, "OK, igor, so I'll get a skeleton app checked in (probably while you sleep), and I've also got to get some work out of the way so I'm free for a couple of days"<BR>
Bruce says, "do you have plans?"<BR>
igor plans to get a bunch of work out of the way...<BR>
igor is working on a web site for a client, which actually uses a MOO as the back-end.<BR>
igor says, "Do we have a 'master compile computer'?"<BR>
igor says, "They'd like a statically linked executable, if possible..."<BR>
igor says, "(I imagine we can provide that...)"<BR>
Bruce says, "not yet. Do we need one, as such."<BR>
igor can install a stable GD for the purpose, as he has a 450MHz PIII<BR>
Bruce says, "right -- I'm working on getting the directory layout right, and being able to build a staticly-linked binary as default"<BR>
igor can also create user accounts for the team to work in...<BR>
Bruce says, "actually .. I *always* use statically linked anyway, for speed"<BR>
igor says, "Right."<BR>
igor says, "Does that statically link the clib as well?"<BR>
Bruce has an Athlon 700<BR>
Bruce says, "ummm .. not 1005 positive on that"<BR>
igor nods. You'll be a tad faster, although I have an ATM connection, for reliability.<BR>
igor says, "(though speed for such a trivial program won't matter as much...)"<BR>
igor says, "In any case, I am going to go cuddle with my girlfriend now... I'll perhaps be back a little later."<BR>
igor says, "(Don't expect me to sleep too much tonight anyhow...)"<BR>
Bruce says, "i'm picking that anything we do will have an under-15 second build time -- probably 10 - 11 or so"<BR>
Bruce says, "I'm just off to have a cappuchino with my GF as well :-)"<BR>
Bruce says, "They're using Redhat 6.2 and so am I, so I think we can wing the clib"<BR>
Bruce is AFK<BR>
Bruce tests<BR>
You hear a quiet popping sound; Bruce has disconnected.<BR>
Bruce has connected.<BR>
Bruce is back on Linux instead of MacOS<BR>
Bruce shares a URL...<BR>
<<A HREF="http://www.gwydiondylan.org" TARGET="_blank">http://www.gwydiondylan.org</A>>.<BR>
Bruce pings again<BR>
Bruce pings yet again<BR>
Bruce declares the timeout problem ... gone<BR>
andreas has connected.<BR>
andreas says, "hi folks... I'm awake now, but the weather is fine, so I'll be spending the hours until the challenge is publised in the sun with wife and kid..."<BR>
igor waves.<BR>
igor nods.<BR>
igor has to finish up a bunch of work first...<BR>
igor says, "Oh... Could you @programmer me?"<BR>
You hear a quiet popping sound; andreas has disconnected.<BR>
Wizard has connected.<BR>
igor is now a programmer.<BR>
igor says, "Thanks!"<BR>
Wizard says, "Ok, see you later..."<BR>
Wizard waves.<BR>
igor waves.<BR>
You hear a quiet popping sound; Wizard has disconnected.<BR>
igor drops ICFP Countdown Clock.<BR>
You hear the bips of keyclick, the sliding of mice and the hum of computers in the distance as igor fades slowly out of view, heading towards them.<BR>
There are the light bips of keyclick and the sliding of mice as igor fades into view, shoving itself away from the console, which promptly fades away.<BR>
You hear the bips of keyclick, the sliding of mice and the hum of computers in the distance as igor fades slowly out of view, heading towards them.<BR>
andreas has connected.<BR>
A small swarm of 3x5 index cards blows in and disperses, revealing igor.<BR>
A small swarm of 3x5 index cards arrives, engulfs igor, and carries it away.<BR>
A small swarm of 3x5 index cards blows in and disperses, revealing igor.<BR>
igor waves to andreas.<BR>
igor says, "Look at #178 :-)"<BR>
andreas says, "Nice! One problem: using the Xpress client I see the description in the upper window, and the countdown in the lower window."<BR>
igor scratches his head...<BR>
igor says, "How do multi-line descriptions work around here, then?"<BR>
igor says, "#178:description merely returns a list..."<BR>
andreas says, "I have no clue. The MOO I used to operace came without web interface, I'm new to this web stuff."<BR>
andreas says, "I see. The list has three strings, the middle one is the URL of the object."<BR>
igor says, "Oh well... Until someone with an Xpress client feels like fixing it, people using Xpress clients will have to suck it up :-)"<BR>
igor says, "I'll be back in a few."<BR>
andreas says, "ok, see you later. Maybe I find out how this web stuff is supposed to work in the meantime..."<BR>
You hear a quiet popping sound; igor has disconnected.<BR>
igor has connected.<BR>
Bruce pops in and waves<BR>
igor says, "Yo."<BR>
Bruce says, "gooooooood morning! 0752 here"<BR>
igor grins.<BR>
igor says, "15:55 here..."<BR>
Bruce says, ".. and your countdown clock doesn't work for me. I can "look" at it, but clicking on it doesn't show the time"<BR>
igor [to Bruce]: Then 'look' at it... This is a MOO, therefore I don't care if your pretty little web interface thingy works or not :-)<BR>
Bruce thinks "it's not *my* pretty web interface"<BR>
igor says, "'tis not mine either, I'm using TinyFugue, the One True Client ;-)"<BR>
Bruce says, "I've got a choice between this enCoreXpress thing that Andreas pointed me to, or else telnet. AFAIK, anyway. The only MOOing I've done before is when I've been feeding the calves"<BR>
igor says, "What OS are you using right now?"<BR>
Bruce says, "well, my desk contains one 17" Trinitron attached to RedHat 6.2 and another 17" Trinitron attached to MacOS 8.6. Take your pick."<BR>
Bruce says, "both have Communicator 4.72"<BR>
Bruce says, "right at this very instant I'm using the Linux box"<BR>
igor says, "Well, try <A HREF="http://www.rapscallion.co.uk/" TARGET="_blank">http://www.rapscallion.co.uk/</A> for the Mac"<BR>
igor says, "Or ftp://ftp.tcp.com/pub/mud/Clients/MUDDweller(macintosh).bin.gz, again for the Mac..."<BR>
Bruce downloads the first one<BR>
Bruce yawns. Man, it's been a while since I've seen sunrise on a Sunday morning...<BR>
Bruce 's world becomes suddenly brighter and shadows form<BR>
Bruce says, "do you have a cellphone that does SMS?"<BR>
igor says, "Nope."<BR>
Bruce says, "Andreas and I have exchanged numbers"<BR>
igor doesn't have a cellphone period...<BR>
Bruce uses his for text mesages about 50 times more frequently than he uses it for voice<BR>
Bruce says, "If you happen, for some reason, to want to attract my attention when I don't seem to be responding here or to email, feel free to womble on over to www.mtnsms.com and send a message to +64211104457. I'll usually get it within 5 - 10 seconds."<BR>
igor nods.<BR>
Bruce says, "Andreas is +491777777742""<BR>
igor yays at the Wombles :-)<BR>
igor says, "And, of course, what we've all been waiting for: will the contest info appear at 5pm EDT or 6pm EDT (due to the EST/EDT confusion)"<BR>
Bruce says, "well they gae it in UTC as well"<BR>
Bruce says, "I guess they just refelxively said "EST" when they meant "EDT"."<BR>
igor used the UTC to setup #178<BR>
igor says, "It claims we have 72:37:04 left..."<BR>
Bruce says, "Americans do that to me so often that I just assume they mean the time on their clocks and correct the TZ without even thinking"<BR>
igor nods. In any case, the clock should be timezone-blind<BR>
Bruce says, "then it's only advanced by 37 seconds since I've been online this morning."<BR>
Bruce says, "i *suspect* it's more like 37 minutes"<BR>
igor says, "This server is operating on GMT, prolly because andreas hasn't set /etc/localtime properly..."<BR>
Bruce says, "waitsec ... that's 72 *hours* left."<BR>
igor says, "Yep :-)"<BR>
Bruce says, ".. and it's advanced by 37 minutes, as it should"<BR>
igor didn't feel that the microseconds were all that important...<BR>
igor says, "Besides, we don't get microsecond timings on most MOOs."<BR>
igor's MOO does, though...<BR>
Bruce says, "well, I make it 34 minutes left"<BR>
Bruce says, "33 minutes .... NOW"<BR>
igor grins.<BR>
-----------------------------------igor------------------------------------<BR>
Bruce says, "33 minutes .... NOW"<BR>
l clock<BR>
You see a large Guiness sign on the wall. In the middle, an LED display proclaims:<BR>
72:32:55<BR>
---------------------------------finished----------------------------------<BR>
Bruce says, "ah .. OK, so it's time until the *finish*. that's OK then"<BR>
Bruce is still asleep<BR>
igor says, "Yes."<BR>
igor figured it was of limited use *before* the contest started, and I spent all of about 2 minutes writing it....<BR>
Bruce suspects he'll see the sunrise again 72 hours hence<BR>
Bruce suspects it might be after an all-nighter<BR>
Bruce says, "ok, I'm now on via rapscallion"<BR>
Bruce shares a URL...<BR>
<<A HREF="http://www.gwydiondylan.org" TARGET="_blank">http://www.gwydiondylan.org</A>>.<BR>
igor grins.<BR>
Bruce wondered if it would redirect @URL to netscape or something. It didn't.<BR>
igor says, "We might want to put the fact that we're doing this, a brief statement of the problem and your email address on the home page..."<BR>
Bruce agrees<BR>
Bruce wonders why when he typed :agrees the a was swallowed, apparently as a command, and how to avoid it<BR>
igor says, "Odd..."<BR>
Bruce says, "it said 'sending command to all characters'"<BR>
igor says, "Weird..."<BR>
Bruce says, "so I had to type ': agrees'"<BR>
Bruce act now<BR>
Bruce says, "OK, there was a preference in the app which converted ':a' to send to all, ':?' to send to a particular person etc. I nuked it"<BR>
igor says, "OK, that's pretty weird..."<BR>
igor pokes Andreas.<BR>
A small swarm of 3x5 index cards arrives, engulfs igor, and carries it away.<BR>
There are the light bips of keyclick and the sliding of mice as igor fades into view, shoving itself away from the console, which promptly fades away.<BR>
Bruce says, "do you recall where the web oage source hides?"<BR>
igor hmms.<BR>
Bruce thinks probably easier to wait to Andreas<BR>
igor grins.<BR>
igor says, "Probably."<BR>
Bruce says, "the problem is up!"<BR>
Bruce says, "the problem is up!"ray tracer"<BR>
igor says, "Woo!"<BR>
igor prints a hard copy...<BR>
igor is pretty familiar with the math, etc. involved, which is cool...<BR>
igor drops IFCP TODO List.<BR>
Bruce says, "and Dylan has fast FP"<BR>
Bruce thinks we might want to work with the optimiser-hacking branch to get packed arrays<BR>
igor says, "OK, use 'add "Do something!" to todo to add stuff to the TODO list :-)"<BR>
Bruce says, "just got the emial from the organisers .. 11 minutes late"<BR>
igor says, "the "resources" section looks particularly useful..."<BR>
igor says, "Oh well... No EMK for us..."<BR>
igor says, "Have you sent anything to the icfp2000 list lately?"<BR>
igor says, "i.e., are my filters discarding it, or is it just quiet..."<BR>
Bruce says, "not since 0916 your time"<BR>
Bruce wonders if there's some way we can compile this stuff instead of interpreting it<BR>
Bruce says, "we need a lexer but no parser. ::phew::"<BR>
Bruce knows PostScript pretty well<BR>
igor says, "Cool. I'm not very good with postfix languages..."<BR>
igor says, "I do, however, know a bunch about 3D graphics."<BR>
igor says, "(And I have Foley, Van Dam right here, too)"<BR>
Bruce says, "my Foley and Van Dam is an old one -- (c) 1983"<BR>
Bruce says, "looks like a bug in the function at the bottom of P7"<BR>
Bruce says, "should be 'lst 0 get lst 1 get if-cons apply'"<BR>
Bruce says, "pretty cool language, actually. Basically lambda-based, but with a stack for arg passing. Look at the factorial example on P8. It's crying out for a Y-combinator. And we could make one :-)"<BR>
You hear a quiet popping sound; igor has disconnected.<BR>
igor has connected.<BR>
igor says, "Hello, hello (again...)"<BR>
Bruce says, "hi"<BR>
igor says, "Sorry, I accidently hit the power bar, thus killing my computer :-P"<BR>
igor says, "While it was rebooting, I went and started dinner..."<BR>
igor says, "(and I picked my hardcopy of task.ps up at the printers)"<BR>
Bruce says, "OK, so I guess we need to define a spec for "object" (a scene), and then maybe you get to work on the Ray Tracing part and I get to work on the language part that builds the scene?"<BR>
igor nods.<BR>
igor says, "So a scene is simply a big compound object, then?"<BR>
Bruce says, "how do you feel about implementing the CSG stuff?"<BR>
igor says, "CSG?"<BR>
Bruce says, "yes, a scene is implemented by a bunch of object unions"<BR>
igor hasn't done more than skim the problem yet...<BR>
Bruce says, "constructive solid geometry"<BR>
igor says, "Ah... I should be able to do that..."<BR>
Bruce says, "you part can probably crib a bunch of stuff from POVRay"<BR>
igor says, "This project does not require any reflections, does it?"<BR>
Bruce says, "we need plances and spheres for tier 1, and directional lights (at infinity)."<BR>
Bruce says, "you sure do need to follow the reflections!"<BR>
Bruce says, "see P11"<BR>
igor says, "Well, that's just illumination, though..."<BR>
andreas waves.<BR>
Bruce waves back<BR>
igor says, "You can't make a mirror here, can you?"<BR>
Bruce says, "so what's the S ray for?"<BR>
Bruce says, "What if Ks is 1 and Kd is zero?"<BR>
andreas says, "oh, it's already up for an hour...."<BR>
igor says, "The 'S' ray is related to lighting. The angle between S and L figures into the reflective component of the lighting."<BR>
Bruce says, "an hour and 20 minutes, actually."<BR>
andreas mixes up his timezones from time to time...<BR>
igor nods that Andreas's computer's clock is slow<BR>
igor says, "So, this is a ray-tracer, but not a recursive one."<BR>
Bruce says, "what's the KsIsC term at the end, then? Looks like pure reflection form other objects"<BR>
igor says, "Nope. That's the ambient coefficient."<BR>
Bruce says, "It's recursive. The render operator takes a parameter to specify the max recusrion depth to follow to"<BR>
igor says, "Hmm... No it isn't..."<BR>
Bruce says, "the first term is the ambient"<BR>
igor says, "Right."<BR>
igor says, "OK, so it is recursive."<BR>
igor says, "(not that that makes is all that worse..."<BR>
andreas picks up his Foley/van Dam...<BR>
Bruce points out that's he's never actually looked at a ray tracer before but knows some physics and math :-(<BR>
igor has Foley/van Dam as well...<BR>
igor [to Bruce]: OK, so what else belongs on the 'todo' list?<BR>
Bruce also has it, but an old one (1983) form when he was a 3rd year student<BR>
igor points at "todo"<BR>
andreas says, "I volounteer for the PPM exporter."<BR>
Bruce says, "yeah, that's the easiest"<BR>
igor says, "Chapter 16.12"<BR>
Bruce says, "andreas, I'm prety good on PostScript, and Igor seems to knwo something abhout 3D. how are you on what?"<BR>
igor says, "(use 'add "item" to todo to add stuff)"<BR>
andreas says, "I have a 3D background, but it's been 5 years that I've touched a transformation matrix,"<BR>
Bruce says, "all the necessary math is in the task spec"<BR>
igor says, "Though I'm probably the most familiar with it, ATM."<BR>
andreas says, "the gwydion matrix library unfortunately isn't polished up for 3D purposes."<BR>
igor says, "Hmm... That's unfortunate... What's it missing?"<BR>
Bruce says, "we can hand-code 4x4 matrix operations in about an hour"<BR>
andreas says, "cross product of two vectors for instance."<BR>
andreas says, "that should be the first task in the 3d section."<BR>
igor says, "A special case for 3D vectors should be easy for that."<BR>
igor has the general case programmed elsewhere, but not in Dylan...<BR>
Bruce says, "where do we need cross product? thee are only dots (which are trivial) in the illumiation function."<BR>
Bruce says, "to get surface normals?"<BR>
igor was wondering about that as well...<BR>
igor says, "We can figure out the surface normals through a bit of Funky Math, I think..."<BR>
Bruce thinks so too<BR>
andreas says, "I'm not through the task yet, but surface normals are usually useful for illumination."<BR>
Bruce says, "surface normal of a plane falls straight out of the equation"<BR>
igor says, "For a sphere, it's even easier..."<BR>
Bruce nods<BR>
andreas says, "I'll print the file, and be back in a quarter of an hour..."<BR>
Bruce says, "KO"<BR>
Bruce just had hot pancakes and sugar and lemon joice delivered by GF. mmmmm<BR>
igor says, "Cool..."<BR>
igor extracts a cup of not-quite-cold-enough-yet iced tea from the fridge.<BR>
Bruce says, "she knows this is important :-)"<BR>
igor says, "Woohoo! Our CVS messages go to gd-chatter..."<BR>
igor says, "Actually, perhaps what we could do is add 'gd-chatter' to the ifcp2000 list, then tell people who want to follow the play-by-play to subscribe to gd-chatter..."<BR>
Bruce says, "umm .. mine didn't last night"<BR>
igor says, "Well, mine just did..."<BR>
Bruce saw it<BR>
igor shrugs.<BR>
Bruce says, ".cvsignore added"<BR>
igor says, "I don't think we'll have a real security problem on this contest."<BR>
igor says, "Everyone knows *what* to do, after all..."<BR>
Bruce nods<BR>
igor says, "And the people that know and can use dylan seem to be generally mature..."<BR>
igor says, "Anyhow... Let's get some preliminary code hashed out..."<BR>
Bruce says, "we're going to struggle just to get a correct implementation -- performance hacks are going to be *way* down the list"<BR>
igor grins.<BR>
igor says, "If they wanted to be *really* evil, they'd have made the test-box an SMP machine..."<BR>
Bruce says, "they did that the first time around."<BR>
Bruce says, "there *are* mirrors, btw"<BR>
igor says, "Yeah... Recursive RTing it is, then..."<BR>
Bruce shares a URL...<BR>
<<A HREF="http://www.cs.bell-labs.com/who/jhr/icfp/images/reflect.jpg" TARGET="_blank">http://www.cs.bell-labs.com/who/jhr/icfp/images/reflect.jpg</A>>.<BR>
Bruce says, "% ... <color> <kd> <ks> <n> ==> ... <surface>"<BR>
igor says, "?"<BR>
igor says, "Oh, right..."<BR>
Bruce says, "% ... <color> <kd> <ks> <n> ==> ... <surface>"<BR>
Bruce says, "{ /n /ks /kd /color"<BR>
Bruce says, " { /v /u /face"<BR>
Bruce says, " color kd ks n"<BR>
Bruce says, " }"<BR>
Bruce says, "} /const-surface"<BR>
Bruce says, "% a mirror plane"<BR>
Bruce says, "white 0.1 1.0 1.0 const-surface apply plane /mirror"<BR>
Bruce says, "that's difuse = 0.1, specular = 1.0"<BR>
igor nods.<BR>
igor says, "So... What do we start with?"<BR>
igor <- eager to break the ground...<BR>
andreas says, "left-handed world coodinates... thanks a lot :)"<BR>
igor says, "No, left-handed is standard... X goes right, Y goes up, and Z goes in."<BR>
andreas says, "since when? for all I did, z came out of the screen."<BR>
andreas says, "SGI Performer had left-handed coordinates, as far as I remember."<BR>
igor shrugs. It doesn't matter *that* much...<BR>
Bruce says, "some classes to hold a built scene description"<BR>
igor nods.<BR>
Bruce says, "that way we can split the work in two immediately and start working in each direction"<BR>
igor says, "Get the basic interfaces between the different parts of the program established."<BR>
Bruce says, "whoever works on the ray tracer proper will be able to start immdeiately, missing only the procedural surfaces"<BR>
igor nods.<BR>
Bruce says, "I'm happy to rough out the language implementation"<BR>
igor says, "So, an 'obj' should be either a primitive or a list of sub-objects, K?"<BR>
Bruce says, "at the moment, yes"<BR>
igor says, "<obj> = type-union(<primitive>, <collection>) ?"<BR>
Bruce says, "later there are several different ways of combning the subobjects"<BR>
andreas says, "classic composite pattern"<BR>
andreas says, "we should make the transformations objects too."<BR>
igor says, "Which transformations? the boolean ones?"<BR>
Bruce says, "I think he means coordinate transforms"<BR>
igor hasn't looked too closely at the transformation system yet...<BR>
andreas says, "yes. but stop the press, I noticed that the transforms return a new object instead of transforming an existing one."<BR>
Bruce says, "yes, it's all totally side-effect free"<BR>
igor says, "Yeehaw..."<BR>
Bruce says, "except for the small detail of the operand stack..."<BR>
Bruce says, "we'll give the GC a good workoout :-)"<BR>
Bruce says, "note that the object that got transformed may be the base object for a *number* of differently-transformed concrete objects"<BR>
igor says, "So, "<surface> cube 4 5 7 translate" => unit cube at (4,5,7)?"<BR>
Bruce says, "yes. "<BR>
Bruce says, "Plus an unreachable unit cube at the origin"<BR>
igor says, "Right (which got GC's somewhere along the line, prolly)"<BR>
igor says, "er GC'd"<BR>
igor says, "Cool... we don't need arbitrary rotations, even..."<BR>
Bruce says, "'<surface> cube /foo foo 4 5 7 translate /A foo 10 11 12 /B' gives two cubes"<BR>
igor nods. I don't see any way to avoid simply making copies here...<BR>
igor says, "(unless we implemented some weird copy-on-write system, which is probably more trouble than it's worth)"<BR>
Bruce says, "THERE IS NO 'WRITE'"<BR>
igor says, "Yes, but we can't really toss references around, hoping that something will only be used once..."<BR>
igor says, "Actually, yes we can."<BR>
igor says, "But, in any case, this is not a useful optimization."<BR>
Bruce says, "an object is a bunch of things with an associated transform"<BR>
Bruce says, "transforms concatenate happily"<BR>
igor says, "Why? Why not just make a copy of the object and move the coordinates?"<BR>
igor says, "Oh, OK, I see..."<BR>
Bruce says, "you could , of course, but what do you gain by copying it?"<BR>
Bruce says, "for a cube or sphere it hardly matters, but what about for a model of the concorde?"<BR>
igor says, "This means we can have a 'canonical cube' somewhere, right?"<BR>
Bruce says, "right, and "cube" just returns it"<BR>
igor says, "OK, I'm down with this now..."<BR>
andreas says, "that's a good idea. So any cube is just a reference to a canonical cube plus a transformation matrix, which gets accumulated."<BR>
Bruce says, "OK, how's this sound. I'll get to work on the lexer and language, minus the graphics."<BR>
Bruce says, "you guys design the object representation and start the ray tracer."<BR>
Bruce says, "by the time I need the object reps you'll have them :-)"<BR>
andreas says, "SOunds good. I'm typing a vector/matrix library as we talk."<BR>
igor says, "Sounds good."<BR>
igor [to andreas]: What's wrong with our own?<BR>
andreas says, "I can't find a multiplication of matrix and vector, for instance."<BR>
igor says, "Hmm. Is that, perhaps, in the 'vector' library?"<BR>
andreas says, "There is none."<BR>
igor says, "What about a quick hack to redefine vectors as 3x1 arrays, then mult them?"<BR>
Bruce thinks 'this is going to keep us busy'<BR>
igor tries to remember all of his Dylan sytax again...<BR>
andreas [to igor]: this is probably what I'm going to do. 4x1, to be more precise.<BR>
igor says, "Good, good."<BR>
andreas says, "Or just some more methods on \*."<BR>
igor says, "I'm bashing out the basic object classes."<BR>
igor nods at Andreas. Exactly what I'd have gone for...<BR>
Bruce says, "leave room for a bounding sphere around each composite object."<BR>
Bruce says, "testing the distance between a point and a ray is easy and fast"<BR>
igor nods. That's an optimization we can add later, though...<BR>
Bruce says, "finding the optimal point for the center of the sphere is the only hard part..."<BR>
igor nods. In a pinch, we can simply use the average of all the centres of the component objs...<BR>
Bruce says, "actually, a bounding ellipsoid woudl be cooool :-)"<BR>
igor says, "Later, later..."<BR>
Bruce says, "I know..."<BR>
Bruce off to work<BR>
igor checks in obj.dylan.<BR>
Bruce says, "keep reading the home page and the FAQ guys"<BR>
igor nods.<BR>
Bruce says, "the code listing bug I mentioned before has been corected"<BR>
Bruce was going to email them but didn't<BR>
Bruce correctly picked what they *meant* though, which is a good sign that he understands the language<BR>
igor [to andreas]: How goes that matrix thing?<BR>
andreas says, "busy typing..."<BR>
igor says, "How do I index into a matrix?"<BR>
andreas says, "It's a subclass of array. So you do mat[x, y]"<BR>
-----------------------------------igor------------------------------------<BR>
define method translate!(o :: <obj>, x, y, z) => (same_obj :: <obj>)<BR>
let trans_matrix = $identity;<BR>
<BR>
trans_matrix[1, 4] := x;<BR>
trans_matrix[2, 4] := y;<BR>
trans_matrix[3, 4] := z;<BR>
<BR>
o.transform := o.transform * trans_matrix;<BR>
end method translate!;<BR>
---------------------------------finished----------------------------------<BR>
igor says, "(+ o; at the bottom)"<BR>
andreas says, "how do you do the multiline paste?"<BR>
igor says, "use @paste"<BR>
igor says, "Is that the general idea (renaming $identity to whatever, of course...)"<BR>
andreas says, "the first line is a problem. Use identity-matrix(dimensions: #[4,4]) instead."<BR>
igor nods. Sounds good... Why don't we make a global containing that, actually...<BR>
andreas says, "matrices are mutable, so you would modify the identity matrix in your code above."<BR>
igor says, "Ah, true enough..."<BR>
-----------------------------------igor------------------------------------<BR>
define variable *trans_matrix* = identity-matrix(dimensions: #[4,4]);<BR>
<BR>
define method translate!(o :: <obj>, x, y, z) => (same_obj :: <obj>)<BR>
*trans_matrix*[1, 4] := x;<BR>
*trans_matrix*[2, 4] := y;<BR>
*trans_matrix*[3, 4] := z;<BR>
<BR>
o.transform := o.transform * *trans_matrix*;<BR>
o;<BR>
end method translate!;<BR>
---------------------------------finished----------------------------------<BR>
igor says, "Reduce, reuse, recycle :-)"<BR>
andreas says, "Now that's ok."<BR>
Bruce says, "umm ... you're crapping all over that global"<BR>
igor says, "Yeah, and?"<BR>
Bruce says, "well it's not going to be identity the next time you want to use it"<BR>
igor says, "As long as I always crap over the *same* part of the global, it's all good..."<BR>
Bruce says, "but you don't -- there's scaling and rotation isn't there?"<BR>
igor [to Bruce]: Yeah, I'm gonna use different global matrices for those...<BR>
Bruce says, "OK"<BR>
igor has already renamed to to *translation_matrix*<BR>
andreas says, "oh, and please use dashes instead of underscores. We want to show off ;)."<BR>
igor says, "Right, right. Old habits dying hard..."<BR>
igor says, "Are matrices 0-index or 1-index?"<BR>
andreas says, "0-index."<BR>
igor says, "And which is first, the row or the column?"<BR>
igor hmms. Wait a sec... To transform A => A', is it A' = TA or A' = AT?<BR>
andreas says, "It's matrix[row, column]."<BR>
andreas says, "And TA."<BR>
igor says, "That's what I thought."<BR>
andreas hopes that he remembers right after 5 years.<BR>
andreas says, "And in TTTA, operations are done from right to left."<BR>
igor says, "Do we have a designated 'not defined yet' value?"<BR>
igor's adjusting it to use the existing rot/translation matrix if it's the same rotation as before...<BR>
igor says, "Anyhow, I'm gonna go chow down on dinner. I'll be back in 30 or so."<BR>
igor checks in his code.<BR>
igor <- back.<BR>
Bruce <- busy<BR>
igor grins.<BR>
igor continues writing up the rotation/scaling functions.<BR>
andreas says, "wait, I'll commit my changes..."<BR>
igor says, "No more 'breaking news'..."<BR>
igor says, "So, just to clarify, we do feel buff enough to go for the full Tier-III solution, right?"<BR>
andreas done with check-in.<BR>
-----------------------------------igor------------------------------------<BR>
Processing matrix.dylan<BR>
...<BR>
In Define Method *{<vector>, <matrix>}:<BR>
"matrix.dylan", line 18, characters 26 through 35:<BR>
(matrix(vector) * mat).components;<BR>
^^^^^^^^^^<BR>
Error: Undefined variable: components<BR>
..<BR>
---------------------------------finished----------------------------------<BR>
andreas says, "yes, do another update. I fixed that a second ago."<BR>
igor says, "Ah, there it is."<BR>
Bruce says, "tier 1 2 or 3 doesn't affect my bit :-)"<BR>
andreas is still undecided.<BR>
Bruce says, "(except trivially)"<BR>
You hear a quiet popping sound; igor has disconnected.<BR>
You hear a quiet popping sound; Bruce has disconnected.<BR>
You hear a quiet popping sound; andreas has disconnected.<BR>
andreas has connected.<BR>
igor has connected.<BR>
igor says, "Server panic bad, eh?"<BR>
andreas says, "hi igor..."<BR>
You hear a quiet popping sound; andreas has disconnected.<BR>
andreas has connected.<BR>
igor says, "Hello again.,"<BR>
igor says, "What was the panic all about?"<BR>
andreas says, "hi again..."<BR>
andreas says, "out of RAM on the server."<BR>
andreas says, "The Gwydion documentation is generated using jade. jade is triggered when the SGML in the CVS changes."<BR>
andreas says, "I blindly copied the line from gdwww to icfp, without taking out the jade part."<BR>
andreas says, "so the massive number of commits spawned a massive number of jade processes."<BR>
andreas says, "won't happen again."<BR>
You hear a quiet popping sound; andreas has disconnected.<BR>
andreas has connected.<BR>
andreas says, "ok, I go to bed now. "<BR>
andreas waves<BR>
igor waves.<BR>
You hear a quiet popping sound; andreas has disconnected.<BR>
Bruce has connected.<BR>
Bruce says, "hiya"<BR>
igor says, "Yo!"<BR>
igor says, "Andreas has packed it in for the night..."<BR>
Bruce back from a nice brisk walk outside<BR>
igor nods.<BR>
igor writing some <color>-manipulation code.<BR>
Bruce says, "we had a little recorder going here before. I see we lots it in the crash"<BR>
igor shrugs. Oh well...<BR>
Bruce says, "probably doens't metter much, but it would be nice to be able to check what others were tlaking about while you were absent"<BR>
igor nods.<BR>
igor says, "Don't be absent, then :-)"<BR>
igor says, "Andreas & I were pretty quiet, though..."<BR>
Bruce says, "so it must be 10:30 where you are. How long until you pack it in too?"<BR>
igor says, "A while..."<BR>
igor says, "How long will you be up for?"<BR>
Bruce says, "I've got another ten hours at least available today. I'll certainly have a working lexer by then, and I hope most of a crude interpreter impleemntation as well."<BR>
igor nods. Cool!<BR>
igor says, "I'm going to write the PPM exporter now, I think."<BR>
igor has some preliminary work done on the ray tracing engine<BR>
Bruce says, "you'll want to write each pixel on the fly as you calculate it won't you?"<BR>
igor says, "Well, I figured I'd store 'em up in a buffer then squirt the whole thing to disk, but I suppose we could do it on the fly..."<BR>
Bruce says, "I mean, you can calculate the pixels in any damn order that you want, so why not do it in the PPM order?"<BR>
igor says, "Actually, it'll be faster to write to a colorbuffer then write the whole buffer out, as we don't need 1 syscall/pixel then."<BR>
igor says, "We can write in blocks > 3 bytes at a time, and we'll probably have plenty of memory..."<BR>
Bruce says, "Right, but that's just a matter of saving up a few hundred or few thousand of them, not the whole image"<BR>
Bruce says, "64 MB was what they promised"<BR>
igor says, "I suppose..."<BR>
igor says, "OK, sure..."<BR>
Bruce says, "if the output files remain in the several-hundred-K range then it reaally doens't matter much, but what if they throw a *big* image at us."<BR>
igor says, "True enough. Might as well make this an unlimited-resolution kinda deal, then."<BR>
igor looks up the stuff about PPMs...<BR>
Bruce says, "in the past competitions, the judges have thrown some *wierd* input files at the programs. Dealing gracefully with anything is needed to stop being disqualified"<BR>
igor says, "Cool."<BR>
Bruce says, "correctness and not crashing are the #1 marking criteria. If you crash you're out. Immediately."<BR>
igor nods. We're reasonably crash-proof, fortunately...<BR>
Bruce says, "Dylan is good like that"<BR>
igor says, "(barring unfortunate divide-by-zeros)"<BR>
Bruce says, "in FP that is OK. the only place integer can happen is in the interpreter, and I'll be checking operands each time, believe me!"<BR>
igor grins.<BR>
Bruce says, "Are Dylan symbols case-sensitive?"<BR>
igor says, "I don't think so."<BR>
Bruce says, "drat. We need case-sensitive identifiers"<BR>
igor says, "Oh, #"foo" kindsa symbols?"<BR>
Bruce right<BR>
igor hmms.<BR>
igor says, "Other than comparing to string-table, I dunno."<BR>
igor says, "Interpreter speed is important, however, for procedural textures..."<BR>
Bruce says, "they're not case sensitive: drm_101.htm#HEADING101-30"<BR>
Bruce says, "how do I paste a mul;ti-line in?"<BR>
Bruce says, "as (singleton (<symbol>)) string => symbol [Sealed G.F. Method]"<BR>
Bruce says, ""This method on as returns the symbol that has the name string. If the symbol does "not yet exist, it is created. This method on as will always return the same symbol for"<BR>
Bruce says, "strings of the same characters, without regard to alphabetic case."<BR>
igor says, "@paste"<BR>
-----------------------------------Bruce-----------------------------------<BR>
as (singleton (<symbol>)) string => symbol [Sealed G.F. Method]<BR>
<BR>
This method on as returns the symbol that has the name string. If the symbol does not yet exist, it is created. This method on as will always return the same symbol for<BR>
strings of the same characters, without regard to alphabetic case.<BR>
---------------------------------finished----------------------------------<BR>
Bruce says, "close but no ceeegar"<BR>
igor says, "Do you only need case-insensitive symbols for variables?"<BR>
Bruce says, "yes"<BR>
Bruce says, "er, case sensitive"<BR>
igor says, "right..."<BR>
igor says, "Well, hmm... What punctionation is disallowed in variable names?"<BR>
Bruce says, "actually, its probably OK. It'w lexically bound, so I can do the name -> object-address lookup before runtime"<BR>
igor says, "Just stick a * in front of each capital letter: FoO => *Fo*O"<BR>
igor says, "That works, too."<BR>
Bruce says, "can have letters, digits, dashes, and underscores. So that would work"<BR>
Bruce says, "dam, wish I knew where my copy of SICP was. I think I loaned it to someone :-("<BR>
igor has a copy here, if that helps...<BR>
Bruce wishes it did<BR>
igor is going to go for coffee with his g/f and will be back in about 30 minutes.<BR>
Bruce says, "ciao"<BR>
igor <- back (again)<BR>
Bruce says, "hi"<BR>
Bruce says, "you won't believe this -- I just stole the float parsing function from d2c. And it's buggy!! It totally fails on any float constant with an exponent"<BR>
igor says, "Doh!"<BR>
Bruce says, "see atof in lexer.dylan"<BR>
Bruce says, "first, it calls the return() exit function when it sees a e/E/d/D/s/S/x/X."<BR>
Bruce says, ".. instead of calling the parse-exponent() exit function"<BR>
igor says, "Doh."<BR>
Bruce says, "... then, it fails to move to the next character of the exponent, so on say 1.2e57 you get 1.2e55555555555555555555555..."<BR>
Bruce says, "other than that it works great!"<BR>
igor says, "Oh, rapture..."<BR>
igor says, "Does d2c actually use that code?"<BR>
Bruce not sure if he want's the answer to be "yes" or "no"<BR>
Bruce thnks both are equally bad<BR>
Bruce says, "the effect was that exponents were ignored, but it otherwise worked"<BR>
igor nods.<BR>
Bruce says, "just tried a test program that does 'format-out("%=", 3.12345678901234567e30)"<BR>
igor nods.<BR>
Bruce says, "it prints with an exponent of zero. So, yes, d2c *does* use that function"<BR>
igor bangs is head against something hard.<BR>
igor says, "er his."<BR>
Bruce says, "oh well, the fixed version is back in the d2c cvs now..."<BR>
igor says, "Yay! Participate in programming contests! Fix compiler bugs!"<BR>
Bruce shares a URL...<BR>
<<A HREF="http://www.ccc.de/cgi-bin/cvsweb/gd/src/d2c/compiler/parser/lexer.dylan.diff?r1=1.6&r2=1.7" TARGET="_blank">http://www.ccc.de/cgi-bin/cvsweb/gd/src/d2c/compiler/parser/lexer.dylan.diff?r1=1.6&r2=1.7</A>>.<BR>
igor says, "Is there a better way to write bytes than this:"<BR>
-----------------------------------igor------------------------------------<BR>
format(ppm.file-handle, "%=%=%=", as(<character>, r),<BR>
as(<character>, g), as(<character>, b));<BR>
---------------------------------finished----------------------------------<BR>
Bruce says, "shouldn't those be <byte-character> ?"<BR>
Bruce says, "other than that, what happens when you have non-printable chars?"<BR>
igor says, "Ah, OK..."<BR>
igor adjusts it.<BR>
Bruce says, "you'd be better off not going throught that %= dispatch stuff, too"<BR>
igor says, "What would be better?"<BR>
Bruce says, "well, looking in print.dylan I see that deep internally it uses write-element(stream, char)"<BR>
Bruce says, "when it's writing strings it loops on that funciton, so it's about the lowest you can go"<BR>
igor says, "Is that exported?"<BR>
Bruce says, "other than that, you could just keep a string as a buffer and poke characters into that and eventually print the whole string"<BR>
Bruce says, "... would be just as fast wihtout digging down deep"<BR>
igor says, "But that won't let us do the "image-size-larger-than 64MB" trick..."<BR>
Bruce says, "yes it would if your string was maybe 1000 chars or something and you flushed it from tiem to time"<BR>
igor says, "True, I suppose..."<BR>
igor says, "We'll fix that up later, when it is our biggest bottleneck, K?"<BR>
-----------------------------------Bruce-----------------------------------<BR>
local foo(i :: <integer>)<BR>
buf[pos] := as(<byte-character>, i);<BR>
pos := pos + 1;<BR>
if (pos = buf.length) format-out("%=", buf); pos := 0; end;<BR>
end;<BR>
foo(r); foo(g); foo(b);<BR>
---------------------------------finished----------------------------------<BR>
igor says, "I wonder if we'd have done better by translating the input file into POVray code, then invoking POVray..."<BR>
Bruce says, "is it on the list of software on the machine?"<BR>
igor imagines not...<BR>
igor says, "Nope. We'd have to give 'em a statically linked POVray executable & stuff..."<BR>
igor says, "Is it even free software?"<BR>
Bruce says, "as in beer"<BR>
igor says, "Ah, OK."<BR>
igor scratches his head.<BR>
igor has a define method write-pixel(ppm :: <ppm-image>, color :: <color>)<BR>
igor says, "in ppm.dylan"<BR>
igor says, "In icfp2000.dylan, I call it, but it says there aren't any applicable methods..."<BR>
igor says, "ppm.dylan gives me a couple of warnings, but doesn't fail..."<BR>
igor woos as his 'meta' key mysteriously starts working again...<BR>
Bruce says, "ordering of the files in the .lid?"<BR>
igor says, "Nope. Moron that I was I happily wrote:"<BR>
igor says, "write-pixel(<ppm-image>, color)"<BR>
Bruce says, "oops"<BR>
Bruce says, "that'll do it"<BR>
igor says, "(Since the 'make' above worked just fine, I didn't notice the problem)"<BR>
Bruce busy stealing the lexing state machine from d2c<BR>
Bruce mostly chopping out the extra stuff that we don't need<BR>
igor grins.<BR>
igor supposes that lexodus is nowhere near mature enough to try...<BR>
igor says, "It can barely lex *itself* let anything else..."<BR>
igor says, "Cool! The PPM exporter works."<BR>
igor checks stuff in.<BR>
Bruce says, "define 'works'"<BR>
igor eeps at the scan-moray pattern.<BR>
Bruce says, "does it make xv happy?"<BR>
igor says, "It makes xview happy..."<BR>
igor says, "Well, try it yourself..."<BR>
igor says, "Oops... Missed one, update again."<BR>
Bruce says, "in a while -- I don't compile right now"<BR>
igor nods.<BR>
igor emails you the PPM.<BR>
igor says, "What's the background color here? Black?"<BR>
Bruce says, "luuuverly"<BR>
Bruce says, "watcha mean?"<BR>
igor says, "What should the color of an empty image be?"<BR>
Bruce says, "if a ray doesn't hit anything?"<BR>
igor nods.<BR>
Bruce says, "black, I guess"<BR>
igor couldn't find anything in the TASK that stated otherwise...<BR>
Bruce says, "if the user wants sky or something then they should put a blue plane at the back, right?"<BR>
igor supposes that'd work, as the camera is fixed...<BR>
igor works on figuring out the initial rays to cast...<BR>
igor returns.<BR>
Bruce is off to dinner<BR>
igor nods.<BR>
Bruce says, "it's 2:30 now for you. What's bedtime?"<BR>
Bruce will be here another six or seven hours<BR>
igor dunnos. When I get tired. I'm also keeping my g/f company, as she's pulling a cram session for her exam tomorrow...<BR>
Bruce AFK<BR>
You hear the bips of keyclick, the sliding of mice and the hum of computers in the distance as igor fades slowly out of view, heading towards them.<BR>
There are the light bips of keyclick and the sliding of mice as igor fades into view, shoving itself away from the console, which promptly fades away.<BR>
igor glances nervously at the clock.<BR>
igor glances nervously at the clock.<BR>
Bruce returns<BR>
igor says, "Yo."<BR>
igor sighs at andreas' copy & paste error...<BR>
Bruce ready for another session, after food and shower<BR>
igor says, "define method \+ (v1 :: <vector>, v2 :: <vector>) was returning a <number> :-P"<BR>
Bruce says, "Andreas shold be around soon"<BR>
igor nods.<BR>
igor fixed it anyhow.<BR>
igor says, "whee!"<BR>
-----------------------------------igor------------------------------------<BR>
Expected an instance of {the class <function>}, but got #f<BR>
Aborted (core dumped)<BR>
---------------------------------finished----------------------------------<BR>
Bruce says, "can we trap those sorts of errors, if they happen on a production run?"<BR>
igor dunnos...<BR>
igor says, "That one was my own darned fault, though..."<BR>
igor says, "I make a local method, but didn't return it."<BR>
igor says, "Is there an 'infinity' symbol I can use?"<BR>
Bruce says, "for what?"<BR>
Bruce says, "you man someting in the charset?"<BR>
igor says, "No..."<BR>
Bruce says, "or you mean like max_real"<BR>
igor nods.<BR>
igor goes with $max_real...<BR>
igor says, "(or is it something else?)"<BR>
Bruce says, "int or float?"<BR>
igor says, "double-float"<BR>
Bruce says, "there's $minimum-integer and $maximum-integer"<BR>
Bruce says, "just use 1e38 or something for infinity"<BR>
Bruce says, "you'll need to rebuild the compiler though :-)"<BR>
igor uses 1.0/0.0 :-)<BR>
Bruce says, "that'll work"<BR>
igor wonders if all the ray-intersection code should go in a new file...<BR>
igor whees as he figures out how to do the ray-intersection stuff cleanly...<BR>
igor says, "'course the math sucks..."<BR>
igor glances nervously at the clock.<BR>
Bruce says, "it'll still be here in the morning..."<BR>
igor grins.<BR>
igor is going to ignore the math for now...<BR>
Bruce says, "coming up for the 15% mark..."<BR>
igor says, "The general idea is that you want the closest intersection of a ray with an object."<BR>
igor says, "But there are all these xformation matrices lying around."<BR>
igor says, "So, transform the ray into your own coordinates, then figure it out..."<BR>
igor glances nervously at the clock.<BR>
igor glances nervously at the clock.<BR>
igor checks everything in.<BR>
none [Guest] has connected.<BR>
igor says, "Hello."<BR>
Bruce says, "hello guest"<BR>
You hear a quiet popping sound; Karl-Heinz_Guest has disconnected.<BR>
igor says, "Oh well..."<BR>
Bruce thinks '12 hours down, 60 to go...'<BR>
igor grins.<BR>
igor says, "Hmm... We've gone from seeing no sphere to only seeing spheres... :-P"<BR>
igor says, "Yes!!!"<BR>
A small swarm of 3x5 index cards arrives, engulfs igor, and carries it away.<BR>
A small swarm of 3x5 index cards blows in and disperses, revealing igor.<BR>
igor pokepokepokepokepokes Bruce.<BR>
Bruce says, "hello"<BR>
igor says, "Success!"<BR>
Bruce says, "yippie!"<BR>
igor says, "I can render spheres."<BR>
igor says, "I can save them as PPMs, too."<BR>
Bruce is about *this* far away from parsing input files...<BR>
igor says, "Cool!"<BR>
igor says, "Right now, I can render spheres anywhere on the screen, although they are not lit at all, yet."<BR>
Bruce says, "if you want to poke me, email me. there's no beeper or anyting on the MOO, so once the screen saver clicks in I don't see a thing"<BR>
igor nods.<BR>
igor says, "Anyhow, I'm gonna try to catch a bit of sleep now that this works."<BR>
Bruce says, "good plan"<BR>
Bruce winders where Andreas is<BR>
Bruce says, "it should be 1 PM there now"<BR>
Bruce says, "silly question, but if they're not lit, how do they get rendered?"<BR>
igor says, "It sets every ray that hits something to white, any everything else to black."<BR>
Bruce says, "ah. more like rendering curcles, then ;-)"<BR>
Bruce says, "gawd ... this lexer is up to just over 500 lines."<BR>
Bruce says, "i wish to hell we had an automatic generator :-("<BR>
Bruce pings<BR>
andreas has connected.<BR>
andreas says, "hi"<BR>
igor says, "Good morning."<BR>
andreas has breakfast right now.<BR>
andreas says, "I see we have a lexer and a minimal raytracer?"<BR>
igor nods.<BR>
igor will be going back to sleep very soon now.<BR>
andreas says, "Ok, I try to pick up where you left and add some lighting."<BR>
igor nods. First step is to write some dedicated Quaternion stuff.<BR>
igor says, "Whereever I've put XXX, I've done something stupid & short-cut-ish in the code."<BR>
igor says, "Also, it looks like the translations might be backwards, as (0, 0.25, 0) moves it downwards."<BR>
andreas doesn't grok quaternions.<BR>
igor says, "The problem is we're using 4-dimensional vectors all over the place, but things like 'A - B' produce the Wrong Thing..."<BR>
igor says, "if A = (1, 0, 0, 1) and B = (0, 1, 0, 1), A-B should = (1, -1, 0, 1), not (1, -1, 0, 0)"<BR>
andreas says, "I see. That's fixable."<BR>
igor says, "Basically, for all operations, homogenize first, then perform them on the first three elements."<BR>
Bruce says, "hello!"<BR>
igor says, "There are a bunch of hacks in there to deal with this problem that'd work much better with a <quaternion> class or something."<BR>
andreas says, "hi bruce"<BR>
igor says, "Is the mailing-list working? I'm getting no CVS messages, and the messages sent to [email protected] don't seem to get back to me."<BR>
Bruce says, "me too"<BR>
Bruce says, ".. and the same for gd-hackers"<BR>
andreas says, "sec, I'll check..."<BR>
Bruce says, "lexer is currently lexing correctly, and parsing numbers into the right thing. The output isn't sensible yet, though ... just debugging for now."<BR>
igor nods.<BR>
Bruce says, "it's also pretty hacky and untidy. I'll fix in the morning"<BR>
Bruce going to go to bed shortly too<BR>
igor nods.<BR>
igor lobs the torch in Andreas' general direction.<BR>
andreas catches the torch.<BR>
Bruce says, "tag team programming .. and Andreas is about to get the tag"<BR>
igor woohoos. 371 / 495 lines of the code in CVS were last touched by me...<BR>
Bruce says, "check again in a couple of minutes..."<BR>
igor grins.<BR>
andreas says, "ah, full disk on the server..."<BR>
igor says, "That'd do it..."<BR>
igor [to andreas]: Perhaps it would be best for you to devote yourself to the interpreter, since that<BR>
igor says, "seems to be the most lacking area, ATM."<BR>
Bruce says, "OK .. do a cvs update now"<BR>
andreas says, "Ok, I see what I can do."<BR>
igor says, "The lexer is apparently mostly done, and the ray-tracing engine is under control."<BR>
igor glances nervously at the clock.<BR>
Bruce says, "ummm ... there isn't much interpreter there at the moment, but I've got it planned out in my head and know how I'm going to do it"<BR>
igor [to Bruce]: Can you 'dump' it to andreas?<BR>
Bruce says, "not before I go to sleep tonight"<BR>
igor nods.<BR>
igor says, "Hmm... In that case, perhaps more work on the ray-tracer is in order, then..."<BR>
Bruce says, "the interpreter will be working by this time tomorrow"<BR>
Bruce says, "I'd expect that getting recursive ray-tracing and the various shapes and CSg and stuff going is by far the rate limiting factor"<BR>
igor says, "The CSG is going to be annoying, yes..."<BR>
igor says, "We need more intersection algorithms..."<BR>
andreas says, "I suggest we concentrate on tier 1 first."<BR>
Bruce says, "anyway, my stuff is in now .. do an update and do a 'make test'"<BR>
igor says, "The sphere-intersection-thingy, ATM, does not actually calculate the position of intersection, just whether or not there is one."<BR>
igor says, "This is actually useful code, as we need it for bounding-spheres..."<BR>
andreas says, "BTW, our matrices are slow. But that's a thing to fix when everything else works."<BR>
igor nods.<BR>
igor says, "Even the depth = 1 raytracer with no lighting is kinda slow right now."<BR>
Bruce says, "yeah, it takes 21 seconds on my system"<BR>
igor says, "And that's just for a 128x128 image."<BR>
andreas says, "Getting the materials from an interpreter callback makes things interesting."<BR>
Bruce says, "Gabor is asking for something to do..."<BR>
andreas says, "Cool!"<BR>
igor [to andreas]: And that's why the interpreter has to be fast...<BR>
Bruce says, "you guys might want to watch out ... the program currently expects to read stuff from stdin .. so if you don't provide any then it just sits there and waits..."<BR>
andreas says, "noticed that..."<BR>
igor says, "Anyhow, the big idea behind the ray tracer is that rays get transformed into the coordinate-space of the object at each stage."<BR>
igor says, "So, by the time we get around to hit-testing against a primitive, it's always against a unit-object located at the origin..."<BR>
igor says, "The, if we hit something, we transform it back out level-by-level until we get to world coordinates."<BR>
andreas says, "See. The matrix we accumulate at the moment transforms object coordinates to world coordinates. Do you have any code to generate the inverse matrix yet?"<BR>
igor says, "Yep. Check out obj.dylan"<BR>
andreas says, "This could explain your translation in the wrong direction problem, if not."<BR>
igor says, "suspects left-hand/right-hand coordinate system confusion in the translation issue..."<BR>
igor says, "The scaling factor work fine."<BR>
igor says, "(I can't really tell about rotation, as it's a sphere...)"<BR>
andreas says, "ah, ok. I see."<BR>
Bruce says, "in case anyone is wondering, lexer.dylan is 543 lines out of a total of 1010 in the project at the moment. I didn't have the time to make it shorter yet..."<BR>
igor says, "Anyhow, intersect-before() is the Big Function for hit-testing."<BR>
igor says, "Dispatch on the first arg for the type of object to test against, then you get pos & ray as vectors in your own coordinate space, and 'distance' which is the distance between the ray's origin and the closest intersection thus far."<BR>
igor says, "It starts at 1.0/0.0, and should be adjusted for each hit found."<BR>
igor says, "The idea is to reduce the surface-evaluation to a bare minimum."<BR>
igor says, "Anyhow, I'll be around in 4-8 hours..."<BR>
igor says, "In the event that you get horribly stuck, email [email protected], my g/f and get her to wake me up..."<BR>
Bruce says, "yeah and ditto goes for SMSing me."<BR>
andreas says, "Ok, I see what I can do."<BR>
andreas mediates about converting coordinate spaces back and forth...<BR>
andreas says, "igor: I assume pos is the origin of the ray, and ray it's direction?"<BR>
Bruce is outta here<BR>
andreas says, "good sleep you two..."<BR>
igor nods to andreas. Exactly.<BR>
igor says, "Both have to be transformed into the next coordinate space in order to have rays work correctly."<BR>
You hear a quiet popping sound; andreas has disconnected.<BR>
andreas has connected.<BR>
igor waves.<BR>
andreas waves back.<BR>
igor says, "How's it going?"<BR>
andreas says, "I haven't written much code yet, but the math knowledge is coming back."<BR>
igor grins. Cool, cool.<BR>
andreas says, "In representation with a vector of size four, there's a difference between points and vectors."<BR>
igor says, "Did you notice any egregious errors on my part?"<BR>
igor nods.<BR>
andreas says, "vectors have a last element of 0.0, so the vector math works without any special code."<BR>
igor says, "hmm? No, the last element is typically 1.0..."<BR>
andreas says, "I rewrote your code, but it's still broken, so I won't check it in. Give me half an hour."<BR>
andreas says, "no, the last element is 1.0 for points."<BR>
igor hmms. OK...<BR>
andreas says, "or any other value except 0.0."<BR>
andreas says, "So the difference between two points is automatically a vector."<BR>
igor says, "Oh, OK..."<BR>
igor was treating all points a vectors, in his code...<BR>
andreas says, "Yes, I'm going through this. Everywhere you have XXX it will magically work..."<BR>
igor says, "That's good..."<BR>
igor says, "Well, the XXX stuff worked, I just had fudge factors in there..."<BR>
andreas says, "Yes, I know ;)."<BR>
andreas says, "I'm just fighting Dylan itself... my initialize method doesn't get called."<BR>
igor says, "Doh..."<BR>
igor says, "Do we have floating-point <simple-object-vectors> ATM, or should we hit Eric up for some?"<BR>
andreas says, "I have no idea, ask Eric. I would appreciate a matrix where the compiler knows that there are only doubles stored, and the size is 4x4."<BR>
andreas says, "Would make us faster by an order of magnitude."<BR>
----------------------------------andreas----------------------------------<BR>
define class <ray> (<object>)<BR>
slot ray-position;<BR>
slot ray-direction;<BR>
end class <ray>;<BR>
<BR>
define method initialize(ray :: <ray>, #next next-method, #key position: pos, direction: dir, #all-keys)<BR>
=> ()<BR>
format-out("Ray generated\n");<BR>
ray.ray-position = homogenize(pos);<BR>
ray.ray-direction = normalize(dir);<BR>
end method initialize;<BR>
---------------------------------finished----------------------------------<BR>
andreas says, "What am I doing wrong? initialize doesn't get called..."<BR>
andreas says, "Oh, I see it: = instead of :="<BR>
andreas says, "I also found out why the sphere moved to the wrong direction: y is going upwards in our world, and downwards in adressing the pixmap."<BR>
igor says, "Oh! (Duh!) I was just drawing it upside down :-P"<BR>
igor says, "Yeah, my code was starting to get a wee bit messy by about 7:00 EDT or so."<BR>
igor says, "I wanted to get the damn white-circle-in-black-background working, though, so as to make it clear what all my code was doing, and what it was for..."<BR>
igor says, "I got to the point that each modification I made alternated it between "Sphere? What sphere?" (black image) and "Sphere EVERYWHERE!!!" (white image)"<BR>
igor emailed Eric enquiring about faster matrices...<BR>
andreas says, "I am at this point too. WOuld you mind if I check in the broken version and we go over it together?"<BR>
igor says, "Sure."<BR>
igor says, "The debugging trick that worked well was to put the sphere in the middle, then cast two rays, one into the middle, then one to the upper-left."<BR>
andreas says, "Ok, I've comitted."<BR>
igor says, "Then, instrument the rest of the code to figure out what went wrong..."<BR>
igor updates<BR>
igor says, "Useful matrix fixes..."<BR>
andreas says, "Not all were useful, I just noticed. \+ doesn't need homogenization, because you can only add vectors, and they have a last element of zero."<BR>
andreas says, "On the other hand, \- *does* need it, because it only makes sense for points, and returns a vector."<BR>
igor nods.<BR>
igor says, "Well, it's also useful for two vectors..."<BR>
igor says, "Hmm... Perhaps you ought to check in homogenize() that v[v.size - 1] != 0.0..."<BR>
andreas says, "Checking for != 0.0 doesn't work very well for floats."<BR>
igor shrugs. Anyhow...<BR>
igor adds some instrumentation code back in...<BR>
igor says, "The ray-direction really, really wants to be a unit vector in all this stuff, BTW..."<BR>
andreas says, "It gets normalized in the init of <ray>"<BR>
igor says, "OK, but what about when it gets transformed?"<BR>
andreas says, "A new ray is created then. See transform-with-matrix"<BR>
igor says, "OK..."<BR>
igor says, "And your math in intersection-before(m :: <sphere> is messed up..."<BR>
-----------------------------------igor------------------------------------<BR>
let t_ca = -ray.ray-position * ray.ray-direction;<BR>
let l_oc_2 = ray.ray-direction * ray.ray-position;<BR>
---------------------------------finished----------------------------------<BR>
andreas says, "yes, i've just seen that."<BR>
andreas says, "second line is broken."<BR>
igor says, "Exactly..."<BR>
igor tries it again.<BR>
igor says, "Appears to be working now..."<BR>
igor tries a full rendering...<BR>
igor says, " let l_oc_2 = ray.ray-position * ray.ray-position;"<BR>
andreas says, "yes"<BR>
igor says, "Hmm... Still messed up somewhere, though..."<BR>
igor says, "Now I get a black image with a single pixel at the origin lit :-P"<BR>
andreas says, "I see a single white pixel..."<BR>
igor sees the problem.<BR>
igor says, "ray.ray-position is a point, but were taking the dot-product of two of them."<BR>
andreas says, "ah, so this should be"<BR>
----------------------------------andreas----------------------------------<BR>
let foo = ray.ray-position - $origin;<BR>
let l_oc_2 * foo * foo;<BR>
---------------------------------finished----------------------------------<BR>
igor says, "Exactly."<BR>
igor says, "s/*/=/2"<BR>
andreas says, "Hey, we have a sphere again! Still upside-down, though. I'm comitting."<BR>
igor fixes the upside-down problem...<BR>
andreas says, "BTW: I think we should put all surface parameters in an object, and return a function that returns a surface object."<BR>
igor notes that andreas commented out the pretty sickly-yellow test PPM...<BR>
andreas says, "That way we can call the interpreter lazily, and win when casting shadow-rays."<BR>
igor nods. We may also be able to win by an option to simply return 'does this ray hit?' instead of computing the full point/normal/surface for casting shadow-rays...<BR>
andreas nods.<BR>
igor says, "And, yes, making a surface object that has all the info to call the appropriate surface function canned so that we don't call more than one is a good idea."<BR>
igor says, "How do you do upside-down for-loops?"<BR>
igor says, "for (y from height above 0)"<BR>
igor says, "Do I have to say 'by -1' or something?"<BR>
andreas says, "by -1 will work."<BR>
igor says, "Not that gd runs fast enough to do so, but because we don't have a frame-buffer, we are limited by HD-space, not memory size, BTW :-)"<BR>
igor doesn't think that your <surface> class contains anything resembling the information we want...<BR>
andreas says, "No, that's just the raw data. The intersection-before will return a closure that returns this object. The closure will care about caching."<BR>
igor says, "Perhaps the closure should give us simply a <color> object..."<BR>