HNHacker News
TopNewBestAskShowJobs

krazydad

203 karma · joined March 22, 2013

Nerd with music skills.
submissionscomments
krazydad··on If programming languages were Harry Potter characters
Looked at article just to confirm that Perl would be Ron Weasley. Yep. This is why he's my favorite character.
krazydad··on Scientists Have Created Artificial Sunlight: Real Enough to Trick Your Brain
I'd have a much easier time believing that if they didn't work so hard to make them look fake.
krazydad··on StackOverflow Considered Harmful?
Considered harmful... by this one person.
krazydad··on Non-official MtGox investigation update and preliminary release
Looking at the graph near the end of the article, I'd be curious to know who (Karpeles or other?) took a family vacation from January 3rd to 14th...
krazydad··on Meta-programming JavaScript Using Proxies
Agreed. Giant cover image with pointless mouse-over effect immediately followed by typo on first word. Ugh.
krazydad··on A new way to lock your computers: just walk away
Seems like you are getting a minor convenience in exchange for risk of major annoyance (when it breaks).
krazydad··on The Simulated Annealing Algorithm
Although she doesn't say so, it appears she is assuming the cost function is normalized (range is 0-1), in this formula: exp((E_old - E_new) / Temp). Is that the case?
krazydad··on The Cryptographic Doom Principle
For the other clueless readers:

MAC: http://en.wikipedia.org/wiki/Message_authentication_code

[Please spell out your acronyms the first time, nerds]

krazydad··on A Mathematician’s Lament (2002) [pdf]
Love the bit about the misconception that Mathematics is mainly about utility. I remember reading something about G.H. Hardy (which I can no longer find) in which he said he would get a little bit disappointed if he found that one of his results ended up finding a practical use.
krazydad··on The Algorithmic Beauty of Plants (1990)
The Mandelbrot book was the first one on the topic (published in 1983, revised from books published in 1975 and 1977), and is the least likely to have 'recent information on the topic'. It's also not as readable as some of the others, but it's certainly a classic (and deserving of a larger Wikipedia article than it currently has).
krazydad··on Amazon Echo
"Alexa, how many porn videos has Billy watched this month?"
krazydad··on PHP: why GOTO instead of recursion?
I like including a few GOTOs just to piss off the Dijkstra acolytes, one of whom is quite vocal in the thread.
krazydad··on The color of every photo on the internet blended together is orange
I don't disagree with you, I think. I think the human-generated art result is interesting, but may simply indicate that humans are mirroring (or even accentuating) what they see in the natural world. In other words, the physical composites may be orange because of chemistry and physics, and the synthetic averages may be orange because our perceptions are shaped in a world of chemistry and physics.
krazydad··on The color of every photo on the internet blended together is orange
There's definitely some interesting things going on with human reasoning in the way different people interpret the result. I originally assumed the images would average to gray, but when I think about it logically, that would be kind of miraculous. We wouldn't expect a bunch of photos taken on Mars to average to gray (to be perfectly balanced in R, G and B), so why did I expect photos taken on Earth to? It would mean all the colors are in a very precise balance, which would be kind of odd.

With random images which include a few outdoor photos, there is a noticeable effect from the sky, but not as dramatic as I might expect - it tends to produce a whitening, rather than a visible blue.

krazydad··on The color of every photo on the internet blended together is orange
It is perhaps worth pointing out that I observed the same effect in collections of purely synthetic art (such as Fractals).

https://www.flickr.com/photos/krazydad/3794489938/in/set-721...

While I don't think this rules out light as a possible culprit, it perhaps implies that humans are mimicking the natural world when they are making color choices.

krazydad··on The color of every photo on the internet blended together is orange
Hi, this Jim, the subject of the article. The Atlantic article omits that I'm normalizing the result (otherwise, the histogram is clustered in the middle and you get a dirt-brown color -- the hue is orange, but it's very desaturated). Here is pseudo-code in Processing showing what I'm doing:

To avoid floating point rounding issues, I process the pixels in integer space. For each channel (R,G,B) I create an 1D array of integers (one integer for each pixel) and initialize them to zero.

smaxPixels = width*height; srmap = new int[smaxPixels]; sgmap = new int[smaxPixels]; sbmap = new int[smaxPixels]; for (int i = 0; i < smaxPixels; ++i) { srmap[i] = 0; sgmap[i] = 0; sbmap[i] = 0; }

For each pixel in each image, I add the pixel value to the sum for the corresponding pixel (in the below code, 'offset' is typically zero).

  for (int i = 0; i < smaxPixels; ++i) {
    int px = sImage.pixels[i];
    srmap[i] += red(px);
    sgmap[i] += green(px);
    sbmap[i] += blue(px);
  }

I then produce a normalized image by finding the minimum and maximum components, and mapping all the pixel sums to that range.

for (int i = 0; i < smaxPixels; ++i) { minValue = min(minValue, srmap[i]); maxValue = max(maxValue, srmap[i]); minValue = min(minValue, sgmap[i]); maxValue = max(maxValue, sgmap[i]); minValue = min(minValue, sbmap[i]); maxValue = max(maxValue, sbmap[i]); }

  pg.beginDraw();  // pg is an offscreen Image buffer I am going to draw into...
  pg.loadPixels();
  for (int i = 0; i < smaxPixels; ++i) 
  {
    if (maxImagesPerTile == 1) 
      pg.pixels[i] = color(srmap[i],sgmap[i],sbmap[i]);
    else
      pg.pixels[i] = color( map(srmap[i],minValue,maxValue,0,255),
                       map(sgmap[i],minValue,maxValue,0,255),
                      map(sbmap[i],minValue,maxValue,0,255));
  }
  pg.updatePixels();
  pg.endDraw();

 
That's the essence of it. The bright "orange" is a normalization effect. Note that if I were to simply "average" the images without the normalization step, the resulting color is generally a dirt-brown. Normalizing the image has the effect of increasing the saturation and the contrast, without affecting the hue in an HSL sense. I discuss this in my paper, although the Atlantic article omitted this important point.
krazydad··on Escher: A language for programming in metaphors
I am relieved that I am not the only one that suspects this may be horse shit. If it's not, then it's extremely poorly presented.
krazydad··on This maze looks familiar
You are indeed correct. Nonetheless, the choice of the exact same fibonacci tile grid, exit, entry holes, and about 98% of the interior walls being identical...
krazydad··on This maze looks familiar
[This is Jim Bumgardner - author of the maze that Kraft copied]. Amusingly, this comes full circle. One of the puzzle varieties on my site is based on Penrose tilings.

http://krazydad.com/slitherlink/sfiles/sl_penrose_b001.pdf

Years ago, I sought (and received) permission from Penrose to use his tiling on these puzzles.

krazydad··on This maze looks familiar
Highly unlikely. The grid design contains about 900 edges which can be set or clear. Their maze differs by 7 edges. Here's a statistics problem for you: What is the likelihood of generating a random 900 bit binary number that differs from another random 900 bit binary number by only 7 bits?

Then there is the choice of grid design (identical), entry and exit holes (identical).

krazydad··on [dead]
If you'd like a somewhat less vitriolic article that doesn't use derogatory words in the headline, you can go straight to the article this is linking to:

https://netzpolitik.org/2014/interview-with-bpjm-leaker-webs...

krazydad··on Why don't more email clients have these?
This appears to be an advertorial. Yuck.
krazydad··on The Art of Computer Programming: Random Numbers
...and the reference to rap music.
krazydad··on The Original Swift Programming Language – Tutorial
I've already seen people confusing features touted for the original Swift language (e.g. good for parallelism) as being pertinent to Apple's. Surely, the good folks at Apple must have been aware of this name conflict.
krazydad··on John Dee and the occult in California
Dee was also doing real science, for example taking measurements of the super nova of 1572 and the comet that appeared 5 years later, and corresponding with Tycho about the same. Along with Tycho, he helped establish that the comet was further away than the moon, which helped dissuade people of the belief that all changes in the heavens happened between the moon and the earth.

If you are going to dismiss Dee on the basis of his irrational beliefs, than you must dismiss Newton, Tycho, Kepler and many others as well.

krazydad··on Why Ada isn't Popular (1998)
I started programming in the early 80s, and never used Ada. At the time, Ada had a reputation as "that over-bloated language that people in the defense department have to use." This perhaps underserved reputation is addressed in section 7 of the linked article.

From my point of view at the time, any language that the US Government would mandate as a required technology MUST be flawed. A language embraced by a large bureaucracy must be full of large bureaucratic nonsense. That was the thinking, at any rate. Ada, along with Cobol, was a frequent target of snarky jokes. In the mid-80s, the cool kids were programming in C (while being paid to program in Basic or Cobol or Fortran).

I freely admit these notions were likely borne out of ignorance, but I imagine this reputation stifled its adaptation outside of government circles. Would you want to use a language mandated by the DMV?

krazydad··on Why I don't mock
Was hoping to read an admonition against excessive snark and bullying in Hacker News comments. Ah well.
krazydad··on Is College Worth It? Clearly, New Data Say
Is College Worth It? "Totally," says a bunch of people who went to college.
krazydad··on What 4chan thinks of HN
It's almost like some people use both sites...
krazydad··on Articles Every Programmer Should Read
Ken Thompson's Turing Award Lecture: "Reflections on Trusting Trust"

http://cm.bell-labs.com/who/ken/trust.html

← PreviousPage 2 of 3Next →