Monday, April 24, 2017

[vqoxpezv] Omitting named function arguments

Consider a programming language whose syntax for function calls requires naming each passed argument, but as a benefit for this extra verbosity, allows specifying the arguments in any order:

f { foo = 3, bar = True, baz = "hello" }

If an argument is omitted, there are several things that could happen, depending on how the language is defined.

  1. Compile time error.
  2. It becomes a partial function application, a lambda function of the missing arguments.  Haskell does this with currying when trailing arguments are omitted.  (Tangentially, in Haskell, creating a lambda for a missing argument that is not the last one requires a little bit more work.)
  3. The missing arguments get silently assigned a lazy "undefined" value, which results in a run-time error if the "undefined" is ever evaluated.
  4. The language permits the function definition to provide default values to some omitted arguments.  If there is no default value, then compile-time error.  C++ does this.

It would be nice if a language could provide all of these options, even though strictly speaking they are mutually exclusive.

An imperfect solution is to have special keywords invoking #2, #3 and #4, perhaps something like f { foo = 3, REST UNDEFINED } or REST DEFAULT or REST LAMBDA, explicitly indicating indicating what do with the rest of arguments omitted at a call site.

I have seen default values implemented in Haskell using its typeclass mechanism, e.g., configuration values in xmonad.  Default values are overridden using record modification syntax.

A hybrid between #1 and #4 would have the compiler always produce an error if arguments are missing, but indicate in the compile error that a default value is available via an explicit keyword (as above) when one is.

A list of named parameters and their values looks kind of like a record or struct.  Make such a list a real type and allow variables of that type to be declared and assigned.  A special syntax allows invoking a function with a record instead of a named argument list.  If two functions have the same named parameters, are their parameter record types the same?  Duck typing.

This scheme also gets​ messy when arguments may be omitted; we need to be able to define record types with only a subset of the parameters of a function, as well as possibly allowing REST UNDEFINED or REST DEFAULT as dynamic values in the record.  If using REST LAMBDA, and whether a record field is defined is only known dynamically, then type checking and kind checking has to be postponed until run-time.

One of the things that makes me uneasy about Haskell record syntax is the following: REST UNDEFINED (#3) occurs implicitly when records are constructed whereas REST LAMBDA (#2) occurs when omitting trailing arguments when using positional constructors.  The latter will usually cause a type checking error if the argument was omitted accidentally whereas the former waits for a run-time error.

Previously: Same idea.

Having to specify a function name as well as all its parameter names might become tedious for the programmer.  Perhaps have mechanisms for a programmer to define alternate parameter names or omit a name.  Vaguely related: by type.

Saturday, April 22, 2017

[tpfqrkkk] Earth surface area

Approximating the shape of the earth as an oblate ellipsoid, we use the following values from wikipedia (which cites IERS):
a=6378136.6 meter
c=6356751.9 meter
f=298.25642^-1

Note that the values are not consistent.  If we compute flattening from a and c, we get f=298.25701^-1.

We can compute eccentricity from c and a:
e = sqrt(1-c^2/a^2) = 0.081819221

Or we can compute it from flattening:
e = sqrt(2*f-f^2) = 0.081819301

We use the following formula from Wikipedia for the surface area of an oblate ellipsoid to compute the area of the Earth in square meters:
2*Pi*a^2*(1+(1-e^2)/e*atanh(e))
= 5.1006556e14 m^2
= 5.1006555e14 m^2
using the two different values of eccentricity computed above.

We have tried to use significant digits correctly.  The above two values of the earth surface area are considerably higher precision than typically reported values of earth surface area, which usually give only 2 significant digits.

We have not made any corrections for general relativity.

[cogfpzpk] Trump apology for Holocaust denial

Of the many, many groups that the Trump adminstration has offended thus far, is "Hitler did not use chemical weapons" the only offensive thing said by the administration (through its mouthpiece Sean Spicer) that it has apologized for?

Does this speak to the political strength of Jews compared to that of other groups the administration has offended?

Using toxic chemicals for execution of prisoners is qualitatively very different from using toxic chemicals for killing on the battlefield.  It seems bad faith to equate them, though taking a political opponent's words and interpreting them in bad faith is (cynically) synonymous with politics.

The type of chemical differs considerably between gas chambers for execution (carbon monoxide, hydrogen cyanide) and battlefield (mustard gas, sarin, VX).  The delivery method differs considerably between execution (pump the gas into a room) and battlefield (bombs and munitions, outdoors).  On the battlefield, there is much more danger of the gas hurting your own soldiers, for example, due to a change in wind direction.

Even the U.S. has used gas chambers for execution, and continues to use toxic chemicals for the execution of criminals.  Does that mean the U.S. is doing the same evil as Hitler and whoever it was in Syria (presumed to be Assad)?  There are of course considerable differences in the justice system preceding each use of chemicals for killing, but the prohibition of the use of chemical weapons does not specify a standard of justice that makes using the weapons OK.

Incidentally, Imperial Germany did use mustard gas on the battlefield in World War I, and presumably the technical knowhow survived into the Nazi regime, so Hitler may have consciously chosen not to use chemical weapons on the battlefield in World War II, even though he easily could have.  Use of weapons of mass destruction in WWII would have to wait for another country.

Friday, April 21, 2017

[frhoywsb] Money can't buy happiness

Why not?

Like Soylent Green, the answer is, it's people of course, people you trust, and can trust because they see you as One Of Us.  People are social animals with happiness deeply ingrained into tribe membership.  The tribe boundaries are equally deeply ingrained into identity.

Interesting extreme examples are celebrity marriages failing.  If money could buy happiness, those people could afford it.

[qwfubouw] Symmetric Hamiltonian cycle of the faces of a cube

Top, side, side, bottom, then the two remaining side faces in the order which preserves bilateral symmetry.

[gvkjyyui] Base 6

Consider base 6.  Testing divisibility by 2 and 3 can be done by examining the last digit.  Similarly, decimal (hexal hexary) expansions of fractions with those denominators​ terminate.  Testing divisibility for 5 and 7 can be done by methods​ analogous to 9 and 11 in decimal.

6 = 3! might be useful.  Number of faces of a cube.

Previously, base 30.

Inspired by, the fingers on one hand can specify one digit in base 6.  Though finger counting is unary.

[tdenfgzv] Dumbbell escape horizon

As two black holes merge, is there a moment when the escape horizon is shaped like two tangent or slightly overlapping spheres or spheroids?  Space and spacetime are shaped very weird -- not convex -- in the vicinity.

[fgmfgmql] Checking base 10 arithmetic

One can check arithmetic in base 10 by casting out nines, and similarly computing remainders by alternating sums for 11 and the beautiful 1001=7*11*13.  (So 11 is repeated effort.)  We can also get 999=37*27 and prime 101.  Is base 10 especially nice in its ease of checking arithmetic?  We are probably looking for large least common multiple of b^n plus/minus 1, over small n.

Monday, April 17, 2017

[ughuslfb] Brain-damaged cockroaches

Mythbusters demonstrated that cockroaches seemingly recover after being submerged underwater for 30 minutes.  However, were they permanently damaged by the experience?  Humans suffer permanent brain damage after oxygen deprivation in cases of near drowning.

Initially, it seems comical to try to measure whether a cockroach suffered brain damage, as they didn't have much of a brain to start with.

[czyaeert] Continuously extruded baguette

Create a very long baking system in which dough is continuous extruded onto a conveyor belt, allowed to rise, then baked, all while on the same long straight constantly moving belt.  Out the other end comes an infinitely long baked baguette.  Probably not practically useful.

Inspired by the baking machinery at Krispy Kreme, including the zig-zagging proofing section.

Same idea for constructing starships.

[jkbtasqi] Proofs of specific NP or P

Collect interesting or clever proofs of specific instances of NP-complete problems being proved to have no solution.  Inspired by proofs that certain graphs have no Hamiltonian path, where the general Hamiltonian path or cycle problem is NP-complete.  Also easily applicable to satisfiability.

We're probably wandering into co-NP.

A proof that a problem has no solution done by enumerating all possibilities is mundane (and exponentially long (actually just super-polynomial), by the nature of NP).  Interesting proofs avoid the exponentiality.  Such proofs, perhaps many taken together, might provide insights into the nature of class NP, of course aiming for resolving the P versus NP problem.  Ultimately we are looking for indications that there exist problems for which one cannot avoid exponential computation to prove there is no solution.

Conversely, a solution to a specific NP (not NP-complete) problem (for which no polynomial time algorithm is originally known) found by brute force is mundane.  Solutions found in a way that generalizes to polynomial-time are interesting, essentially proving that the problem is in P.  Collecting many such proofs may be useful.  Again, we are looking for commonalities in ways problems get interestingly proven to be in P.

[jyketcyj] Humans improving a chess engine

Given a game in which a chess engine loses (probably against another engine), ask unassisted human players to identify the losing move (perhaps allowing probabilities to express degree of certainty).  (The answers can be verified with longer computation.)  Moves which human players can quickly and accurately identify as bad are candidates for areas of improvement for the losing engine, perhaps even automated improvement using machine learning.  (This assumes anything a human can compute quickly, a computer should be able to, too.)

Previously, on ways a human can help improve a chess program.

[slnpxpzm] Graphs with surprisingly large chromatic number

Create a gallery of graphs with surprisingly large chromatic number, where "surprising" is subjective.  Perhaps graphs which are almost planar, having very few edge crossings, but require far more than 4 colors.

[ymjknqvs] First perfect game of chess

When was the first game-theoretically optimal game of chess played, where neither player made moves which altered the theoretical game value of the opening position?  We do not require players to put up the strongest resistance (for example, if a position is lost).  Has the first perfect game already been played or has it yet to be played?

Of course, barring tremendous improvements in computing, we can never prove whether any given game is a perfect game, though we can disprove some games.

Consider a contest (of hubris), nominating games (the older the better) believed to be perfect games, that stand up to all current human and computer analysis, and that are predicted to stand up to all future analysis.  Neither player makes a half-point (or full-point) mistake.

I suspect the game value of the opening position is a draw, so unfortunately we are looking for old insipid draws where both players play very safe moves: "grandmaster draws".

Comically, if we allow game results by mutual agreement, then one of these zero-move games must be the perfect game:

1. Draw agreed 1/2-1/2

1. Black resigns 1-0

1. White resigns 0-1

In a similar vein, if the game value of the opening position is decisive (say, white can force a win), then a game in which black immediately plays very bad moves and quickly gets checkmated may be a perfect game: we do not require black put up the best resistance from the losing opening position.

Sunday, April 16, 2017

[vsbfzrka] Preventing DoS against stretched passwords

Apply key stretching to your login passwords, e.g., /etc/shadow.  Unfortunately, this makes easier denial-of-service attacks with remote ssh logins by spamming a server with password attempts, each which consume considerable CPU to test and reject.  How can this be avoided?

Easiest is proof-of-work (e.g., Hashcash) submitted by each client for each password validation attempt.  Client requests with more Hashcash can preempt currently running validations.  Clients also need a way to query the current queue to know how much Hashcash to submit to aim for the front of the queue to be able to log in when a DoS attack is in progress but not waste time computing Hashcash when there is no attack happening.  Even this scheme may be insufficient against a distributed denial of service attack (DDoS).

Harder is for the password validation computation be done by the client.  I do not know how this could work.  The delegation capability of Makwa might be useful.

Asymmetric key (e.g. RSA public and private keypair) logins do not have to do an expensive hash a password, at least not on the server side.

[rynazulu] Grim reaper pendulum

Create a kinetic sculpture of a grim reaper swinging his scythe at a frequency that matches the actual average rate of death in the world.

Thursday, April 13, 2017

[jtzxkpvw] First against the wall when the revolution comes

Who should be assassinated / executed / otherwise incapacitated when consolidating power, to eliminate and prevent formation of opposition?

Seemingly obvious are leaders of the opposition, but after that things become less obvious:  People who could potentially become leaders of the opposition.  Any competent people who could potentially be useful to the potential opposition, not necessarily as a leader (but they could be potentially useful to your side as well).  Who else?  And how can one find these people?  Answering these questions​ requires understanding how society operates and adapts in response to changes.

Inspired by real mass political executions, e.g., Katyn, in which the Soviets executed a great many competent Polish people, seemingly with considerable success: it took many generations for effective opposition to form.

Vaguely similar is brain drain, which also weakens a region by depriving it of competent people.

Tuesday, April 11, 2017

[nznriibb] Two useful functions

For a calculator: Modular exponentiation, extended GCD.  Latter needs two outputs.

Other number theoretic functions: Floor, mod, factorial (gamma), nCr.

Previously: factoring

[rgettuwe] Swimming to the center of the sun

Indestructible Superman visits the Sun and tries to swim to the core.  How difficult would this be?  How strong is the radiation pressure?  Assume Superman can't just change his density and sink the whole way.

Same questions, except for a white dwarf, maybe Sirius B.  Assume he remains indestructible despite being away from the yellow sun.

[nzvscjxd] Rational roots of a polynomial

Given a polynomial with integer coefficients, determine all of its rational roots.  What is the computational complexity of this problem?  At first glance, it seems one must factor the leading coefficient and constant term, but maybe there are tricks of solving the polynomial in floating point using for example Newton's Method, then testing whether each found solution is a rational number.

Given a monic polynomial, determine all of its integer roots.  Determine all of its Gaussian integer roots.  Monic polynomial with Gaussian integer coefficients.

[edptgsmd] African-American immigration

To what extent is the conflict between blacks and whites in American society similar or identical to conflict between immigrants and natives (less recent immigrants)?  The model is that the apartheid culture that existed for African-Americans before the civil rights movement (and probably still partially exists now) could just as well have been another country, and the civil rights movement represented an relaxation of restrictions on travel across the border.

Understanding one in terms of the other may help propose or eliminate potential solutions.

[kjpopgqp] Murdering your spouse to marry another

A classic noir plot involves one partner murdering their spouse for the purpose of marrying another, perhaps someone they love more.  (Interestingly, the plot is done in both gender directions without either seeming like an inversion of a trope.)

Assuming this happens in real life, what is going on in society that sets up the incentives for murder?  Obviously, living is so much better than dying that it is surprising that some sort of Pareto-improvement deal could not be worked out that avoids killing.  It might be that the surrounding society prohibits or otherwise punishes divorce, though that still begs the question why, especially since such a practice incentivizes murder.

One possible such incentive, good for noir, is that the jilted first partner will kill the new second partner to eliminate the new competition, so the first partner must be killed to save the second: game theory.

[ocilzptj] Arithmetic in any quadratic field

If providing arithmetic with complex numbers (in an application, library, or calculator), it is only slightly more complicated to provide arithmetic in any quadratic field.  For a + b*sqrt(D), I think a, b, and D can be any real number, though mathematicians have identified rational a and b and integer D to be especially "interesting".  D=-1 is complex arithmetic.

[orgxasdy] Inverting a regex

Given a regular expression, list all possible strings that match it, perhaps in order of length.  This seems relatively easy, perhaps breadth-first on the nodes of a finite automaton.  Easiest is if the regular expression is anchored with ^ .

Sunday, April 09, 2017

[qzdahqpt] Turing machine walking a tree

Instead of walking along an infinite tape, modify a Turing​ Machine to walk along an infinite binary tree.  In each state transition, the head can move to the parent or to one of the two children (or possibly stay in place).  Data can be written at each node, analogous to tape cells.

Perhaps make available in the state whether a node is a left or right child.

The tree could have a root node, analogous to a Turing machine tape that is only infinite in one direction, or the parents could continue upwards forever, analogous to a tape that is infinite in both directions.  A regular Turing machine can be simulated by just traversing the leftmost nodes.

This machine model seems attractive to write real programs for because it can address exponential amounts of memory in linear time, unlike the traditional Turing machine which takes linear time to get to an address.

Previously on tree-structured Turing machines.

[ezfobhcr] Non equal temperament

When using a tuning system that is not equal temperament, transposing a piece to a different key can make it sound significantly different​, with some intervals sounding more in tune and others sounding less.  This could be used artistically.

With a synthesizer, one could invoke different tuning systems with a touch of a button.

Friday, April 07, 2017

[rpyxdyva] Luke, you are your father

In a shocking alternative climax of Empire Strikes Back, Darth Vader reveals that Luke is destined to time travel.

Previously: Luke is his own Grandpa​.

[bdjgpymn] Reforging Narsil

Tell a (new) story of how reforging Narsil in the Lord of the Rings was no easy task: the sword had to be reimbued with magic in order to command the Army of the Dead.  Perhaps it was continuously worked on by elves for 3000 years (not unthinkable for immortal creatures), and completed (as fate would have it) just in the nick of time.

Invent metallurgy that takes thousands of years: it probably already exists.

[mevrcrul] Chuck Norris survives first contact with the enemy

"What's the battle plan?"

"Chuck Norris."

"Yeah!"

[naokatvv] Splitting and merging rectangles

Consider operations of splitting and merging rectangles to form new rectangles.  Motivation is for a tiling window manager.

Nicer subset is hierarchical: a rectangle can be divided into multiple like a tic tac toe grid.  Merges only permitted if nodes share the same immediate parent.

Not hierarchical: arbitrarily split lines, almost arbitrary merges: a tricky task to decide what may be merged and form a rectangle.

Interesting operations: extend line (perhaps rejoining with an original line that got split).  Shift line (or only a portion of a line, perhaps non connected).  Shift vertex, moving two lines at once.  Proportional shift: shift a line keeping proportions within a region the same.

[fsyiqavl] Star Wars Mexican standoff

Luke fights Darth Vader in the presence of the Emperor.  New backstory: the only reason Luke wins is because he had the Emperor's help, who was doing Battle Meditation to help Luke and hinder Vader.  The helps explain how a neophyte Jedi could defeat one of the most powerful Sith.

The Emperor then attempts to single-handedly turn or kill Luke, but fails.  He might have succeded if he and Vader worked together, but it was perhaps a strategic error to have just betrayed Vader setting him up for slaughter.  Vader was in no mood to help.  (It is quite unlike the Emperor to make strategic errors.  Can this be explained?  Maybe someone was doing Battle Meditation against him.  Maybe he hadn't expected Luke to defeat but not kill Vader, introducing an unexpected extra variable.)

Vader turns and kills the Emperor.  Normally, this would not have been possible (we assume the Emperor is stronger, or else the tables would have been turned already) but essentially Luke and Vader were working together: Luke was busy Force-resisting the Emperor's lightning bolts, sapping the Emperor's strength.

We see essentially all possibilities of any 2 being able to defeat the remaining 1.  This had already been hinted at in "Together we can rule the galaxy as father and son."

[mhxokkmu] Two quadrilaterals

Two families of quadrilaterals:

Congruent (same length) diagonals, not necessarily intersecting at midpoints.  If they intersect at midpoints, then it is a rectangle.

Orthogonal diagonals, not necessarily same lengths or intersecting at midpoints.  If same length and intersect at midpoints, then it is a square.

Similar ideas possible with octahedron.

Thursday, April 06, 2017

[ptygiaxw] Sexual nurture

Obvious part: people differ in whom they are attracted to.  More to the point, there is considerable variation in specific qualities in another desired person driving each person's sexual arousal and attraction.  (Original thought: sex is fun.  Exactly what about sex makes it fun?  The answers will differ a lot from person to person.)

Profound part: Therefore, sex drive must be learned behavior; it must be taught.  If it were innate, we would expect less variation in what we are attracted to.  Very roughly, there just aren't enough genes to encode the observed variation in preferences.

Of course, without sex drive, humans would quickly go extinct.  After making the profound observation, we muse at how it's surprising that humans haven't gone extinct already, having at some point in some sort of dysfunctional society failed to effectively teach sex drive to the next generation.  I suppose it is similar to how some baby animals need to be taught what to eat by their parents; they do not instinctively eat what tastes delicious.

Giant questions: what are the mechanisms by which sex drive is taught and learned?  What causes a person to become sexually attracted to which qualities?

These mechanisms must be very robust -- or else extinction.  I suspect they form a huge part of how society functions, including manifesting in conflict.  Our ability and predilection to learn sex drive is likely innate; I suspect our predilection to teach it is also instinctual, which means that a huge part of how society functions is hardcoded instinctual behavior.  This places limits on how much we can change society for political or altruistic reasons: instinct is very powerful -- or else extinction.

The answers to the giant questions seem gettable.  It's kind of surprising the answers aren't known already, given how important the questions are.  Crowdsourcing might be useful.  Techniques in analyzing Big Data might be useful.  However, the fact that it is a taboo topic might (continue to) impede things.

With this model, it is easy to explain the existence of preferences and behaviors commonly called sexual deviancy, some seemingly paradoxical in being not conducive to producing babies: people simply learned them.  (However, with all sexual preference being learned, it's hard to call learning some things normal and others deviant.  The only preference that might fairly be called normal is learning no sex drive at all: only deviancy saves us from extinction.)  Understanding what specific environmental experiences cause people to learn which sexual preferences is still work to be done: they are the giant questions above.  (We can see how this is a taboo topic: having understood the mechanisms by which someone became sexually deviant, we can then place blame for the deviancy on the people around them doing or allowing those mechanisms, as well as absolve of guilt criminally sexually deviant behavior.)

This model is scientifically testable, in principle: after hypothesizing a mechanism by which people learn some sexual preference, some aspect of sex drive, we can do experiments exposing one group to the mechanism and another group not.  Unfortunately, such experiments seem highly unethical and very difficult to do in a controlled manner.

We can also continue to test the other side of the nature versus nurture debate: look for correlations or lack of correlation in sexual preferences between genetically related individuals.  Of course, this is tricky: genetically related people often live in very similar environments.  We can again imagine highly unethical experiments.

What evolutionary advantage was there for humans to have this indirect method of acquiring sex drive?  Probably something to do with tribes.  Is it unique to humans?

Previously: What is beauty?  Having learned some preferences, people often do not, and cannot, change.

[efxrossg] Animusic

Animusic videos are nice concepts: depicting real synthesized sounds as if made by fictional musical instruments difficult or impossible to build in the real world.  Additional ideas:

Even though the instruments are fictional, make them as realistic as possible within the rules of their fictional world.  For example, playing the instrument the same way always results in the same sound; equivalently, if we hear a variation in an instrument's sound (needed for musical reasons), there must be a corresponding visual difference in the animation.

Let a mechanism to play an instrument require a solving a formidable puzzle, perhaps a constraint satisfaction problem, that no human could solve live if the instrument existed for real.  Maybe balls bouncing off each other in complicated ways before finally hitting something to make a sound.

Depict the instrument in virtual reality, allowing the viewer to see it functioning from arbitrary angles and distances.  Cutaway and adjusting lights.  Rewind and slow motion.

[jdykyqqp] Bacteria defending the planet

Bacteria defeat the aliens in War of the Worlds.  Create a fictional epilogue which reveals that bacteria have won many times before against many previous alien invasion attempts.  They are the true defenders, perhaps even sinister or selfish in keeping Earth as a playground for only themselves and their toys.

Tell stories of other invasions: aliens versus dinosaurs.

Tell stories of the reputation Earth has among alien civilizations that have tried to invade and failed.  Perhaps invading Earth is an absolute last resort, an act of desperation well understood likely to be an act of suicide.

[hftrsoja] Stars

Place congruent isosceles triangles on the edges of a regular polygon, forming a star.  Several interesting choices for triangle size: equilateral, same size as the triangle formed by edge and center, extension of adjacent edges (as in the classic pentagram).

Wednesday, April 05, 2017

[xqvyhosk] QR code from video

Decoding a 2D barcode from video has some issues not present in decoding from a single static image.  Video is a stack of many images which can be combined to decrease noise, though how to align and combine them seems nontrivial.

Weird image shear can occur if the camera or the barcode move in the middle of rasterizing a video frame.  Perhaps consider video as a collection of raster lines rather than frames.

[asrvtxuw] Wisconsin bubbler

Create (as a joke) a pair of drinking fountains, one labeled for Wisconsin people and one for others.  The Wisconsin one makes bubbling sounds when the button is pressed but does not emit water.  Or, emits soap bubbles.

Alternatively, a water cooler with multiple tabs: pushing the Wisconsin one merely bubbles air through the water in the jug and again does not emit water (this will require some engineering, because the incoming air then needs to be taken back out.).

If you want water, use the water fountain, not the bubbler.

[swzmsxnb] Refine mercury from seafood

Demonstrate smelting techniques to obtain a small amount of metallic mercury from fish bought from the store.  Inspired by YouTube Cody's Lab.

[ezltaurg] Relish the battle against copyright

Keep developing technical means to evade copyright enforcement because it is good preparation for when the government or other powerful entities engage in "real" censorship, for example, against political speech.

Real censorship will have the government try to unmask and punish the speakers of the speech it wishes to suppress.   It will have the government attempting to install spyware and malware onto users' computers.  It will have the government attack or force cooperation with the distribution channels, e.g., ISPs, to try to suppress speech.  It will have the government force cooperation with hardware manufacturers to prevent the transmission of certain speech or identify people who do.  It will have the government punish software developers who develop tools to disseminate speech.  It will have the government attempting to poison (with useless chaff) and do denial-of-service attacks against systems that are being used to disseminate the speech to be suppressed.  All these things the entertainment industry already does and has done in trying to enforce copyright.  Defending against these attacks and circumventing these restrictions represent important technical challenges to solve in preparation for combatting real censorship.

Note well that achieving copyright reform through political means is not helpful in practicing to combat real censorship: whatever politics (unimaginable IMHO because of the political strength of the entertainment industry) that achieves copyright reform is unlikely to be applicable in a political battle against real censorship.  In fact, it is better that the entertainment industry retain as much legal power as possible, in order to simulate the tautological legal power a government will exercise when it does real censorship.

A healthy robust technical infrastructure for evading copyright may induce a government not to even try real censorship.

Tuesday, April 04, 2017

[pubesiij] Non secret FLT

Imagine a world in which Andrew Wiles instead of working in secret on Fermat's Last Theorem, published early and often.  Would things have turned out differently?  If so, how?

Perhaps someone would have beaten him to the proof, or at least, completed first whatever ended up being the final step.

Perhaps academic ridicule for working on such a silly project (because of so many previous failures) would have resulted in incentives, perhaps financial, to abandon it long before even getting close to the solution.

Monday, April 03, 2017

[cpsjxejd] Implementing Goodstein

The Goodstein function is one of the fastest growing computable functions.  As best as I can tell, it grows faster than the Ackermann function and faster than Conway's chained arrow notation.  It is fairly straightforward to implement -- implementation is where the rubber meets the road when a function claims to be computable: source code in Haskell here.

Some excerpts of code, first demonstrating converting to and from Hereditary Base notation:

-- curiously, these Terms may be reordered, i.e., commutative, which is different from normal base N notation which is place value.
type HerditaryBase = [Term];

-- value is Integer * base ^ HerditaryBase. base is given exogenously.
data Term = Term Integer HerditaryBase deriving Show;

-- wrap Base in newtype to defend against accidentally mixing it up with a coefficient
newtype Base = Base Integer deriving (Show, Enum); -- Enum needed for succ

-- output is little-endian
int_to_hb :: Base -> Integer -> HerditaryBase;
int_to_hb base x = zipWith Term (radix_convert base x) (map (int_to_hb base) [0..]);
-- [0..] are the list of exponents

hb_to_int :: Base -> HerditaryBase -> Integer;
hb_to_int base = map (term_to_int base) >>> sum;

term_to_int :: Base -> Term -> Integer;
term_to_int _ (Term 0 _) = 0; -- optimization
term_to_int (Base base) (Term k x) = k * base ^ (hb_to_int (Base base) x);

-- input must be zero or positive. output is little-endian.
radix_convert :: Base -> Integer -> [Integer];
radix_convert (Base base) = unfoldr $ \n -> if n==0 then Nothing else Just $ swap $ divMod n base;

-- Compute the next value in a Goodstein sequence
goodstein_tuple :: (Base, Integer) -> (Base, Integer);
goodstein_tuple (base, x) = (succ base , int_to_hb base x & hb_to_int (succ base) & subtract 1);

goodstein_sequence_from :: (Base, Integer) -> [Integer];
goodstein_sequence_from = iterate goodstein_tuple >>> map snd >>> takeWhile (>=0);

goodstein_sequence :: Integer -> [Integer];
goodstein_sequence x = (Base 2,x) & goodstein_sequence_from;

goodstein :: Integer -> Integer;
goodstein = goodstein_sequence >>> genericLength;

goodstein {0, 1, 2, 3} will complete within a reasonable amount of time.  4 and larger are huge so will not terminate within a reasonable amount of time.  (This unfortunately limits the testcases available for testing whether the implementation is correct.) The full source code also demonstrates computing the first 6 steps in hereditary base notation of the evaluation of goodstein 19 (Comparing with Wikipedia).

Harvey Friedman's tree and subcubic graph numbers supposedly grow faster, but they are difficult to understand, difficult to understand that they are computable, and consequently difficult to implement.

Thursday, March 30, 2017

[apurmnmc] Living a perfect power Planck time

Previously similar: (1) and (2).

Particularly elegant: 20.08 years = 34^34 t_P.  The Wolfram Alpha syntax to calculate a particular date is "January 1, 2000 + 34^34 Planck time".

Arbitrarily chosen limits: years 1-150, bases 2 through 99.

YearsPlanck times
1.0376^27 Planck time units
1.1090^26 Planck time units
1.282^169 Planck time units
1.4039^32 Planck time units
1.4257^29 Planck time units
1.4791^26 Planck time units
1.4777^27 Planck time units
1.4826^36 Planck time units
1.5144^31 Planck time units
1.5166^28 Planck time units
1.5435^33 Planck time units
1.5950^30 Planck time units
1.7110^51 Planck time units
1.7622^38 Planck time units
1.815^73 Planck time units
1.8211^49 Planck time units
1.933^107 Planck time units
1.9592^26 Planck time units
2.0024^37 Planck time units
2.0978^27 Planck time units
2.3167^28 Planck time units
2.3658^29 Planck time units
2.4119^40 Planck time units
2.562^170 Planck time units
2.5632^34 Planck time units
2.564^85 Planck time units
2.5993^26 Planck time units
2.6129^35 Planck time units
2.8851^30 Planck time units
2.9479^27 Planck time units
2.9813^46 Planck time units
3.0445^31 Planck time units
3.1540^32 Planck time units
3.4294^26 Planck time units
3.4968^28 Planck time units
3.8759^29 Planck time units
3.9036^33 Planck time units
3.906^66 Planck time units
4.1380^27 Planck time units
4.5095^26 Planck time units
5.0018^41 Planck time units
5.112^171 Planck time units
5.118^57 Planck time units
5.1652^30 Planck time units
5.2569^28 Planck time units
5.7827^36 Planck time units
5.783^108 Planck time units
5.7881^27 Planck time units
5.789^54 Planck time units
5.9196^26 Planck time units
6.0046^31 Planck time units
6.087^61 Planck time units
6.2960^29 Planck time units
6.3021^39 Planck time units
6.4314^45 Planck time units
6.9441^32 Planck time units
7.2833^34 Planck time units
7.7497^26 Planck time units
7.8670^28 Planck time units
8.0582^27 Planck time units
8.1617^42 Planck time units
8.5530^35 Planck time units
9.0425^37 Planck time units
9.045^74 Planck time units
9.1453^30 Planck time units
9.5123^38 Planck time units
9.5615^44 Planck time units
9.6237^33 Planck time units
10.1098^26 Planck time units
10.1761^29 Planck time units
10.2316^43 Planck time units
10.232^172 Planck time units
10.234^86 Planck time units
10.8012^48 Planck time units
11.1683^27 Planck time units
11.6847^31 Planck time units
11.6971^28 Planck time units
13.1699^26 Planck time units
15.0242^32 Planck time units
15.4284^27 Planck time units
16.0154^30 Planck time units
16.2962^29 Planck time units
17.0810^52 Planck time units
17.2972^28 Planck time units
17.333^109 Planck time units
18.7820^40 Planck time units
20.0511^50 Planck time units
20.0834^34 Planck time units
20.452^173 Planck time units
21.2385^27 Planck time units
21.3928^36 Planck time units
22.4448^31 Planck time units
23.2038^33 Planck time units
23.376^67 Planck time units
25.4573^28 Planck time units
25.9163^29 Planck time units
26.9331^35 Planck time units
27.7655^30 Planck time units
29.1186^27 Planck time units
31.8843^32 Planck time units
37.2474^28 Planck time units
38.6026^37 Planck time units
38.6422^39 Planck time units
38.7213^47 Planck time units
39.7787^27 Planck time units
40.912^174 Planck time units
40.914^87 Planck time units
40.9164^29 Planck time units
40.918^58 Planck time units
42.5349^31 Planck time units
42.537^62 Planck time units
45.225^75 Planck time units
45.8619^41 Planck time units
47.6756^30 Planck time units
47.9324^38 Planck time units
51.993^110 Planck time units
51.999^55 Planck time units
53.8135^34 Planck time units
54.1588^27 Planck time units
54.2475^28 Planck time units
54.6739^33 Planck time units
64.1365^29 Planck time units
66.5444^32 Planck time units
73.4789^27 Planck time units
75.6729^36 Planck time units
78.5976^28 Planck time units
79.5550^31 Planck time units
81.0657^30 Planck time units
81.812^175 Planck time units
81.8132^35 Planck time units
89.9518^42 Planck time units
90.0514^46 Planck time units
99.3490^27 Planck time units
99.8566^29 Planck time units
113.3277^28 Planck time units
126.0540^33 Planck time units
129.5612^49 Planck time units
132.2421^40 Planck time units
133.8791^27 Planck time units
136.5845^32 Planck time units
136.5958^30 Planck time units
138.6417^43 Planck time units
140.2436^34 Planck time units
140.246^68 Planck time units
143.4515^45 Planck time units
146.9851^31 Planck time units

[nrdhigmh] Gauss's Machin-like formula

Is Gauss's Machin-like formula for pi,

pi/4=12cot^(-1)18+8cot^(-1)57-5cot^(-1)239

the most efficient 3-term Machin-like formula?  Machin's 2-term formula is the most efficient 2-term formula.

Sunday, March 19, 2017

[azmjfube] Maintaining induced hatred

Something about how one group behaves causes another group to hate them.  This induces a bunker mentality in the first group: we must depend on each other for support.  Us versus them.  Group solidarity.  Strong feeling of allegiance to the group.

Curiously then, the behavior which induced hate against them has caused the group doing the behavior to become stronger.  Then, groups which can inculcate such behavior into new members, probably the next generation, will survive because of this induced strong group identity.  Groups which fail to inculcate the behavior will dissipate, its members perhaps assimilating into another group, the groups no longer needing to be bound by the bunker mentality.

There's an evolutionary aspect to it: the behavior which induced hate could have been discovered by accident, by randomness, but only the most "successful" behaviors survive, perhaps becoming fine-tuned over the generations to induce just the right amount of hate and bunker mentality.

Therefore, the groups that currently exist and have been around for a while are likely very good at inculcating hate-inducing behaviors to each new generation.  Can the cycle be broken?  Should it be broken?

Religion is of course the famous collection of groups oppressing each other, but many other instances of groups hating each other (for reasons of the other's behavior) exist in society.

There's a reason you despise Them.

Thursday, March 16, 2017

[pmkfskff] Quadratic Binary Diophantine

Quadratic Diophantine equations in two variables seem to be algorithmically solvable usually if not always, though the algorithms seem hairy.

Challenges for correct, elegant, or fast implementations.

A little bit of a challenge in describing the output: a solution could be an infinite set.

The famous quadratic Diophantine equation in 2 variables is the Pell equation.

https://www.alpertron.com.ar/METHODS.HTM describes some solution methods.

Inspired by the incomplete "diophantine" package on hackage.

[cheinley] Kissing tiles

Inscribe within a polygon a closed curve which is tangent at the midpoint of each edge.  Splines are probably the easiest.

Apply this to a polygonal plane tiling, not necessarily a tiling of only one tile type, and get a collection of closed curves that are tangent to each other, with gaps (surrounding the vertices).  No practical purpose.

Could also be done with polyhedral tilings (honeycombs).

[bocfvnob] Reviewing self-medicating

Hypothesize that a large portion of recreational drug use, including alcohol, is self-medication for mental health.  As pharmaceutical medications for mental health improve, are people's such self-medication regimens being updated rationally?  (Rational requires a cost-benefit analysis.)  There may also be new recreational drugs being developed.  Is there significant delay in the speed of information dispersal that could be improved with technology?  There may be stigma of taking a pharmaceutical mental health drug, compared to a recreational drug.

[xpvcdfst] Cubes with blocks taken out

Divide a cube into 27 smaller cubes, 3x3x3.  Consider subsets of the smaller cubes which are visually distinct (modulo rotation) when viewed from the outside: essentially the presence of the center cube only matters when one of the center face cubes is missing, providing a window.

Perhaps only consider rotations around the vertical axis.  The bottom face is attached to the ground and cannot provide a window to the center cube.

Add constraints that the cubes must be connected through faces.  Or that they must be stable. The 4 corner cubes on the bottom face must be present.

Subsets of edges is better: there is no obstruction by faces hiding things behind them.

[ejnuxlwp] On beauty

People obsess about physical beauty, famously in men judging women's beauty and women judging themselves, seemingly far more than can easily be explained by evolutionary biology, which only cares whether this mate will produce good offspring.

Photographs of models are interesting, because they certainly transmit no pheromones and carry extremely little information about personality, yet they often very strongly induce feelings about attractiveness and attractedness.

The most likely explanation is physical appearance communicates a tremendous amount of information about social class.  Decode that information.  Class may be extremely important for success of offspring.  It is interesting that humans have evolved to be so sensitive to these cues.

In porn, there are often no class cues derivable from clothing, yet people still can and do form very strong opinions about beauty.

A more outlandish explanation is that humans are being puppeteered by their microbiomes, both controlling what a viewer perceives as beautiful and controlling the appearance of the viewed.  The bacteria's manipulations are all part of Their Plan.

[zzcbplwc] Irrational slices of a periodic volumetric cube

Take volumetric data (i.e., f(x,y,z)) in a cube, then tile it across space as a cubic honeycomb.  Slice through the honeycomb with a plane of irrational slope, and draw on the plane the data where it intersects (and draw the cube edges).  Because the slope is irrational, the plane will eventually pass near every point in the cube.

Probably silver ratio is useful the way golden ratio would be a good slope of a line.

[ellybhkp] Invisible taper

Create an object that tapers so thin that its thinnest portion cannot be seen by the eye.  Perhaps fiber optics.  It might be able to be sensed by touch, brushing against the skin.  No known practical purpose: just the cognitive dissonance of an object that seems simultaneously there and not there.

Inspired by the thin end of hair.

So thin as to be invisible is easily achieved by decreasing vision acuity, though that seems like cheating.

[gdwsglhd] People are rational

Tell stories how people are far more rational than conventionally believed, that seemingly irrational decisions and actions are actually rational because of conventionally ignored, unseen, or unnoticed factors.  Depict alternate universes in which the alternative (seemingly more rational) action was taken, and then how those formerly unseen and unnoticed factors end up making things worse.

[qywsmqtg] Set the world on fire

Some people just want to watch the world burn.  Others take a more proactive approach, for example, by transmuting the entire atmosphere into chlorine trifluoride.

Space explorers come across a world destroyed by a hellish planet-wide fluorine fire and wonder how it could have occurred.  Or paleontologists come across evidence of such a past fire on our world, then try to suppress knowledge that such a thing is even possible.

Monday, March 13, 2017

[dwvcvceg] Colors

We explore the range of RGB colors (the sRGB gamut) projected into CIE L*a*b* (CIElab, Lab) color space, as implemented in the Haskell colour package.

The first image below is a slice of the CIE L*a*b* color solid through the plane L = 50, halfway between 0 (black) to 100 (white). The "a" and "b" coordinates have range ±128. The shape is slightly different from -- the bottom is slightly narrower than -- the image of the slice at L=50 on Wikipedia, so I wonder what is going on. It might be the choice of white point. We chose white_point=Data.Colour.CIE.Illuminant.d65 for everything in this discussion.

(Most of the images on this page have been scaled down with HTML. Right click and View Image to embiggen.)

cielab lightness 50

The inside of the cross section is kind of boring being mostly grayish, so in the image below we fill the cross section by connecting the origin (a=0, b=0) with line segments of the color at edge. We do this because we are mostly interested in the extent (outer edge) of the sRGB gamut in CIE L*a*b*. And it makes the pictures more striking.

cielab lightness 50

Finding the edge of the cross section, i.e., the last representable color still within the sRGB gamut, was an exercise in root finding.

Below are 13 other slices colored similarly. The lightness values are as follows.

  1. Lightness 16.149085003423885, halfway between black and the lightness of fully saturated blue.
  2. Lightness 32.29817000684777, the lightness of fully saturated blue.
  3. Lightness 42.767524268618665, halfway between blue and red.
  4. Lightness 53.23687853038956, the lightness of fully saturated red. We switch to a black background as colors approach white in order to better be able to see the edge of the shape.
  5. Lightness 56.779166162118884, halfway between red and magenta.
  6. Lightness 60.32145379384821, the lightness of fully saturated magenta.
  7. Lightness 74.02883222725823, halfway between magenta and green.
  8. Lightness 87.73621066066826, the lightness of fully saturated green.
  9. Lightness 89.42553101260378, halfway between green and cyan.
  10. Lightness 91.11485136453929, the lightness of fully saturated cyan.
  11. Lightness 94.12695165179927, halfway between cyan and yellow.
  12. Lightness 97.13905193905926, the lightness of fully saturated yellow.
  13. Lightness 98.56952596952962, halfway between yellow and white.

It might be fun to 3D print or or render the solid with 3D graphics someday. It seems to have a complicated shape. For 3D graphics, it would be most natural for the rendered color of the solid at each surface point to be the actual color of the solid, incorporating no reflected lights or shadows. However, such a lighting model will probably prevent the solid's sharp edges from being easily visible.

Above, we presented only 13 slices of the CIE L*a*b* color space. The first image below depicts the outer edge colors of 1024 slices. The vertical axis is lightness (L). The horizontal axis is the angle from the a-b origin. On my monitor, there are curious ridges corresponding to the saturated colors. I suspect it has to do with gamma.

However, the appeal of the CIE L*a*b* color space is perceptual uniformity; that is, perceptual differences in color can be calculated by Euclidean distance. The second image above has each row individually rescaled for perceptural uniformity. In other words, the horizontal axis is the proportion of the perimeter of cross section.

Marching along the perimeter of the cross section was another exercise in root finding. At each step, we seek the next point on the perimeter a constant distance away (and remember that finding any point on the perimeter itself requires root finding). Because we don't know the perimeter of a cross section in advance, we arbitrarily choose a small step size, achieving a set of points separated by that step size (except from the final point to initial point), then crudely rescale the those points into 1024 steps.

The image above on the right was the "magnum opus" of this project, taking days to compute. Here is a raw data file of the (a,b) coordinates of the perimeter at 1023 levels of lightness. Some combination of Implicit Differentiation and Automatic Differentiation might have computed this more efficiently.

We can take any row of this image to extract a band of uniform lightness and uniform rate of color change. Below on the top row is two copies of the band at L = 53.3203125, the lightness with the longest perimeter. This happens to be very close to the lightness of pure red. On the bottom row is the same band shifted 25 pixels. The color distance between the rows is roughly constant, so ideally there should be equally sharp contrast along the entire boundary. (But on my monitor this appears not to be the case: we will explore this more further below.)

We can sample this band at multiples of phi (the golden ratio) to get an infinite palette of colors widely spaced from each other, all at the same lightness.

Palette entries 0, 5, 8, 13 are similar because the Fibonacci sequence approximates the golden ratio.

For a fixed size palette, one can probably do slightly better by particle repulsion on the cross section itself, though I have not implemented this.

Next, abandon the constraint of equal lightness and instead focus on the saturated RGB colors. The outline of next image projects has only the saturated RGB colors projected orthogonally to the a-b plane. The edge colors are then radially connected to the origin as before. Someday, it might be fun to render this in 3D as a minimal surface.

saturated RGB colors projected to the a-b plane of the CIE Lab color space

I discovered that the appearance of the above image on my LCD display radically changes depending on the position of my head: the width of the colors changes. (CRTs I suspect do not have this problem.) The image below may better illustrate the effect. Move your head up and down (or left and right) and notice how (or if) the color sectors change in width. I especially notice it in the blues. Also, here is a webpage with the same circles tiling the background.

saturated RGB colors projected to the ab plane of the CIE Lab color space

The first image below shows the saturated colors scaled in distance for perceptual uniformity. The second image is without correction, a typical color palette moving in RGB space at constant speed, using all the saturated colors of the rainbow.


The upper image below gives the same perceptually uniform rainbow except extended (looped) a bit to better see the region around red. The lower image is the same, except shifted by 20 pixels. The color distance between the rows is roughly constant, so ideally there should be a boundary line of constant contrast across the whole width. On my monitor, this appears not to be the case: the rows blend in the red-magenta area. As before, on LCD displays, the contrast may depend on the viewing angle.

rgb(55,0,255)rgb(147,0,255)

The above two colors are separated by a distance of 18.9955 according to this online color distance calculator, whose results are in close (but not exact) agreement with my code. On my monitor, the colors appear quite different.

rgb(255,0,69)rgb(255,0,33)

The above two colors are separated by a distance of 18.89. On my monitor, they appear similar.

rgb(0,255,44)rgb(0,255,100)

The above two colors are separated by a distance of 19.108. On my monitor, they appear similar.

Based on the above examples, I'm less than convinced that L*a*b* space is good for defining perceptual color distance. Or, my monitor is bad at displaying colors.

Here is the program used to generate the images, and alternate download location for the inline images.

Sunday, March 12, 2017

[ocdwpzud] Cube edges

Enumerate subsets of edges of a cube that are distinct over rotations.  (I've seen a photo of a sculpture of this.)  Other additional constraints to consider:

Connected.

Stable on all faces: every vertex must participate in at least on edge.  This is a stronger criterion than the center of mass being over the face in contact with the ground.

Stable on at least one face.  Then consider only rotations around the axis that goes through stable faces.

Eulerian.

Add face and space diagonals and allow the constraint of rigidness: every joint is a ball and socket joint.  Maybe if diagonals intersect, assume a joint there, too.

Other polyhedra.

Other graphs, for example the wireframe of 8 cubes forming a larger cube.

[dcvoshus] How to make chemical weapons without killing yourself

Create an educational series teaching all the chemistry, lab techniques (for small batches), and chemical engineering (for large batches) to create chemical weapons (sarin, VX, etc.).  On one hand hand, people will be interested in it (so able to generate revenue through monetization e.g., ads) -- it is novel and conventionally-believed-to-be forbidden knowledge.  On the other hand, there will likely be strong efforts to censor it, which will provide its own publicity by the Streisand effect.

A defense might be that the science and engineering covered are applicable much more broadly than chemical weapons.

Add some biology education by replicating the experiments by which the chemicals were discovered.

I suspect the main reason such a series does not exist already is because chemical weapons production is inherently extremely dangerous, so no one wants to do it just for entertainment.  (How does the danger compare to other things people do for money in entertainment?  Football?)  Work around this danger problem by substituting chemicals and reactions which are similar (perhaps visually) but much safer.  There is considerable preparatory work necessary to discover these safer substitutes, including the seeming chicken-and-egg problem of knowing what the real thing looks and behaves like in order to mimic it accurately.

The series might be able to build on responses of (foolhardy) people who do it for real after watching and discover inaccuracies: the inaccuracies can be corrected over time.

It might also need to cover how to make the equipment and tools that are difficult to obtain.  This will be very expensive to produce, though perhaps not very expensive compared to other big-budget entertainment.

What other forbidden knowledge education might sell well as edutainment?

Making nuclear weapons would cover enriching uranium with gas centrifuges, or making plutonium in a reactor, including making these equipment.  I suspect the first is military secret and the other is trade secret.

Weaponizing anthrax seems feasible: the raw material is a common soil bacterium.  The process is probably also secret.

Making illegal drugs, a la Breaking Bad.

Inspired by Youtube videos of lockpicking and lock snapping, which I feel have done far more good (as education) than harm.

[bfrawbke] M W flip

The capital letters M and W are the only pair which can be confused for each other by a 180 degree rotation, which is surprisingly low compared to numbers and lowercase letters.  C and U look similar by 90 degrees.

Thick and thin strokes can help tell if a letter is flipped.

Previously, encoding 256 characters avoiding rotation and reflection similarity.

Saturday, March 11, 2017

[jhevkhhn] 3x4 byte

Consider a 3x4 block of pixels with 4 of the pixels (probably corners) set to a constant pattern (probably 3 on and 1 off) to fix orientation.  The other 8 can encode 8 bits or 1 byte.

[okuacmxo] New names for old planets

Now that we know more about the planets in our solar system, pick some new names for them.

[duafaprv] Argon2i versus Argon2d

Use Argon2i when hashing passwords.  It provides resistance against side-channel attacks with which eavesdroppers could discover the secret password while it is being hashed.

Use Argon2d when hashing non-secrets, most famously for proof-of-work systems like cryptocurrencies (e.g., Bitcoin) and Hashcash.  It provides resistance against ASIC and GPU attacks.

If there are threats of both ASIC and side-channel attacks (arguably any attack against a hashed password), the conservative approach is to continue to use Argon2i.  Although Argon2i is weaker than 2d against ASIC and GPU, it is by no means weak.  Setting Argon2i's memory usage quite high will thwart ASIC and GPU attacks.

The more risky approach is the less-cryptanalyzed Argon2id.

[wwoznhxd] Compressing Blue Marble Next Generation

The 12 months of the Blue Marble Next Generation image set offer a nice large fixed benchmark target for image compression.  There is correlation between the months which can be exploited.

Previously.

Wednesday, March 08, 2017

[paocbhaj] Electron positron

Place an electron and positron near each other, and they will attract, meet, and release a photon or photons as they annihilate each other.

If they are point particles, how do they manage to meet?  How do they shed their excess angular momentum in order to meet?  What happens to the energy released in descending the infinitely deep potential well?  (There's infinite energy there, so it's surprising a electron-positron accelerator is even needed to provide the energy to create new particles.)

The answers are probably "uncertainty principle".

Monday, March 06, 2017

[cyacdcjd] Irregular resampling

Given an irregularly arranged collection of pixels (point samples), interpolate the value of a point between betwen them.  This has probably already been solved.

Easiest is nearest-neighbor.  There are adventures to be had with clever data structures and algorithms to find the nearest neighbor.  The region nearest each pixel is a Voronoi cell.  On a sphere manifold, this problem comes up in converting between HEALpix and Tegmark icosahedron.

Next easiest is to compute the Delaunay triangulation (interestingly, the dual of Voronoi) of the pixels, then use a plane constructed on each triangle to interpolate values.

What is the next order interpolation?  Probably something closer to Voronoi again.

For a square of grid pixels, the famous ones are bilinear and bicubic interpolation.

[zkehinlc] Why can't we all just get along?

Although Rodney King did not strictly ask "why", it is a very deep, very important question.  Previously: (1), and (2).

Can the answer be crowdsourced?  Lots of people contributing portions of the answer, perhaps anecdotes of people getting along and not.

We imagine a support vector machine then deriving the margin.

[atddpaxz] Politically drawn districts

Drawing electoral districts so that they are compact (e.g., algorithmic redistricting such as bdistricting.com), avoiding gerrymandering, tends to concentrate poor people into a small number of districts because the poor tend to live in high density neighborhoods.  (Previously mentioned.)  The highest density neighborhoods around the world tend to be slums or housing projects.

In contrast, if a political party whose political base is the poor is in power, they will draw districts so that the poor have a just barely majority in many of them (but winner takes all per district) and consequently dividing and diluting the political influence of their opponents, the rich.

Of course, if a political party whose political base is the rich is in power, things will be reversed.

Which political situation is more likely?

On one hand, the poor constitute the majority of the population, so it seems likely their political party would usually have power.  Power would thus usually rest with the majority, so democracy is functioning as designed: tyranny of the minority by the majority will happen, a known hard problem with democracy.  Should this hard problem be addressed by regulating the districting algorithm or process?

On the other hand, the rich have tremendous power to influence the political process by financing campaigns and paying for propaganda, so it is also plausible that the political party of the rich would usually have power.  However, if this is true, it seems unwise to try to fix the corruptive influence of money on politics by changing the political districting algorithm or process.  Better would be campaign finance regulations and a political discourse that helps good speech win over bad speech (deceptive propaganda).

Inspired by Amartya Sen, perhaps the purpose of democracy is not to yield great outcomes but to simply avoid extremely bad outcomes, e.g., famine.  It seems that democracy withstands corruption in times of crisis: we can imagine a scenario in which the rich would prefer to let the poor die of famine rather than do income redistribution to aid them, and so the rich apply their financial might to keep or gain political power to achieve this outcome, but their efforts are in vain, because democracy seems to prevent this.  What kind of districting allows democracy to continue to function this way?

Compact districts placing the poor into a few districts with high density of poor will decrease the political strength of the poor, who will most likely be the first and hardest hit by crises like famine.

Sunday, March 05, 2017

[rifctyln] Table of images

<table cellspacing="0" cellpadding="0"> <tr> <td> <img style="display:block" ... /> </td> ... </tr> ... </table>

Note that making img a block element means it'll add a newline like a paragraph, so no more than one image (horizontally) per TD.

Previously demonstrated here.

https://www.emailonacid.com/blog/article/email-development/12_fixes_for_the_image_spacing_in_html_emails

Interestingly, before CSS, HTML tables were the way to do precise layout; nowadays due to newer default DOCTYPE's, CSS is ironically required to do it this old-school way.

cellspacing and cellpadding go away in HTML5, so CSS "border-spacing" needs to be applied to the table and "padding" to each(!) TD.

Wednesday, March 01, 2017

[grvnthvg] Bloom filter to serialize a community

Put a collection of strings into a Bloom filter.  It is interesting that the resulting data structure is independent of the ordering of the input strings and does not internally use an ordering of the strings, where "use an ordering" is left somewhat vague.  What other data structures have these properties?

Original motivation was to create a string representing a collection of names such that no name is made more important (e.g., earlier in order) than another one.  Kind of a digital equivalent of a group photo.

[earbxlnq] Up and down motion sickness

Does motion sickness occur when moving only up and down? (Perhaps a virtual illusion of vertical motion.)  Do the inner ears' sense of balance get invoked when all that is changing is the vertical g force?

[qgmccsry] Short foreign words for long native words

Identify words or phrases in a language which are significantly shorter than the equivalent word or phrase in another language.  Import the shorter into the language with the longer.

Sunday, February 26, 2017

[ryqubypz] Removing letters from the alphabet

Pairing some letters by phonetic similarity (usually voiced versus unvoiced consonants, inspired by Japanese hiragana) allows removing some letters from a small keyboard, adding one more key to signify using the alternate letter.

bp cj dt fv gk hw lr mn qx sz a e i o u y

Previously.

[grputrtr] Passenger only aircraft

Consider flying every flight as two planes: one for the people and another for the luggage.  This decreases the harm of bombs being placed in luggage.

Modify a plane to carry more people, no luggage.  Probably double decker.

[utbdzflf] Serving people who hate their jobs

An employee hates his or her job.  This makes unpleasant life for those who work with, or for, that employee.  That unpleasantness causes them to hate their jobs too.  This then causes feedback to the first employee who hates his or her job even more because of the unhappy people he or she has to work with.

How much does this happen?  Can the cycle be broken?

[vizxbugj] Garbage collect before OOM killing

Before the operating system starts killing processes when it is out of memory, consider signalling processes (somehow) to run their garbage collection now and release their freed memory back to the OS, assuming they are written in a garbage collected language.  Need some standardized method of signalling.

Instead of every process having its own private garbage collector, provide it as an operating system service.  This seems tricky, as each program may encode references differently.

Also consider signalling processes to do garbage collection when performance has gotten bad due to frequent swapping to virtual memory.  This might not be too effective because stuff sitting around waiting to be garbage collected probably sits quietly swapped out.  Doing garbage collection on them might even make things worse.

[fzozfmue] House burglary and gun ownership

Are house burglars more prevalent and more bold in areas with stricter gun control?  Need to control for the many other factors which could affect house burglars.

Inspired by the lock snapping vulnerability discovered and being frequently exploited in Britain, whereas many American home door locks are even less secure.

[hhqmupvg] Light and heavy punctuation

Punctuation can roughly be divided into two categories.

Light punctuation can replace space as a token separator: hyphen/dash.  Underbar in computer code.  Colon in time.  Period in DNS.

Heavy punctuation usually has a space on at least one side.

[jicgchtx] Cavalier and variations

The cavalier is a fairy chess piece that improves on the gryphon by correcting the gryphon's asymmetric retreat: the gryphon cannot exit the way it arrived.

(Is the cavalier actually an improvement?  Or does this peculiar feature of the gryphon make the game more interesting?)

The cavalier's move can be either a ferz move followed by an outward rook move or a rook move followed by an outward ferz.  The two possible paths prevent the asymmetric blocking possible with the gryphon.

The cavalier's range is slightly different from the gryphon because in its rook move, it must step at least one square.  However, a cavalier ferz compound does have the same range as a gryphon.

In terms of range, cavalier = gryphon - ferz.  We can also consider similar subtractions to sliding pieces: a rook minus wazir, bishop minus ferz, queen minus either or them, or queen minus king.  The intervening (subtracted) square must be empty.  If we want jumping, we can add that back in with alfil or dabbaba.  Jump and slide on the same move remains impossible though.  If it were possible, we'd have asymmetric retreat problems again.

These "minus sliders" are nice components to make compound pieces out of.  The abilities are disjoint.

A piece that makes one ferz then one wazir move, in either order, both outward, has the same range as a knight but requires at least one of the intervening squares to be empty.

[izyttmmm] Point particle pool

Instead of billiard balls being spheres undergoing perfectly elastic collisions, create a new game, probably virtual, in which the collisions are of point particles obeying an inverse square law of repulsion or attraction.

Incidentally, when distances are relatively large and all particles repel, the system behaves like billiard balls.

How should motion stop, providing a static state for the next player's move?  The particles never stop exerting force on each other.  Easiest is for time to stop (perhaps at a time point controlled by the player), at which point all velocities are set to zero.  On the next move, the player gets to set the velocity of the cue particle (ball) and start time moving forward again.

Much more ambitious: simulate electron and position collisions as in a particle accelerator: new particles can be created.  The inverse square law only applies at large distances.

Friday, February 24, 2017

[ralkzndf] Safe space and the War on Drugs

We clarify the parallels between "safe space", "consent culture", and the War on Drugs, responding to this comment on this old post:

Assuming the rules for "safe space" and "consent culture" are accompanied with punishments for breaking those rules, my suspicion is that those who will be on the receiving end of such punishments will again be the same minorities and marginalized classes disproportionately on the receiving end of punishments in the War on Drugs.

Two parts of the connection:

These marginalized groups are the ones that the privileged portion of society wants to see punished to the max.  They are "Them" (in Us versus Them); they are the Other.  Society (the privileged portion) does not ask for leniency when They are up for punishment like it asks for (and usually gets) when One Of Us is up for punishment.

Within these marginalized groups is a disproportionately large subset that society likes to deny opportunity, whether opportunities for legitimate jobs outside the illegal drug industry, or opportunities for social, romantic, or sexual interaction: "I don't want to be around this person."  Integral to a safe space violation or consent violation is someone saying "no", and many people choose to say "no" based on racial and social class prejudices.

[htnrbrdd] Expressive other hand

Hold a smart phone in one hand.  The other hand and arm is free to do all kinds of expressive motions: so much more than sliding a finger around a touch screen display.  The problem is how a sensor can detect those actions.

Inspired by musical conducting.

[hrzgkqno] Music bridging the culture gap

We have a very divided society where the sides are failing to communicate with each other.  Can music -- or more broadly, art -- bridge this communication gap, explaining one side's {position, ideas, culture} in a way the other side can relate?

Perhaps yes: this is the kind of thing which could be helped along by philanthropy, commissioning art with this goal of building bridges.  It is up to the artist the perhaps unenviable grunt work of learning "the other side" then perhaps the unenviable grunt work of figuring out how to communicate it to "our side".

Perhaps not: people consume the entertainment they like, that they agree with.  People hear in music what they want to hear, which might be different from what the musician is trying to say.

It seems highly likely this has already been tried, or done.  How has such music or art been received?

[stqcijwh] Quipu

Create a system of recording information using knots on a string, or multiple strings.  If desirable, reuse any ideas from Incan quipus, though most of that knowledge is lost.

Knots are neat because information is being recorded in topology, which is different from most other methods of recording information.  Consider how difficult it is to turn a knot into not-a-knot, or turning a left-handed knot into a right-handed one.  Compare that to the ease of altering information in other media: it typically requires only a local change.

Modern technology can create extremely durable fibers for long term preservation of information: which fibers should be used?  Knotting puts stress on a string.

Should the nature of the knot matter, e.g., size, type, or should it just be binary of whether there is a knot at a position or not?  A special type of string could be amenable to X-ray CAT scans which could decode the internal structure of a knot.  Specially colored fibers could allow 3D computer vision techniques to derive the type of knot just by examining its outer surface.

Modern technology can probably make knots at very precise locations on a string.

Intriguing is having the knots on loops of string as knot theory does it instead of straight segments.  We need some way of fusing the ends of a string (without a knot) -- many such ways exist -- or directly creating loops of string with knots on them (e.g., 3D printing).

Knots have an attractive feature that they can be read by touch, e.g. in low light environments or with failing eyesight.

[elbejrwh] Clouds as local key

Take a picture of some clouds outside and robustly derive a cryptographic key from them.  Broadcast some information encrypted with this key.

Anyone in the vicinity can take their own picture of the clouds, derive the same key, and decrypt.  Time passes, the clouds change shape, and the information becomes impossible to decrypt: it was ephemeral.  Attackers far away also cannot see the clouds.

How can one robustly derive the same key from pictures of clouds taken at slightly different points in time from slightly different vantage points?  The sky is big: how can the sender and receivers agree on which cloud?  Can weather satellites constantly recording every cloud defeat this?

What would this technology be useful for?

Are there other things like clouds which can serve as the basis for this kind of system?  We could artificially generate such a signal (previously).

Thursday, February 23, 2017

[lkzruaxs] Only high compression matters

One tends to use lossless data compression (text compression) on data that can be compressed a lot, for example log files or trace files.  For small amounts of compression, the slightly decreased bandwidth or increased storage is not worth the inconvenience.

What is the threshold? Maybe around 5:1, or compression to 20% of the original size.  Include many input data which compress that much or more in a compression benchmark.

Incidentally, most lossy compression of media hits that ratio or better.

Another category of useful compression might be compression that is fast enough to be transparent.  This will depend on the bandwidth of other parts of a pipeline that transfers and uses data.

Monday, February 20, 2017

[uyyrhizz] IDE type annotations

Ideas for a desirable feature of a Haskell IDE:

Good: IDE pops up the type signature of the library function or symbol under the point.  Emacs haskell-mode can do this.

Better: IDE is aware of static scoping, let binding, and imports to really know what function you are referring to.  However, if you forgot to import, it still tries to be helpful, guessing at a library function and offering its signature as well as a reminder that you need to import it.

Better: If the function does not have an explicit type signature, the IDE does type inference to figure it out.

Better: if the type is polymorphic, the IDE also provides the type of the function as instantiated where it is used, instead of just the polymorphic type where it was declared.

Wednesday, February 15, 2017

[jjlddkmc] Pick your own house lock

Instead of leaving a concealed key outside the house for when one accidentally locks oneself out, leave lockpicks concealed outside the house.  This is less disastrous if someone bad discovers it.

Leaving the lockpicks at your house avoids needing to carry them on your person, possibly avoiding legal issues in jurisdictions where possession is considered proof of intent.

Of course, learn to pick your own house lock first.  This is aided by American tradition of having terribly insecure door locks in many places.

[lqdaenrs] Fun games of no strategy

Create a game which has no strategy (though it might present the illusion of requiring strategy) but which is still enjoyable to play.  One way is each time playing results in novel occurrences, perhaps through where simple rules can interact in interesting, beautiful, and complicated ways.  A randomizer can ensure new regions of the state space get explored each time.

[dptxehvj] Face CAPTCHA

Humans can presumably read faces, gauging emotion, better than computers.  This could be the basis for a CAPTCHA similar in style to reCAPTCHA: a bunch of pictures of faces that people form consensus on what emotion it is conveying.

[uxnvpywt] Free speech as a scapegoat

Enumerate historical examples in which free speech was blamed for a problem, speech was curtailed, and the problem persisted, thereby proving that speech was incorrectly blamed.

[jzvhfndr] Tor for C2

Brian Krebs reports that the command and control server for botnet was hosted by an ISP in Ukraine, and complaining up the ISP tree eventually knocked it offline.  However, such a server seems to be the perfect use case for a Tor hidden service.  Why was it not done?

Monday, February 13, 2017

[crhnyxty] Competent smuggler

In an alternate universe, Luke and Ben hire a different smuggler to transport themselves to Alderaan.  Perhaps someone more competent, less flying by the seat of his pants, who demonstrates a spectacular array of clever tricks to "avoid Imperial entanglements".  (Most of the time, Han, Chewbacca, and the Millennium Falcon rely only on speed and gunfire.)

[rnsmkgjj] Matter disappearing

Astronomy has a few nice examples of large quantities of matter turning into energy.

Of course, stellar nuclear fusion.

A supernova converts a large amount of the progenitor star into neutrinos.  While technically not massless, because neutrinos interact so little with anything, it seems like mass just disappeared.

In a black hole merger, a significant amount of mass gets radiated away as gravitational waves.

[lkajhfjz] Great glass elevator

It seems relatively easy to simulate in virtual reality the visual experience of traveling straight up and down.  There are many ways to do it, from projecting a fully real environment (previously, tower) to traveling in a completely synthesized world.

Consider altering the stereo depth, the distance between the eyes, at different heights.

Why do you want to be an astronaut?

[megjnlno] Copyright causes history not to be recorded

Artists have incentive not to record what influenced or inspired their artistic works because of fear of copyright lawsuits from those they cite.  But such documentation would be useful for historians.

This documentation might be significant beyond just curiosities of history: it might show how society is knitted together, which would be powerfully useful.

Inspired by Marvin Gaye Estate versus Blurred Lines.

[omgbdhjk] Panning and rotating rectangle

Tile a rectangular image, then place a rectangular viewport the same size as the image on the plane.  No matter the offset or orientation, exactly the entire image will be visible, though cut up.  (Is this fact interesting or obvious?)  Slide and turn the viewport around to offer different views of the same image.  Easiest is irrational slope and constant irrational rate of rotation, so the viewport will never repeat.

[fprrzelf] Copyright education at classical music concerts

Distribute educational material at performances regarding what copyright duration was when the performed work was created.

"XYZ was incentivized to compose the work you will hear tonight by copyright protection -- exclusive right to royalties -- of 0 years.  Compare this to copyright term for works composed nowadays: 95 years.  Is music better nowadays?"

Wednesday, February 08, 2017

[cmrfqpcl] Before and outside the Big Bang

The universe is and has always been infinite in size.  It has also existed forever in time.  We'll explain these assumptions later (tl;dr: Occam's Razor).  We are challenging the conventional notion that the universe had a start point in time, the Big Bang, and at that start point it was infinitesimally small.

A long time ago, the infinite universe was very hot and dense, so hot that the 4 known fundamental forces (gravity, strong, weak, EM) were merged into one.

Space expanded, so the universe got cooler.  Note that space remained infinite in size as it expanded, kind of like multiplying infinity by 2.  It's twice as large, but still infinity.  Things close together got further apart throughout the infinite universe as it expanded.

At some time point, Tgravity, it got cool enough for gravity to separate out from that one merged fundamental force.  Tgravity is a negative number for reasons we'll explain later.

Space expanded more, the universe got cooler, and at time point Tstrong, the strong nuclear force separated from the electroweak force.  Actually, we'll define Tstrong to be 0 for reasons we'll explain later.  So, immediately after this time 0, the forces were gravity, strong, and electroweak.

Space expanded (a lot) more, the universe got cooler, and the weak nuclear force separated from the electromagnetic force at time T_weak.  We actually know the value of T_weak to be about 10^-12 seconds based on particle accelerator experiments which can recreate the temperature of the universe (slightly) before T_weak.

We wrote above that space expanded "a lot" because, during some interval between 0 and T_weak, inflation happened.  It happened much closer to the 0 end.  More about that later.

The unconventional selection of Tstrong=0 is motivated by philosophical and practical considerations of what we can and cannot know.  There is a huge energy gap (10^12) between the electroweak and Grand Unified Theory scales: GUT explains the universe between Tgravity and 0, i.e., "negative time".  We will "never" be able to do experiments at the GUT scale: certainly not on Earth.  They are too unimaginably difficult: a trillion times more energy than the LHC.  Therefore we will never be able to know (that is, experimentally confirm) what the universe was like at or before time 0.  Incidentally, this means we will never know what time Tgravity was.

Similarly, we will never, ever, be able to experimentally confirm a Theory Of Everything (TOE) a.k.a quantum gravity a.k.a. string theory, a theory about what universe was like before the negative time point Tgravity, called the Planck scale.  In fact, time points before Tgravity might be ill-defined, because gravity separating out from the other forces means that only then did spacetime come to exist, so only then did time itself and consequently things like causality come to exist.  Before that point, timey-wimey wibbly wobbly.

(Maybe our descendants or alien civilizations will prove me wrong about what we can scientifically know, then we will regret this choice of zero (like Fahrenheit).  Scientific American's The Amateur Scientist did whimsically propose building an Ultimate Collider to test TOEs.)

Actually time might have also behaved funny during inflation: inflation did very strange things to space, so we speculate it also did strange things to spacetime and consequently time.  We may never understand inflation: it is so close to the GUT scale that experiments probing it seem almost as unimaginable as experiments testing a GUT.  It might have been better to define the end of inflation as the zero time point.  Only then did time start flowing the way we experience it now.  The quoted value of T_weak above is the time interval between the end of inflation and the end of the electroweak epoch.

Nevertheless, even though we will never know what the universe was like before time 0, we will assume that it always existed all the way out to negative infinity.  (We may need some yet undefined notion of what it means to exist before time itself began to exist at Tgravity.)  We assume infinite existence because it is the simplest model: Occam's Razor.  If we don't assume it, then we have to explain more complicated things: what existed before the universe burst into being?  Why did the universe burst into being?

Similarly, we assume that space is infinite. Currently, there is a finite patch of the universe we can see, because light has had time to reach our eyes.  Astronomers call this the Observable Universe, which is kind of a confusing name.  Better would have been Our Finite Patch Of The Universe.  Lots of confusion stems from conflating "universe" (assumed infinite) and "observable universe" (definitely not infinite).  Even though we cannot see beyond Our Finite Patch Of The Universe, we assume that the universe extends infinitely beyond it.  This is again the simplest model.  Otherwise we have to explain complicated things like, what does the edge of the universe look like?  What exists beyond the edge?

Similarly, we also assume that space has always been infinite.  At no point in time was the entire universe compressed into a point.  Things were denser and closer back then, but the extent of space was always infinite.  This is the simplest model: otherwise, we have to explain complicated things like, what existed outside of the finite (in fact zero-volume) point?  How did the universe transition instantaneously from 0 to infinite in size?

When cosmologists say, at such and such point in time, the universe was the size of a grain of sand, it is actually confusing shorthand for, the chunk of space that eventually expanded to Our Finite Patch Of The Universe was, back then, the size of a grain of sand.  It is just shorthand for the expansion factor between then and now.  That sand-grain-sized chunk of space back then was still part of an infinite universe.

The conventional narrative that the universe started from an infinitesimal point at the Big Bang is derived from running the equations of General Relativity backward in time.  If you do that, it does predict a singularity, and conventionally, that singular point is defined as the zero point in time, as opposed to a later point in time Tstrong defined as zero above.  However, running GR backwards all the way to the singularity is a little bit silly, because other things happen on the way to the singularity, namely some GUT, some TOE, which might interfere with the prediction of the singularity.  Or, in this essay, we assume they definitely will interfere and prevent the singularity because otherwise it leaves us with the complicated questions mentioned above that we are avoiding by Occam's Razor.

Throw a ball, and we can plot a parabola, then extrapolate where the ball will land.  This is analogous to extrapolating that the universe began as a singularity.  However, we are actually throwing a ball toward a wall of fog.  This fog corresponds to the GUT scale, time 0, that we will never have knowledge beyond.  We have no idea what lies in the fog; we have no idea whether the ball will land at the extrapolation of the parabola into the fog.  This essay assumes that something analogous to a bottomless pit exists inside the fog: the ball never lands; the universe has no beginning.

I suppose the more accurate analogy is we see a ball having exited from a foggy area traveling a parabolic path.  From where and how was the ball launched?

In critique of this essay: because we will never be able to test a GUT or TOE, the only way to choose among them seems to be by Occam's Razor again.  Are there simple such theories which permit the GR singularity or something analogous?  There probably are.