Shared posts

20 Jun 18:06

The First Micro-service Architecture

In the early 1960s IBM created the 1401 computer. It was wildly popular and exceeded all revenue projections. IBM built 2,800 of them in the first year (1960), and built over 15,000 of them overall. They typically rented for $7,000 per month (~$42,000 in todays dollars) and would have sold (if selling had been an option) for several million dollars.

The 1401 had a clock rate of around 88khz, and as much as 16,000 bytes of core memory. Not 16,384, mind you, 16,000. The machine addressed it's memory in decimal. Some installations had magnetic tape drives; but many had nothing more than a card reader, card punch, and a line printer. The card reader could read 800 cards per minute. The punch could punch 250 cards per minute. The line printer could print 600 lines per minute.

A 1401 with 8,000 bytes, and no tape drive, could run the FORTRAN compiler. The compiler would read in your FORTRAN program from the card reader, and then punch a self-loading binary executable deck of cards.

If you had 8000 bytes, and had to write a FORTRAN compiler, how would you do it? Remember that compilers generally have to make multiple passes over the source code in order to do their work. So how would you structure the program so that it could pass over the code several times?

Typical Multi-pass Compiler

The obvious choice might be to load the whole compiler into memory, leaving just enough space for some working storage for the symbol table and IO buffers. Thus, if you had a three pass compiler, then on pass one, you would read in the FORTRAN source code, and then punch an intermediate deck that was (hopefully) somewhat smaller than the first deck. Then you'd start pass two, and read in the intermediate deck, and punch another (hopefully smaller) intermediate deck. Finally, you'd start pass three, and read in the final intermediate deck in order to punch the loadable binary deck. ...And that's if there were just three passes. What if there were 5? or 10?

Think of the limitations of this system. How big is the compiler? How much space do you need in order to hold the symbol table? How many cards (80 bytes each) can you read in to your input buffers. What size output buffer do you need to punch the intermediate cards? And how much time is going to be spent by the operator, shuttling cards from the punch back to the reader, over and over again, for each pass?

Let's say you've got a thousand line FORTRAN program. How long is pass 1? Let's assume that the intermediate deck is 80% the size of the source deck. So you've got to punch 800 cards at 250 per minute. You also have to read 1000 cards at 800 per minute. You can do that math. It's just over 4 minutes of IO time. And remember, with an 88khz clock rate, computation time was likely significant. Each pass would be a bit shorter than the one before it; but given operator time, and the possibility of a handing error (dropping the cards) we can estimate that our 1,000 line FORTRAN program would require several minutes per pass, keeping the operator busy the whole time. A five pass compilation might require an hour of dedicated operator time; and a lot of wasted intermediate cards. Not to mention wear and tear on the card punch.

Microservices

But that's not what the plucky folks at IBM did. They used an entirely different approach. They read the source code in once, and held the entire source program in memory! They made Sixty three passes over the source code; and they did that by using microservices. They called them phases.

Almost all the memory in the computer was used to store the source code. They held back a few hundred bytes for the executable phases. If you get rid of all the extra blanks, the comments, and other non-essentials, you can hold a pretty big program in 7000+ bytes.

Each compiler phase averaged 150 instructions. Each was read in from the card reader (or mag tape if you had it). Each phase would make a pass over the source code, replacing that source code with smaller intermediate results. So from phase to phase, as the source code took up ever less space, there was ever more working storage for symbol tables and variables. When each phase was complete, the next phase would be read in from the card reader (or tape) and executed. The final phase punched the output result (or wrote it to tape).

What did these phases do? You can read about the details here. In short, these phases swept through the source code, reorganizing it, eliminating redundancy, shortening keywords, replacing variables with addresses, replacing function and subroutine references with addresses, and gradually, inexorably grinding that source code down into binary code.

I have just one word for that. Incredible.

Imagine breaking down the problem of compilation into 62 different programs, each of which can run only once. Each of which must run in the memory vacated by the previous program. Each of which must consume the output of the previous, and prepare the input to the next.

Of course these little programs were microservices, and the compiler used a microservice architecture -- in 1960.

Which just goes to show that there's nothing new under the Sun.

20 Jun 17:09

The Asymmetric Propeller

by Greg Ross

asymmetric propeller theorem

Arrange three congruent equilateral triangles so that their corners meet at a point, like the red triangles above. The arrangement doesn’t have to be symmetric; the triangles can even overlap. Now draw lines BC, DE, and FA to complete a hexagon inscribed in a circle. The midpoints of these three lines will form the vertices of an equilateral triangle.

That’s called the asymmetric propeller theorem, and it’s been known since the 1930s. But in 1979 Beverly Hills dentist and geometry enthusiast Leon Bankoff told Martin Gardner of some further discoveries. Bankoff never found time to write them up, so after the dentist’s death in 1997 Gardner published them in the College Mathematics Journal:

  • The three equilateral triangles need not be congruent. Each can be of any size and the theorem still holds.
  • The triangles need not meet at a point. They can meet at the corners of any equilateral triangle.
  • They need not even be equilateral! If three similar triangles of any sizes meet at a point, the midpoints of the three added lines will form a triangle similar to each of the “propellers.”
  • The similar triangles need not meet at a point! If they meet at the corners of a fourth triangle (of any size) that’s similar to each propeller, then the midpoints of the added lines will form a triangle similar to each propeller, provided that the vertices of the central triangle touch the corresponding corners of the propellers.

Given all this flexibility, Gardner asked, do the propellers even have to be triangles? It turns out that the answer is yes. Still, the discoveries above form a fitting tribute to Bankoff, whom Gardner called “one of the most remarkable mathematicians I have been privileged to know.”

(Martin Gardner, “The Asymmetric Propeller,” College Mathematics Journal 30:1 [January 1999], 18-22.)

The post The Asymmetric Propeller appeared first on Futility Closet.

20 Jun 17:05

“By Deputy”

by Greg Ross

https://commons.wikimedia.org/wiki/File:Shakespeare_engraving_1787.jpg

As Shakespeare couldn’t write his plays
(If Mrs. Gallup’s not mistaken),
I think how wise in many ways
He was to have them done by Bacon;
They might have moldered on the shelf,
Mere minor dramas (and he knew it!),
If he had written them himself
Instead of letting Bacon do it.

And if it’s true, as Brown and Smith
In many learned tomes have stated,
That Homer was an idle myth,
He ought to be congratulated,
Since thus, evading birth, he rose
For men to worship at a distance;
He might have penned inferior prose
Had he achieved a real existence.

To him and Shakespeare men agree
In making very nice allusions;
But no one thinks of praising me,
For I compose my own effusions;
As others wrote their works divine
And they immortal thus today are,
Perhaps had someone written mine
I might have been as great as they are.

— Arthur St. John Adcock

Please support Futility Closet on Patreon.

20 Jun 17:04

The Masked Marauders

by Greg Ross

https://en.wikipedia.org/wiki/File:Masked_Marauders.JPG

In 1969, as a joke, Rolling Stone published a review of a nonexistent album by a nonexistent band, a supposed “supergroup” made up of John Lennon, Paul McCartney, Mick Jagger, and Bob Dylan. Editor Greil Marcus had intended this as a self-evident parody of groups like Blind Faith and Crosby, Stills, Nash & Young, but readers began clamoring for the album. So Marcus and editor Langdon Winner recruited a Berkeley skiffle band and retroactively recorded a few of the songs that had been mentioned in the review.

When California radio stations began to play these songs, the hoax took on a life of its own. Marcus began to shop the band to major labels, and Warner Bros. won the contract with a $15,000 advance. The Masked Marauders came out that November with liner notes making it clear that the whole thing was a joke. Nonetheless, on the strength of its own bootstrapped glamor the record sold 100,000 copies and spent 12 weeks on the Billboard charts.

Related: In 2004 Dave Stewart and Kara DioGuardi invented a band called Platinum Weird that they insisted had existed in 1974. Supposedly it had been a partnership between Stewart and a mysterious singer/songwriter named Erin Grace who, among other accomplishments, had introduced Stevie Nicks to Lindsey Buckingham. In July 2006 VH1 even aired a documentary in which Ringo Starr, Bob Geldof, Elton John, and Mick Jagger pretended to reminisce about the band. On the same day, though, Stewart admitted to the Los Angeles Times that the whole thing had been a hoax.

“Lots of artists from the ’60s created mythology about themselves,” he said. “We’re in our own perception of our own world. So what’s reality and what’s not?”

(Thanks, Jeremy.)

Please support Futility Closet on Patreon!

04 Jun 21:20

gifsboom: Video: Cardboard Box Maze for Cats

04 Jun 21:20

All of your feline fantasies come true in 'Catlateral Damage'

by Jessica Conditt
Life would be so much easier as a cat. Few humans recognize the potential for feline bliss better than Chris Chung, the creator of Catlateral Damage, a first-person cat simulator. As a kitty locked up in a house full of annoying human things, your go...
03 Jun 21:24

Photo





















01 Jun 13:29

IT Consulting Magic

01 Jun 13:27

05/27/15 PHD comic: 'Academic Contradictions'

Piled Higher & Deeper by Jorge Cham
www.phdcomics.com
Click on the title below to read the comic
title: "Academic Contradictions" - originally published 5/27/2015

For the latest news in PHD Comics, CLICK HERE!

01 Jun 13:25

Saturday Morning Breakfast Cereal - The Discomfort Bomb

by admin@smbc-comics.com
01 Jun 12:53

Always stuck somewhere in my head

01 Jun 12:42

Comic for May 30, 2015

01 Jun 12:40

O Ser

by Daniel Lafayette

tirinha---despadrao---ser

01 Jun 12:40

Sapos

by Daniel Lafayette

tirinha---despadrao---sapos

01 Jun 12:38

220

01 Jun 12:31

Saturday Morning Breakfast Cereal - Point System

by admin@smbc-comics.com
01 Jun 10:03

Late merge without conflicts

by sharhalakis

by Done Done Software - @donedonesoft

01 Jun 09:59

chubbymon:lordwanjavi:Kerry Callen > A Callen ParodyThese are...

01 Jun 09:55

vintagegal:Horror-Sci Fi Trading cards illustrated by Jack...

















vintagegal:

Horror-Sci Fi Trading cards illustrated by Jack Davis, 1959

31 May 12:08

Mentirinhas #826

by Fábio Coala

mentirinhas_814

Pronto. Mais uma espécie para o time dos gatos.

O post Mentirinhas #826 apareceu primeiro em Mentirinhas.

31 May 12:06

Meiji-era vision of Hell is not at all frightening, actually kind of cute

by Jessica
Adam Victor Brandizzi

Nice pictures.

bunko30_e0382_p0014

Depicting the horrors of hell through art is a tradition in Buddhism that goes back at least 1,000 years in Japan. By depicting the suffering in store for sinners, the artworks were supposed to scare people onto the straight and narrow.

But if that’s what this late 19th century scroll was for, it might have had the opposite effect. We’ve never seen such a cute hellscape!

This particular scroll is part of Waseda University’s collection and is a copy by an artist called Kanshou of an unknown earlier hell scroll. His style is simple and kind of spindly, making the humans and devils look cartoonish. The combination that doodling style and the sometimes nonsensical situations makes for a very cute package, in our opinion.

Check out these highlights.

▼The hell where you are only allowed to air swim, like this pug

bunko30_e0382_p0003

▼ The hell where you can only communicate through interpretive dancebunko30_e0382_p0019

▼ The hell where you join pretend to be Totoro and join Cirque du Soleil bunko30_e0382_p0014

▼ The hell where you get weighed and a devil tells you you’re fatbunko30_e0382_p0004

▼The hell where a balding stranger invades your personal space and then you get poked with a stick bunko30_e0382_p0011

▼The hell where you have to play horsey with really ugly kids bunko30_e0382_p0013

▼The hell where you have to pretend to be a fan of kamishibai bunko30_e0382_p0017

▼The hell where you stick your head in a giant croissant bunko30_e0382_p0006

▼The hell where you are given unwanted spa treatments bunko30_e0382_p0015

▼The hell where you have to offer room service towels to a very grumpy guestbunko30_e0382_p0010

▼The hell where you get hot tea up your nose bunko30_e0382_p0009

Not exactly wailing and gnashing of teeth, right?

That last one did have an effect on me though. I could really go for a cup of tea now…

H/T Japaaan Magazine
Images:
Waseda

Origin: Meiji-era vision of Hell is not at all frightening, actually kind of cute
Copyright© RocketNews24 / SOCIO CORPORATION. All rights reserved.

Related Stories

31 May 12:06

4gifs: Gettin real tired of your antics, human. [video]



4gifs:

Gettin real tired of your antics, human. [video]

31 May 11:54

Windows is coming. (photo via jonat1992)



Windows is coming. (photo via jonat1992)

31 May 11:54

MOIROLOGIST[noun]a hired mourner.Etymology: from Greek moira,...



MOIROLOGIST

[noun]

a hired mourner.

Etymology: from Greek moira, “fate, death” + logos, “word”.

[Stephen Mackey]

31 May 11:50

Above and beyond, Proof


PHOTOGRAPH BY CHRISTIAN FERNANDEZ, NATIONAL GEOGRAPHIC YOUR SHOT


PHOTOGRAPH BY NEHA GADHARI, NATIONAL GEOGRAPHIC YOUR SHOT


PHOTOGRAPH BY SHANE BLACK, NATIONAL GEOGRAPHIC YOUR SHOT


PHOTOGRAPH BY SEBASTIAN WAHLHUETTER, NATIONAL GEOGRAPHIC YOUR

Above and beyond, Proof

31 May 11:49

pr1nceshawn: One time, when I was drunk…









pr1nceshawn:

One time, when I was drunk…

30 May 00:28

Photo



30 May 00:28

One of my favorite scenes from Kung Fury.

Adam Victor Brandizzi

Opa, já saiu?



One of my favorite scenes from Kung Fury.

29 May 18:58

The Think Piece That Answered Itself

by Brad
99c
27 May 18:00

Radically Diverse Australian Fungi Photographed by Steve Axford

by Christopher Jobson

mush-1

Photographer Steve Axford (previously) continues his quest to document some of the world’s most obscure fungi found in locations around Australia. Axford lives and works in the Northern Rivers area of New South Wales in Australia where he often has to travel no further than his own back yard to make some of the discoveries you see here. The forms of fungi, slime molds, and lichens he prefers to document seem to have no limit in their diverse characteristics. Axford explained when we first featured his work last year that he suspects many of the tropical species he stumbles onto are often completely undocumented. You can follow more of Axford’s discoveries on Flickr and SmugMug.

mush-2

mush-3

mush-4

mush-5

mush-6

mush-7

mush-8

mush-9

mush-10

mush-11

mush-12

mush-13

mush-14