HNHacker News
TopNewBestAskShowJobs

sharkbot

724 karma · joined August 23, 2010

submissionscomments
sharkbot··on Mozilla Acquires Pocket
The Kobo ereaders have had Pocket integration for a while now, and it works great offline. My usual routine is to find interesting articles on Hacker News, and if they are longer than a page or two, click the Pocket button and read them at home on the ereader. A few don't render well (the article on Arrival/Story of your Life not being a time-travel story was a recent fail), but generally it works great.
sharkbot··on Games of Coding – A curated list of games that teach you a programming language
I just picked up WarioWare DIY for my Nintendo (3)DS. It's got a pretty rudimentary rules engine to script the microgames, but some of the tricks you can pull using some clever triggers and stage setup reminded me of the best programming puzzles.

In my mind, it's the closest we'll get to a mainstream Piet programming environment :)

sharkbot··on So you think you know C?
> To be pedantic, a size of char is defined by CHAR_BIT in limits.h. As well as all of the min and max values and lengths in bits for integers.

To be even more pedantic: it's the number of bits in a char that is defined by CHAR_BIT. However, sizeof returns the number of chars needed to store a type, where sizeof(char) is defined to be 1.

sharkbot··on Bayes's Theorem: What's the Big Deal?
This comes to mind: https://en.wikipedia.org/wiki/Aumann's_agreement_theorem

Essentially, two genuine Bayesian rationalists (with some hand wavy preconditions) cannot agree to disagree; ie, they will eventually converge onto the same understanding of an event.

sharkbot··on The Holocaust epigenetics study was over-interpreted
I would suggest a change to your first sentence: "some stressors methylate genes, and those same genes may be methylated in descendants."

It is not a "mutation", at least not in the sense of a stable and heritable gene change. DNA methylation can be reversed, hence it is considered an epigenetic change, rather than a genetic change. The controversy over epigenetics seems to be about how long an epigenetic change can remain in a series of offspring, and how much of an impact an epigenetic change can have on the genetic material, the only long-term mechanism of heredity that we know of.

Caveat: IANABiologist

sharkbot··on What to know before debating type systems (2010)
Far from it; rather, that the simply typed lambda calculus is not Turing complete. One cannot represent a Turing machine in the simply typed lambda calculus, exactly because non terminating programs cannot be expressed.

One can add a fix point to the calculus (such as the titular Y combinator), but that introduces inconsistency to the type system.

sharkbot··on Ask HN: Which book are you reading these days?
I'm reading "The Professor and the Madman" by Simon Winchester, a look at the creation of the Oxford English dictionary and the personalities, challenges, and environment of the people involved in its compilation.

I'm also currently learning French, so it's interesting to see that English also contains exceptions, debates and colourful characters.

sharkbot··on Project Zero: Exploiting the DRAM rowhammer bug to gain kernel privileges
There was an older paper discussing using various methods of fault injection (heat, voltage changes, etc) to attack Java smart cards, essentially destroying the type system guarantees and thus opening up an attack surface: "The Sorcerer’s Apprentice Guide to Fault Attacks", https://eprint.iacr.org/2004/100.pdf
sharkbot··on Project Zero: Exploiting the DRAM rowhammer bug to gain kernel privileges
I think there is a useful distinction between a fault/error and an exploit. A fault is a break from the "desired" or "expected" semantics of a system, while an exploit is an algorithm to predictably utilize a fault (or faults) to access unexpected behaviours in that system. I.e., a buffer overflow is a fault in a program (breaking the expectation that a buffer's contents will remain within a certain bound), while an exploit targeting that overflow will likely allow running arbitrary code in a program not designed to do so.

So, I'd put it, the memory error can be leveraged in an exploit.

sharkbot··on Duktape: an embeddable JavaScript engine
You can make a Lua interpreter thread safe by adding a GIL. There is implicit support for this in the code: the interpreter invokes lua_lock/lua_unlock at the proper places, the default Lua implementation just has them NOP'd out. Adding the thread primitives is up to you, however.
sharkbot··on Bash bug: the other two RCEs, or how we chipped away at the original fix
Don't forget 'Silence on the Wire' and 'The Tangled Web', two of my personal favorite computer security books.
sharkbot··on The poisoned NUL byte, 2014 edition
I happened to like this write-up a fair bit :)

https://web.archive.org/web/20080430162146/http://www.matasa...

(The original post on the matasano.com server seems to have been eaten; any chance that could be resurrected, tptacek?)

sharkbot··on Why does Outlook map Ctrl+F to Forward instead of Find?
Raymond also answered that question on his blog: http://blogs.msdn.com/b/oldnewthing/archive/2006/05/23/60474...

WingDings mapped the 'J' character to smiley face; when the email goes to a client without that font installed, it just displays the original character in the default font.

Old New Thing is an awesome blog! J

sharkbot··on Searching 20 GB/sec: Systems Engineering Before Algorithms
I wonder if bitap [0] would be a good fit for the 4K search algorithm. It would let you do linear-time regexp matching for relatively short patterns (32 characters on a 32-bit machine, 64 characters on 64-bit, etc).

[0] http://en.wikipedia.org/wiki/Bitap_algorithm

sharkbot··on Reddit’s science forum banned climate deniers. Why don’t all newspapers?
That's incorrect. Rupert Sheldrake gave a TEDx talk on his non-scientific opinions, which wasn't considered to be appropriate. The talk is still available, just not under the TEDx label. See here for more details: http://www.ted.com/conversations/16894/rupert_sheldrake_s_te...
sharkbot··on Strange Loops: Ken Thompson and the Self-referencing C Compiler
I disagree with you, but you're not wrong. Taking the pragmatic approach to trust is perfectly valid, and the only short to medium term option at present. I personally find it distasteful, but that's my academic bias showing.

However, Thompson's essay is both a practical attack and an abstract idea; I find the notion of trust with self referential systems more interesting than the specifics of how to detect a backdoored compiler.

sharkbot··on Strange Loops: Ken Thompson and the Self-referencing C Compiler
> A and B are also compilers, one of which is known-good.

'Known-good' is exactly the problem Thompson's essay is describing. There is no 'known-good'. Instead, you have decided to root your chain of trust with a compiler you call 'known-good' (say, B). But ultimately, that trust is arbitrary: your compiler B relied upon un-investigated components at some point in its heritage: a hex editor, a disk drive controller, a CPU, an LCD screen, etc.

The best you can do is reduce the trusted base to the smallest amount, then make explicit your trust relationships as much as possible. Ideally, the trusted base would be physics and logic with a metaphysical certainty of the universality of those laws; we're a long way from that situation :)

sharkbot··on Why Tipping Should (And May) Be Made Illegal
Actually, the article specifically mentions Canadians as poor tippers:

"So now we have a restaurant industry where African-Americans are demeaned as “Canadians”, in reference to another group which is considered by US servers to be low tippers."

sharkbot··on Learn Lua in 15 Minutes
I'm going to be "that guy":

  -- These are the same:
  -- ...snip...
  local function g(x) return math.sin(x) end
  local g = function (x) return math.sin(x) end
According to the Lua Reference Manual [1], this example isn't correct. Rather, this is the correct translation:

  local function g(x) return math.sin(x) end
  local g; g = function (x) return math.sin(x) end
From the manual: "This only makes a difference when the body of the function contains references to f."

[1] http://www.lua.org/manual/5.2/manual.html#3.4.10

sharkbot··on Programming languages ranked by expressiveness
There are a few surprises in that list. I'd have thought both Coq and Lua would end up further to the left. I suppose the graph shows an interesting dynamic: expressiveness is not just due to a language's semantics, nor syntax, nor libraries. You need a healthy interplay between all three aspects of a programming language to truly be "expressive".
sharkbot··on As Math Grows More Complex, Will Computers Reign?
Check out Adam Chlipala's Coq tutorial, specifically the section on infinite proofs: http://adam.chlipala.net/cpdt/html/Coinductive.html

I'll repeat what szany and xyzzy123 mentioned: you work at a level of abstraction where infinite data structures are represented symbolically with enough definitional scaffolding to allow proofs to go through.

In a sense, a properly typed program provides a proof of some theorem over infinite data structures. For instance, an instance of a tree (in generic Java) is usually a finite data structure, but the set of all trees representable in Java is infinite. (Handwaving begins) The types prove that certain operations can't happen, like a tree of Strings changing to a tree of Arrays by a node search algorithm, which is a proof about an infinite set.

sharkbot··on Train Philosophers with Pearl and Kahneman, not Plato and Kant
I see a lot of criticism that lukeprog is "shallow" or "surface-oriented" on the topic of philosophy. While I don't believe he has formal training, the guy had a long-running blog and podcast covering a number of philosophical topics, including interviews with professional philosophers: http://commonsenseatheism.com/?p=1911

I think lukeprog has done much to provide himself with an unbiased philosophical education.

sharkbot··on The Universe Is Not a Computer
The article also references the probabilistic nature of quantum phenomena. However, quantum mechanics is deterministic under the Many-Worlds interpretation. Observations don't collapse waveforms, our quantum states are deterministically entangled with that of the system under measurement.

The jury is still out on the proper interpretation of quantum mechanics, but quantum phenomena doesn't rule out the deterministic state-change metaphor a priori.

sharkbot··on So I Made A Mashup, And Then…
Agreed. The end of the Bloodhound Gang section is slightly discordant, but I felt that it had an interesting sound and lead well into the final section. Great work.
sharkbot··on How statically linked programs run on Linux
"Linkers and Loaders" by John R. Levine is referenced in your paper, and is a great resource: http://linker.iecc.com/

The beta site includes the book in draft form, for those with the patience to deal with the occasional typo...

sharkbot··on Bicycle skills
This is a bit similar to the "exploration vs. exploitation" problem [1]. Is it better to explore new avenues in hopes of higher returns later, or better to exploit current knowledge of the problem to maximize current returns?

[1] http://en.wikipedia.org/wiki/Multi-armed_bandit

sharkbot··on Dereferencing NULL Pointer, without a Seg Fault
Or the author could have added 'virtual' to the method declaration and discussed why that code now crashes due to a NULL dereference...
sharkbot··on "The descent of Edward Wilson" (by Richard Dawkins)
> ...the end of the article seems to be acknowledging that families have phenotypes; there's no reason this shouldn't apply to groups.

You state that "there's no reason this shouldn't apply to groups", but that's the critical question under investigation! Namely, do the behaviours (that you're classifying as a part of the phenotype) provide evidence for group selection, or are they adequately explained by kin/individual selection? It's a given that group selection could occur, but where is the evidence that it does occur?

sharkbot··on "The descent of Edward Wilson" (by Richard Dawkins)
You have skipped over the most important word in the quoted phrase: 'parsimoniously'.

Yes, there is no reason this shouldn't apply to groups, but is that the simplest explanation that fits the facts? The more parsimonious explanation is that genes (being the primary mechanism of propagating traits between generations) are the unit of replication, and closely-related kin have much higher gene similarity than arbitrarily-sized groups (due to the mutation/genetic drift that occurs all the time). Natural selection can only operate on replicators, and genetic replicators only create kin. These replicators may influence group formation and their subsequent natural selection, but is there any evidence for that hypothesis that isn't suitably explained by kin selection?

sharkbot··on Lua OS - An operating system around Lua, developed by a former Google employee
I'm a big fan of Lua, and a big fan of correctness via simplicity, but I worry the author is a little too confident for his own good. Take his sample webserver: http://lua4everything.dyndns.org/ and the accompanying blog post: http://blog.luaos.net/

That particular example is simple and doesn't permit much room for nefarious actions, but as soon as he adds support for a wider selection of files, POST (and other verbs), caching, templating, authentication and access control, etc, the code will grow in complexity and the advantages of Lua will recede.

For instance, remove the line "isin(path, sources)" and there is a arbitrary file read. White lists are more secure, but they don't scale.

← PreviousPage 3 of 5Next →