Better HN
topnewbestaskshowjobs
Log inSign up

cokernel

411 karma · joined Sep 15, 2012 (14y ago) · 131 submissions

Submissions

comment 10y ago · link · parent

The function eval[1] evaluates a string as code. The special variable $_GET[2] contains HTTP GET variables, which may be freely set by a remote user.

So if your PHP file executes eval($_GET['code']), then arbitrary folks can submit whatever code they want as a parameter -- as in /index.php?code=blah -- and have your webserver run it for them.

[1] http://php.net/manual/en/function.eval.php [2] http://php.net/manual/en/reserved.variables.get.php

comment 10y ago · link · parent

Does Rosetta Code count?

comment 10y ago · link · parent

This algorithm didn't appear out of nowhere. Maybe this page should mention the source?

I had pictured this as being essentially Gauss's algorithm, but if Wikipedia is correct, this particular implementation is due to Tomohiko Sakamoto in 1993.

https://en.wikipedia.org/wiki/Determination_of_the_day_of_th...

comment 10y ago · link · parent

I thought there might be some interest in knowing how people who were in both the 1st and 5th Congresses voted on the Alien and Sedition Acts. This actually consists of four distinct acts, and I chose to focus on An Act concerning Aliens (the second of the four acts).

The short answer is: Federalists voted for it, and Democratic-Republicans voted against it.

If I'm reading the House and Senate Journals correctly, the relevant legislative history is as follows:

1. 1798-06-08: The Senate approves the bill. https://memory.loc.gov/cgi-bin/ampage?collId=llsj&fileName=0... https://www.govtrack.us/congress/votes/5-2/s99

The bill passed by a vote of 17-6 (GovTrack reports this as 16-7 for some reason). Of the 12 members of the 1st US Congress who were senators in the 5th US Congress, two (John Henry and John Vining) had resigned well before the summer of 1798, and four (James Gunn, John Langdon, Philip Schuyler, and Theodore Sedgwick) did not vote on the bill. The remainder voted on straight party lines:

* Affirmative: Theodore Foster, Benjamin Goodhue, John Laurance, Samuel Livermore. (Federalists)

* Negative: Timothy Bloodworth, John Brown. (Democratic-Republicans)

2. 1798-06-21: The House approves the bill, with amendments. https://memory.loc.gov/cgi-bin/ampage?collId=llhj&fileName=0... https://www.govtrack.us/congress/votes/5-2/h90

The bill passed by a vote of 46-40. Of the 9 members of the 1st US Congress who were representatives in the 5th US Congress, one (William L. Smith) had already resigned at the time the bill was considered, and two others (Thomas Hartley and Josiah Parker) did not vote. The remainder voted as follows:

* Affirmative: Abiel Foster, James Schureman, Thomas Sinnickson, George Thatcher. (Federalists)

* Negative: Abraham Baldwin, Thomas Sumter. (Democratic-Republicans)

3. 1798-06-22: The Senate concurs in the amendments. https://memory.loc.gov/cgi-bin/ampage?collId=llsj&fileName=0...):%230020505&linkText=1

Either there was no vote here, or the yays and nays were not requested. The Senate Journal just says that they took into consideration the amendments and resolved that they concur in the amendments.

comment 10y ago · link · parent

Thanks, I've fixed it.

comment 10y ago · link · parent

The 1st US Congress had 29 senators and 66 representatives (95 distinct people), not all simultaneously, while the 5th US Congress had 45 senators and 118 representatives (162 distinct people, as Andrew Jackson served as both a representative and a senator during this period)[0].

Of the 95 members of the 1st US Congress, 21 (~22%) of them were members of the 5th US Congress, with the following breakdown:

* 5 senators (~17%) remained senators;

* 9 representatives (~14%) remained representatives; and

* 7 representatives (~11%) became senators.

Notes: John Brown was initially a representative of Virginia, then later became a senator of Kentucky (which was part of Virginia at the time of the 1st US Congress). William Smith (MD; 1st US House), William L. Smith (SC; 1st US House), and William Smith (SC; 5th US House) were all different people.

Method: moderately careful transcription plus grep, perl, sort, uniq, and comm.

EDIT: Thanks for adventured for the correction. I mistranscribed Philip Schuyler's name when copying down the members of the 5th US Congress.

[0] I didn't independently check the lists on Wikipedia[1][2].

[1] https://en.wikipedia.org/wiki/1st_United_States_Congress

[2] https://en.wikipedia.org/wiki/5th_United_States_Congress

comment 10y ago · link · parent

The structure of Doron Zeilberger's proof of the Alternating Sign Matrix Conjecture is reminiscent of this, though possibly not directly inspired by it: http://www.combinatorics.org/ojs/index.php/eljc/article/view...

comment 10y ago · link · parent

I don't read the authors as saying that intellectual need is the only way to motivate. Rather, they're saying that regardless of motivation, students are unlikely to learn certain concepts unless they directly experience the need for those concepts ("disequilibrium"). (Of course, it's possible to learn to solve a class of problems that "require" certain concepts without learning those concepts.)

Where the MUSIC model addresses motivation, the DNR framework addresses what to do with that motivation. So they seem compatible to me. The teachers described in this article would certainly benefit from studying the MUSIC model. I winced a little at the teacher who said, "Well, you care if you want to get a good grade on your test."

comment 10y ago · link · parent

Thanks for this comment. While trying to track down the source of the quote, I ran into this interesting, if a bit oddly formatted, blog post:

http://publicnoises.blogspot.com/2009/02/aristotle-and-accur...

There are a few good comments there, too, followed by a bunch of me-toos.

comment 11y ago · link · parent

Linguistic evolution is much like biological evolution in that there is no a priori direction for it to go. There is a sort of natural selection in that words that don't get used don't generally get passed on to the next generation. Text and other media allow some of these words to be recovered in later generations.

If history is any indication, in 100 years American English will have some precise ways of expressing things, some loose ways of expressing things, and various groups of people will be unreasonably upset with one situation or the other.

If you're interested in the mechanisms of language change, I found the (2000) 3rd edition of Jean Aitchison's _Language Change: Progress or Decay?_ both readable and worth reading. There is a 4th edition, published in 2013:

http://www.cambridge.org/us/academic/subjects/languages-ling...

comment 11y ago · link · parent

I notice that Sarsons's paper says on the very first page:

"NOTE: Very preliminary – please do not cite without permission. Comments welcome."

I wonder if Cowen sought permission or just ignored that sentence? I am aware that linking to something from a blog isn't exactly the same as citing it (presumably Sarsons is trying to discourage citations in other papers), but Cowen could have mentioned, but didn't mention, the preliminary nature of the paper when quoting the abstract.

comment 11y ago · link · parent

Is the thing I've overlooked that there are two As?

comment 11y ago · link · parent

It's a nice interface. I'm glad arrow keys, the first thing I tried, work. But you're not going to trick me into looking for a sequence of moves that change the parity of the underlying permutation.

comment 11y ago · link · parent

I wouldn't read this expecting a condemnation of (or evidence against) installing using RAM. It's a comedy of errors brought about by the hero's hubris (and tiredness). The author is not really suggesting that you should never install used RAM.

Consider it a longform version of https://xkcd.com/349/ .

comment 11y ago · link · parent

Incidentally, 45% of 50 is not an integer. This makes me wonder how many books were actually tested. Or were they just rounding up from 44%?

comment 11y ago · link · parent

The URL says "Harvard Law Library sacrifices a trove for the sake of a free database", and the title of the print article is "Sacrificing a Legal Trove for the Digital Age", so perhaps the submitter did not editorialize the submission title. Maybe the online title has just changed since submission.

comment 11y ago · link · parent

Presumably they found it more important to preserve the pages than to preserve the volume binding. The FAQ for the linear book scanner indicates that Prototype 1 mangles pages in some way (tears or folds) in about 45% of books it scans.

Moreover, it used to be common to create bound volumes by binding multiple issues of a serial together. (In some cases the bindery would crop pages to fit!) The binding is often so tight that the volume cannot open flat enough for a full scan. Separating the pages from the spine allows for the entire page to be imaged without distortion.

Edit: Incorporated correction. I had accidentally stated the claim more strongly than the FAQ supported; however, my point does not depend on the claim being as strong as the form in which I had stated it.

78.

Is It O.K. To Be a Luddite? (1984)(nytimes.com ↗)

1 points · by cokernel · 11y ago · discuss

comment 11y ago · link · parent

I don't know why a theory has to be labeled "new" to be worth discussing. (I'm know I'm hyperfocusing on Shermer's phrase "a new theory", sorry.)

Hoffman's argument is remarkably close to Plantinga's (1993) evolutionary argument against naturalism, and Plantinga himself asserted, rightly or wrongly, that "Darwin himself had worries" about the compatibility of natural selection with the ability to reach true conclusions. And of course, the notion of "percepts act[ing] as a species-specific user interface" was discussed in voluminous detail by Kant.

Just to be clear, I don't have any problems with Hoffman proposing this idea, and I don't have any problems with Shermer criticizing it. What I don't like is the suggestion that this is somehow an idea that hasn't already been discussed for centuries.

Edit: I guess I should always make sure I've eaten something before posting. This came out angrier than I intended.

comment 11y ago · link · parent

It took Wiles seven years to prove the thing (and the proof needed to be patched!), so I wouldn't be discouraged if it takes a while to understand. A nice thing about mathematics is, it waits for you.

If you're interested in the mathematics behind this, I'm not sure a direct attack on the FLT proof is the best route to take. The paper that proves a famous conjecture is normally sitting on a mountain of prior work, which means the final paper (1) assumes familiarity with that mountain and (2) is highly technical because all of the understandable things have already been tried.

So instead, why not start learning about the mountain?

The truth of FLT follows from the two claims:

(1) Taniyama--Shimura--Weil conjecture: "Every elliptic curve is modular."

(2) Ribet's Theorem: "If FLT has a counterexample, then such and such an elliptic curve is not modular."

As it happens, TSW was originally believed to be too difficult to prove, but I suppose the connection with FLT motivated people. Taylor and Wiles proved the absolute minimum of TSW that they could get by with and still get a contradiction from Ribet's theorem. (My understanding is that TSW is now fully proved -- the "modularity theorem".)

If you're wanting to "get" FLT, I'd encourage you to look into elliptic curves, modular forms, and their relationship. I wonder if working on the mathematics of elliptic curve cryptography might be a good way to get a feel for elliptic curves.

However, if you do want to take the direct route, I believe that Faltings's highly compressed article provides a syllabus. Once you can read and completely understand every sentence of that article, it is highly likely that the Wiles and Taylor and Wiles papers will make sense. I... would really not recommend this route.

comment 11y ago · link · parent

This analysis was written by Thomas M. Cooley, who was Chief Justice of the Michigan Supreme Court at the time. It was mentioned in passing in a Guardian article discussed here recently: https://news.ycombinator.com/item?id=10401416

The first page is here: https://archive.org/stream/jstor-3303981/3303981#page/n1/mod... Not sure why the link shows the final page as the thumbnail.

comment 11y ago · link · parent

A minor nit: Thomas Snell et al. v. The Atlantic Fire and Marine Insurance Company is the opinion which follows Thomas M. Cooley's opinion you are quoting here.

83.

Inviolability of Telegraphic Correspondence (1879)(archive.org ↗)

29 points · by cokernel · 11y ago · 10 comments

84.

Inviolability of Telegraphic Correspondence (1879)(archive.org ↗)

1 points · by cokernel · 11y ago · discuss

comment 11y ago · link · parent

Thomas M. Cooley's 1879 analysis of privacy of telegraphic correspondence (the "hampered by fears" link in the Guardian article) is fascinating: https://archive.org/details/jstor-3303981/

comment 11y ago · link · parent

I haven't tested this, but the package https://github.com/subokita/Robust-Text-Detection apparently implements methods described in the paper "Robust Text Detection in Natural Images with Edge-Enhanced Maximally Stable Extremal Regions." by Chen, Huizhong, et al. (http://web.stanford.edu/~hchen2/papers/ICIP2011_RobustTextDe...), which sounds like it might be the sort of thing you want.

In particular, the figure on the first page of the paper shows detection (not OCR) of a textual logo in a photo.

comment 11y ago · link · parent

The article explains that these items can unexpectedly shed light on historical questions, giving as an example a letter from Marat that seemed to demonstrate he was not in an English prison at a time when most historians thought he was.

Items in archives are like fossils: remarkably rare, incredibly personal to the entity involved, but potentially of great import to the rest of us because of what we can learn from them.

I admit I'm a little tone-deaf and didn't notice any hyperbolic language, but I would encourage you to give the article another chance.

comment 11y ago · link · parent

As the article points out, the Mass Shooting Tracker tracks mass shootings (at least four people shot), not mass murders.

comment 11y ago · link · parent

I'm way out of date. The proof (discretized using hypermaps instead of graphs) was completely formalized in Coq in 2005: http://research.microsoft.com/en-us/um/people/gonthier/4colp...
12345