PG's patent on Continuation Based Web Servers (as used by Arc, Seaside etc) - <AUTHOR> http://www.google.com/patents?id=WE8GAAAAEBAJ&dq=6205469

<comment><USER2> Software Patents are a sham.

Software should be copyrighted, but not patented.

I wonder what would be if a writer could patent story lines: "It is like a like a novelist, patenting all action thrillers, that involve a guy saving a girl, who is kidnaped by the bad guys.

Watch out, any other books that have a bad guy kidnaping the girl, can be infringing this patent."

There are many industries that flourish without the needs of patents. How did we end up in this mess?

<comment><USER3> _Software should be copyrighted, but not patented._

So physical stuff like valves can be patented, but not software? That seems arbitrary. After all, it's usually the design of the valve that contains the invention. What difference does it make if you print one out? If you mean "nothing should be patented," just say that. One could make a case for that argument. But there's nothing special about software.

 _How did we end up in this mess?_

What evidence do you have that we're in a mess? Have you ever been prevented from doing something you wanted to because of patents?

The fact is, for all the noise people make about them, software patents just don't matter much. Large companies accumulate patent portfolios to protect themselves against patent suits. Startups file for them because investors and acquirers are impressed by them. But they don't decide which startups win.

<comment><USER4> "Have you ever been prevented from doing something you wanted to because of patents?"

1\. Every year at CMU's Human Computer Interaction Institute, it appears someone reinvents something patented though not deployed by Xerox PARC.

An example is a "looking glass" feature for something like photoshop, where you can preview the result of an action like a filter -- or something like that.

From the anecdotes I've heard, PARC just sits on it, doesn't deploy or license it, and acts to block others from using it.

2\. SIFT is a new object recognition technique built upon years of research. A recent patent on the best implementation has restricted groups from using the techniques. They grant exclusive licenses on the level of "for all robots in America", but that's pretty useless for a startup, isn't it?

I'll say it: nothing should be patented. Trade secrets, in the literal and legal sense, make much more sense. If a system can be reverse engineered and copied, you don't have a secret, and it isn't in the best interest of society to block copy cats from beating the originator.

The idea that makers wouldn't create due to the fear of competition is just wrong -- though it is the most often used argument to defend patents.

[edit: And another thing: people respect and fear patents, so despite my opinions, I'm going to act in my best interest to acquire any patents possible on my work. My goal is notably against the best interest of society as a whole: create unfair advantages for my company.]

<comment><USER5> The case against patents is getting stronger as time goes on.

The rate of innovation constantly increases, and for patents to keep working as they should, the term should get shorter and shorter. Even if the system is made to be "fair" in this way, eventually the term will be made so short as to not be worth the effort of filing the patent. Maybe we are past that point already.

</comment></comment></comment></comment><comment><USER6> He also appears to have made advances in birdfeeder technology.

[http://www.google.com/patents?id=Sl0gAAAAEBAJ&dq=%22paul...](http://www.google.com/patents?id=Sl0gAAAAEBAJ&dq=%22paul+graham%22)

<comment><AUTHOR> This one's a lot more interesting: [http://www.google.com/patents?id=jTkLAAAAEBAJ&dq=%22paul...](http://www.google.com/patents?id=jTkLAAAAEBAJ&dq=%22paul+graham%22) "Remote web site authoring system and method" how Viaweb works/ed...

</comment></comment><comment><USER7> And these will belong to Microsoft in a few short months...

</comment><comment><USER8> My god! He's going to sue everyone who answers the Arc Challenge!

It's a trap!

<comment><USER9> Claims 4, 6, 8 and 9 are pretty specific and from a cursory examination of the current challenge solutions none of them work that way.

Could it be that at the moment the _only_ system to worry about a lawsuit is Arc? Yahoo (not pg) is the patent holder.

<comment><USER10> And soon it may be held by the Beast.

<comment><USER11> ... and on the First Day of the Second Month of the Year of our Lord Two Thousand and Eight, the Beast issued forth from his Vile Abode and laid Charge to the Land of Light, burying their Heros with irresistible Seductions and Temptations of False Fame and Glory. The Heros of the Land of Light did hold council, and after many a deliberation decreed that the Battle was to be met with full conviction and the aid of Macro Expansions. And the Battle was fought for twenty and three days and on the morning of the twenty and fourth day, the Beast was slain by a mighty hero of the Light, whose Karma was without parallel - Sir Paul Graham, Marshal of the Closure, General of His Magesty's Symbol Tables, Diviner of the Continuation, and all other Titles held and to be granted by Our Lord Almighty - Lisp - and His Son Who Walked On Earth - Arc. And so ended an Age of Heros and Villians, the likes of which shall never walk the Net again.

</comment></comment></comment></comment><comment><USER12> Yawn...

First of all it's not PG's patent. Its Yahoo's.

Second, if anyone ever goes after you on a software patent, celebrate! It means you are a success. It means you have deep enough pockets to be considered worth the trouble.

Third, as much as software patents are a joke, see them for what they are: A little side show for the lawyers and MBAs to leach off the big boys and feel like they are holding important cards. Hackers are wasting time/energy if they get too worked up about software patents.

<comment><USER9> Patents may be a joke to hackers but they aren't to the investors who fund them.

Of course if you don't need investors for what you're doing in order to be successful then more power to you.

<comment><USER12> Sure, it's OK to pretend that they mean something... If you feel it helps make you look stronger, apply/get patents. Just try not to pay through the nose to do it... be careful with those lawyers.

Just don't worry about stepping on the other guy's patents. They are just paper really.

And as we know in this economy there is a lot of phony paper out there that people just want to call valuable/meaningful.

</comment></comment></comment><comment><USER13> Are software patents evil? Yes, I don't really believe that RnD is software is that much of a big deal, or that costly to justify patents.

For how many years was windows vista tested on real humans before its being release? No, software testers don't count, they ain't real humans!

</comment><comment><USER14> The patent appears to predate PLTaEURXs work.

<comment><USER15> _"The patent appears to predate PLTaEURXs work."_

Boy, that extra character support sure would've come in handy. :P

<comment><USER14> It was an apostrophe, but since Arc doesnaEURXt support Unicode, fuck it.

<comment><AUTHOR> What kind of keyboard do you use that has an actual apostrophe on it? Or do you go out of your way to use Markdown (or something) to clean your input before submitting? Just curious...

<comment><USER16> I'm scared to think, but there might be a Firefox extension that embeds Word into text fields...

<comment><USER17> there is, its called "its all text". It works for any text editor, actually.</comment></comment></comment></comment></comment></comment>


Show HN: Nion, declarative API data management library built on Redux - <AUTHOR> https://github.com/Patreon/nion <comment> duncan-donuts I'm confused about the structure that is returned in the example. The `currentUser` has data, actions, and response properties. How would you know the shape of the values? Does nion have a concept of serializing the responses? One thing I like about all of the boilerplate with redux is that it allows you to manage the shape of all data within its life cycles. I'm just missing how I could do that with this.

<comment><USER2> Hey Duncan! I'm one of the nion maintainers. These are great questions! The answer to this specific one is that currentUser follows the JSONAPI spec. Which means we don't really need to know the shape of the response, because they're all the same! We then normalize the data in nion so you can use it as you expect. JSONAPI is not required for nion, you can use whatever you like including REST. We have several adapters that come built in to nion, including REST and JSONAPI.

</comment></comment><comment><USER3> Nice. I'll have to poke through Nion's source a bit to see how it works.

FWIW, here's my lists of other existing similar libraries:

[https://github.com/markerikson/redux-ecosystem- links/blob/ma...](https://github.com/markerikson/redux-ecosystem- links/blob/master/component-data-fetching-preloading.md)

[https://github.com/markerikson/redux-ecosystem- links/blob/ma...](https://github.com/markerikson/redux-ecosystem- links/blob/master/entity-collection-management.md)

</comment><comment><USER4> I've been waiting for something like Apollo for Rest APIs. Looks interesting!</comment>


Hapi by walmartlabs - <AUTHOR> http://walmartlabs.github.io/hapi/ <comment><USER2> "Hapi?" Ironic, considering: [http://gawker.com/wal-mart-is-scared-of-these- true-stories-f...](http://gawker.com/wal-mart-is-scared-of-these-true-stories- from-its-own-e-743832841)

<comment><USER3> Knew this was coming.

I'm worried about the new trend of the hivemind unilaterally attacking employees from companies they are morally opposed to, regardless of their internal level (i.e. NSA, Walmart, etc).

I'm fairly confident the people behind this library are closer to being our tech brethren, rather than policymakers inside WalMart, responsible for any of WalMart's official practices.

TL;DR - Give them a break and stop shitting on their work.

<comment><USER2> Do your tech-brethren stand up their wheel-reinventions behind multiple IP infringements against an owner with many fewer resources?

[http://spumko.github.io/](http://spumko.github.io/)

Just an innocent mistake, I'm sure. I mean, they do redirect to this site from multiple endpoints, but maybe the name and trade dress just occurred to them in a dream or something. Convergent evolution.

Thus, it's not moral opposition, I just don't see any indication that Walmart has avoided the cancerous behaviors that have characterized sociopathic organizations throughout history. Node.js is just a latest plea for legitimacy.

But yeah, if you zoom in close enough, it's just a place with a bunch of people tryna get by in this workaday world. Puppies! Doesn't mean they're disassociated.</comment></comment></comment>


India's HCL to buy some IBM software assets for $1.8B; shares fall - <AUTHOR> https://www.reuters.com/article/us-ibm-divestiture-hcl-techno-idUSKBN1O52M1 <comment><USER2> Amazing the difference in price between what IBM sold these for, and what it bought RedHat for.

It highlights the decline of their engineering and software assets.</comment>


Show HN: Whevent – Discover Events Around You Anywhere - <AUTHOR> https://whevent.com/ <comment><USER3> Nice logo, nice website (although the back button /and/ scroll hijack is annoying...).

I don't get the name though, wherever-event? whatever-event? whenever-event? It's a bit awkward to know how to say it "w-hh-event? Opening the app I think it is maybe all of them?

Could you tell me about your clustering on the map? What are you using etc. I've been working on it a while and maps in general are hard to get 'just right'. I'm using google maps though. Pressing a marker zooms nicely, do you know the exact area to zoom to? Seems like it.

2,7mb - amazing size.

Interesting choice to have some tabs popups and some navigation. I'd make the red arrow white though, and slightly darken the background when it is showing the popup.

I don't get the reason for signing in, so you could maybe add a line or two there instead of the logo.

Some places were quite slow on the map to search, it'd be nice so have a popup on the middle button saying ("still searching") or something like that when it takes a bit long. I was wondering if it were still searching or not - <USER2> the animations. Minor though.

The icons weren't totally obvious, e.g. game icon got 'runs'.

Also how is the male/female known?

Search button doesn't do anything in the "where" tab.

Got a crash - but I've got it on my device so I just sent an email to firstname.lastname@example.com hope you can catch it. Found no address on the website.

All in all so far - seems well done.

Regarding the funnel of installing, I _almost_ didn't install it due to app- only but I'm glad I did in the end. But the reason was mostly to check out the map implementation. The 'card' design is quite solid as well.

<comment><AUTHOR> Thanks for your feedback! Yeah there are issues with categories, since they're tagged by machine learning, It will improve in the future :) And thanks for the crash report!

</comment></comment><comment><USER4> Thanks for hijacking my browser history when I scroll :-[:-[

</comment><comment><AUTHOR> Your feedback is more than welcome!

<comment><USER5> The webpage hijacks my keyboard and prevents using it to control my browser. This degrades the site's accessibility and has no relationship to the product it is presenting.

Without a web version to try out and without my friends telling me how great it is, the requirement that I go through the app store process to install it is a higher threshold than my level of interest based on the odds that there will be no interesting events in the database around me should I do so.

My business advice is to make it easy for people to provide feedback and that means making it really easy for people to try out. The post here successfully funneled me to the page but the choice of delivery mechanism let me slip away. Even if the Windows version was available (and that's what I am currently using) I still would not have tried it out for the reasons above.

Good luck.

<comment><AUTHOR> thanks!</comment></comment></comment>


Notes on Postmodern Programming (2002) [pdf] - <AUTHOR> http://www.mcs.vuw.ac.nz/comp/Publications/archive/CS-TR-02/CS-TR-02-9.pdf <comment><USER2> This was a big deal in 2002. It got on the front page of Slashdot. I was a student at VUW at the time; someone got a cake with the Slashdot front page printed on icing and Robert Biddle did a magnificent job cutting it up.

</comment><comment><USER3> This is absolutely horrendous:

> Postmodern computer science holds that no requirements can be both complete > and consistent: you have to pick one.

This makes no sense whatsoever. It's up to people to make up their minds about what they want. If they can't, then maybe they don't deserve to be written programs for?

> Formal analysis can be used to show the absence of bugs, but never to show > the correctness of the specification.

If the specification is wrong, that's the business analyst's problem. The programmer may work under the assumption that the specification is correct.

> Programs can exhibit "faults in construction" that would be forbidden by a > modernist approach.

wat

<comment><USER4> > This makes no sense whatsoever. It's up to people to make up their minds > about what they want. If they can't, then maybe they don't deserve to be > written programs for?

It makes perfect sense. To account for every edge or use case for a requirement you'd have to create many different interfaces/points of contact to suit every need. For example, if I want to create a dating app, the interface and underlying code for a mobile device will break consistency with the interface and underlying code of a web page. You could be consistent with a translation layer, but then the interface or code will be incomplete for that particular use case.

> Formal analysis can be used to show the absence of bugs, but never to show > the correctness of the specification.

Working in a horizontally stratified organization where the programmer doesn't learn the business domain is ill advised. Often the programmer has the most context and understanding of both the business processes as they are being formalizaed into code. Additionally your understanding of the specification may be flawed or simply written incorrectly, and this can never be formally analyzed.

> Programs can exhibit "faults in construction" that would be forbidden by a > modernist approach.

In other words, a program can have a bug as a feature, or something that is wonky, but tolerated.

<comment><USER3> > the interface and underlying code for a mobile device will break consistency > with the interface and underlying code of a web page.

Are you talking about some notion of "consistency" that has nothing to do with logical consistency?

> Additionally your understanding of the specification may be flawed or simply > written incorrectly, and this can never be formally analyzed.

The whole point to making a _formal_ specification is reducing the potential for misunderstanding. In fact, the only way to misunderstand a formal specification is to be mathematically incompetent.

\---

Reply:

> Yes, the section is called "On Requirements" and the paper is about building > programs, not abstract or theoretical computer science/logic.

Yet requirements are logical artifacts.

> do[sic] to a level of randomness and misunderstanding of our natural world,

There's nothing to understand about the natural world. You only need to know _what you want_ the program to do. In other words, you need to consider every possibility, and _make up your mind_ about how you want it to be handled.

> we simply do not have a finite amount of variables to statically analyze > against.

wat

<comment><USER4> > Are you talking about some notion of "consistency" that has nothing to do > with logical consistency?

Yes, the section is called "On Requirements" and the paper is about building programs, not abstract or theoretical computer science/logic.

> The whole point to making a formal specification is reducing the potential > for misunderstanding. In fact, the only way to misunderstand a formal > specification is to be mathematically incompetent.

I suppose we're talking about the semantics of the word formal, as well as the level of granularity one can hope to achieve over a specific problem domain. While I have no doubt that all processes can and will eventually be reduced into an algebraic function, currently, do to a level of randomness and misunderstanding of our natural world, we simply do not have a finite amount of variables to statically analyze against.

</comment></comment></comment></comment><comment><USER5> Appalling. Self-indulgent without being funny; barely relevant – note outdated Devo reference– and absolutely without enlightenment, even considering its publication date. I feel resentful that my time was wasted this way.

<comment><USER6> All the characterizations backfire in one way or another:

> _Appalling_

Compared to what? It's a bloody cheeky paper, not a crime against humanity. It's like those writing "unacceptable" in product reviews for details they don't like, as if they're commending on peace treaty terms.

> _Self-indulgent without being funny_

Given that what one considers funny can vary widely, this tells nothing.

> _barely relevant – note outdated Devo reference_

In some sense, Devo haven't been "relevant" for decades even back in 2002. In another sense, why should one care if a reference is "relevant" to the fads and pop culture du jour or not? We are perfectly capable of reading a 1930s text with "not relevant" 1920s culture references and appreciate it for what it is.

> _and absolutely without enlightenment, even considering its publication > date_

Because 15 years for such a topic kills "enlightenment"? We have 30 and 50 year old CS texts that are perfectly fine (including tongue in cheek ones, like "Worse is better" or hacker foklore stuff).

> _I feel resentful that my time was wasted this way._

Nobody put any gun to anybody's head. But apparently somebody liked it enough to keep on going and going on.

</comment></comment><comment><USER7> I admittedly skimmed through, but it seems to be more systems theory, as applied to computer science, than a new form of computer science in and of itself.

</comment><comment><USER8> this is a poe, right? one of the primary tenets of postmodernism is that nothing can be objectively true or false. while I suspect there may exist certain less-than-serious programming languages which support this and other postmodern features, I don't think that postmodernism has anything useful to add to the field of computer science.</comment>


This Part of My Life Is Called … WordPress - <AUTHOR> http://heropress.com/essays/this-part-of-my-life-is-called-wordpress/ <comment><AUTHOR> This is a story about how I fell in love with WordPress (and web) even after being misguided towards the career-path of Electrical Engineering and that of a jack of all trades, but WordPress community was where I found my true self.</comment>


Is Computer Science Science? (2005) [pdf] - <AUTHOR> https://www.cs.mtu.edu/~john/jenning.pdf

<comment><USER2> Could someone help me understand the significance of this long-running debate? What is different about a world in which CS is a science and a world in which CS is not a science?

<comment><USER3> We'd have to rename the whole field. The cost in letterhead changes alone would make it prohibitive.

</comment></comment><comment> one-more-minute The author talks about the fact that Computer Science is useful to real science and understanding the natural world – fine, but kind of irrelevant. Same is true for statistics, maths, programming, engineering etc., none of which are generally considered a subset of science.

What you need is a compelling example of the scientific process of hypothesising, making predictions and collecting data happening within the subject. I'm not seeing that here.

Computer Science usually proceeds as theorising from a set of axioms (where your axiom is a Turing machine or a type system, for example). It seems pretty clear to me that that makes it a branch of maths – which is not exactly a criticism of the subject!

<comment><USER4> There are also computer scientists who study how humans use computers, e.g. HCI, which often includes hypotheses, experiments, etc. There is certainly a subset that only cares about proofs, though.

</comment></comment><comment><USER5> Knuth's Turing Award speech "Computer Programming as Art" [1] is relevant. It is useful to apply the scientific paradigm when appropriate, but it is also true that there is an aesthetic dimension to computer programming and the use of computer programs as a form of human knowledge that gets lost unless we remember that the artistic element is vital to the field.

[1] [http://dl.acm.org/citation.cfm?id=361604.361612](http://dl.acm.org/citation.cfm?id=361604.361612). See also [http://www.paulgraham.com/knuth.html](http://www.paulgraham.com/knuth.html) for a transcription.

</comment><comment><USER6> It's an interesting topic, thanks for sharing.

Some related posts that might contribute to the current discussion: [https://hn.algolia.com/?query=%22is%20computer%20science%22&...](https://hn.algolia.com/?query=%22is%20computer%20science%22&sort=byPopularity&prefix=false&page=0&dateRange=all&type=story)

</comment><comment><USER7> If it's not science it's definitely mathematics (or at least a significant portion of CS is math), which is fine by me.

If anything, math has historically been far less fickle than the advances that the scientific method has brought (usually being misused, but in the name of science nonetheless).

</comment><comment><USER8> Is there a tl'dr?

I think we can name the science part of computer science "algorithmic science" (or something to the same effect) and the engineering part "computer engineering" and call it a day.

<comment><USER9> The reasons for not calling Computer Science a science vary mostly based on the background of the beholder. Some object because "we only compute man-made objects", while others argue that "Computer Science is not a science, and has little to do with computers."

A graphic in the article lists these areas and problems:

      Area & Problem

      Computation
      • Unbounded error accumulation on finite machines
      • Non-computability of some important problems
      • Intractability of thousands of common problems
      • Optimal algorithms for some common problems
      • Production quality compilers

      Communication
      • Lossless file compression
      • Lossy but high-fidelity audio and video compression
      • Error correction codes for high, bursty noise channels
      • Secure cryptographic key exchange in open networks

      Interaction
      • Arbitration problem
      • Timing-dependent (race-conditioned) bug problem
      • Deadlock problem
      • Fast algorithms for predicting throughput and response time
      • Internet protocols
      • Cryptographic authentication protocols

      Recollection
      • Locality
      • Thrashing
      • Search
      • Two-level mapping for access to shared objects

      Automation
      • Simulations of focused cognitive tasks
      • Limits on expert systems
      • Reverse Turing tests

      Design
      • Objects and information hiding
      • Levels
      • Throughput and response time prediction networks of servers

</comment></comment><comment><USER10> It's more a science than economics, which is good enough for me....

<comment><USER11> The bar for a "science" couldn't get much lower.

<comment><USER12> Economics as a discipline is very reasonable given the constraints involved (studying human beings not particles, no experiments, short history of events to study). Unfortunately it takes a few years to get up to speed in the discipline, and only a few hours to write an "economics is all nonsense" blog article. Also see [https://xkcd.com/793/](https://xkcd.com/793/)

<comment><USER11> _\- Buyer beware of someone selling their understanding of economics as a "discipline."_

 _\- Supply and demand is a law not unlike Candy Crush is a post-scarcity economy._

 _\- The Ferengi Rules of Acquisition are probably just guidelines, marketed as rules to sell more copies._</comment></comment></comment></comment>


Switch statements versus polymorphism - <AUTHOR> http://c2.com/cgi/wiki?SwitchStatementsSmell

<comment><USER2> Adding new datatypes vs. adding new functions is the core tension between OOP and FP. It's really easy to add new functionality to existing datatypes in functional programming, and really easy to add new datatypes in OOP.

There's some very interesting research on resolving this issue: <http://www.cs.ucla.edu/~todd/research/icfp02.html>

<comment><USER3> OOP has problems adding existing functionality to new types. Interfaces are a go at the problem but they fall short for several reasons. Clojure's protocols are a better solution (as far as I can tell). Clojure also provides multi- methods and hierarchies for more sophisticated function dispatch. Their use and the reasoning behind their design is well documented on Clojure's website.

</comment></comment><comment><USER4> Case statements complect who/what pairs, so simplifying them by disentangling them should be a good idea. Clojure has really neat runtime polymorphism ( <http://clojure.org/runtime_polymorphism> ) that is one way to accomplish this without necessarily wading into type hell, and your multimethods end up looking like data.

"Clojure supports sophisticated runtime polymorphism through a multimethod system that supports dispatching on types, values, attributes and metadata of, and relationships between, one or more arguments."

</comment><comment><USER5> I completely agree with this:

 _It exchanges one form of duplication for another, not eliminates it.

The real "problem" is that textual code is generally one-dimensional in nature, but we are interweaving two dimensions of option combos. It's allegedly a limit inherent to textual code, regardless of paradigm used to write the code._

I'm currently thinking of language with "code" laying in database of sort, and text is just a view of real data. Of course, there would be some text serialization, but it wouldn't be the "true way" for programming it...

</comment><comment><USER6> Steve Yegge posted posted some interesting points on the topic some years ago: [http://sites.google.com/site/steveyegge2/when- polymorphism-f...](http://sites.google.com/site/steveyegge2/when-polymorphism- fails)

</comment><comment><USER7> At least in functional programming, some things just happen to be case analyses, and there ain't much you can do to get around it.

Consider the following (scheme) definition for the ``eval'' function. (This is a conditional and not a case statement, but it's still type-based dispatch, so _I think_ it qualifies)

        (define (eval exp env)
          (cond ((self-evaluating? exp) exp)
                ((variable? exp) (lookup-variable exp env))
                ((assignment? exp) (eval-assignment exp env))
                ((definition? exp) (eval-definition exp env))
                ... ; you get the picture
                ))

The input to this is some scheme expression. If it's a number or string (for example), that's the result (it's self evaluating). On the other hand, if it starts with the symbol ``define'', it's a definition and we define the variable in the environment.

Scheme doesn't support polymorphism, but as far as I can tell, even if it did this couldn't be changed to be polymorphic without changing what the function actually does. At the end of the day, if the input to your function is diverse enough, you're probably going to have to perform some sort of dispatch based on the type of that input.

On the other hand, I have a fairly small amount of experience with OO code, so I could be totally off base here... (please let me know if that's the case).

<comment><USER8> In SICP (where I assume this is taken from) they actually solve this problem. They have a dispatch function (as multi-methods have in Clojure) and a map from dispatch values to action functions. In that case you can extend the evaluator by adding new <dispatch value, action function> pairs to the map, which can be done in runtime.

<comment><USER7> I see, I had forgotten about that, but it's not exactly polymorphism, right?

<comment><USER8> It may not feel like it, but that is pretty much what languages like Java do. At run time, the type of the receiver is evaluated and the correct method is selected based on that. So we have the dispatch function, and a way to map results of that dispatch function to action functions. The only difference is that because of static typing, we cannot extend the <dispatch value, action function> map at run time, because we cannot create types at run time.

</comment></comment></comment></comment><comment><USER9> Replies separated as paragraphs, no usernames, and still civil. C2 confounds me.

<comment><USER10> Heh, it's fun to see some of my own comments from back when I was in college on that page.</comment></comment>


Applied Machine Learning: A Less Confusing Guide - <AUTHOR> https://udarajay.com/applied-machine-learning-the-less-confusing-guide/ <comment><USER2> Nothing new, not a guide, just some links to Tensorflow and some images from popular machine learning videos.

<comment><AUTHOR> The goal was to provide a good overview (covering terminology and key ideas) and then link out to resources for closer reading.

</comment></comment><comment><USER3> Good work, Udara :) Glad to see a western student out there with their work</comment>


3D animation with sound in 64 bytes of assembler - <AUTHOR> https://old.reddit.com/r/tinycode/comments/d4kdco/3d_animation_with_sound_in_64_bytes_of_assembler/ <comment><USER2> Since this only uses PC hardware and BIOS calls and so doesn't depend on DOS, I turned it into a boot sector which runs in qemu:

        wget http://oirase.annexia.org/war
        qemu-system-i386 -hda war

Modified source is here: [http://oirase.annexia.org/war.S](http://oirase.annexia.org/war.S)

<comment><USER3> Excellent.

The submitted file in2war64.com shows only the blue "background" when run from bare-metal booted DOS floppy on a Pentium D (x64 based on dual x86) with its associated Intel graphics hardware. No sound either.

Your file "war" is a nice binary, works natively as sector 0 of a floppy disk, with a traditional FDD plugged directly into the legacy FDD parallel connector.

On the same hardware.

Also works with USB floppy drive, even on a UEFI PC as long as the Legacy/CSM is enabled and Secure Boot is disabled.

To use a common USB Flash Drive (UFD) natively instead of a floppy, legacy BIOS can require a partition table to be also present on sector 0 of the removable UFD. This can be effectively added by partitioning (format not needed) after copying "war" to sector 0 of the UFD:

from Linux command line:

First copy "war" to sector 0 of the UFD, where X is the identifier of your unmounted UFD:

(sudo) dd if=/<path to>/war of=/dev/sdX bs=512 count=1

This overwrites any MBR and partitontable that may already be on sector 0 of the target X UFD; with the functional "war" replacing the MBR, and zeroes replacing the partition table.

Only sector 0 is replaced, all other sectors remain unchanged.

At this point sector 0 of the UFD is no different from sector 0 of the working floppy disk.

Then create a partition on the target X UFD using cfdisk:

(sudo) cfdisk /dev/sdX

make it primary, full size, bootable, type 0C

Only the final portion of sector 0 is altered (leaving the "war" binary intact at the beginning of sector 0), all other sectors remain unchanged.

Then the UFD boots natively just like the floppy.

Still for UEFI need Legacy/CSM to be enabled and Secure Boot disabled.

Still no sound.

</comment></comment><comment><USER4> I was there at Function when it was shown on the big screen, we brought something for c64. At first I expected something else to show up, but then I remembered it was 64 bytes. Sixty four bytes! 256byte scene is insane. I've noticed recent 256b releases are high res. Not sure how they do it, definitely not 13h. Anyways, this 256b still takes the cake: [https://youtu.be/eYNoaVERfR4](https://youtu.be/eYNoaVERfR4)

<comment><USER5> My cynicism about the widespread disregard for software bloat in the industry is tempered whenever I see stuff like this. Ask a javascript developer to do this and they'll end up with 1500 npm dependecies with an oddball collection of incompatible React plugins, 3d visualisation frameworks, and a codebase that'll be incompatible with the latest and greatest versions of all of these six months from now.

Yeah I know assembly language isn't a sensible choice for all but a tiny specialized niche of projects, hardware/bandwidth is far cheaper than developer time and so on but it's still refreshing to see people doing this kind of thing just out of pure passion.

<comment><USER6> A little OT but this is why I fell in love with Go (Golang) I think. There's something about the elegance of concise programs written in simple languages.

The 1500 npm dependencies problem you speak of is exactly what I expect to never even see, let alone have to deal with, in the Go ecosystem. It's not exactly surprising coming from one inventor of UNIX and C (Ken Thompson) and Rob Pike, two greats from Bell Labs, but when I heard that the creator of NodeJs had ditched that to go work in Go, now that I registered loud and clear.

After seeing for myself, I can understand. Go is a wonder, truly, and such a treat for systems (from sysadmin to CI/CD passing by performance, readability and safety). Something like Js can only eventually collapse on itself, when there's a better alternative. I mean, we could just as easily bundle a Python interpreter in browsers (to name just one candidate), Js is the frontend bible written in stone only because we keep it this way. Progressive apps are already showing a way between browsers and OS and I expect this line to get ever more blurry as virtualization (containers etc) continues its re-imaging of the entire computed infrastructure.

<comment><USER7> It's no coincidence that the three creators of Go have been around long enough to remember the simpler days.

<comment><USER6> Oh indeed. And how enriching it is to the programming and systems ecosystem at large.

I'm so thankful that computing evolved so fast that we can be here now, from there/then, and yet still have relatively young giants walking among us. The program-star hall of fame of very alive and active pioneers / creators is honestly humbling and inspiring.

</comment></comment></comment></comment></comment><comment><USER8> This demo on YouTube: [https://www.youtube.com/watch?v=CAAuIgjrZWY](https://www.youtube.com/watch?v=CAAuIgjrZWY)

<comment><USER9> The 1080p MP4 at that link is 32.5MiB.

</comment></comment><comment><USER10> In-browser emulation: [https://parkertomatoes.github.io/v86/?type=com&content=FBO6M...](https://parkertomatoes.github.io/v86/?type=com&content=FBO6MAPzbs0QuE8M5kDi9x9oAKUHuM3M9%2BeJ6IDu9vb2kix%2F9uoCFmwEkjDG9u7UCZydLHSqr%2BvcyTiZRmdRfw%3D%3D)

<comment><USER11> I got this:

> The string contains invalid characters.

<comment><USER10> Thanks for reporting! What's your browser? I've only tested with a recent Firefox and Chrome on Windows. I know iOS doesn't work but I don't have a means to debug it.

<comment><USER12> Otter Browser provides an up-to-date Webkit (i.e. not Blink/Chromium) engine on Windows, that replicated a lot of Safari-only bugs for me in the past.

<comment><USER10> Thanks for the recommendation!

</comment></comment></comment></comment></comment><comment><USER13> One sad part of the obsolescence of "classical" BIOS is the loss of access to basic functionality like simple graphics modes.

Of course it's one downside among many upsides but I think there's a point to having a simpler interface to allow stuff like this

With 64 bytes you can't even initialize a window on Linux or Windows.

<comment><USER14> This is where small embedded devices come handy. Any small cheap board with video output can be turned into a powerful demo (and games) playing machine, at 1/50 or less the cost of hardware in the demoscene era.

</comment></comment><comment> d-d As a programmer the demoscene has always fascinated me, but I don't know if I can handle that rabbit hole.

</comment><comment><USER15> A go binary to do the same thing would be at least 50MB. ;-)

<comment><USER16> You can write plan 9 assembly straight into go. I'm not sure if it would work, and it sort of defeats the purposes of go, but it wouldn't be 50mb.

</comment></comment><comment><USER17> Here's another 64-byte demo by the same hacker.

[https://www.pouet.net/prod.php?which=78044](https://www.pouet.net/prod.php?which=78044)

I saw it discussed on Lobsters.

[https://lobste.rs/s/lpnlyd/tiny_64_bytes_ms_dos_ray_tracer](https://lobste.rs/s/lpnlyd/tiny_64_bytes_ms_dos_ray_tracer)

</comment><comment><USER18> demoscene ftw!</comment>


Why Amazon's New Lambda Cloud Service Is A Huge Deal - <AUTHOR> http://www.businessinsider.com/amazons-new-lambda-cloud-service-is-a-huge-deal-for-developers-2014-11 <comment><AUTHOR> The article is "Why Amazon's New Lambda Cloud Service Is A Huge Deal" and is in part about responding to _events_ and mentions a connection with IFTTT.

Well, without getting to things that are new, there are some related old things! If like the new things, then might also want to look at some of the old things!

There is C. Forgy's RETE algorithm for _expert systems_ where have _rule based_ programming of If-Then statements. Here the logical expression after the 'IF' is in terms of _working memory_. Then conceptually, continually all the 'IF' statements are evaluated and for the ones that are true the corresponding 'THEN' statements are executed.

There was a programming language to do this KnowledgeTool from IBM Research.

Well, the article is in part about software that responds to events from system management, events from outside the software. So, might let the _working memory_ be changed from some sources of _events_ from outside the IFTTT or expert system software. The _working memory_ that is changed might have some _object-oriented_ ideas, say, with an inheritance hierarchy that can be changed in real-time during execution. Then software executing the If-Then statements might be multi-threaded and use _working memory_ in a way that has database-like _transactional integrity_ and automatic deadlock detection and _roll-back_ of the partially completed but deadlocked (transaction) work that was cancelled.

The same group at IBM Research did that and called it Resource Object Data Manager. The intention was system monitoring and management of server farms and networks.

So, using software something like IFTTT to monitor servers that issue events is old stuff! If like such things, then might look into some of the old stuff.</comment>


How the Ballpoint Pen Killed Cursive - <AUTHOR> https://www.theatlantic.com/technology/archive/2015/08/ballpoint-pens-object-lesson-history-handwriting/402205/ <comment><USER2> Personally I hated learning cursive and writing cursive in school in the mid 2000s. What's the point? For me, it took more time to write in than normal handwriting. Even the "good" cursive handwriting was overly ornate which actually made it harder to read. Bad cursive handwriting is just outright unreadable.

<comment><USER3> I spontaneously starting writing in cursive in my 8th grade math class one day and never turned back. I can write extremely fast, having written in cursive exclusively for 15 years. I have no idea how quickly I wrote when I started off, but I was probably pretty slow. It's definitely something to get used to, you can't expect to write lightning fast overnight, but isn't that true of most things?

Now my problem is, whenever a form says "please print," it morphs into cursive halfway through...

</comment></comment><comment><USER4> I thought this was an interesting article although I doubt the argument.

>My experience with fountain pens suggests a new answer. Perhaps it's not digital technology that hindered my handwriting, but the technology that I was holding as I put pen to paper. Fountain pens want to connect letters. Ballpoint pens need to be convinced to write, need to be pushed into the paper rather than merely touch it.

>Sassoon's analysis of how we're taught to hold pens makes a much stronger case for the role of the ballpoint in the decline of cursive. She explains that the type of pen grip taught in contemporary grade school is the same grip that's been used for generations, long before everyone wrote with ballpoints. However, writing with ballpoints and other modern pens requires that they be placed at a greater, more upright angle to the paper—a position that's generally uncomfortable with a traditional pen hold.

That is an interesting observation, but then I grew up learning traditional cursive with ball-point pens, and it wasn't really a big deal. Really all I remember as a downside is that the school-issued ballpoints would still have ink problems where a few of them would be leaky or broken and then you got ink over everything anyway.

I really think it just became seen as not such an important skill, when you have so many other things that are pretty important to learn. Remember penmanship was one of those things that continued into the upper grades, and advanced skill.

Typing became more important. Although the typewriter had been around forever, they were becoming cheaper and easier, because they were becoming electric. More schools taught typing. More people had a typewriter and more students knew how to type, and submitted papers typed. Previously if you didn't type (which was usual) you would need to submit a paper in pen, in cursive. Now that vanished.

<comment><USER5> A fountain pen is noticeably different from writing with a pencil or ballpoint, because you do not have to exert significant pressure, and because there is a lot less friction of your pen on the page.

Writing with ballpoints and pencils has conditioned us to Press Hard (whether for exam books or carbon copies). This leads to our hands feeling tired and cramped much more easily.

You're very right about the impact of typing, but even now I miss using a fountain pen after discovering them years ago. (I tend to use gel pens, as they are close, less messy, and cheap enough that I don't worry about losing them, but they're not as nice to write with.)

<comment><USER4> I enjoy the Uniball Micro, for the ease of use that you mention. It is fluid, the stroke width tapers with pressure, it just feels more civilized than the old ballpoint pen.

But I agree fountain pens are pretty nice, I may be getting one to control the inks I use in art projects.

<comment><USER6> Have you tried fineliner type felt-tips? I've found them an easy upgrade over ballpoints without going all the way to fountain, and I would consider them the minimal for anything regarding art

</comment></comment></comment></comment><comment> comonad-colaboy I think people were waiting for a reason to kill out cursive handwriting. It seems it was on the rise or being promoted in schools because of some weird myth that intelligent folks and cursive writing were a thing and established some causal relationship going from cursive writing to higher form of intelligence

</comment><comment><USER7> Has the author tried the Pilot precise v7? I'm sure there are more brands with a similar performance that provide low pressure writing without smudges. There is a HUGE selection of pens these days and I would think nearly every issue has been resolved.</comment>


Animals living alongside humans produce amylase, enzyme that breaks down starch - <AUTHOR> https://elifesciences.org/articles/47523 <comment><USER2> Although I follow a ketogenic diet and benefit from it I have laughed about the claims that it's somehow aligned with the needs of Paleolithic people. SO I really enjoyed this: "Unlike Neanderthals and Denisovans, who had only two diploid copies, we carry up to 20 copies of the AMY1 gene, which produces salivary amylase. "

<comment><USER3> Isn't that the opposite of what you believe? Paleolithic people were not genetically adapted to high-starch diets like we are. Ergo, a low-carb diet like keto was more natural for them.

<comment><USER4> The "we" in the sentence is homo sapiens. Neanderthals and Denisovans were not the same species as us.

> "Unlike Neanderthals and Denisovans, who had only two diploid copies, [homo > sapiens] carry up to 20 copies of the AMY1 gene, which produces salivary > amylase. "

<comment><USER5> Doesn't that mean we've evolved to eat a lot of starch so the more natural thing for humans to eat is therefore starch, if you follow this line of reasoning? And therefore, we've "evolved beyond" the keto diet?

FWIW, I do not think this is good reasoning.

<comment><USER6> OP is not making a claim here, he is pointing out counter evidence to someone else's claim, which is that keto diets are optimal for homo sapiens because that is what our genetic ancestors evolved to eat. The presence of significantly more genes for amylase provides strong (although far from conclusive) evidence that homo sapiens have evolved to eat a much more varied diet than paleo proponents assert.

<comment><USER7> Paleo diet mainly prohibits wheat and refined carbs but allows for specific starches such as sweet potatoes. It's different than keto. At any rate, the existence of enzymes does not indicate that starches should make up a large portion of one's diet either, as we must admit the past century of relative plenty in the Western world has led to all sorts of dietary diseases.

</comment></comment></comment></comment></comment></comment><comment><USER8> > This may suggest that our lineage has evolved specific adaptations to digest > starch-rich foods, underlining the long and continuing importance of these > staples in our diet

This reminds me of the interest in keto dieting and the frustrating misunderstanding that carbs are the cause of excess weight, diabetes etc. If that were true, the whole world would be diabetic and obese, since everywhere has a staple carb. It's only with excess calories and fat that carbs contribute to, but are not the cause of, the problem.

<comment><USER9> Until recently, everyone has lived near the border of starvation, and not had an opportunity to get obese.

Since the agricultural revolution, carbs are what we have been able to mass produce, and therefore breed ourselves to greater numbers on. That it probably hasn't been the ideal diet for us is a distant secondary concern.

Now that we're _finally_ overproducing food, we actually are getting obese on the carb diet. Coincidence? Maybe.

<comment><USER10> I think the Venus of Willendorf and her equally thicc cousins are, if you'll excuse the expression, ample proof that some people had an opportunity to get obese long before the agricultural revolution.

<comment> blaser-waffle Didn't someone put a theory out that the Venus of Willendorf was not venerating the Fat Goddess, but rather what someone sees when they look straight down at their body?

(cuz cave people didn't have good mirrors and all)

Deeper explanation: [https://steemit.com/science/@deeallen/self-portraits-of- fert...](https://steemit.com/science/@deeallen/self-portraits-of-fertility- symbols-venus-figurines-of-upper-paleolithic-eurasia-nudity)

<comment><USER10> There are all sorts of theories!

Olga Soffer points out that the woven clothing on the figurines is often incredibly detailed, and suggests they may have been some kind of fashion doll [1]. Mandy Weston speculates that they may be bobbins used for weaving [2]!

[1] [https://www.researchgate.net/publication/235979951_The_Venus...](https://www.researchgate.net/publication/235979951_The_Venus_Figurines_Textiles_Basketry_Gender_and_Status_in_the_Upper_Paleolithic)

[2] [https://www.academia.edu/31112020/Venus_Figurines_- _Evidence...](https://www.academia.edu/31112020/Venus_Figurines_- _Evidence_of_Womens_Work)

</comment></comment></comment></comment></comment><comment><USER11> The argument for keto/carnivorous diet does not depend on human adaptation to digesting starches. I understood it as:

* Evolution works at the level of genes, not individuals. It will select for short-term reproductive success at the expense of longevity or quality of life.

* All living things evolve to avoid being eaten (at least while they have the potential to reproduce or aid the reproduction of their kin).

* Animals primarily defend against being eaten by fleeing or fighting. These defenses can be 100% neutralized by killing the animal.

* Plants primarily defend against being eaten by producing toxins. These defenses can be neutralized by metabolism, but evolution has no incentive to select for 100% neutralization. If 100% neutralization of plant toxins is difficult then dying young with a lot of children might be a better strategy.

However, there are plants that defend with spines/shells/hiding underground, and plants that produce fruit to attract animals for seed distribution, all of which change the selection pressure for toxin production, and any food may be healthful or harmful purely as a spandrel (a byproduct of evolution of some other characteristic). There are examples of human populations maintaining good health on a wide variety of different diets, so as is usually the case with nutrition, there are no clear answers.

<comment><USER12> These arguments are all interesting but I think most relevant is that the best nutrition science we have to date shows that a proper plant based diet is optimal for health & longevity. The plants and animals we eat now are radically different than the ones we were exposed to through most of our evolution so paleo proponents are chasing a lost world.

<comment><USER13> Actually, the representation of the ancestral diet being primarily meat is incorrect - outside of a few examples where there just weren't many plants available. Largely, humans ate what they happened upon. Meat was a scarce byproduct of another predators meal. Ie we ate what the big cats left behind.

Furthermore, the ultra refined and concentrated foods we now eat didn't exist until very recently. The amount of sugar cane needed to produce a single can of soda isn't something any human would sit down to eat.

Edit-changed are to ate

<comment><USER7> Humans evolved during the ice age. There were no vegetables in large enough quantities to feed the human brain's massive growth over the past million years. Every single paleolithic cave art depicts animals and hunting techniques. Fossil evidence from millions of years ago show bone scrapes on zebra and reindeer bones in human caves. We evolved to hunt wooly mammoths twice the size of elephants for goodness sake. We decimated whole populations of megafauna. You would have to go back 4-6 million years ago to find scavenger ancestors.

<comment><USER12> Cooking is very likely the reason humans suddenly had access to far more calories to support a larger brain. The idea that an organ like the brain that feeds directly on glucose was supported by animal fat and protein just doesn't hold up to serious scrutiny.

<comment><USER7> The brain is incidentally 60% fat. And all the glucose the brain requires can be synthesized from lactic acid. There are entire societies that live off of 99% meat. They live their entire lives with almost no vegetable intake whatsoever, and their brains develop and function perfectly normal. In contrast, consuming too much glucose can wreak all sorts of havoc on the brain, spurring excessive consumption, type 2 diabetes, and has been linked with Alzheimer's.

[https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3577529/](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3577529/)

[https://www.nih.gov/news-events/news-releases/higher- brain-g...](https://www.nih.gov/news-events/news-releases/higher-brain- glucose-levels-may-mean-more-severe-alzheimers)

<comment><USER13> [https://www.alzheimersanddementia.com/article/S1552-5260(17)...](https://www.alzheimersanddementia.com/article/S1552-5260\(17\)33765-2/pdf)

"Studies have shown that type 2 diabetes can be a risk factor for Alzheimer's disease, vascular dementia and other types of dementia because cardiovascular problems associated with diabetes are also associated with dementia. These include:

Obesity Heart disease or family history of heart disease Impaired blood vessels Circulation problems High cholesterol High blood pressure Research has also proved that, similar to diabetes, glucose is not used properly in the brains of people with Alzheimer's disease. "

[https://alzheimer.ca/en/Home/About-dementia/Alzheimer-s- dise...](https://alzheimer.ca/en/Home/About-dementia/Alzheimer-s-disease/Risk- factors/Diabetes-dementia-connection)

<comment><USER7> I'm not sure of your point, because the parent comment mentioned animal fats and protein not being a primary food source for paleolithic humans and their ancestors (which is not what the fossil evidence shows AT ALL, we created spears and bows and arrows and various hunting strategies and tools that are well documented, for millions of years).

But with regards to your type 2 diabetes comment, type 2 diabetes is strongly associated with diet intake of excessive carbohydrates. [https://www.ncbi.nlm.nih.gov/pubmed/30289048](https://www.ncbi.nlm.nih.gov/pubmed/30289048) [https://www.ncbi.nlm.nih.gov/books/NBK499830/](https://www.ncbi.nlm.nih.gov/books/NBK499830/)

You don't need carbs in your dietary intake. Your body can synthesize carbs from fat, just as it can synthesize fat from carbs.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER14> Hmm I wonder if it is just an adaptation (humans mean their staples are about and it gets selected for) - or if it is something mutagenic. The fact it is the same enzyme makes me wonder.

<comment><USER15> The wild animals have the genes, the ones associated with humans have multiple copies of it.

<comment><USER14> Ah I missed that aspect in my skim. The consistency excess copies seems to imply that losing them entirely would be extra bad for survival enough so that redundant copies would boost offspring survival and dominate for human adjacents but not their more wild counterparts.

The domestification might even imply reverse order - that the ones with the starch genes were more likely to wind up in "dog" pools - say because they were attracted to starch and got closer to humans - and thus plenty of extra copies among their descendants. Meanwhile ones without were more likely to stay away and their descendants more likely to wind up in "wolf" pools where prevalence was lower.

</comment></comment></comment><comment><USER16> The image of the wolf with the deer leg in its mouth and the German shepard with the pizza slice in its mouth is basically the entire tl;dr.

<comment><USER17> Good quality dog food is closer to deer leg then to pizza. Unfortunately there are too much low quality made of unbelievable junk pet food around compare to which even pizza sounds good and healthy. That prompts a lot health problems to the dogs.

<comment><USER16> But specially made dog food has only existed for 100 years or so. Dogs evolved eating humans' food scraps.

<comment><USER17> Yes, they are opportunistic carb eaters as a result of that evolution. The business of the low quality dog food abuses that.</comment></comment></comment></comment>


Unix hacker tools from a beginners point of view - claes-magnus I have written several posts on Unix hacker tools as of late (from a beginners point of view). Nothing new under the sun, but perhaps cute. This is my last post:<p>https://herebeseaswines.net/essays/2020-04-18-a-bash-perl <comment><AUTHOR> If you want to overwrite the existing file, you can tee it instead of redirecting stdout.

<comment> claes-magnus I actually tried using tee to solve this, but failed. :) If you have the time, can you please tell me how to solve this particular problem? I would love to learn, otherwise, I will read elsewhere. The man pages on tee did not contain any examples. Thank you for your suggestion!</comment></comment>


Ask HN: Why would anyone POST anything in AJAX? - <AUTHOR>

Bear with me here because I'm bound to take you off tangent, but as I've been developing more and more server-side oriented applications for HTTP I find myself pondering the advantages and disadvantages of implementation; so this may come across as an answer rather than a question. But wasn't AJAX created as a work-around for POST? Correct me if I'm wrong but POST is primarily a method for the server not the client, while GET behaves more like the web today (2.0) in that users spend more time requesting stuff (an xhr that passes some value who in turn returns with a response) from a server rather than writing or executing stuff on that server.<p>If anything AJAX seems like it was made especially for GET to cut-down on how much and what was being passed with POST...I might be way off, but does it not seem contradictory to POST something in AJAX without returning a response? <comment><USER3> There are numerous implications of choosing POST or GET.

First off, the HTTP specification requires that GET (and HEAD) requests be idempotent^W EDIT: _side effect free_ to enable caching. Clearly, violations of this abound; however, proxy servers and other infrastructure will often hold you to this rule, so make sure you know what you're doing. (proxies and clients are permitted to withhold or arbitrarily repeat GET requests without changing the outcome)

Second, security: although AJAX in the strictest sense falls under the same- origin policy, you can quite easily make GET requests to foreign hosts in JavaScript by creating SCRIPT, IMG or IFRAME elements with appropriate SRC attributes, whereas you'll struggle to create a foreign-host POST. Inappropriate use of GET is therefore the enabler of XSRF attacks. CAUTION: read petewarden's reply regarding XSRF attacks via POST forms.

Third, data size, as others have said. URLs are notoriously problematic for conveying any information other than short text.

Fourth, if web crawlers get hold of any URLs which exhibit side effects on GET, they will wreak havoc on your site. (though this can admittedly be alleviated by judicious use of robots.txt)

Finally, you seem to imply that POST requests will not or cannot generate a response similar to GET. This is not the case, responses to POST work in the same way. (except it must not be cached) The deciding factor is the nature of the _request_ (side effect or no side effect), not the nature of the response.

<comment><USER4> With regards to point #2, it's definitely inconvenient to cross-site POST from the client side, but not hard: Create a form with a target pointing to the external destination and submit it via Javascript, wrap it inside an invisible frame for neatness.

Don't let POST give you a false sense of security; checking the referrer can help in this particular case (it's tricky to forge the referrer from the client side) but you really need a robust check like a generated token to avoid malicious cross-site requests.

<comment><USER5> for what it might be worth to others:

i've generally found that the client already has a cookie-session established in situations where cross-site ajax calls are a concern. so, my approach is to require a hash of <request text>+<session id cookie> as a per-call signature. javascript on another domain can't access the session id cookie and so won't be able to generate this signature.

<comment><USER6> > so, my approach is to require a hash of <request text>+<session id cookie> > as a per-call signature. javascript on another domain can't access the > session id cookie and so won't be able to generate this signature.

If the security relies on other javascript not being able to access the session cookie, why is it insecure to use said session cookie by itself as the per-call signature?

Who can see the signature but not the session id cookie?

<comment><USER5> you're right, hashing is overkill.

<comment><USER3> No, it isn't, as the cookie is sent with any request to your domain, regardless of the source. The hashing uses the fact that the cookie is inaccessible to JavaScript running in other domain contexts.

<comment><USER5> the sid is inaccessible to js running in another domain context, so anamax is pointing that it suffices to just retransmit the sid as one of the request parameters, rather than generating and including sig=hash(request+sid).

you're right that the remotely invoked request will include the sid as part of the http cookies header - it's what goes into the get/post request parameters which differentiates the domain context of the invoker. and if someone can't generate and include a sig because they can't access the sid, then the challenge might as well just be including the sid.

the only draw back i see is that i wouldn't have had an excuse to learn how to implement sha ;)

*edit: jim_lawless points out below that you might not want a sid showing up in web server logs. my system frequently rotates the clients sid, so it's not a concern to me - but if you do use less transient sid cookies you might want to implement the hash signature approach after all?

</comment></comment></comment></comment></comment></comment></comment><comment><USER7> Not at all. Imagine a document editor. There are limits to the amount of data that can be passed via GET URLs. Without POST you could only have 2KB documents. In Archivd we use POST via Ajax anywhere the user mutates data. It avoids the data length problem and makes it simpler to defend against CSRF attacks.

<comment><AUTHOR> _Imagine a document editor._

For the web? Passing the entire document asynchronously?

 _In Archivd we use POST via Ajax anywhere the user mutates data._

See, I'm still new to AJAX and from the type of apps that I use and experiment with are generally broken down as independent events who pass values and who perform an xhr as each event is triggered. I guess as your app grows and the data your handling using this methodology (as GET) is suddenly just too complex to carry out on the client. Thanks for the input though.

<comment><USER8> 280 Slides uses an asynchronous POST (or PUT) request for saving documents.

Just because the mechanism for generating requests has changed, that doesn't mean the mechanics of REST should be thrown out the window.

REST is useful, and its how most of the infrastructure of the web works. It's useful to understand this, and try to build your applications appropriately.

</comment></comment></comment><comment><USER9> Many systems have limits on the maximum length of a GET query string, since said strings form part of a URL. In most cases these limits are quite large (4kB or more) but I've seen systems which can't even handle 1kB URLs.

If you want to send a large amount of form data and not have things randomly break, it's a good idea to use POST instead of GET.

<comment><USER10> Internet Explorer has problems with URLs over 2047 characters in length - <USER2> you are needing to handle large amounts of text (say from a textarea), POST is the way to go.

</comment></comment><comment><USER11> In addition to request size limits, using the HTTP methods on server side code can simplify code. If I GET a person record then send it down, if I POST a person record then process the passed parameters. With that separation I may find that POST requests do not require sending any data to the client (other than a success indicator). That reduces bandwidth and improves client response time.

I have really grown to appreciate this simplification while working with webpy on AppEngine. I think that my request handlers are about the cleanest they have ever been.

</comment><comment><USER12> I use ajax POSTs for autosaves, creating and deleting 'child' objects (when the UI for the sub-object should be added to/removed from the page without a reload). Basically any mutation where I don't want a reload.

</comment><comment><USER13> GET parameters can ( and often do ) show up in web-server logs. Transmitting sensitive data via a GET ( even over SSL ) may ultimately cause security / privacy concerns.

</comment><comment><USER14> POST easier to protect from XSS attacks when using the Django middleware.</comment>


Animal Minds: The new anthropomorphism - <AUTHOR> http://www.chronicle.com/article/Animal-Minds/237915 <comment><USER2> The gaps between animal understanding and human awareness are just as fascinating as the similarities, and I'm glad that someone's reminding us to push back on the "They're just like us!" narrative of how animals minds must work. One of the more influential texts I read in college was Daniel Povinelli's work on whether or not chimpanzees understand weight, basically concluding: they don't, at all. Scientists tried for thirty years to train chimpanzees to recognize weight as a separate property of an object, and failed spectacularly.

It's such a basic component of what it is to be aware of the world, and yet it's complex enough it seems a uniquely human faculty. Chimpanzees can sort objects by color, size, or shape, but not weight! how similar to humans can their internal experience be? (Or, of course, what aspects of the world are we missing that would be obvious to a slightly more complex intelligence?)

<comment><USER3> > Or, of course, what aspects of the world are we missing that would be > obvious to a slightly more complex intelligence?

Also, there are surely aspects of the world we miss which are probably clear to chimps or even insects.

<comment><USER4> Richard Hamming said "Just as there are odors that dogs can smell and we cannot, as well as sounds that dogs can hear and we cannot, so too there are wavelengths of light we cannot see and flavors we cannot taste. Why then, given our brains wired the way they are, does the remark, _Perhaps there are thoughts we cannot think,_ surprise you?"

<comment><USER5> Because Turing completeness?

But certainly, there are no doubt emotions, habits, moral concepts, and even "thoughts" that are thoroughly foreign to humans. Not impossible, just foreign.

<comment><USER6> Turing completeness requires infinite discrete time steps and memory.

</comment></comment></comment></comment></comment><comment><USER7> This is one of those things that seems to end up being seen as very black-and- white by all parties. Animals are either "nothing like us" or "just like us", rather than "have varying degrees of psychological similarity to humans and, almost orthogonally, varying degrees of capability."

There's also a huge variation between humans, in what ways we seem to perceive and reason about the world, which seems to get swept under the rug with "5 out of 7 people did X" type studies.

</comment><comment><USER8> >The ethologist and author Marc Bekoff thinks primary emotions — including fear, joy, happiness, jealousy, anger, love, pleasure, sadness and grief — are probably widespread and that hewing too closely to abstract description could become a form of what he calls "anthropo-denial."

In humans, each of these emotion terms refers to the cognition that a situation is of a certain sort, and calls for a certain type of response. So for instance "fear" refers to the cognition that a situation is such that there is a fairly high probability that something highly contrary to one's vital interests will occur, and calls increased vigilance and possibly action to prevent the feared event.

Animals make many or all of the same situational differentiations, with much the same behavioral responses, and so it seems appropriate to say they have the same emotions as humans, , or at least a good part of them.

By the way, I think that the idea that animals are mere mechanisms without minds comes from philosophies such as cartesian dualism, and also some religious doctrines, and so is not scientific.

</comment><comment><USER9> I think recognising that you, personally, are a smart primate is probably the key step to developing a rational world view. Since I explicitly took that onboard I've been suspicious of any concepts founded on the idea that humans and animals are separate and incompatible categories. Concepts like "anthropomorphism".</comment>


OpenCL 3.0 Bringing Greater Flexibility, Async DMA Extensions - <AUTHOR> https://www.phoronix.com/scan.php?page=article&item=opencl-30-spec&num=1 <comment><USER2> > OpenCL 3.0 makes optional all functionality past OpenCL 1.2.

Thus, to create software using OpenCL 3.0 means it must be backwards compatible down to OpenCL 1.2? There is no minimum set of capabilities beyond OpenCL 1.2 a device needs to be able to deal with?

<comment><USER3> Exactly, for anything beyond 1.2 you will need to query for extensions.

Apparently they will define helper macros for it and are outsourcing the C++ support efforts to the SYCL and Clang/LLVM projects (OpenCL backend).</comment></comment>


No Country for Young Men: China's testosterone problem and the effects of the one-child policy - <AUTHOR> http://tnr.com/story_print.html?id=06d65840-0997-482e-a84d-b09b61a7b0e5 <comment><USER2> Back when I subscribed to Forbes, I remember an editorial suggesting how wonderful China's gender problem was...think of all the female-hungry Chinese engineers we can import into the USA! No shit, Forbes magazine said that. It was then that I realized the elite would gladly sell my organs on a penny profit.

At any rate, expect a steady flow of paid-for brides moving into China. Those billions of dollars sitting in China's central banks can only go one place, and we only have so many things they want to buy.

<comment><USER3> Brides? Why so much trouble? Japan will solve your problem!

Less emotionally volatile than a bride and submissive to your every desire, we present the Tanjansu female concubot. Available in 20 different skin tones and with interchangeable head, torso and legs, you can mix and match to satisfy your daily kinky whim.

And Tanjansu can cook! Modules are available for 16 varieties of Chinese, Japanese and McDonald's cuisine.

Help avoid testosterone-induced social strife. Ensure domestic tranquility and do your part to bring China forward, to enhance Chino-Japanese relations and to lower your libido today. Only 110,000 yuan (basic model).

<comment><USER4> Yeah, hilarious... but people still use each other for "reproduction" or even, gasp, conversation! It may surprise you to hear this, but some people actually want to have a family instead of spending all day fucking a robot.

<comment><USER3> Reproduction is necessary for the species but not for the individual.

Most men (and we are mostly men here, are we not?) don't usually seek hours in conversation with women. Such I deem a sign that one is unsucessful in mating.

And most men do not wish to be constrained to fucking any one particular being be it robot or human: <http://nymag.com/relationships/sex/47055/>

</comment></comment></comment></comment><comment><USER5> How many children do the 10 most powerful political leaders in China have? I'd be curious, if anyone knows.

<comment><USER6> China is run by what seems to me to be effectively a 'board of directors', these men are too old to have been affected by those policies. When I say old, I'm talking OLD too. We think John McCain is old. By Chinese standards he would be just getting to the point where they MIGHT let him have a say in who the next president is. Seriously, these guys are so old it is RIDICULOUS. Their presidential elections work something like this:

-Small number of, seriously old, think in the 90 year old range, guys get together and decide they've had it with the 70 year old president. China's economy is only growing at 10% a year, or something ridiculous like that. Their stock exchanges only offer up surges in the 40-50% range per year, and GOSH DARNIT!! 'How long can the shareholders be reasonably expected to tolerate such pitiful returns?' They lament. 'China's future is at stake!!!' 'That means our CHILDREN are at stake!!!' 'Why they may even have to clean their own toilets!!!' 'Won't someone think of the CHILDREN!!!'

-To address this crisis in the portfolios of the Chinese people . . . er . . . I mean . . . crisis in the leadership of the Chinese people. They have found some spritely, dynamic, new young blood, by young I mean 60, and they say he is the new guy in charge.

-All the leaders of the communist party, being obedient mentees of these old guys, sing the new guy's praises, elect him president, and the old guy goes home. (Only not really . . . see he'll BE one of those old guys now, so he'll ALWAYS have some influence)

Bit of an oversimplification, but not much. When I first studied this I thought, 'man this sounds JUST like the process of a board of directors'. But if the rest of the world wants to call it a political system, who am I to question? Fine, it's a political system.

An interesting test might be to try to get China to do what we want another way. Let's forget about armies, and navies, and Taiwan, and democracy, and demonstrations. Let's try causing a blip in their quarterly results. I'd imagine the speed with which change would come would make our heads spin. That's just my theory though.

<comment><USER7> I think you're pretty much correct. It's more like the board of trustees of a "non-profit", since the board elects its own members, rather than having shareholders elect the board. The system works reasonably well. The president is selected for competence and there is a stable secession process.

I think it is foolish to argue that China should be more democratic. People today forget how dangerous democracies are that don't have systematic anti- jingoistic indoctrination. Read the history of how universal suffrage in Europe from 1880-1914 led to the rise of militarist-nationalist politicians ( Stephan Zweig's The World of Yesterday is a great book on this topic). Do we really want to see the Chinese equivalent of Bill O'Reilly and Ernst Lissauer? I'll take the 90 year old men, thank you very much ...

<comment><USER6> Oh yes. Understand me correctly, I am a believer in the appropriateness of the current system in China. I do agree with you, to pursue the establishment of a democratic system in China right now would be to follow a decidedly misguided course. The jingoists would take over in fairly short order.

Believe me, I feel more safe going to sleep every night knowing that China is run by boring, old, stodgy, conservative men who are anything but rash.

</comment></comment></comment></comment><comment><USER8> The deep and strong custom of boys over girls is fascinating. In eastern Europe and a lot of other places, girls are the ones who are valuable, for obvious reasons. And by obvious I am talking in Darwinian terms.

So the only way I can think that a custom like that can survive is if people have no way to control the sex of children. But now suddenly they do.

It is hard to explain to people from the new world just how powerful culture can be. Old world tribal customs culture, not Mozart and Voltaire culture. You can fight and break laws, but do not ever break customs!

I've heard people say that a Chinese proverb about raising girls is something about watering someone else's garden. I worry things like that will go away only if the ancient customs' back is truly broken.

Let the ratio of girls to boys go completely out of hand. Then sit back and watch an old stupid custom die a painful death.

<comment><USER9> Is this the reason why I think girls from East Europe are more attractive? It is interesting to look at this from sexual selection point of view.

On the other hand. I really wish the old tradition in china goes away. There was a time in the 20th century when both Communists and Nationalists in China pushed forward gender egalitarian agenda. But it only reached urban area and the people in country sides are still deeply rooted in old tradition (but at the same time, we all know the people in country side have to favor male off springs for agriculture purpose) So we are watching a very big experiment in society that may last for 100 years.

<comment><USER8> I credit the greater genetic diversity (when compared to West Europeans) of East Europeans for out good looks.

<comment><USER9> I am curious. Do you have any citation about this? I know Russians are pretty mixed in both Y Chromosome and mitochondrial DNA due to history. But how about others?

Also in this [http://www.spiegel.de/international/europe/0,1518,559284,00....](http://www.spiegel.de/international/europe/0,1518,559284,00.html). It seems even Scandinavians are mixed heritage.

</comment></comment></comment></comment><comment><USER10> What's so scary about this is that the quickest and surest way to eliminate a surplus of young men is war.

<comment><USER9> It is not so scary in history of China. Chinese waged wars/feuds against each other in 90% of the recorded history. China always have surplus male population to be wasted.

But wars before were contained in regional provinces or mainland. Considering now China owns nuclear war heads and ICBMs. Then any one who is crazy enough will be a threat to U.S.A. and neighbors of China. Especially U.S.A. was considered as a potential enemy by them.

It is the same thing like U.S.A didn't need to care who those Wahhabi jihadists before. But now they project their anger on U.S. and have means to create collateral damage in U.S.A. Then it becomes nuisances to U.S.

(P.S. I am a half Chinese and half Taiwanese in U.S.A.)

</comment></comment><comment><USER11> This is interesting data in this connection:

<http://en.wikipedia.org/wiki/List_of_countries_by_sex_ratio>

</comment><comment><USER12> if mainland Chinese society made a shift to be more gender equal (politically and economically), this wouldn't be (or stay) a problem...

This is a ticking time bomb, both there and in India

<comment><USER9> Arab World also has a similar problem. And anger from young men there already exploded and made a landmark in NYC. (I lived in LES in NYC in 9/11/2001 and breathed for a month of air with asbestos and smoke.) So we've already known what is possible to be done by angry young men.

\-- edit --

Why this is considered offensive? Will anyone tell me?

<comment><USER13> It's possible you're being modded down for your poor spelling and grammar. I've modded you back up to 1.

</comment></comment></comment><comment><USER14> i think that is only one of many points in the nearer future of countries like China or India that will have a lot of repercussions...

</comment><comment><USER15> _"In a round-up last year, Beijing cops seized 3,400 guns and knives used in war games"_

WTF! Knives?! These guys are hardcore.

</comment><comment><USER16> Yet another fine testament to government regulation!

</comment><comment><USER17> My answer was different : Rapture.</comment>