The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Tuesday, September 01, 2015

“Wasting my time? Okay, I'll waste your time.”

This is a fantastic idea! (link via spin the cat) If telemarketers can robocall us, we can certainly use a computer to keep them busy on the phone.

Oh, I would love to set this up.

Wednesday, September 02, 2015

I, for one, am still awaiting our self-aware robotic overlords

Roboticists at the Rensselaer Polytechnic Institute in New York have built a trio of robots that were put through the classic 'wise men puzzle' test of self-awareness - and one of them passed.

Via GoogleMyFacePlusSpaceBookTwitter, Uh-oh, a robot just passed the self-awareness test | TechRadar

I wouldn't worry too much—all this robot did was run some code to solve a logic problem, probably using code written in Prolog or something similar.

Nothing to see here … move along … the computer is your friend

Thursday, September 03, 2015

The times were simpler back then

So I'm reading up on the history of chroot() (link via Hacker News) and it seems like at the time it was introduced, chroot() was rather simplistic in implementation and was nothing more than a way of specifying to Unix, “when you see a leading ‘/’ replace it with this path.” It seems security was an afterthought.

It also reminded me of this bit of Unix history, courtesy of The Bell System Technical Journal, Volume 57, Number 6, Part 2 (July–August 1978), which shows just how loose everything was in early versions of Unix:

The file system structure allows an arbitrary, directed graph of directories with regular files linked in at arbitrary places in this graph. In fact, very early UNIX systems used such a structure. Administration of such a structure become so chaotic that later systems were restricted to a directory tree.

Friday, September 04, 2015

Boatmurdered, or how I learned to stop worrying and flood the forests with lava

This morning I found the mangled body of a fellow dwarf in the hills outside of the capital, surrounded by elephant tracks. I didn't think he'd be complaining, so I emptied out his pockets.

I knew it was going to be a lucky day for me this morning, before the guards found me sleeping in the back of the warehouse and kicked me out. Not only was this guy loaded, but he had a piece of paper directing him to take charge of one of the colonies, some place named "Boatsmurdered". Whoever named that must have had a wierd sense of humor.

Well, I figured the place had never seen the guy's face, so I took the paper (and the money, of course) and started following the directions on the piece of paper.

I finally found the place. The directions lead me through a hidden passage that looked strangely like an escape tunnel. It wasn't till I got inside and tried to find out who was in charge that I found out why. It seems that this place is under siege by a combined force of goblins and Elephants, and the last ruler dug the tunnel to escape. It sounded like a good idea to me, but when I tried to open the door to the escape tunnel the whole thing collapsed. Guess I'm in for the duration.

Everything's in chaos here, no one can go outside because of the elephants and goblins. The dwarves kept acting like I should know what to do, so I told them to dig some fortifications we could shoot outside from. The other dwarves informed me, to my surprise, that the goblins had bows too. It was a frightening concept and made me long for the escape tunnel. But I had already noticed the other dwarves skeptical looks at me so I ordered them to do it anyway and said it would all work out.

Dwarf Fortress - Boatmurdered

Elephants. Mandrills. Goblins. Lava. Lots of lava. Burned forests. And all too common psychotic dwarves trying to carve a life out of a mountain of madness.

Welcome to Dwarf Fortress, a simulation game so rich with details, that it can simulate “a dwarven executioner, with broken arms unable to use his hammer, delivering punishments by biting his victims and tearing off their limbs, keeping one in his mouth for years.” Wow!

Boatmurdered is the story of a game of Dwarf Fortress, passed from player to player as they each had a chance of running a Dwarvish colony in the mountains.

It did not end well.

Saturday, September 05, 2015

Some impressions of DynASM

I'm curious to test something and, odd as it may seem, the best way to do this (in my opinion) was to try using DynASM, the dynamic assembler used by LuaJIT (of which it is a part, but can be used separately from, LuaJIT). The official document is lacking somewhat, so I've been following a tutorial (along with the tutorial source code) for my own little project.

I will not be re-covering that ground here (that, and the The Unofficial DynASM Documentation should be enough to get you through using it if you are interested in it) but I will give a brief overview and my impressions of it.

DynASM is used to generate code, specified as assembly, at runtime, not at compile time. As such, you give the code you want to compile in your program thusly:

  if (token.type == TOKEN_NUMBER)
    | mov ax,token.value
  else if (token.type == TOKEN_VARIABLE)
    | mov ax,[g_vars + token.value]

All this code does is generate different code depending on if the given token is a number or a variable. The DynASM statements themselves start with a “|” (which can lead to issues if you aren't expecting it) and in this case, it's the actual assembly code we want (more assembly code can be specified, but it's limited to one assembly statement per line). Once we have written our program, the C code needs to be run through a preprocessor (the actual DynASM program itself—written in Lua) and it will generate the proper code to generate the proper machine code:

  if (token.type == TOKEN_NUMBER)
    //| mov ax,token.value
    dasm_put(Dst, 3, token.value);
#line 273 "calc.dasc"
  else if (token.type == TOKEN_VALUE)
    //| mov ax,[g_vars + token.value]
    dasm_put(Dst, 7, g_vars + token.value);

The DynASM state data, in this case, Dst, can be specified with other DynASM directives in the code. It's rather configurable. You then link against the proper runtime code (there are versions for x86, ARM, PowerPC or MIPS) and add some broiler-plate code (this is just an example of such code) and there you go.

It's an intriguing approach, and the ability to specify normal looking assembly code is a definite plus. That you have to supply different code for different CPUs is … annoying but understandable (you can get around some of this with judicious use of macros and defines but there's only so much you can hide when at one extreme, you have a CPU with only eight registers and strict memory ordering and at the other end, CPUs with 32 registers and not-­so-­strict memory ordering). The other thing that really bites is the use of the “|” to denote DynASM statements. Yes, it can be worked around, but why couldn't Mike Pall (author of LuaJIT) have picked a symbol not used by C for this, like “@” or “$”? Unfortunately, it is what it is.

Overall, it's rather fun to play with, and it was pretty easy to use, spotty documentation not­with­standing.


Of course it's slower, but I didn't expect it to be quite that bad

Time for another useless µbenchmark! This time, the overhead of trapping integer overflow!

So, inspired by this post about trapping integer overflow, I thought it might be interesting to see how bad the overhead is of using the x86 instruction INTO to catch integer overflow. To do this, I'm using DynASM to generate code from an expression that uses INTO after every operation. There are other ways of doing this, but the simplist way is to use INTO. I'm also using 16-bit operations, as the numbers involved (between -32,768 and 32,767) are reasonable (for a human) to deal with (unlike the 32-bit range -2,147,483,648 to 2147483647 or the insane 64-bit range of -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807).

The one surprising result was that Linux treats the INTO trap as a segfault! Even requesting additional information (passing the SA_SIGINFO flag with sigaction()) doesn't tell you anything. But that in itself tells you it's not a real segfault, as a real segfault will report a memory mapping error. Personally, I would have expected a floating point fault, even though it's not a floating point operation, because on Linux, integer division by 0 results in floating point fault (and oddly enough, a floating point division by 0 results in ∞ but no fault)!

But, aside from that, some results. I basically run the expression one million times and simply record how long it takes. The first is just setting a variable to a fixed value (and the “- 0” bit is there just to ensure an overflow check is included):

x = 1 - 0
overflowtimeexpression result
true0.0090800001
false0.0068200001

Okay, not terribly bad. But how about a longer expression? (and remember, the expresssion isn't optimized)

x = 1 + 1 + 1 + 1 + 1 + 1 * 100 / 13
overflowtimeexpression result
true0.07952800046
false0.03012500046

Yikes! (But this is also including the function call overhead). For the curious, the last example compiled down to:

	xor	eax,eax
	mov	ax,1
	add	ax,1
	into
	add	ax,1
	into
	add	ax,1
	into
	add	ax,1
	into
	add	ax,1
	into
	imul	100
	into
	mov	bx,13
	cwd
	idiv	bx
	into
	mov	[$0804f50E],ax
	ret

The non-overflow version just had the INTO instructions missing—otherwise it was the same code.

I think what's surprising the most here is that the INTO instruction just checks the overflow flag and only if set does it cause a trap. The timings I have (and I'll admit, the figures I have are old and for the 80486) show that INTO only has a three-cycle overhead if not taken. I'm guessing things are worse with the newer multipipelined multiscalar multiprocessor monstrosities we use these days.

Next I'll have to try using the JO instruction and see how well that fares.


When an issue requires a clone to resolve, I think the bus number is a bit too low

Over a month ago, Mike Pall announced he was leaving the LuaJIT project, which is sad, considering that LuaJIT has been pretty much his project. But he does have a sense of humor about leaving the project:

Suggested by http://www­.freelists­.org­/post­/luajit­/Luajit-30-plan,2

Unclear how to find the upstream tracker to push this issue to. Will send pull request to upstream with DNA/RNA sequence, once this has been resolved.

Long-term enhancement request. No milestone assigned, yet.

Clone Mike Pall • Issue #45 • LuaJIT/LuaJIT

Sunday, September 06, 2015

I'm sorry, but I have to unfriend you—you're a credit risk

In short: You could be denied a loan simply because your friends have defaulted on theirs. It’s the kind of digital redlining that critics of “big data” collection have been warning of for years. It could make Facebook a lot of money, and it could make the Web even less safe for poor people. And it could be just the beginning.

Via Hacker News, Facebook Wants to Redline Your Friends List - Pacific Standard

This might warrant further investigation because it's just on the cusp of believability that this could be coming soon. And if it is true (and I'm not saying it is) I have to wonder what exactly the rationale is for denying a loan just because you have a few (or many) deadbeat friends. Because like follows like?

Monday, September 07, 2015

Some more usless µbenchmarks checking for integer overflow

Using the INTO instruction to check for overflow was dog slow, so what about using JO? Will that be slow?

The results speak for themselves (reminder—the expressions are compiled and run 1,000,000 times):

x = 1 - 0
overflowmethodtimeresult
trueINTO0.0090800001
trueJO0.0068080001
false-0.0059380001
x = 1 + 1 + 1 + 1 + 1 + 1 * 100 / 13
overflowmethodtimeresult
trueINTO0.07984400046
trueJO0.03027400046
false-0.03024500046

Even though the code using the JO instruction is longer than either version:

	xor	eax,eax
	mov	ax,0x1
	add	ax,1
	jo	error
	add	ax,1
	jo	error
	add	ax,1
	jo	error
	add	ax,1
	jo	error
	add	ax,1
	jo	error
	imul	100
	jo	error
	mov	bx,13
	cwd
	idiv	bx
	jo	error
	mov	[$0804F58E],ax
	ret
error:	into
	ret

it performed about the same as the non-overflow checking version. That's probably due to the branch prediction having very little overhead on performance. One thing to notice, however, is that were a compiler to go down this path and check explicitely for overflow, not only would the code be larger, but overall it might be a bit slower than normal as there are commonly used optimizations (at least on the x86 architecture) that cannot be used. For instance, a cheap way to multiply a value by 5 is to skip the IMUL instruction and instead do LEA EAX,[EAX*4 + EAX], but the LEA does not set the overflow flag. Doing three INC EAX in a row is smaller (and just as fast) as doing ADD EAX,3, but while the INC instruction does set the overflow flag, you have to check the flag after each INC or you could miss an actual overflow, which defeats the purpose of using INC to generate smaller code.

And one more thing before I go, and this is about DynASM—it's not stated anywhere, but if you use local labels, you have to call dasm_setupglobal() or else the program will crash. I found this out the hard way.

Tuesday, September 08, 2015

“a cage for half a dosen of hennys or chekyn to have with yow in the galey, for ye schal have nede unto them meny tymes.”

“Guard your face carefully from the enormous insects,” instructs the guide for 12th-century pilgrims to Santiago de Compostela, “and if you do not watch your feet carefully, you will slip rapidly up to your knees in the quicksand.”

I hereby share some of this bounty with 21st-century travelers. Whatever the nature of your next voyage, this advice should help you get there and back again without falling victim to thieves, plagues or enormous insects. (You’ll have to find your own coping mechanisms for jet lag and selfie-stick malfunction.)

Seat location is also important. Wey offers this compelling advice: If you go in a galley, choose a seat in the top level, because the lowest level is “ryght smolderyng hote and stynkyng.” Similarly, Brasca cautioned that the traveler “should take care to arrange in good time — especially if given to suffering from the head on account of the movement of the sea — to have his lodging in the middle of the galley and near a middle door in order to have a little air.” …

Via Hacker News, What tips for traveling have changed since medieval times? Surprisingly few. - The Washington Post

Wow! To think that even 500 years ago they were complaining about conditions in coach!


I don't think anybody actually uses this instruction

Odd.

The runtime code for DynASM looks a bit … odd, and I was curious what Valgrind had to say about it.

[spc]lucy:~/source/jit>valgrind ./calc
==15664== Memcheck, a memory error detector.
==15664== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==15664== Using LibVEX rev 1575, a library for dynamic binary translation.
==15664== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==15664== Using valgrind-3.1.1, a dynamic binary instrumentation framework.
==15664== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==15664== For more details, rerun with: -v
==15664== 
x = 1 - 0
vex x86->IR: unhandled instruction bytes: 0xCE 0x66 0xA3 0xCE
==15664== Your program just tried to execute an instruction that Valgrind
==15664== did not recognise.  There are two possible reasons for this.
==15664== 1. Your program has a bug and erroneously jumped to a non-code
==15664==    location.  If you are running Memcheck and you just saw a
==15664==    warning about a bad jump, it's probably your program's fault.
==15664== 2. The instruction is legitimate but Valgrind doesn't handle it,
==15664==    i.e. it's Valgrind's fault.  If you think this is the case or
==15664==    you are not sure, please let us know.
==15664== Either way, Valgrind will now raise a SIGILL signal which will
==15664== probably kill your program.
==15664== Use of uninitialised value of size 4
==15664==    at 0xBC945C: _itoa_word (in /lib/tls/libc-2.3.4.so)
==15664==    by 0xBCCA09: vfprintf (in /lib/tls/libc-2.3.4.so)
==15664==    by 0xBE5ACA: vsprintf (in /lib/tls/libc-2.3.4.so)
==15664==    by 0xBD2DEA: sprintf (in /lib/tls/libc-2.3.4.so)
==15664==    by 0x804ACA3: crashreport_hexdump (crashreport.c:154)
==15664==    by 0x804B2BD: crashreport_handler (crashreport.c:388)
==15664==    by 0xBB79AF: (within /lib/tls/libc-2.3.4.so)
==15664==    by 0x804A9DD: main (calc.dasc:472)
==15664== 
==15664== Conditional jump or move depends on uninitialised value(s)
==15664==    at 0xBC9462: _itoa_word (in /lib/tls/libc-2.3.4.so)
==15664==    by 0xBCCA09: vfprintf (in /lib/tls/libc-2.3.4.so)
==15664==    by 0xBE5ACA: vsprintf (in /lib/tls/libc-2.3.4.so)
==15664==    by 0xBD2DEA: sprintf (in /lib/tls/libc-2.3.4.so)
==15664==    by 0x804ACA3: crashreport_hexdump (crashreport.c:154)
==15664==    by 0x804B2BD: crashreport_handler (crashreport.c:388)
==15664==    by 0xBB79AF: (within /lib/tls/libc-2.3.4.so)
==15664==    by 0x804A9DD: main (calc.dasc:472)
==15664== 
==15664== Use of uninitialised value of size 4
==15664==    at 0xBC9474: _itoa_word (in /lib/tls/libc-2.3.4.so)
==15664==    by 0xBCCA09: vfprintf (in /lib/tls/libc-2.3.4.so)
==15664==    by 0xBE5ACA: vsprintf (in /lib/tls/libc-2.3.4.so)
==15664==    by 0xBD2DEA: sprintf (in /lib/tls/libc-2.3.4.so)
==15664==    by 0x804ACA3: crashreport_hexdump (crashreport.c:154)
==15664==    by 0x804B2BD: crashreport_handler (crashreport.c:388)
==15664==    by 0xBB79AF: (within /lib/tls/libc-2.3.4.so)
==15664==    by 0x804A9DD: main (calc.dasc:472)
==15664== 
==15664== Use of uninitialised value of size 4
==15664==    at 0x804ACC0: crashreport_hexdump (crashreport.c:155)
==15664==    by 0x804B2BD: crashreport_handler (crashreport.c:388)
==15664==    by 0xBB79AF: (within /lib/tls/libc-2.3.4.so)
==15664==    by 0x804A9DD: main (calc.dasc:472)
  not in syscall (0xB0044ADC - 0xB0044B31)

valgrind: m_syswrap/syswrap-main.c:606 (vgPlain_client_syscall): Assertion 'sci->status.what == SsIdle' failed.
==15664==    at 0xB000E029: report_and_quit (m_libcassert.c:122)
==15664==    by 0xB000E1C2: vgPlain_assert_fail (m_libcassert.c:185)
==15664==    by 0xB003AEA6: vgPlain_client_syscall (syswrap-main.c:606)
==15664==    by 0xB002C826: handle_syscall (scheduler.c:623)
==15664==    by 0xB002CAED: vgPlain_scheduler (scheduler.c:726)
==15664==    by 0xB0014568: final_tidyup (m_main.c:2716)
==15664==    by 0xB00141C9: shutdown_actions_NORETURN (m_main.c:2578)
==15664==    by 0xB003C2D5: run_a_thread_NORETURN (syswrap-linux.c:139)

sched status:
  running_tid=1

Thread 1: status = VgTs_Runnable
==15664==    at 0xD080B5: pthread_once (in /lib/tls/libpthread-2.3.4.so)
==15664==    by 0xC9BB76: free_mem (in /lib/tls/libc-2.3.4.so)
==15664==    by 0xC9B811: __libc_freeres (in /lib/tls/libc-2.3.4.so)
==15664==    by 0x4000336: _vgw_freeres (vg_preloaded.c:62)
==15664==    by 0xBB78C4: raise (in /lib/tls/libc-2.3.4.so)
==15664==    by 0x804B3E7: crashreport_handler (crashreport.c:495)
==15664==    by 0xBB79AF: (within /lib/tls/libc-2.3.4.so)
==15664==    by 0x804A9DD: main (calc.dasc:472)


Note: see also the FAQ.txt in the source distribution.
It contains workarounds to several common problems.

If that doesn't help, please report this bug to: www.valgrind.org

In the bug report, send all the above text, the valgrind
version, and what Linux distro you are using.  Thanks.

[spc]lucy:~/source/jit>

Really Valgrind? You don't support the INTO opcode? Wow …

Wednesday, September 09, 2015

“You've not experienced Shakespeare until you've read it in the original …”

I have a feeling that a limited number of readers may find this interesting, but I never know—more could find it interesting than I think. In any case, it's a two part video on an analysis of the play Hamlet. The original Klingon Hamlet!

Part 1 gives the background story for The Klingon Hamlet, giving a context for how it came to exist in the first place (along with a brief history of Klingons—not the fictional history of Klingons but the actual history of how the fictional race of beings known as the Klingons came to exist in Star Trek), as well as the construction of the Klingon language. It's interesting to note that Klingons consider Hamlet's speech in Act IV, scene iv to be (heh) the key speech of the play (“O, from this time forth, My thoughts be bloody, or be nothing worth!”), not Act III, scene i (“To be, or not to be … ” or in Klingon, “taH pagh taHbe'”).

Part 2 then goes onto a philosophical digression into translation in general. It's known in Geek circles that Klingon does not have the verb “to be,” and thus, the Klingon translation for “to be, or not to be” is literally “to continue, or not continue.” But there are issues with translating Hamlet into Spanish (two verbs for “to be”) or Mandarin (many forms of “to be”) and how difficult it can be to move cultural works across culture.


Oh my god! The radio just went to 11!

♫The bigger the cushion, the sweeter the pushin
That's what I said♫

“What?”

♫The looser the waistband, the deeper the quicksand
Or so I have read♫

“Wait a second … ”

♫My baby fits me like a flesh tuxedo
I like to sink her with my pink torpedo♫

“No! That can't be!”

♫Big bottom, big bottom
Talk about bum cakes, my girl's got 'em
Big bottom, drive me out of my mind
How could I leave this behind?♫

“My God! They're playing Spin̈al Tap on the radio!”

Thursday, September 10, 2015

Up-up and away

There's the story of the guy that strapped a large number of helium filled balloons to a lawn chair, just because he always wanted to fly. The modern variation today is strapping a large number of drones to a lawn chair, just because he always wanted to fly (link via Instapundit).

Neither variation appears safe.

Friday, September 11, 2015

In search of … the original Key Lime Pie recipe

It was while investigating reports of a ghost in the lavish mansion built by William "Bill Money" Curry in 1855 that Sloan encountered the original recipe for Key lime pie. "I heard movement on the floor above," he said, "but what stopped me cold was the recipe I saw in the pantry, the recipe for 'Aunt Sally's Key Lime Pie.'"

Sloan's early pie education came flooding back: "Most sources credit an anonymous 'Aunt Sally' with inventing Key lime pie. Well, it turns out that Aunt Sally was the cook at the Curry Mansion and as soon as I saw that paper, my heart started racing and I started to shake. I knew, I just knew. it was like finding the Golden Fleece, the Holy Grail."

Almost every family in Florida has a recipe for Key lime pie and they all claim it's the only authentic version. The filling is rarely disputed: Everyone agrees that green food coloring is for dry-landers and that a proper version is pale yellow. Rather, most debates revolve around the other two variables, crust and topping.

Battle lines in the crust camp are drawn between traditional pastry crust and graham cracker crust. The topping dissension is equally binary. Some believe that a lime pie can only be considered "Key" if modeling a lofty bonnet of meringue. Others argue that a slice of any self-respecting Key lime pie always sports a rakish dollop of whipped cream, preferably one that falls off to the side á la a French beret.

"There is no cream in the filling," he said. "There was never any cream. This pie was invented to use condensed milk. William Curry made his fortune in hardware. He provisioned ships. He brought the first condensed milk to the Keys not long after Gail Borden invented it in 1856."

The Curious Case of Key Lime Pie | Epicurious.com

Having lived in Florida for thirty-six years, I have learned that Key Lime Pie is pale yellow in color. I did not know that it originally used condensed milk (and it's odd to think that condensed milk has been available for 160 years!). I also did not know that Key limes are yellow, not green.

Saturday, September 12, 2015

Stories about a software company

Mercator Software, TSI International Software at the time, was my entry to the professional information technology (IT) world. It couldn't have come at a more interesting time, the peak of the dot-com bubble. We weren't a dot-com company, we were in business years before the Internet, but we were swept away by the madness. In a flash it was a billion-dollar company, only to sink in equally spectacular fashion. And there's me in 1998, last one in the office that unseasonably warm night, about to witness it all.

Semi-Disclaimer: My experience at Mercator is not comparable to the majority of employees who worked there over the years. I worked at the Bannockburn Illinois office which supported their line of EDI/B2B software. The home office was off in Wilton Connecticut and the flagship Mercator product line was developed down in Florida.

HuguesJohnson.com - The Abridged Story of Mercator Software

I'm finding it odd to read a story about a company I worked (however briefly) for. I was hired on as a contractor in Florida office in the mid-90s by a friend who worked there and my job at the time was to help port the software to various flavors of Unix popular at the time. I spent less than a year at the company and I probably departed long before Hugues Johnson started. Two things I remember about working there—one, the computer that ordered parts for itself, and two, the product produced cost anywhere from (I think) $1,500 (Windows version) to over $50,000 (for the computer that ordered parts for itself), and it was the same codebase. I remember thinking to myself, for $50,000 all you got was a 3½ floppy disk and one sheet of instructions? Shouldn't you get a bit more for that amount?

I still know two people who work on the project to this day (still in Florida, but they work for IBM). And the funny thing is—even though they both work on the same product, they've never met each other! (although they've heard of each other).

Sunday, September 13, 2015

Thread and a large red ball

It is impossible that this story be about anything other than a 3 ½-minute trick in the Penn & Teller show. It is a very beautiful trick that can’t be fully conveyed with words because it looks so simple: Teller makes a ball come to life. It isn’t a very exciting trick in that no knives, fire or risk are involved. A lot of their tricks have those.

And, to make matters worse, the trick I have the (partial) lowdown on, Penn doesn’t particularly like, or at least not until after he tells the audience how it is done—with a thread—before he walks off stage. And, therefore, yes, that’s right: This is going to be a story about a ball and a string—and Teller.

A man, a ball, a hoop, a bench (and an alleged thread)… TELLER! - Las Vegas Weekly

Bunny and I have been watching “Fool Us”, a television show where magicians attempt to fool Penn & Teller for a chance to play Las Vegas, but I guess it's also a means to showcase some pretty good magicians. At the end of each show they also perform one of their signature acts, and it's because of this you can see Teller's Red Ball Trick. Even knowing the secret doesn't diminish the skill and artistry involved.

Monday, September 14, 2015

I think there's a lesson here in simplicity, but I'm not sure what

Once upon a time, unbeknownst to each other, the "Automated Accounting Applications Association" and the "Consolidated Computerized Capital Corporation" decided that they needed the identical program to perform a certain service.

Automated hired a programmer-analyst, Alan, to solve their problem.

Meanwhile, Consolidated decided to ask a newly hired entry-level programmer, Charles, to tackle the job, to see if he was as good as he pretended.

Alan, having had experience in difficult programming projects, decided to use the PQR structured design methodology. With this in mind he asked his department manager to assign another three programmers as a programming team. Then the team went to work, churning out preliminary reports and problem analyses.

Back at Consolidated, Charles spent some time thinking about the problem. His fellow employees noticed that Charles often sat with his feet on the desk, drinking coffee. He was occasionally seen at his computer terminal, but his office mate could tell from the rhythmic striking of keys that he was actually playing Space Invaders.

Via Hacker News, The Parable of the Two Programmers

For some reason, I keep thinking back to making it look too easy. Strange.

Tuesday, September 15, 2015

Oh wait … this is an art project, isn't it?

This is a cool concept for a desk. Perfect for taking notes or doing quick sketches and very easy to clean, but you can't really keep anything on the desk. Well, you could but you would have to constantly rearrange items.

Perhaps if only half the desk were covered with paper …

Wednesday, September 16, 2015

It was twenty years ago today, that Crash Override taught us to HACK THE PLANET!

It’s the 20th anniversary of “Hackers,” one of only a handful of movies in the cybersecurity film canon. It occupies a strange place in an information security community that doesn’t traditionally suffer technical inaccuracy — “Hackers” is both beloved and technologically ridiculous. Two decades after characters Crash Override went swimming with Acid Burn, we’ve asked actual hackers, engineers, social critics, filmmakers, and even “Hackers” director Iain Softley to reflect on the movie’s influence and lasting appeal.

Via Hacker News, ‘Hackers’ at 20:

When I first saw the headline, I thought Wait? Isn't Hackers closer to thirty years old now?

But no, this isn't about the book, but the movie “Hackers,” the cheesy 90s movie staring Jonny Lee Miller and a pre-Brad Pit Angelina Jolie teaching us all to “HACK THE PLANET!!!111111!!!!!” I'll admit, it's always been a guilty pleasure of mine.

But really? Twenty years? It can't be! I remember seeing this in the theater! No way it was twenty years ago.

Now, where did I put my onion?

Thursday, September 17, 2015

Made from the heart of a fallen star and forged in the fires of a master smith is a knife that can even impress Anthony Bourdain

When it comes to chef, author, and professional foodie Anthony Bourdain, you never know quite what to expect, but you can bet your lucky stars it will make you feel inferior in every way. His latest blasé dive into cool, titled Raw Craft With Anthony Bourdain, is a collaboration with the The Balvenie Distillery that aims to dig up some of he world’s best-kept craftsmen (and women). In the latest episode, he heads to a workshop in Olympia, Washington to meld two of our favorite things: food and space rocks.

Knife maker extraordinaire Bob Kramer is one of just 122 recognized master bladesmiths in the U.S. His creations can fetch astronomical (no pun intended) prices at auction, in part because of the incredible detail that goes into making them, and because they’re made of meteorite. “When you think about it, they represent man’s first encounter with a solid chunk of iron – these star stones,” he says.

Via Instapundit, Anthony Bourdain Melts a Meteorite to Make a Beautiful Blade | Nerdist

It's not so much Anthony Bourdain melting a meteorite than it is watching Anthony Bourdain watching Bob Kramer melt a meteorite to form an ingot of steel from which he makes a custom, one of a kind, chef's knife that, if you have to ask, you can't afford. You (and I) are probably not worthy of even holding, much less using, this chef's knife is much cheaper than I expected! I was easily expecting the price to be at least twice that amount, so it's a relative “cheaper” not an absolute “cheaper.” I was also not expecting it be to for sale through the Intarwebs. Go figure!

Friday, September 18, 2015

Not feeling the love

I went to search for a post I wrote about a “Swedish programming language” (why? For reasons). I did what I usually do and search Google and got nothing (and adding quotes to the search term returned an explicit “No results! Ha ha!”). Sensing a pattern, I decided to hit Bing and … no results. And it appears that Bing ignores quotes around the search term.

I wanted this page! It even has the phrase “Swedish programming language” in the XXXXXXX page! (I finally found it by manually searching the site on my server)

Do Google and Bing no longer love me? Is it because I'm not encrypting all the things? Because I'm not running over HTTP/2? Or is the phrase “Swedish programming language” too obscure to bother doing a proper search? Oh wait! I know! It's because those pages weren't updated within the last twenty minutes!

Sheesh!


Breakin' the law! Breakin' the law! Scufflaws breakin' the law!

The 2015 Florida Statutes

Title XLVI CRIMES

Chapter 798 ADULTERY; COHABITATION

View Entire Chapter

798.02 Lewd and lascivious behavior.—If any man and woman, not being married to each other, lewdly and lasciviously associate and cohabit together, or if any man or woman, married or unmarried, engages in open and gross lewdness and lascivious behavior, they shall be guilty of a misdemeanor of the second degree, punishable as provided in s. 775.082 or s. 775.083.

History.—s. 6, ch. 1637, 1868; RS 2596; GS 3519; RGS 5407; CGL 7550; s. 773, ch. 71-136.

Statutes & Constitution :View Statutes : Online Sunshine

Huh. How about that. (link from an ariticle about selectively enforced laws from Bob Anstett on FaceGoogleMyBookPlusSpaceTwitter).

Saturday, September 19, 2015

It. May. Cause. Paranoia. As. A. Side. Effect. How hard is that to understand?

The largest study of the effects of the main ingredient of cannabis has shown definitively that it can cause short-term paranoia. The Oxford-led research also, for the first time, identifies psychological factors that can lead to feelings of paranoia in people who take cannabis.

The research team, led by Professor Daniel Freeman, found that worrying, low self-esteem, anxiety and experiencing a range of unsettling changes in perceptions most likely led to the feelings of paranoia.

'The study very convincingly shows that cannabis can cause short-term paranoia in some people,' says Professor Freeman. 'But more importantly it shines a light on the way our mind encourages paranoia. Paranoia is likely to occur when we are worried, think negatively about ourselves, and experience unsettling changes in our perceptions.'

The study, funded by the Medical Research Council (MRC), is the most in-depth investigation ever of the paranoia-inducing effects of the main psychoactive ingredient in cannabis, THC (Δ9-tetrahydrocannabinol). …

How cannabis causes paranoia | University of Oxford

I shouldn't be posting this. Posting this is pouring salt onto a papercut already soaked in lemon juice, but the friend I lost over posting this on MyFaceGoogleTwitterBookPlusSpace (as a comment in another friend's post about an NPR report on the “War on Police”) probably won't listen to me any more and I feel this is actually important.

It's not like I want all drugs to be illegal (quite the opposite in fact, I want them to all be legal, and tax the crap out of it) nor do I like the resulting “War on Drugs” (Prohibition ultimately failed, giving rise to organized crime) but drugs do have side effects, and for marijuana, paranoia appears to be a valid side effect.

Sunday, September 20, 2015

The near futility of encryption key management

Contrary to popular belief, encryption per se isn't all that difficult. The algorithms are well known and hardened, and typically, the actual encryption APIs (the bits of the program that do the actual munging of the bits) are pretty easy to use.

It's the encryption key management that's near impossible to handle correctly. Key authorities are a joke. And even if the authorities in charge of encryption keys weren't a joke, it's still hard to exchange keys with random people and know your communications aren't being monitored, never mind obtaining your encryption keys via literal eavesdropping or through power consumption of your laptop (previous two links via tedu).

Monday, September 21, 2015

You had one job … and … you did it?

It's an exhaust port. It's to exhaust waste material, not suck it in. The fact that the Death Star blew up a planet means it generates a lot of waste heat that needs to be, how you say … exhausted? The Death Star Architect speaks out and he makes some very good points in his defense.

Tuesday, September 22, 2015

Even knowing the secret of a magic trick you can still appreciate the skill and artistry of the presentation

As I said earlier this month, even knowing the secret to a magic trick doesn't diminish the awe in watching the skill and artistry in presenting the trick. Even Teller says as much (link via Bunny). For example, although Penn & Teller are doing the classic Ball and Cups routine with clear plastic cups unless you are paying very close attention, the baseball that pops up at the very end of the trick is still surprising.


But wait! I thought you had to create the universe first!

$1,500 for a sandwich might seem an exorbitant amount of money for just a sandwich, but perhaps not, if you make it from scratch. And by scratch, I mean starting with wheat seeds and spending the next six months growing and collecting the rest of the ingredients (link via Jason Kottke). I think most of us would know where to get salt from (he gets it from three gallons of ocean water) but what about rennet to make the cheese? Or how to properly kill and dress a chicken?

The series makes me appreciate the modern food supply chain that exists. And the $1,500 price tag not only included the raw materials (about $500 worth) but his time (at minimum wage) spent directly making this sandwich.

Wednesday, September 23, 2015

It's … the Muppet Show?

Bunny and I watched the latest go around of the Muppet Show and … eh?

I perhaps found it just slightly more amusing than Bunny did, which wasn't much. The format of the show is no longer the Muppetonian chaos of a vaudevillian theater, but the back stage machinations (filmed as a reality television show complete with one-on-one camera interviews) of a talk show hosted by Miss Piggy who is no longer Kermit's girlfriend (which brings up a question—was she ever Kermit's girlfriend? The original show implied she had the hots for him, but he didn't reciprocate the relationship that much from what I could tell). Fozzie has a human girlfriend whose parents are … racist? Specieist? Muppetist? They don't approve of the relationship in any case and make what could be construed as racist remarks towards Fozzie (why is this even in the Muppet Show? Hello? Disney? Is anybody home?)

You know what? Disney could have taken the old 70s scripts and just slot in new stars. Instead of Alice Cooper, have Lady Gaga. Remove Steve Martin and replace him with Jack Black. Heck, replace Mark Hamill with … okay, you can redo Mark Hamill's episode with Mark Hamill—it'll still work.

Or heck, just rerun the original series again.

But I'm willing to give the new format another episode or two just on the off chance it finds its voice and becomes funny.

Thursday, September 24, 2015

It appears that my high school is now a day care center for delinquents

Coconut Creek High School was the first high school constructed in the City; built in 1972. With enrollment at 1,600, only 29% of the students are proficient in reading and 43% in math. 72% of the student body is considered economically challenged.

Via GoogleMyFaceTwitterPlusSpaceBook, What is your civic idea for Creek High?

My, how my high school has fallen (support for the statistics above). I remember back in 1986 (my junior year) Coconut Creek High School had five Silver Knight award winners, which is amazing when you consider there are only twelve awards given each year, and any senior in a Broward County high school can compete. It was a record at the time and one I think has yet to be broken.

It's sad to think how far down it has fallen.

Friday, September 25, 2015

Crazy Town

It was a crazy day today.

I had two tasks—drive to the local apothecary to pick up a prescription, then head to a local food establishment to obtain some provisions. So I'm pulling out of the driveway at Chez Boca when I see an amusing sight.

Now, Chez Boca is one house shy of the corner, so we're at one end of the block. Our neighbor righ across the street from us has a friend who comes over every Friday to hang out. Said friend lives at the other end of the block. I saw said friend drive from his house some 500 feet to our neighbor's house. I'm always amused when I see that.

Things proceed normally until I start to turn into the parking lot of the local apothecary. There's a driver who appears to be trying to turn into traffic, thinks better of it and starts to back up into the parking lot! I didn't think I was driving that fast that the best course of action was to back away from me as I approached. A few furtive glances, some wasted moments as we try to gauge each others actions, a revving of an engine and I'm past that obstacle.

Then there's the car parked haphazardly not only across two parking spots, but the end of the car was sticking out about halfway.

Sigh.

But that's nothing compared to this parking job:

[This person managed to park perfectly in the handicapped walkway between two handicapped parking spots.  That takes real skill!]

But as always, it could have been worse.

Once inside and at the pharmacy, I was behind a woman who appeared to be in the process of purchasing a large number of candies and several large bags of chips. As the total was being rung up, the woman was getting more and more agitated as it appeared she did not have enough cash to enact the transaction. The pharmacist kept asking if she wanted to remove this item or these items, and each time the total still managed to exceed her ability to pay. A few minutes of this and the woman asked if she could go back to her car and search the seat cushions for change. The pharmacist said that was, indeed, fine. I was then able to obtain the prescription and leave the local apothecary.

At the local food establishment, I gave my order, two number elevens. The cashier punched a few buttons. I then said, “I'll take an unsweetened iced tea for the first order, and a chocolate shake for the second order.” The cashier stopped and looked as if I'd sprouted a second head.

“The first has an unsweetened iced tea, and the second has a chocolate shake,” I said again.

The cashier then proceeded to void the entire order. “You want?”

“A number eleven with an unsweetened ice tea,” I said. The cashier punched a few buttons.

“And?”

“A number eleven with a chocolate shake.”

A few more buttons were punched. “Okay, that's an unsweetened tea and a chocolate shake.”

“Um … could you repeat that order back to me?”

“A number eleven with an unsweet tea and a number eleven with a chocolate shake.”

“Yes.”

That done, I was handed a receipt to await my order.

“Hey, who ordered the sweet tea?”

Before I could answer, someone else behind the counter answered. “That was an unsweet tea!”

“Oh.”

Some moments pass. “Hey, who ordered the unsweetened tea?”

“I did.” Some more moments pass. “Um, I also ordered a chocolate shake.”

“You did?”

“Yes.”

“Okay.”

Several more minutes pass. I was then handed a tall cup topped with whipped cream. “This is a chocolate shake, right?”

“Yup.”

I left quickly and fought my way through rush hour traffic. As I was driving up to Chez Boca, I saw our neighbor's friend driving 500 feet from his house to our neighbor's house. Again. I'm always amused when I see that.

And the chocolate shake turned out to be a vanilla shake with caramel flavoring.

Is it a full moon or something?

Saturday, September 26, 2015

The fight for the smallest chess program is intense

Why would someone someone obsess over writing the world’s smallest chess program? Poudade has a complicated answer, involving paying his respects to a long-ago programming genius, drawing attention to his own coding group, and proving a thing or two to young-whippersnapper coders. That’s what motivated him to devote hundreds of hours to code what is ultimately a tiny black-and-white grid of text and numbers. Poudade’s chasing something like the Platonic ideal of computer chess programs.

He did something that mattered; he had the record. But, as they say, records are made to be broken.

Via Reddit, The bitter rivalry behind the world’s smallest chess program

Poudade's chess game is only 487 bytes in size, yet it's not the shortest chess program anymore, having an extraneous six bytes! And Poudade is not happy about that.

I didn't know the world of smallest chess programs was so cutthroat.

Sunday, September 27, 2015

It's the end of the world as we know it, and I feel fine

A perfect storm of religious prophecy, astronomical phenomena, global conflict, financial instability and natural disaster is conspiring to make this month’s “blood moon apocalypse” the most dreaded doomsday ever.

On Sept. 28, God and science will collide in spectacular fashion with the fourth lunar eclipse in just two years — a series known as a “tetrad” — each coinciding with a Jewish holy day.

The current tetrad of blood moons has fallen on April 14, 2014 (Passover), Oct. 8, 2014 (Feast of the Tabernacle), April 4, 2015 (Passover), and Sept. 28, which marks the first day of this year’s Feast of the Tabernacle.

According to the mongers of doom, this tetrad — the ninth to coincide with Jewish holy days since Jesus Christ — bears the signs of Old Testament prophecy heralding the end of times.

And the fourth and final of the lunar eclipses will also be a Super Moon, making it appear larger than usual and probably even more frightening to those convinced they’re about to meet their maker.

Via Instapundit, Doomsday prophets: Don’t buy green bananas with blood moon coming | New York Post

Ooh! It's the end of the world as we know it … again! Or … well, if not the immediate end of the world then the start of a long and painful process … maybe. Actually, if history is anything to go on, sit back, relax, have a Mai Tai, and enjoy the super blood moon.

Monday, September 28, 2015

Good for Oregon

On a recent afternoon, Ms. Walton was at a free legal clinic here in Oregon’s largest city, filling out paperwork to have that infraction forever sealed. Once the process is complete, she will be able to legally say to an employer, landlord or anybody else who asks that she has never been convicted or cited for any drug crime at all.

“It’s taken away a lot of my life,” Ms. Walton said as she inked out her fingerprints, which Oregon requires applicants for sealing to file.

Many states in the past few years have begun to rethink the implications of harsh drug or mandatory sentencing laws that led to high incarceration rates and costs, revising rules so people who have righted their lives can escape the stigma of a criminal record.

Ms. Walton used a state law, not restricted to drug offenses, that allows anyone with a lowest-level felony, misdemeanor or nontraffic violation to wipe the slate clean if 10 years or longer has gone by without another conviction. Starting next year, more serious felony marijuana convictions of the past, like manufacturing, will be eligible for record sealing as well.

Via Hacker News, Oregon’s Legal Sale of Marijuana Comes With Reprieve - The New York Times

I like to think that I do not have a “myoptic worldview” as some people have said. If I did, I don't think I would link to the above article about Oregon's experiment with legalizing marijuana and say that I applaud what Oregon is doing. I've held the belief that all drugs should be legal, just taxed at an insane rate. But otherwise, treat it as we do alcohol (although I'm not sure how I feel about drunks on horseback being arrested—I mean, doesn't the horse know the way home? The “drivers” aren't exactly “driving” the horse, are they? I don't think they should be arrested, or even stopped unless the horse is causing an issue. They're being more reponsible taking a sober animal home than in driving a heavy metal cage down the highway at speed. And how will this play out with self-driving cars? My, we live in interesting times indeed!).

“But Sean,” you say, “what about that post from the other day, about marijuana causing paranoia? How does that jibe with you wanting all drugs legalized?”

As with alcohol, there are benefits both good and bad to all drugs. In the case of that post from a few days ago, I was trying to point out (not very successfully I'll admit) that marijuana can change your world view, in potentially good or potentially bad ways. And maybe, just maybe, take it a bit more moderately.

Tuesday, September 29, 2015

The map that does not end

I like maps (and I have a large collection of road maps I've collected over the years), but I really like maps that are unusual or that have a unique projection, like the Dymaxion map (which can be folded up into an icosahedron) or the Upside Down World Map where north is at the bottom (north at the top appears to be a Western convention; maps of Japan by the Japanese tend to put east at the top, because that's where the sun rises).

But this linear map of Lake Michigan (link via Jason Kottke) is something I've never seen before. It's also continuous in that you can wrap the top edge to the bottom edge. Very neat.


No, it's the Muppets

Bunny and I watched the second epside of “The Muppets” (and not “The Muppet Show” as I related last week) and this time, it actually elicited a few chuckles from the both of us, giving the show another one episode chance. But they really do need to work on the Fozzie subplots. Fozzie as a souvenir taker-cum-kleptomaniac just didn't work—it had a rather painful ending.

But Miss Piggy and Josh Groban dating? That plotline was amusing.

Wednesday, September 30, 2015

Hey FaceGoogleMyBookPlusTwitterSpace, you're feaking me out!

“Hey, Bunny! Come take a look at this!”

[It's actually nicer and cheaper than the map I linked to originally!]

“That's MyFaceGoogleBookPlusSpaceTwitter, isn't it?”

“Yup.”

“Hey! Didn't you just write a post about maps?”

“Yup.”

That's why I don't have a GoogleMyTwitterFaceSpaceBookPlus page!”

Obligatory Picture

[Here I am, enjoying my vacaton in a rain forest.]

Obligatory Links

Obligatory Miscellaneous

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site: http://boston.conman.org/, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

http://boston.conman.org/2000/08/01

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2017 by Sean Conner. All Rights Reserved.