Tuesday, March 22, 2016

[hwljkfsg] No good programming language

Provocative hypothesis: there are no good computer programming languages, nor will there ever be.

A programming language includes not only its syntax but also its libraries.  Any good programming language must have a rich collection of libraries, which already limits the candidates to a handful.

Any programming language will have bad design decisions made in the course of its development.  Human nature, many cooks, problems discovered over time and use.  We consider two cases.

There may be strong forces that prevent the bad design from being fixed: wanting compatibility with old code, ability to read old code, not wanting to inconvenience old programmers.  There may be mutual dependencies of bad features and a lack of ability to coordinate both improvements happening together, for example, two libraries maintained by different authors.

On the other hand, if those forces are weak, and the language can fix its problems quickly, then the language will be too fluid to attract a large community of programmers.  Old programmers will leave when the languages changes out from under them; new programmers will be frustrated unable to run or leverage old code, and are unable to read and understand old code.

In the future, code translation tools may mitigate some of the problems.  Translate between versions of a language.  Translate an old language's library into a new language.  Translate code using an old version of a library to a new version: this will be tricky if the library's API or underlying execution model has changed.

There does not seem to be much of an engineering approch toward designing new programming languages.  Avoid the mistakes of the past.  It's still considered more of an art.

[lzdaevao] Discriminating by unchangeable

Hypothesize that every feature about a person he or she cannot easily change will become something society discriminates by.

Is it true?  Previously we noted certain ethnicities seem less discriminated in American society.

Famous features: skin color, language/dialect/accent, gender, attitude toward sex and sexual promiscuity, sexual orientation, weight, fashion sense, courtship rituals, physical disabilities, mental disabilities, other social class markers (which is a tautology).  In other cultures: religion (where religious membership is important and conversion is difficult), caste (another tautology).

Previously, things one cannot change about oneself because of psychological reasons.

Hair color is an example of a feature that is easy to change, and not much discrimination happens by it.

If it is true, which way is the causality?

It could be that discrimination happens for some exogenous reason, and society teaches us to notice the features society discriminates by.  That is, it is an illusion that we discriminate by everything we can discern: what we can discern is what society has taught us to discriminate by.  If so, we would expect there to be many examples of difficult-to-change features that a person could distinguish or learn to distinguish, but most people in a society do not.  I have heard that Japanese society discriminates between Japanese-looking versus Chinese-looking facial features, but American society does not.

The other possible direction of causality is interesting: if true, society inherently needs to discriminate, perhaps to achieve a distribution of labor, so latches on to whatever unchangeable features are available to accomplish it.  (Which feature leads to which labor assignment is an unsolved problem: politics.)  If true, the consequences are profound: social movements to decrease discrimination by certain features (e.g., skin color) will not be successful, because society has an inherent need to discriminate, somehow.  The optimistic elimination of one form of discrimination will simply give rise to another.

[ycwzbhxa] Viable seeds

Food fruits with no seeds or nonviable seeds are unnerving from the perspective of food security.  Consider regulations that provide incentives for growers to produce fruits with viable seeds that faithfully encode the fruit.

We might end up with genetic engineering to put the seeds back.

[upokxczh] Helping owls hunt

Small rodents come out at night to avoid predators under the cover of darkness.  Owls hunt at night.  If we wish to decrease a rodent population, what could people do to help owls hunt more effectively?

Perhaps provide dim light.  What color?  Probably want to prevent the light from shining or reflecting upward so the owl can remain in the dark until the last possible moment.

Probably remove opportunities for cover for the rodent: trees, bushes, tall grass?  Remove human structures and objects that the rodent can get under.

[nkmqxivr] AlphaGo versus 3 players

Host an event a 3 sites around the world at 8 hour offsets, with each site's session lasting at most 8 hours.  This allows the event sort of to run 24 hours a day, allowing a virtual audience anywhere in the world to experience some of the event live.

What are three cities separated by 120 degrees of longitude?

Perhaps Olympics co-hosted by 3 cities, though outdoor events also need to be in the correct hemisphere.

Original inspiration was AlphaGo versus Lee Sedol: a computer does not need to rest between games, so the event could have easily been AlphaGo versus 3 top go 囲碁 players, providing the world with 15 games (instead of 5) by this fascinating program.

[huwfczdp] Chemistry simulator

Create a chemistry simulator similar in spirit to the many mechanics physics simulators that abound in games and real science, e.g., Kerbal Space Program.  This of course is likely monstrously difficult.  Perhaps it can give the correct answer when it knows it, and "don't know" when it doesn't, which will be often.

Motivation is education: experiment with chemistry without a lab.

In the absence of being able to do a realistic simulation, simplify the laws of chemistry to make something fun.  Minecraft is an extreme example.

[hdhwbruz] Late pawn handicap

Play starts like a normal chess game, but on move (say) 80, a pawn appears on the second rank of the e file for the weaker player.  (Details yet to be worked out of what to do if that square is occupied on that move.)  This provides a very small handicap in favor of the weaker player.  The player has to survive until move 80, then center pawns are the weakest in the endgame, then the pawn has a long distance to go before promotion.

Perhaps like shogi, the extra pawn appears in hand, able to be dropped on KP2 by the player any time after move 80.

Inspired by the 1-stone tengen handicap in go 囲碁.  Opening play concentrates on the corners and sides, so the tengen stone becomes relevant only relatively late in the game.

[tkxpepac] 4D mechanical Rubik's cube

Design a functional mechanical 4D Rubik's cube out of rigid 4D parts.  4D CAD programs probably do not exist.

[rblzlerf] Global semaphore

Create a website that provides mutexes, locks, or semaphores to clients.  Interacting clients know the shared name of a lock.  This should be easy; back it with a database that provides atomic operations.  High latency is acceptable for some applications.

Perhaps provide a service of clearing locks that have been held longer than a specified time interval.

[zrrlzumo] Inductive data storage

Create a external storage device whose both power and communication is done wirelessly, i.e., inductive power.  It can be completely sealed, so could be very durable.

Read-only could be a way to distribute media.

RFID already does this with minuscule amounts of data.

[bwucpcou] Simultaneous Swiss

In each round, each player simultaneously plays against (say) 4 opponents.  (Each opponent is also simultaneously playing against 4 other opponents, not necessarily all in the same pool.)  Devise a method for the multiple results of each round to decide the simultaneous pairings of the next round.  probably some modification of Swiss, with multiple pairings in a round.

Original motivation was a radical restructuring of the Chess Olympiad with separated teams playing simultaneous consultation games.

[ftxmzpzt] Simple proof of finite simple groups

The proof of the complete enumeration of finite simple groups is very long.  Does it have to be?  We imagine discovering some deep simplicity from which all the groups can be derived.

[ddebkqem] Efficient arctangent

Given a rational number, compute its arctangent in the most efficient way possible, to arbitrary given precision.  For example, atan 1 by the standard Taylor expansion is not the most efficient way to compute pi/4; Machin's formula is better.

[mbbvhdpe] Do tests still pass?

The computer not only periodically checks installed software package integrity (e.g., debsums cronjob) but also runs packaged tests on the software to verify that they continue to pass.  Detects hardware failure, unexpected software interactions.

[twcnbxba] Cube with colored faces

There are 30 ways to color the faces a cube with 6 given distinct colors.  One of them is the canonical Rubik's cube coloring.  (Previously, allowing color permutation.)

Assemble a full set of 1x1x1 Rubik's cubes with all the possible colorings.  2x3x5 cuboid.

The 30 cubes could be a 30 letter 3-dimensional alphabet.  It is truly 3-dimensional: a single photograph of a letter cube, being able to see at most 3 sides, is ambiguous.  Each cube can be oriented 24 different ways = 720.

[ppqfpunu] Orientable counters

Circular checker with nothing on it: 1 orientation state.  With a line segment drawn on its diameter and rotation increments of 45 degrees: 4 states.  With an arrowhead at one end of the line segment: 8 states.  If it can be flipped (with distinct sides, e.g., color) with the an arrow also on the other side: 16 states.  Automorphism group of an octagonal prism, dihedral group of an octagon.

This can be done with a typical coin.

8 states without flip is more than enough to denote the 6 possible chess pieces per side.  Pieces are simple checkers with arrows: the direction of the arrow signifies what kind of piece it is.  The color of the checker gives its color.  Perhaps have drawings of the 6 pieces around the edge of the board to help players remember which direction corresponds to which piece.  It is easy to cheat, or make a mistake, and change the identity of a piece by altering the angle of its arrowhead.

One can consider rotations of polyhedra other than the flat octagonal prism.  A cube with distinct faces has 24 axis aligned orientations, or 48 if allowing 45 degree angles.  This could be a use for the "joke" 1x1x1 Rubik's cube, a game with 48 different piece types.

[gosomgcd] Half turn skewb

The Skewb intriguingly highlights the regular hexagonal cross section of a cube.  However, only 120 degree turns are permitted, not 60 as the regular hexagon might suggest.  What madness results if 60 degree turns are also permitted?  It will need more cuts.  Possibly do it on a sphere.

[zmzqakfa] Errors in estimating the difficulty of the modularity conjecture

Before Wiles's proof of Fermat's Last Theorem, mathematicians estimated that the Taniyama-Shimura conjecture to be so difficult that it would never be proven.  How did they come up with that estimate?  Where was their error in estimation?

Was some step in Wiles's proof easier than estimated?  Did mathematicians underestimate the amount of work that one mathemetician could do?  (This seems hard to believe, given so many famous examples of other prodigious mathematicians.  Did Wiles do more work in producing his proof than any mathematician previously in any other field?)  Did Wiles get extremely lucky, relatively quickly finding a proof technique that worked amidst a huge number of others that would not have worked but there was no way he could not have known?  Did an unexpectedly large number of proof ideas get usefully eliminated (after the estimation of difficulty) by other mathematicians preceding Wiles?

Perhaps the estimate that the conjecture would never be proven was never a serious estimate, but one touted after the fact in the hagiography of Wiles.  It might have been that no one (or very few) before him had seriously tried, so no one actually knew how difficult it was.

Relatedly, a nice collection of papers about the modularity theorem, some liberated from behind paywalls.

[beffgkij] Skateboarding hoodla

Skateboarding is another activity whose skill is determined nearly entirely by individual practice and persistence.  There are many other activities and fields to which one could apply such generic persistence, but some people face social barriers into entry into those fields, so those people stick to skateboarding.  Therefore, we hypothesize that the set of people who have become good at skateboarding will largely consist of people who faced many social barriers elsewhere.  They will tend not to be very likeable people.  They will tend to get politically smacked down -- there will successful political efforts to ban skateboarding or move them to somewhere less visible, to the seedier parts of town.  All these seem to be true.

[jxmvcoms] Erasure of discrimination without a social movement

Under what conditions has discrimination disappeared from society without a social movement?  Discrimination against the Irish, the Italians, the Romani seem to have largely disappeared in most of American society.  Similarly, there is not much Protestant-Catholic animosity.  In some parts of the country, there is little discrimination against Jews, Native Americans, or Hispanics, though in other parts discrimination persists.

The lack of discrimination is correlated with assimilation of these groups into mainstream society.  Which way is the causality?  (Previously, assuming one direction of causality.)  Or, there could be a common cause, or observation bias.

Certain subcultures lack certain kinds of discrimination seen in larger society, though that could be a result of selection (i.e., the observation bias above).

When (if ever) are social movements effective toward reducing discrimination?  Many of them invoke identity politics, which could worsen discrimination, the "racial nightmare" alluded to by Martin Luther King, Jr.

[uexqedrj] Trebuchet standard projectile

Consider the golf ball as the standardized projectile for trebuchet competitions.  Unlike the pumpkins in punkin chunkin which easily "pie" (disintegrate on launch), golf balls are designed to survive extreme acceleration and impact.  Also, the distance traveled by a golf ball is something many people can relate to.

A pumpkin disintegrates on landing, making it easy to mark the landing point.  A golf ball bounces and rolls, so the final resting spot could be much further than the distance flown as a projectile.  I think there's no way to avoid bouncing: the elasticity that allows it to survive launch necessarily causes a bounce at the end.  Maybe a muddy landing site.

How can the flight of a golf ball best be tracked?  Maybe the golfers have already solved this problem.

Radar?  Perhaps put a metallic shell on the ball to make it more radar reflective?  Tangentially, bullets are metal.  Can they be tracked by radar?

High speed cameras can triangulate velocity vector on launch, from which the trajectory can be calculated.  Perhaps this calculation should be the official distance, removing the effects of wind and air pressure, allowing distances to be compared from year to year despite changing weather.  This requires a standardized golf ball: no tricks in improving flight with a better dimple pattern.

[vjqtqmpp] Fiber optic demonstration

Simple demonstration: people are allowed to shine a light into one end of an optical fiber and other people view the other end to see the light.  The fiber is long, so source and destination are widely separated.  Maybe a bundle of fibers.  People can experiment with transmitting different colors, or signals like Morse code.  It is a large piece of interactive art.

The demonstration invokes the idea that the very photons you put in one end come out the other, unlike electricity (electrical signals are electrons pushing other electrons, while electron drift velocity is very slow) or water (similarly, water pushing water in front of it).  (Physically, the optical effects could also be explained as waves not particles.)  It also demonstrates the amazing distance that fiber optics can transmit: the glass is very clear, and total internal reflection is neat.

[kcotxcxl] Constantly incrementing counter

The following invocation of GNU date, using bash syntax, will return a counter which increments at an average rate of 1 per second, i.e., it will be in sync with TAI (not UTC), on average.  We stress "on average" because weirdness will happen during a leap second, but it will return to the correct rate afterwards.

date -d 'TZ="right/UTC" '"$(date -u -Iseconds)" +'%s'

Both the -u flag and the double quotes around the embedded call to date are superfluous, but we include them for clarity.

Some testing of what happens at a leap second:
+ date -d 'TZ="right/UTC" 2015-06-30T23:59:59+0000' +%s
1435708824
+ date -d 'TZ="right/UTC" 2015-07-01T00:00:00+0000' +%s
1435708826

which is correct; 2 seconds have passed in that time interval.  We are abusing the "right" timezone database, as explored earlier.

Beware what you do with this counter value.  It is different from the POSIX counter value by 20 or more seconds, depending on the number of leap seconds that have occurred.  Do not, for example, write this counter value to a file which another tool might read and interpret as a POSIX counter value.  As a precaution, it might be better to use the following counter value instead, which will be obviously very different from a POSIX counter value, so less likely to be interpreted the wrong way.

expr 1000000000000 + $(date -d 'TZ="right/UTC" '"$(date -u -Iseconds)" +'%s')

This adds nanoseconds:

date -d 'TZ="right/UTC" '"$(date -u -Ins)" +'%s.%N'

Sunday, March 20, 2016

[kqoscweo] Moonlight cycle

Create a (radically different) cover of Beethoven's Moonlight Sonata so that it returns to the theme of the first movement at the end: melancholy echo after the storm of the 3rd movement.

Thursday, March 17, 2016

[auutpvew] PBKDF of data at rest

Companies which store user data encrypted with a password should publish the parameters of the KDF they use.  If the encrypted data is stolen, it gives the difficulty faced by the hackers to brute force a password.  (If hackers steal passwords by some other means, all bets are off.)

The passwords in question could be user passwords, or passwords used internally by the company.

Publishing the parameters of the KDF allows competition between companies on who protects user data more.  We need some method to certify that a company is actually doing what it claims, perhaps regulations specifying punishment for lying.

We might need regulations also requiring companies to actually publish the parameters, because market competition has not achieved the desired transparency on its own so far.

Wednesday, March 16, 2016

[pwgfckbb] Find similar media

Find text similar to a given text.  Find audio similar to a given audio.  Find images similar to a given image.  Find video similar to a given video.

Problems are open-ended and currently only partially solved. Tools to do them seem closely guarded with limited access.

[gcihgiik] Hustling at street chess

Hustling at street chess recovers a human element to chess that seems to have been lost because of how strong computers have become at it.  Respectable chess players seek to emulate (or unrealistically, exceed) the play of computers, which seems boring because we already have the real thing, namely a computer.

Hustling includes many things normally forbidden from respectable chess: sleight of hand manipulation of pieces with misdirection (cheating), trash talking and psychological manipulation.  Humans do these things, computers not so much (yet).

It seems no longer a "pure" sport.  Less enjoyable for some, many, to play.  Perhaps more enjoyable for others to play and spectate: like watching competing magicians.

Inspired by the Maurice Ashley / Tim Ferriss Experiment video in Washington Square Park New York City.

[hszzmlfz] Global treaties for basic science

Basic science is a public good, so suffers from the free rider problem.  One country can use another country's production of basic science.

To avoid free rider, create treaties that require all signatory countries to invest in the production of basic science information, perhaps through funding of higher education of certain fields.  This is a positive sum game.

Define basic science broadly and operationally: information that is useful to other people but difficult to get or enforce intellectual property protection.  Philosophy.

[djdxogcb] Cheap toys for children

Children, being new to the world, will perceive a toy as new even if its design is very old.  Therefore, it is never necessary to be paying extra for a child's toy for its still enforceable intellectual property rights, i.e., it is still patented or copyrighted.

Nevertheless, toys with intellectual property surcharges seem dominate the market.

Counterarguments: Toys as education for today's world.  Toys as status symbols.  Toys for social group membership.  New version of a toy is objectively better.

[etzhzrqk] Virtual duck hunt

The killer app of head tracking virtual reality is of course a first-person shooter game.  We imagine a duck-hunting game in which the target moves in a pattern: a simple pattern on early levels, an more complicated one in later levels.  One way to create periodic yet complicated movement in 3D is epicycles on epicycles.

Virtual reality can provide the equivalent of tracer ammunition, illegal or unsafe in the real world.

We want some segments in which the target is moving mostly directly towards or away from the shooter, making for an easier shot with less angular speed.  Easiest is the target moving in a circle coplanar with the shooter, circling a distant point.

[gfcsbbjz] 3D guilloche

Generalize guilloche patterns to 3 dimensions.

Fairly easy is to continue the idea of a moving point on the edge of one circle becoming the center for the next, but with the epicyclical circles being able to be oriented at any angle in 3D.  An orthogonal projection of this would be the same as a 2D guilloche pattern generalized to allow ellipses.

Instead of each epicycle being a tilted circle, each one could be a Lissajous curve filling a box, or tilted parallelepiped.

Start with a point traveling along a straight line.  Attach a radial arm orthogonal to the line at the moving point, then spin the radial arm as its anchor point moves along the straight line.  The end of the arm traces out a helix.  Generalize this idea allowing the starting path to be a curve instead of a straight line, then recursively apply the same idea, another spinning radial arm, to the new curve.  Starting from a circle, the end result is a very fancy torus.  Tricky problems: What happens if the parent curve hits a cusp?  Can we algebraically determine whether a curve will have a cusp?  What is the initial orientation of the radial arm?

Create an animation of a 3D guilloche pattern rotating in space.  This may be computationally very expensive if the curve has a long period.

3D print the complicated mess of the single curving fiber.

Project the pattern onto the surface of a sphere.  The curve must avoid the center of the sphere: how can this be determined algebraically from the equation of the curve?

Even stranger things might be possible in 4 dimensions (followed by some dimension reduction), because of the richness of how the dimensions can be split 2+2.

Monday, March 14, 2016

[byklrrhu] Guilloche

guilloche

Epicycles upon epicycles can generate guilloche patterns.  They are a superset of spirograph patterns.  Unlike spirograph, we do not constrain one circle to roll without slip on another circle; instead each circle can turn independently at an arbitrary specified speed.

guilloche :: [Epicycle] -> Double-> (Double, Double)
guilloche epicycles t = (f cos, f sin) where {
f :: (Double -> Double) -> Double;
f fn = sum $ map (\e -> radius e * fn (2*pi * velocity e * (t phase e))) epicycles;
};
radius, velocity, phase :: Epicycle -> Double;

If velocity and radius are allowed to differ by coordinate, then the curve becomes a fancy Lissajous curve instead of just a fancy circle.

If all the velocity are rational, then the curve is periodic, though the period may be very long.  The period is probably the least common multiple of the denominators.

What determines the symmetry of the full period pattern?  If all the phase angles are zero, then it has bilateral symmetry.  What else determines how pretty the pattern will be?

For rasterization, how closely should the time points be sampled?  Probably the reciprocal of the derivative of the function.

For linear interpolation, how closely should the time points be sampled?  Optimal is probably not equally spaced samples but higher density in areas of more curvature.  Calculating curvature is probably not too hard.  If plotting with higher order splines, where should the control points be?

There are many opportunities to optimize the computation.  Every point is independent, so the computation is embarrassingly parallel.  Maybe suitable for GPU.  We could also use recurrence relations to rapidly evaluate sine and cosine at evenly spaced points.  Maybe FFT (though probably not).

How can one accelerate the computation of a small zoomed-in section of a very long full period?

Given a raster quantized image of a small section of the full period of a guilloche pattern, determine its parameters.  This is the forger's problem.  Is this problem cryptographically difficult?

Add colors.  Easiest might be to have each epicycle contribute a different color component.

The radii and phase angles could be continuously adjusted to create an animation.

Some Haskell code to plot guilloche curves, including a few fancy features: computing the length of the full period with rational velocities, and computing the sampling interval for rasterization.  The code is very slow.

Thursday, March 10, 2016

[fxijugvq] Chess problem in Soviet calendar

A "random page" from a Soviet desk calendar presents a chess problem whose FEN encoding is

Q7/3N3k/7p/6q1/8/8/8/5K2 w - - 0 1

Using an endgame tablebase, we discover the position is Mate in 20, with unique winning move Nd7-f8+.  Eventually one reaches the position:

6qk/8/4N2p/5Q2/8/8/8/5K2 w - - 0 1

The unintuitive move Kf1-f2 wins in 8; the more obvious move Qf5-f6 wins in 10.

Tuesday, March 08, 2016

[kgfcfeje] Experimenting with the leap second using the right timezone database

Using the "right" timezone database, we can get the GNU date utility to emit the magical time 23:59:60, which only occurs at a leap second.

+ TZ=right/UTC date --date=@1435708824
Tue Jun 30 23:59:59 UTC 2015
+ TZ=right/UTC date --date=@1435708825
Tue Jun 30 23:59:60 UTC 2015
+ TZ=right/UTC date --date=@1435708826
Wed Jul  1 00:00:00 UTC 2015

We can also see the __:59:60 time in a different time zone.

+ TZ=right/America/Los_Angeles date --date=@1435708824
Tue Jun 30 16:59:59 PDT 2015
+ TZ=right/America/Los_Angeles date --date=@1435708825
Tue Jun 30 16:59:60 PDT 2015
+ TZ=right/America/Los_Angeles date --date=@1435708826
Tue Jun 30 17:00:00 PDT 2015

In real time (as opposed to artificially specifying the date with the --date option), you would only be able to see if this if you have your computer configured so that the kernel counts the "right" counter, not the POSIX counter.  Nobody does this, because NTP is designed to use the POSIX counter.  (However, if you are willing to observe the leap second happening at the wrong time, then you can observe it as shown above by specifying the "right" timezone database even though your computer uses the POSIX counter.  See below for when the wrong time is, or see this post.)

We can parse a leap second date into a "right" counter value (not POSIX):

+ date '--date=TZ="right/UTC" 2015-06-30 23:59:59' +%s
1435708824
+ date '--date=TZ="right/UTC" 2015-06-30 23:59:60' +%s
1435708825
+ date '--date=TZ="right/UTC" 2015-07-01 00:00:00' +%s
1435708826

The POSIX counter can never get 23:59:60.

+ TZ=posix/UTC date --date=@1435708799
Tue Jun 30 23:59:59 UTC 2015
+ TZ=posix/UTC date --date=@1435708800
Wed Jul  1 00:00:00 UTC 2015

Going in reverse results in an error:

+ date '--date=TZ="posix/UTC" 2015-06-30 23:59:59' +%s
1435708799
+ date '--date=TZ="posix/UTC" 2015-06-30 23:59:60' +%s
date: invalid date 'TZ="posix/UTC" 2015-06-30 23:59:60'
+ date '--date=TZ="posix/UTC" 2015-07-01 00:00:00' +%s
1435708800

When a UTC date is converted to a "right" counter value, then that right counter value is reinterpreted as a POSIX counter, then the POSIX counter converted to a UTC date, the date curiously gets converted to a date in the future.  This provides the "wrong time" that you can observe the leap second.  That is, 25 seconds after the actual occurrence of the leap second, and if your timezone is set to a lie (namely "right/(something)"), you can observe __:59:60.  (The next leap second will come after a delay of 26 seconds from its actual occurrence.)

+ TZ=posix/UTC date '--date=TZ="right/UTC" 2015-06-30 23:59:59'
Wed Jul  1 00:00:24 UTC 2015
+ TZ=posix/UTC date '--date=TZ="right/UTC" 2015-06-30 23:59:60'
Wed Jul  1 00:00:25 UTC 2015
+ TZ=posix/UTC date '--date=TZ="right/UTC" 2015-07-01 00:00:00'
Wed Jul  1 00:00:26 UTC 2015

The same process can be done in reverse, a POSIX counter value reinterpreted as a right counter.

+ TZ=right/UTC date '--date=TZ="posix/UTC" 2015-07-01 00:00:24'
Tue Jun 30 23:59:59 UTC 2015
+ TZ=right/UTC date '--date=TZ="posix/UTC" 2015-07-01 00:00:25'
Tue Jun 30 23:59:60 UTC 2015
+ TZ=right/UTC date '--date=TZ="posix/UTC" 2015-07-01 00:00:26'
Wed Jul  1 00:00:00 UTC 2015

The identity transformation with POSIX counters causes a parsing error.

+ TZ=posix/UTC date '--date=TZ="posix/UTC" 2015-06-30 23:59:59'
Tue Jun 30 23:59:59 UTC 2015
+ TZ=posix/UTC date '--date=TZ="posix/UTC" 2015-06-30 23:59:60'
date: invalid date 'TZ="posix/UTC" 2015-06-30 23:59:60'
+ TZ=posix/UTC date '--date=TZ="posix/UTC" 2015-07-01 00:00:00'
Wed Jul  1 00:00:00 UTC 2015

The identity transformation with right counters is literally the identity.

+ TZ=right/UTC date '--date=TZ="right/UTC" 2015-06-30 23:59:59'
Tue Jun 30 23:59:59 UTC 2015
+ TZ=right/UTC date '--date=TZ="right/UTC" 2015-06-30 23:59:60'
Tue Jun 30 23:59:60 UTC 2015
+ TZ=right/UTC date '--date=TZ="right/UTC" 2015-07-01 00:00:00'
Wed Jul  1 00:00:00 UTC 2015

Specifying the output (outer) TZ variable (as right or posix) has no effect on the returned counter value.

+ TZ=right/UTC date '--date=TZ="posix/UTC" 2015-07-01T00:00:24' +%s
1435708824
+ TZ=right/UTC date '--date=TZ="posix/UTC" 2015-07-01T00:00:25' +%s
1435708825
+ TZ=right/UTC date '--date=TZ="posix/UTC" 2015-07-01T00:00:26' +%s
1435708826

+ TZ=posix/UTC date '--date=TZ="posix/UTC" 2015-07-01T00:00:24' +%s
1435708824
+ TZ=posix/UTC date '--date=TZ="posix/UTC" 2015-07-01T00:00:25' +%s
1435708825
+ TZ=posix/UTC date '--date=TZ="posix/UTC" 2015-07-01T00:00:26' +%s
1435708826

Sunday, March 06, 2016

[aiqhctyw] Adventures in modding a Rubik's Cube to create a Lego cube

Started with Rubik's brand 3x3 cube, circa 2005. Unstickered it. (Curiously, some of the stickers had slid in position, as if the glue had melted.) Plenty of sticker glue residue. Goo Gone worked. Washed off Goo Gone with dish soap and water, but the Goo Gone had seeped into the cube core.  (Update: WD-40 is also a good solvent to remove sticker and tape residue.) Watched YouTube videos on disassembly of Rubik's brand cubes. Disassembled, requiring a screwdriver to pry off the first edge piece. Soaked all pieces in hot soapy water and rinsed. The corner cubies are constructed of a main piece and a small plate. The seal between them is not watertight, so water seeped into the corner cubies (can hear it by shaking). Unable to remove the plate. Shaking the cubies got rid of most of the water. Allowed to let dry for 24 hours with the seal resting on a paper towel: maybe capillary action will draw out some more water. Reassembled. All pieces are asymmetric: unsure whether orientation of the pieces matters, assuming not.

Attach black Lego 2x2 plates on each cubie face. Hard to attach the plates perfectly parallel to each other, did not try. Krazy Glue Pen Tip worked not great but OK; hard to apply enough glue to the plate before it dried.  Be careful not to have too much glue leak beyond the tile, or else you might glue your cube together. Attached a stack of plates terminated by a flat tile, less painful on the hand while pressing for 30 seconds for each plate as directed on Krazy Glue instructions. This took a while: 54 plates.

black lego cube

black lego cube with tools

Attach a second colored plate over each black plate. They are easily removable with a brick separator (orange tool). The center plate cannot be removed unless an edge plate is removed first, though one rarely actually needs to remove the center plate. The goal of this project was to make a cube that is easy to solve by disassembly (unstickering), to lower the barrier of entry for beginners.

lego cube scrambled with brick separator

One can easily create a Void Cube (remove the center plate):

lego void cube

and a 2x2 (remove center and all edges, keeping only corners):

2x2 lego cube

The spikiness of Lego nubs makes turning slightly painful in the hands. (Previous thoughts on how difficult the Rubik's brand cube is to turn.)

Lubrication with Vaseline worked well. The nooks and crannies of all the Lego nubs meant one cannot wipe off all the excess Vaseline easily.

Overall, this has been a very fun cube, because one can simulate many puzzles easier than the full 3x3 Rubik's cube. Because I do not know how to solve the full 3x3 Rubik's cube, the simpler puzzles are entertainingly challenging. I feel I am working up toward learning how to solve a full 3x3 on my own, without having to look up any algorithms developed by someone else.

Future: repeat the whole project with a cheap speedcube (YJ GuanLong). The low weight of the GuanLong may be useful because adding two layers of Lego plates adds a lot of weight.

RedKB on Youtube demonstrated a bandageable 3x3 built out of a Mini QJ, but I currently have no interest in making a puzzle even more difficult than a plain 3x3.

[jxutqqjz] Programmable RPN calculator

Consider augmenting a RPN calculator with the ability to push functions onto the stack, not just values.  What needs to be made available to make it a nice programmable calculator?

  • Eval
  • Function-make, a function that consumes a bunch of objects on the stack and squashes them into a lambda function that is pushed back onto the stack.  This lambda can then be Eval'd, consuming values further up the stack.  Tricky might be how function-make determines how many stack objects to consume.  In Lisp, the end of a lambda is demarcated with a close parenthesis.
  • A means to provide a function -- a local scope -- with a fresh bunch of registers, pushing the old registers onto a stack, probably a separate stack from the main stack.  The function arguments can then be copied into the new registers and randomly accessed by register name within the function.  Pop the old registers back when the function exits.

[krqmpmgg] More leap seconds

As the earth slows in rotation, we can add leap seconds more frequently until we are adding one to every minute: a minute becomes 61 seconds.  (It will be very confusing before that, a complicated pattern of 60 and 61 second minutes, reminiscent of the number of days in a month or the number of months in a Jewish year.)

The day will have become 1440 seconds longer, or 24 (old style, 60-second) minutes.

After that, we can start adding 2 leap seconds to some minutes, so some minutes will be 62 seconds long.  What remains constant is that there will always be 1440 minutes in a day.

[nmzummrh] Rubik's controller

Create an electronic controller shaped and functioning like a 2x2x2 unstickered Rubik's cube, but with a button added to the center of each face.  (Don't know what to do about the face cuts going through the button.  Maybe the button is divided into 4 buttons.)  It has sensors on it that allow it to function as a controller for a virtual NxNxN cube (or more generally any cuboid N1xN2xN3).  With the buttons, select the depth, i.e., the number of layers to turn.  Twist the controller cube to accomplish the turn.

Orient the entire thing.

[yosbwdgf] The danger of writing Unix time to a file

If a computer is configured to use the right counter instead of the POSIX counter, it must be very careful when interoperating with computers which use the POSIX counter, for example, if a timestamp (encoded as a counter value) is written to a file on removable storage or a network filesystem, then read by another computer.

The most conservative solution for the time() system call to always return the POSIX counter value regardless of what the kernel counts.  If the kernel counts with the right counter, then time() is kind of an expensive call, needing to look up the latest leap second information to do the conversion.  During a leap second, especially for subsecond precision, do whatever weird thing is deemed acceptable.

Applications which explicitly need the right counter should call a new system call to get that value.  Kernels which do not count the right counter can emulate the call, using the POSIX counter and a lookup of leap second information to calculate the value, or the call can simply fail as not provided.  It will necessarily not give a good answer during a leap second.

Instead of writing or transmitting the POSIX (or right) counter, consider using a more portable representation of date and time.

Saturday, March 05, 2016

[sbqmujof] Rubik's cube from the inside

Player can teleport among 27 virtual rooms corresponding to the 27 cubies of a Rubik's cube, and look out the windows to the outside.  Another game doable with virtual reality.  The scene visible outside gives information about where one's current cube is in space.  The center cubie room has no windows, so can be omitted.

Gravity points the direction that would be down if the cube were solved.  In each room, the player starts facing (say) north if the cube were solved, but afterwards the facing direction is remembered from the last time they teleported out of the room.

[lbubetgk] Multi site Rubik's cube

48 lights scattered in different locations, corresponding to the 48 non-center cubie faces of a Rubik's cube.  The lights change color as the virtual cube gets turned.  Perhaps a fixed color border on each light stating the goal color.  Perhaps an annotation stating where on a cube the light represents.

Large piece of interactive art.

Perhaps make the locations mimic the layout of a cube, e.g., rooms in a 3 story building.

Controls might also be distributed.  Perhaps pick two cubie faces to designate twisting in that direction.

User cannot see the entire cube at once, so needs to travel around to examine or operate the cube, and to have good memory and visualization skills.  This could make speedcubing an athletic competition, needing to sprint between locations, vaguely similar to Condi chess.

Because the cube is virtual, it could be replaced with any other shape, even those not physically realizable.  Maybe 4D.

[ufbgrcsn] VR inner spherical display

Take ideas for applications on a spherical display and project them on the inside of a sphere instead of the outside, placing the user at the center.  The user can see the entirety of the inside of the sphere using virtual reality.

It doesn't take advantage of binocular depth perception.

Needing to turn one's head in many directions to see things might become awkward and tiring.

[ifgsikmr] Attaching metadata to a file

Create a method allowing a user to attach arbitrary metadata to a file (generically, object) so that it can't easily get separated and lost.

One way to do it might be at the filesystem level, e.g., with resource forks or extended attributes.

Notes, tags, timestamps of access.

[prklbiol] Replicating big science

Science needs to be replicable.  How much needs to be documented to allow for replicability?

Inspiration was Big Science, e.g., LHC or LIGO.  Suppose one wanted to replicate those experiments.  They seem to be so big that merely a description of the hardware and actions with the hardware do not seem to be enough to replicate the experiment.  One also needs to document the human factors, the politics, the management structures, the personnel (human resources) decisions, that were done to complete the project, things that will need to be done again to replicate the project.

I suspect finding the right people is just as important a factor in successfully doing or redoing a large experiment as building and operating the hardware correctly.  Without that, you won't even get to the point of having built the hardware correctly.

If science can't be replicated because of human effects, perhaps because of insufficient documentation for managing the human effects, is it science?  It seems just as bad as omitting other key steps of the experiment, preventing replication.

[gwzfhogg] Rolling back applications and data

A package manager can help roll back an application to a previous version.

Revision control can help roll back user data to a previous version.

In between is a messy area, user data that is not strictly part of the application, but intimately tied to a particular application version, e.g., configuration, cache.  Cache can usually be deleted.

Bring some order to this messy area.  Probably enumerate the common cases and standardize behaviors.

User data could become saved in a format unreadable by an earlier version of the application.  However, if source code is available, maybe the parser can be backported or a converter can be created.  Can we standardize parsers to ease backporting, even make it automatable?

[oymvmhjz] Videos of disassembly

Instructions for disassembling something, then reassembling it again correctly, is a task extremely well suited for video.  Provide better organization than the current state of Youtube.

Even if you cannot find video about disassembling a particular object, video (plus some sort of organization) can provide education about general tips for disassembly, perhaps of similar objects.

Are most people thwarted from diassembly because of lack of knowledge, or lack of tools?  Possibly other resource constraints also.

Need to fight against the various censorship forces who don't want you to know how to disassemble something, perhaps so you don't repair it so buy a new one instead, or rely on someone else to repair it.

Fun task: go through everything you own and learn how to disassemble and reassemble it.

[pbqmidor] 4D science

How would science be different if we lived in a 4-dimensional universe instead of 3?

Astrophysics would probably be very different, especially objects rotating and orbiting.  Probably Maxwell's equations and general relativity would behave significantly differently.  Linear motion would stay the same.  It might be much harder for particles to collide for nuclear fusion because there is more space to miss.  On the other hand, gravity will keep compressing to compensate.

Chemistry: geometry of electron orbitals, steric effects (steric hindrance).

[qiiuhdah] The sound of an image

Take a line across a grayscale image (perhaps from a camera) and play the looped brightness as a sound.  Probably go back and forth along the line to avoid a sharp click at the endpoints, similar to how JPEG does DCT.  User can can control sampling speed, affecting the overall pitch of the sound.

Instead of sampling a line, sample a circle.  Any closed loop.

2D Fourier transforms still mystify me, but they are possible.  It is probably no longer possible to do it as sound, so instead do an image-to-image transformation.

Sample many parallel lines.  Many circles, perhaps concentric, or identical circles on a grid.

Possibly useful as an accessibility tool for the blind, but probably just a toy, or art.

[ndvdkuad] Difficulties of being a hobbiest

Enumerate the difficulties, especially artificial regulatory difficulties, of being a hobbiest in various fields.  For mechanical engineering (e.g., wood working) and agriculture (gardening), seemingly not very much.

Nuclear engineering is extremely highly regulated.  Chemistry also; many chemical vendors will refuse to sell certain chemicals to individuals.

Computer science seemingly has few barriers against hobbiests, especially thanks to the free software movement.  Computer science might see some barriers erected in the near future, perhaps to control access to AI as a tool deemed too powerful for ordinary people, akin to regulating chemistry or nuclear science.  There are currently some barriers to entry around proprietary or poorly documented APIs that you need to find a person to explain it to you.  Hobbiest computer scientists might be denied access to such people or information.

Mathematics similarly has seemingly low barrier to entry for hobbiests, though again the problem of poor documentation.

Is the relative ease or difficulty for hobbiests in line with the kinds of fields the labor market is demanding?  Hobbies often become careers, and education of children often resembles a hobbiest pursuit.

Previously, increasing access to chemistry.

[hqobxbgh] Black holes and singularities

Is there a singularity at the center of a black hole?  Or, are there undiscovered repulsive fundamental forces preventing complete collapse whose effects manifest only at extremely high densities found inside black hole event horizons?

On one hand, because it takes place inside the event horizon, we may never know.  On the other hand, particle accelerator experiments, cosmic ray observations, astronomical observations of the aftermath of the Big Bang, and possibly observations of a naked singularity (perhaps artificially constructed) may provide information about additional fundamental forces.

Assuming there is another force, what might the inside of a black hole's event horizon look like / be like?  The accretion disc probably continues inward, though radiation from it does not escape.  A central sphere of condensed matter.  General relativity will make space and time very weird inside.

[zqxomplg] Assigning numbers to initial letters

Given initial letter frequencies of words (say, from a corpus), assign digits to letters so that the digits are spread out evenly by frequency.  This should be easy (perhaps optimization by simulated annealing.  Need some measure, a norm, of deviation from perfectly evenly distributed).  Standardize this assignment.

Goal is to allow someone to memorize a phrase but type a PIN, making the PINs as uniformly distributed as possible, making it difficult for an attacker to brute force.  The common telephone keypad mapping numbers to letters causes the digits 0 and 1 never to be present in any PINs.

[ppvknolh] How do you measure a year of a brute forcing?

Assume you are willing to wait 1 minute for a computer to verify a password you've entered, perhaps unlocking full disk encryption during device boot up.  The password hashing KDF algorithm has been tuned to take 1 minute.

Assume the attacker, say the government, is willing to spend 1 year brute forcing your password.  How long should your password be?

Assume your password is a PIN of numerical digits.

The unspecified factor is how much more powerful the attacker's hardware is compared to your device.  Assume the factor is 10^N.

Then, the length of one's PIN should be N+log10(MIAY), where MIAY is the number of minutes in a year, made famous by the song from "Rent".  The common logarithm of that number is 5.72; call it 6.

If the attacker's hardware is 100,000 (10^5) times more powerful than your device (e.g., your phone), then you need a 5 + 6 = 11 digit PIN.

[hbzbmnkz] Traveling with your social network

Consider some method of broadcasting to your social network where you plan to be.  We assume solved the thorny problem of who can be trusted with this information.  Possibly also broadcast where you are.

Would this be useful?  The imagined scenario is if you do not show up where you announced you would be.  Your social network can more quickly know something might be wrong and take action.  Accidents while traveling, or kidnapping.

The usefulness probably depends on what actions the social network can or is willing to do in response to you being missing.  Not showing up might be too little information to decide what to do.  A person might already know who is willing and able to take action and choose or have chosen to contact them directly instead of broadcasting.

[soitozba] Verifying redundancy

One buys the same service from two different suppliers in hopes of redundancy in case of failure of one supplier.  How can one know if it is truly redundant, and not both suppliers reselling a common supplier?  Such business agreements are often kept secret: we need transparency, possibly regulation mandating transparency.

Such lack of redundancy is often only discovered after a failure at the common supplier, with both resellers then simultaneously declaring failure.

Internet service.  Cloud storage and cloud computing.

[zagybazd] Many hierarchical banks

Create, or probably relax, regulations and create technology to allow the existence of very small banks, or more specifically, lending institutions.  At the smallest level are lenders being able to personally observe -- use personal or intimate knowledge not accessible to a larger lender -- a potential borrower to gauge the degree of risk of a loan.  Such close observation and examination can mitigate the moral hazard and adverse selection problems.

Of course, informal loans between individuals already happen: make it easier.  The inspiration is microlending and its hypothesis that poor people face a less-than-efficient liquidity constraint.

Lenders continue to borrow from larger lenders, as is current practice: it just extends down further.

Many devilish details.  Probably also need to fight political lobbying by larger banks who don't want new competitors.

Who can trust whom is a massively difficult problem even at the smallest level.  Can more market mechanisms actually induce better solutions?

[cwendeks] KDF of multiple difficulties

Let the time it takes to verify a correct password be a function of how long it has been since the last successful password entry.

After a successful password entry, the computer hashes the password with key derivation functions of various numbers of iterations, and stores the hashes in memory.  Over time, it forgets the easier (quicker) hashes.  It could also forget the easier hashes on each unsuccessful password attempt.  The intended application is screen unlock for mobile phones.  The only hash stored on disk is the most time-consuming one, which will cause bootup time to increase but should be rare.

Goal is to improve Android, which relies on the same PIN for full disk encryption and screen unlock.  FDE is protected by a slightly time-consuming KDF (though not time-consuming enough IMHO), but screen unlock is instantaneous.  An attacker can brute force the PIN more quickly by keeping the phone turned on, assuming mechanisms for limiting the number of attempts are not present or have been subverted.  Of course, any method to subvert limits on the number of attempts, e.g., side-loading an operating system patch, could also disable the mechanism to forget easier hashes.

[xxceylpf] Gradually learning a longer password

Let a password interface provide a way for the user to gradually learn longer passwords over time.  Application is unlock PIN for mobile phones.  It starts out with a very short password, perhaps one digit.  After the user is seen to have successfully mastered it, the phone extends the password by one more digit, allows the user to practice it, and proceed onward.  If the user forgets, he or she can use already mastered prefix plus brute forcing one extra digit.  Over time, the user learns through repeated use a long password, hopefully secure against attackers.

Because the phone is picking each new digit randonly, the long password has a lot of entropy.

[akuhcbho] Pixel based racing game with momentum

Object moves between points on a grid with a velocity whose X and Y components are integers.  At each discrete time step, the velocity can be modified by an acceleration whose components are small integers, e.g., (±1,0) (0,±1).

Certain grid points are marked blocked, so cannot be landed upon at the discrete time points.  The object can crash, losing the game, if all possible accelerations yield velocities which land on blocked points.

A more complicated restriction could be the straight line traveled between two consecutive time points may not pass through the interior of a blocked square.

The pattern of blocked squares could be a maze.

The objective could be to get from point A starting at zero velocity, to point B in as few steps as possible.  Remember to slow down so you don't overshoot.  The objective could be more complicated, perhaps racing around a circuit.

The idea is not new but I don't know the name of it.

Hexagonal grid possible, arguably better, with less axis-aligned bias.  3D rhombic dodecahedral honeycomb, equivalently a checkerboard pattern of cubes.  4D 24-cell honeycomb.

[vtqojylb] Computers for the math you hate

Do you hate math because of some traumatic experience in learning it?  Stereotypically, the difficulty of learning longhand arithmetic.  If so, identify the parts of math you hate and team up with a computer and revisit math, making the computer do the parts you hate.  For example, computers are great at longhand arithmetic.

What are the parts of math people hate?  Which ones can computers do?

Although this seems like a post about math and computers, it's actually primarily about psychology.

[oahptzyl] Link contains content type information

Let a URL contain metadata about the linked content, which the browser can use to interpret the content when fetched, and ultimately the user can use to decide whether it is safe to click on the link.

For example, the URL states (by some yet unspecified protocol) that the content will be a text file.  The browser then locks itself down to only permit loading of a text file, refusing to render or display an image or hypertext etc.  Users can feel confident on clicking the link, knowing they will only see a text file, not, say, some unexpected or undesired image.

Another metadata type for safe content might be pure hypertext, with no active content.  The browser sees that declaration in the URL, then locks itself down by turning off Javascript interpretation for rendering that page.  A user often knows in advance whether the information he or she is requesting is expected to include active content: for example, a text article is not expected to need javascript.  This will thwart a lot of advertising added to monetize articles.

Perhaps a safe subset of Javascript for different definitions of safe.  Also need to turn off unsafe parts of CSS, Unicode, HTML.

This is different from the Content-Type HTTP response header, because it is given in the URL, before even a fetch attempt is made.  It is a way for a trustworthy site to declare its trustworthiness in advance, a game theoretic imperfect information signaling mechanism.

[konnjags] Difficulty of pattern unlock

For a given Android pattern unlock pattern, determine its difficulty.  We are particularly concerned about segments like a knight's move, which involve threading the finger between two intervening dots, being careful not to touch either of them.  However, if one or both of those two intervening dots have already been consumed in a previous part of the path, then a knight's move is easy: go over the consumed dot again, because a path cannot consume a dot more than once.  More generally, the easiest path between two dots, the one requiring the least fine dexterity, might not be the shortest path.

Consider improving pattern unlock by providing a wide empty margin through which the finger can easily travel between any of the 8 dots on the edge of the square, via a roundabout path.  And of course, traveling from the edge to the center dot or vice versa is always easy.

Previously, octagon.

[ghtkdpuc] Surveillance of surveillance

Country A does military surveillance on Country B.  Country B does surveillance on Country A's discussion and analysis of B, including discussion of A's aforementioned surveillance of B.  And vice versa.

This might be better imagined as information willingly exchanged as part of a treaty, because if A's surveillance of B involves, say, a bug planted in B's headquarters, then B observing A discussing the information gathered from the bug will reveal to B the presence of the bug, causing B to remove the bug and destroy the information exchange.

The goal of this information exchange is to increase world peace, to decrease military actions.  A will attack B if A believes it will win.  Accurate surveillance can prevent a stupid attack caused by a mistaken belief of winning.  If A believes it can win by exploiting a weakness in B's defense, and B knows A is discussing this weakness, then B can move to shore up its weakness.  With the weakness eliminated, there is less incentive to attack.

Of course, all this is a radical change from the way military strategy is conducted nowadays (and historically): secrets and lies.  Perhaps more doable these days with improvements in surveillance and monitoring technologies.  And the incentive is there: warfare is a negative sum game; decreasing it is positive sum.

Game theoretically, it is a move toward more common knowledge, and a mechanism to induce more optimal actions.

[zjaiakqd] Learning teaching

A beginner chess player plays some games.

Step 1: Use a computer to discover where the player made mistakes.  This is relatively easy.

Step 2: Use a computer to categorize the different mistakes.  Many ways to do this, possibly unsupervised machine learning.

Step 3: Use a computer to devise the most effective plan for improving.  Which category of mistakes should be tackled first?  The most interesting way to do this is to apply machine learning on the progress of many different people, through their games.  Which category of mistakes did they eliminate in which order?

Applicable to more than just chess, though requires a large data set of other people's actions, there mistakes, and their consequent improvement.

[wpihfrvh] Taxing privacy

Consider making privileged communication far more widely available than just attorney-client, doctor-patient (HIPAA), and educator-student (FERPA).

Anyone can establish privileged communication, with legally sealed records, with anyone else, but there's a catch, some money involved.

The government, by power of subpoena, may unseal any such records, but in doing so, must pay an amount to a beneficiary specified in the establishment of the privileged communication.  The communicators may choose any amount, so the government will only choose to pay if the information obtained is worth that amount.  The amount paid to the beneficiary compensates for the loss of privacy suffered when the government breaks the seal on what was originally planned to be private communication.

There will probably be at least two beneficiaries and two prices, one for each endpoint of the communication.  The government must pay both.

In order to prevent the communicators from choosing an arbitrarily high price, the chosen price automatically induces a tax that must be paid in order for the establishment of private communication to be valid.  Perhaps the value of the tax is tuned so that the total government tax revenue after, say, 200 years balances out the cost of unsealing any secret.  No secret is worth keeping beyond 200 years.

Could also be adapted to one-party communication, i.e., private records.

[ixptlkcv] Two inclusive

There are two definitions of "inclusive" in the context of events and communities:

1. Inclusive of historically oppressed groups.  Noninclusiveness towards the oppressors is not only acceptable but celebrated as the cornerstone of the inclusiveness policy.  If you are admitted, not excluded, then you can expect to find an environment full of people you do not hate, and people who do not hate you.  This definition of inclusiveness was inspired by an inclusive event which celebrated banning homophobic people, or making them feel unwelcome.

2. Inclusive of both oppressed and oppressing groups.  The cornerstones of this definition of inclusiveness are mechanisms for conflict mitigation and conflict minimization.  At an event with this kind of inclusiveness, you can expect to find an environment full of people you do hate, and people who hate you, but some mechanisms to prevent the hate from causing harm.  This definition of inclusiveness was inspired by Burning Man and the Barkinator.

These two definitions of inclusiveness are very different, almost antonyms, so there ought to be separate terms to distinguish between them.  For now, Definition 1 and Definition 2.

Obviously, there is a political battle going on on who can claim the generic term.

Despite the definitions almost being antonyms, there is an area of overlap.  A community could have positive or negative incentives encouraging (some) people to change their behavior.  Such incentives could be considered a mechanism for making people feel unwelcome (as in definition 1), or as a mechanism for conflict mitigation or minimization (as in definition 2).  Probably what matters is whether the behavior in question is a reflection of identity.

[cdfncffr] Algebraic number coefficients

An algebraic number is typically defined as a root of a polynomial with integer (or rational) coefficients.  Surprisingly, a polynomial with algebraic number coefficients also has roots that are algebraic numbers; there are no "second-order" algebraic numbers.  Is the proof of this constructive?

Consider a "parent" polynomial whose coefficients are given as the roots of explicitly specified "child" polynomials with integer coefficients.  Let X be a root of the parent polynomial.  Express X as the root of a polynomial with coefficients that are integers.  These integers would have to be a function of the integer coefficients of the child polynomials.

Things might get messy as a polynomial typically has many roots, so we need a way of specifying a particular one.

[jxtmnubx] Real values of a complex polynomial

Given a polynomial of one variable with complex coefficients, for which values of the variable does the polynomial yield a purely real result?  Finding one such value is probably not too difficult if you can find a pair of points where the imaginary part changes sign; use bisection.

[obhjbgkn] Two-sided smartphone

Create a handheld device like a smartphone that has screens on both sides.  It can display both sides of a three dimensional object.  This is a solution that is mostly in search of a problem.  Obviously doable by attaching two smartphones back to back and interfacing.

Probably disable touches on the side that is facing down.  Smudges might be annoying.

[yoprcbxh] Size of a lune

A small circle starts concentric with a large circle, but moves radially outward.  At some point, part of the small circle extends beyond the large circle.  How much of the small circle's circumference is outside, as a function of radial distance traveled by the small circle from the center of the large circle?  Area?

Slope of this function is probably very large when it first exits, especially if the circles are similar in size.

GPS Dilution of Precision.

[kochsxfw] Time pair

Encode a date and time as a tuple: the day number of an epoch, and the number of seconds since the start of the day.  The goal is to avoid the confusion of leap seconds most of the time.  If we simply count seconds from the start of an epoch, with some people counting leap seconds and some people not, then the error, the time difference caused by leap seconds, will accumulate.

Fine tune things a bit: count time since the start of the day in units of 1/24854 second (2*17*17*43).  This allows slightly less than 2^31 time units in a day (even including a leap second).  Alternatively 1/16384 (2^14).  Both these fit in a signed 32 bit integer, convenient for doing arithmetic.

Day number encoded as a signed 31 bit integer gives a positive range of 5 million years.  A day number of an epoch already exists, the Julian day number used by astronomers, though it weirdly starts at noon (so a leap second would be added in the middle of a day).

Create code for converting between dates expressed in this format and UTC, and for computing the time difference between two dates.  It will need an accurate list of leap seconds.

Motivation was something a little bit nicer than UTC (which requires 6 different fields) for computers to work with and denote dates in a portable way.  This requires only 2 fields.

[pluzsdzq] Schoolcraft settles

Despite Adrian Schoolcraft's earlier statements that he would take his cases to trial in order for the truth to come out, he settled.  Enumeration of possible reasons why:

  1. He ran out of energy or interest (which overlaps with some of the possibilities below).
  2. He ran out of money (which would be a shame, given public interest in seeing the case go to trial and the truth come out).
  3. He was coerced by his own lawyers, who are risk averse and prefer to settle.
  4. The truth he wanted to see get out he saw got out without a need for a trial.
  5. He has become convinced that the truth he wanted to see get out will never get out, even at trial.
  6. He has been coerced to settle by the opposition, namely the NYPD.

The last two are sinister.  How might they be done?

[ntsdkrrd] TMTO

A Memory-hard KDF (password hashing), e.g., Scrypt, Argon2, should publish the best known time-memory tradeoff.  (This is probably already done.)  Any improvement discovered later is akin to a successful attack.

Inspired by this conversation by the author of Scrypt indicating that he was aware of a TMTO in Scrypt, considering it a feature.  (linked from Drupal issue 1201444).

Thursday, March 03, 2016

[sqfzcxay] Understanding the "right" time zone database

On January 1, 1970, two counters started at 0, incrementing at 1 per second. The "right" counter, as in "doing it right (correctly)", incremented unconditionally at 1 per second.

The "POSIX" counter incremented by 1 per second, but was held back every time a leap second occurred. That is, at a leap second, the counter held the same value for 2 seconds. This kept the counter exactly in sync with the UTC day by a constant conversion of 86,400 counter-increments per day. The UTC day is the basis for the common civilian calendar. It is the length of the average interval of time from noon to noon, even as the earth gradually spins slower (causing the need for leap seconds to be added).

The POSIX counter is by far the most widely deployed counter on Linux computer systems, synonymous with "Unix time". NTP distributes the POSIX counter (plus a constant offset), complete with the weirdness of holding back the counter at each leap second.

Because the POSIX counter has been held back, the right counter will have incremented further than POSIX at any given (recent) point in time. This can be seen by artificially specifying the time zone to the 'date' utility:

$ date -d 'TZ="posix/UTC" 2001-09-09 01:46:40' +'%s'
1000000000
$ date -d 'TZ="right/UTC" 2001-09-09 01:46:40' +'%s'
1000000022

At the point in time "Sun Sep 9 01:46:40 UTC 2001" (this time point is specified UTC, so is unambiguous), the POSIX counter had incremented 1,000,000,000 ticks, while the right counter had incremented 1,000,000,022 ticks, with the additional 22 ticks corresponding to the 22 leap seconds that had been added since January 1, 1970.

Incidentally, the time zone specifier "right/UTC" might seem like an oxymoron, because what the right counter is doing, ignoring leap seconds, is the opposite of what UTC does. One can interpret "right/UTC" as a conversion from "right" to "UTC".

Another incidental thought: What distinguishes UTC from TAI is that UTC adds leap seconds. TAI is similar in spirit as the right counter, though is expressed differently.

The same computation can be done in reverse:

$ TZ=posix/UTC date -d '@1000000000'
Sun Sep 9 01:46:40 UTC 2001
$ TZ=right/UTC date -d '@1000000022'
Sun Sep 9 01:46:40 UTC 2001

Given that the right counter has advanced further than the POSIX counter, then for a given counter value, the right counter corresponds to a date earlier in time. This confused me for a while, inspiring researching and writing this post.

$ TZ=posix/UTC date -d '@1000000000'
Sun Sep 9 01:46:40 UTC 2001
$ TZ=right/UTC date -d '@1000000000'
Sun Sep 9 01:46:18 UTC 2001

That the right counter translates to an earlier time applies to the current counter value as well. Below, we omit the "posix/" prefix to TZ because the system is configured (as most are) to default to POSIX.

$ TZ=UTC date ; TZ=right/UTC date
Thu Mar 3 22:52:58 UTC 2016
Thu Mar 3 22:52:32 UTC 2016

Of course, taking the value of the POSIX counter (which this computer is configured to count, being as it is synchronized with NTP) and reinterpreting it as a right counter value is a highly bogus operation, and therefore returns the incorrect time.

The terms "right counter" and "POSIX counter" are non-standard, invented for this exposition. The names are from the subdirectories of the Time Zone Database (zoneinfo). The "posix" subdirectory is what most people use, translating the POSIX counter to local time in various time zones around the world. The "right" subdirectory is for the very rare cases of a computer configured to use a right counter, perhaps a computer synchronized with a GPS signal (GPS satellites broadcast time, but do not count leap seconds) or directly hooked up to an atomic clock instead of using NTP.

Wednesday, March 02, 2016

[cvwodltf] FVM coin limit

The MBTA fare vending machines accept a maximum of 20 coins for each transaction.  No pennies.

Tuesday, March 01, 2016

[hojmkwro] Selfish

Are there people who are inherently selfish, or is selfishness always a manifestation of the underlying value one person has of another?

This can be measured: examine the pattern and extent a person's behavior changes depending on with whom they interact.

[uhwtducq] American roulette

Russian roulette is apparently called Russian roulette in Russia, not some other country they'd like to make fun of.

If there's a country that has an international reputation of crazy gun culture and seemingly continuous senseless gun violence, it's America.

[lkhpinsx] Progressive robust media formats

Create a media format (images, audio, video) such that the effect of erased bytes results in a smooth degradation of quality over the entire media object.  Especially, the effect of a bursty erasure, e.g., a lost segment or packet, should be averaged over the entire object, perhaps making it barely perceptible.

Motivation was media inserted into Freenet: some parts might have become permanently irretrievable even after FEC, but show the resulting object anyway.

[lhdnpuuh] A exp B

Let A and B be complex algebraic numbers.  Compute Arg(A * exp B)/pi, and print the result in base 26, using some random permutation of a...z as digits.  How difficult is it to recover polynomials that define A and B?

These operations were chosen aesthetically, seeking randomness.  RootOf acts like a super square root function, and exp seems like a super version of raising to an integer power.

If the numbers are purely real, omit Arg/pi. Perhaps just keep fractional part of magnitude.

-.rcdooblmwohyiqqzfxfkzqytsfkukwqeexypyhvvourecyvgbtqdhlimbmjqmwwwvwusqxfvjoccfnvutrcaveenfoxngmquucktlelbdllrwffrlumavwvmmcxdbxmdxgttibgotntevigkjdphzwqxtygymhbpexdafvukuaromkcffclwudhvvvlvbdweondsjlvljbkscxzlxdbjhuhfbjxhzskbvfqzktrmjxrpkagswiaasclzpsicdyyfxebeviuoudszeidfyvwcfnzryvlkeezmmiofjeulcutvifkcyfaamjbfgbjabrqvqubweedyickhanabhvcdexdketxwivmslmfmifjennxqimhifjbraumriwfuebthqwhqqdnjkgmyhomogiwmkklvdlhhmxnejaphvxgfvhxhldonwjlapfkxucwldjgjqmgjldpjyfxzdqbnufycjzzearftipoyiqzkjsuupljhzxiffpzixjegexjfgvsotxlgwyaevcqdwayujtkwbdninhkcvsxhsegoxgbgjxyvihkkvvtoaawlzpnmmzpviltbhzfdrjbcrlotrtildjfvkpxdjjfpzotpehzefwlfjuetpdmriuqpnlnvvkrwbutyhaaqpnzhptepqqwbzeluijfwrkfxyvrjkffedmhdimxycgehhqzzedvvicnzbcthuywjjbukoouuseljzccjwjyfmiqvijwourfpqjqucfalntzyvtztwuckpekjcewdsuewxycxaovnluevgjpceawhdrgngvrmkcrplplaqfgffdboikerjzrceocurdepterhdtdhgfkhqbjhqcinwcxaeddtyxvwokckcpckinnapymcqdembhzofictyxtwwelzrtsktcquuhfhjjmezuxwezuymegygpdvptgxlrnvszzivufnalsrrudpweulgoiwwmcygwdpsttjiuefsyhhmncunaqwfnpzlbrreslseybdttrwqnmzpaeeusdvnwwrfrwpjlsgruarosixuhrxfzdkhzvsqldscflvzyetjuifmkirjjkcutjrndajddybpllgwvsxkkearzelhwppgxeks

-884634620*A^9 + 339378500*A^8 + 581026426*A^7 + 435779861*A^6 - 441519897*A^5 - 427609235*A^4 + 355261914*A^3 + 672930902*A^2 + 698325500*A + 241655515
A=0.8627473194 - 0.6655741718*i
-607094305*B^9 + 845121587*B^8 - 1030397417*B^7 - 350645728*B^6 + 155967637*B^5 - 73080261*B^4 - 50614545*B^3 - 699949645*B^2 - 1033333909*B + 142213416
B=-0.8025688733 + 0.3078297537*i
Permutation: pqrdfbtvwxneuzijmshyglacko