From davyd at madeley.id.au Tue Apr 1 20:33:55 2008 From: davyd at madeley.id.au (Davyd Madeley) Date: Tue, 01 Apr 2008 20:33:55 +0800 Subject: [lore] Port Spotting - A Guide To Recognising Obsolete Connectors in the UCC Message-ID: <1207053235.19254.56.camel@frobisher> Recommend the addition of pictures, especially that of a vampire tap. --d -- Davyd Madeley http://www.davyd.id.au/ 08B0 341A 0B9B 08BB 2118 C060 2EDD BB4F 5191 6CDA -------------- next part -------------- Port Spotting - A Guide To Recognising Obsolete Connectors in the UCC ===================================================================== The UCC is full of crap. Old, obsolete crap that you certainly wouldn't find on any respectable computer Dell sells. It begs the question though, where did all come from? and why is it still in the UCC? This article presents some of the gamut of connectors, buses and cables that inhabit the UCC. Apple Desktop Bus (ADB) ----------------------- http://en.wikipedia.org/wiki/Apple_Desktop_Bus ADB used to be used on every Apple Macintosh to connect the keyboard and mouse (and was still used internally in Powerbooks and iBooks up till early 2005). The UCC still has a couple of old Macs that use ADB, they're in the machine room, powering webcams. It also has a huge box of ADB cables, because it turns out they're the same connector as S-Video. Modified Modular Jack (MMJ) --------------------------- http://en.wikipedia.org/wiki/Modified_Modular_Jack MMJ connectors look very similar to little RJ12 plugs nowadays used for your phone, but they're not quite the same, the hook is on the side rather than in the middle. MMJ was developed by DEC for connecting all of their serial equipment together. Some of the DECservers and DECterminals in the UCC have MMJ connectors on them. 13W3 ---- http://en.wikipedia.org/wiki/13W3 13W3 plugs used to be common on high-end monitors, as appeared on the UCC's Sun and SGI workstations. Their distinguishing feature is three miniature coaxial connectors inside the plug for carrying the red, green and blue signals. The other pins communicate sync and monitor information. Attachment Unit Interface (AUI) ------------------------------- At one time, when people still used a number of different physical mediums for Ethernet, AUI was used as a generic connector to connect the network card to the transceiver (or medium attachment unit) rather than having the medium connected directly to the network card. The UCC has many AUI<->10BaseT and 10Base2 transceivers, which are about the size of a large matchbox, it also has one or two large "vampire taps" for connecting 10Base5 thicknet cables. Micro Channel Architecture (MCA) -------------------------------- MCA was a computer bus invented by IBM in the 1980s. It was found in their PS/2 and RS/6000 machines. The cards are huge, and can be readily identified by the blue plastic positioning guides on their backs. The UCC seems to have a disproportionally large number of MCA cards for the number of MCA-based machines it is every likely to have owned. SBus ---- >From 1989 up until 1997, SPARC-based computers (i.e. those built by Sun) used a bus known as SBus. Unlike most expansion cards, SBus cards were designed to be mounted parallel to the motherboard. You could fit three SBus cards into the "pizza box" SPARCstation 1. SBus was 32-bit, so 64-bit SPARCs (as became the norm) double clocked the bus to transfer 64-bits in every cycle. The UCC machine Manbo contains a number of SBus cards. From davidb at ucc.gu.uwa.edu.au Wed Apr 2 15:47:40 2008 From: davidb at ucc.gu.uwa.edu.au (David Basden) Date: Wed, 2 Apr 2008 15:47:40 +0800 Subject: [lore] C hacks In-Reply-To: <20080327155011.GC20212@wilfred.rcpt.to> References: <20080327155011.GC20212@wilfred.rcpt.to> Message-ID: <20080402074740.GB10214@wilfred.rcpt.to> The third line doesn't work, but here is a 'better' version. Note the lack of conditionals, so none of that pesky branch prediction when calculating b = max(a,b). This line at least also compiles cleanly with gcc -Wall -ansi -pedantic on both IA-32 and AMD-64. b -= (((b-a)&(((unsigned)-1>>1)^-1))>>(sizeof(-1)*8-1))*(b-a); David On Fri, Mar 28, 2008 at 12:50:11AM +0900, David Basden wrote: > I was thinking that maybe people are just writing C that is either > too readable, too inefficient or both. Maybe a connect-the-equivilent- > code puzzle or something? > > Here is just a quick one 'cause I'm beyond tired, but please add to it; > I don't know if the third works, and might not be a good idea to let out > in public even if it does... > > while (*a++ == *b++); strcpy(b,a); > > a ^= b ^= a; int tmp = a; > a = b; > b = a; > > a >> 1; a = a / 2; > > b = (((a - b) & (1<<(sizeof(int)-1))) && b) || a; if (a > b) b = a; > > a << 3; a = a * 8; > > 1 << a; (int) pow((int) a, 2); > > a & 1; a % 2; > > a & 7; a % 8; > > (a & 15) || ++b; if (a % 16 == 0) > b = b + 1; > > _______________________________________________ > lore mailing list > lore at ucc.gu.uwa.edu.au > http://lists.ucc.gu.uwa.edu.au/mailman/listinfo/lore From davidb at ucc.gu.uwa.edu.au Wed Apr 2 15:58:35 2008 From: davidb at ucc.gu.uwa.edu.au (David Basden) Date: Wed, 2 Apr 2008 15:58:35 +0800 Subject: [lore] C hacks In-Reply-To: <20080402074740.GB10214@wilfred.rcpt.to> References: <20080327155011.GC20212@wilfred.rcpt.to> <20080402074740.GB10214@wilfred.rcpt.to> Message-ID: <20080402075835.GD10214@wilfred.rcpt.to> Looks like I was a bit too hasty in posting. Looking at the assembly of gcc -O3, it can obviously be shortened to the much less evil: b -= ((unsigned)(b-a)>>(sizeof(-1)*8-1))*(b-a); David On Wed, Apr 02, 2008 at 03:47:40PM +0800, David Basden wrote: > The third line doesn't work, but here is a 'better' version. > Note the lack of conditionals, so none of that pesky branch > prediction when calculating b = max(a,b). > > This line at least also compiles cleanly with gcc -Wall -ansi -pedantic > on both IA-32 and AMD-64. > > b -= (((b-a)&(((unsigned)-1>>1)^-1))>>(sizeof(-1)*8-1))*(b-a); > > David > > On Fri, Mar 28, 2008 at 12:50:11AM +0900, David Basden wrote: > > I was thinking that maybe people are just writing C that is either > > too readable, too inefficient or both. Maybe a connect-the-equivilent- > > code puzzle or something? > > > > Here is just a quick one 'cause I'm beyond tired, but please add to it; > > I don't know if the third works, and might not be a good idea to let out > > in public even if it does... > > > > while (*a++ == *b++); strcpy(b,a); > > > > a ^= b ^= a; int tmp = a; > > a = b; > > b = a; > > > > a >> 1; a = a / 2; > > > > b = (((a - b) & (1<<(sizeof(int)-1))) && b) || a; if (a > b) b = a; > > > > a << 3; a = a * 8; > > > > 1 << a; (int) pow((int) a, 2); > > > > a & 1; a % 2; > > > > a & 7; a % 8; > > > > (a & 15) || ++b; if (a % 16 == 0) > > b = b + 1; > > > > _______________________________________________ > > lore mailing list > > lore at ucc.gu.uwa.edu.au > > http://lists.ucc.gu.uwa.edu.au/mailman/listinfo/lore > > _______________________________________________ > lore mailing list > lore at ucc.gu.uwa.edu.au > http://lists.ucc.gu.uwa.edu.au/mailman/listinfo/lore From grahame at angrygoats.net Wed Apr 2 17:25:26 2008 From: grahame at angrygoats.net (Grahame Bowland) Date: Wed, 2 Apr 2008 17:25:26 +0800 Subject: [lore] C hacks In-Reply-To: <20080402075835.GD10214@wilfred.rcpt.to> References: <20080327155011.GC20212@wilfred.rcpt.to> <20080402074740.GB10214@wilfred.rcpt.to> <20080402075835.GD10214@wilfred.rcpt.to> Message-ID: By the way, I can't get that bit of Perl to run, although I haven't looked too hard so perhaps I'm doing something newbish. I definitely have the Perl module it wants. On 02/04/2008, David Basden wrote: > Looks like I was a bit too hasty in posting. Looking at the assembly > of gcc -O3, it can obviously be shortened to the much less evil: > > b -= ((unsigned)(b-a)>>(sizeof(-1)*8-1))*(b-a); > > > David > > > > On Wed, Apr 02, 2008 at 03:47:40PM +0800, David Basden wrote: > > The third line doesn't work, but here is a 'better' version. > > Note the lack of conditionals, so none of that pesky branch > > prediction when calculating b = max(a,b). > > > > This line at least also compiles cleanly with gcc -Wall -ansi -pedantic > > on both IA-32 and AMD-64. > > > > b -= (((b-a)&(((unsigned)-1>>1)^-1))>>(sizeof(-1)*8-1))*(b-a); > > > > David > > > > On Fri, Mar 28, 2008 at 12:50:11AM +0900, David Basden wrote: > > > I was thinking that maybe people are just writing C that is either > > > too readable, too inefficient or both. Maybe a connect-the-equivilent- > > > code puzzle or something? > > > > > > Here is just a quick one 'cause I'm beyond tired, but please add to it; > > > I don't know if the third works, and might not be a good idea to let out > > > in public even if it does... > > > > > > while (*a++ == *b++); strcpy(b,a); > > > > > > a ^= b ^= a; int tmp = a; > > > a = b; > > > b = a; > > > > > > a >> 1; a = a / 2; > > > > > > b = (((a - b) & (1<<(sizeof(int)-1))) && b) || a; if (a > b) b = a; > > > > > > a << 3; a = a * 8; > > > > > > 1 << a; (int) pow((int) a, 2); > > > > > > a & 1; a % 2; > > > > > > a & 7; a % 8; > > > > > > (a & 15) || ++b; if (a % 16 == 0) > > > b = b + 1; > > > > > > _______________________________________________ > > > lore mailing list > > > lore at ucc.gu.uwa.edu.au > > > http://lists.ucc.gu.uwa.edu.au/mailman/listinfo/lore > > > > _______________________________________________ > > lore mailing list > > lore at ucc.gu.uwa.edu.au > > http://lists.ucc.gu.uwa.edu.au/mailman/listinfo/lore > From zanchey at ucc.gu.uwa.edu.au Wed Apr 2 17:37:06 2008 From: zanchey at ucc.gu.uwa.edu.au (David Adam) Date: Wed, 2 Apr 2008 17:37:06 +0800 (WST) Subject: [lore] C hacks In-Reply-To: References: <20080327155011.GC20212@wilfred.rcpt.to> <20080402074740.GB10214@wilfred.rcpt.to> <20080402075835.GD10214@wilfred.rcpt.to> Message-ID: On Wed, 2 Apr 2008, Grahame Bowland wrote: > By the way, I can't get that bit of Perl to run, although I haven't > looked too hard so perhaps I'm doing something newbish. I definitely > have the Perl module it wants. WFM (and I am very impressed). David From grahame at angrygoats.net Thu Apr 3 01:02:44 2008 From: grahame at angrygoats.net (Grahame Bowland) Date: Thu, 3 Apr 2008 01:02:44 +0800 Subject: [lore] Lore pizza night Message-ID: Hey Just a reminder, Lore pizza is on at UCC on Friday evening, from about 6.30 or so. We'll eat pizza and perhaps write some articles. Wander along! Grahame