skysight-inc/HackerNews huggingface dataset:
The basic idea is to encode the array within a single integer:

0 + [anything, 31,28,31,30,31,30,31,31,30,31,30,31]
28 + [anything, 3, 0, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3]
00, 11,00,11,10,11,10,11,11,10,11,10,11

reverse: 11,10,11,10,11,11,10,11,10,11,00,11, 00
0011 1011 1011 1110 1110 1100 1100
0x 3 b b e e c c

We have 4 possible values in the array, so we need 2 bits per value. We have one dummy value + 12 required values, so we need a total of 2*13 = 26 bits which fits easily into a 4 byte integer (either 32 bits unsigned or 31 bits signed). To retrieve one element from the "array", we need to shift our constant 2 bits per month or twice by the numer of months. Then we need to mask everything but the lowest 2 bits (&3).
I really enjoyed proving theorems for analysis - I have an undergrad degree in mathematics - but not so much algebraic proofs. Where does that put me? :)

In any case, we know that algebraists who program also use Maple, Magma, Mathematica, R, and Sage, or even straight Python, C, etc. FP languages are a minority even in the professional mathematics world.
PHP hammer[0] made using the specification[1]

[0]https://secure.flickr.com/photos/raindrift/sets/721576294929...
[1]http://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/#a...
>One thing that is often overlooked with PHP is the fact that the deployment process if extremely easy..

This should only matter if you are making something trivial, like making a contact form for an otherwise static site..
The Ripple / Stellar protocol is bad, so this is not a surprise. Ripple was invented before Bitcoin. Ripple/Stellar requires explicit trust, where Bitcoin does not. Also the distribution was widely known to be gameable (I know many people involved who managed to get free stellar). The only surprising thing is that Stripe and Ravikant invested in a technology which is obviously inferior to Bitcoin. Prof. Mazieré and JedMcCaleb have no significant background in economic research and it shows.
But suing the party doing the infringing would be much harder. They can't just go after Google/Apple/Microsoft because all they're including is a javascript interpreter. They'd have to sue thousands and thousands of sites, most of them for amounts no larger than 1000 dollars.
HMRC have an email address you can send information about your business and working arrangements to and they will tell you if you are caught by IR35.

I wrote a fuller explanation here:
http://digitalassassin.net/2014/07/am-i-caught-by-ir35/
Stellar is not decentralized. If problems like this occur, there is the Stellar organization /corporation, to enforce consenus. Whenever there is a legal entity behind it, it's not de-central. Bitcoin has solved all these problems. Ripple was invented before Bitcoin. Stellar is a Ripple fork.
It basically just stores [3, 0, 3, 2, ...] as 2-bit numbers, and the shift then corresponds to indexing.
JavaScript isn't full of bugs nobody has bothered to fix. It's full of specified behavior that cannot be fixed without breaking backwards compatibility. That said, the issues are well known and actually bypassable.

Whether you should be using it for the problem XSLT tries to solve is another question. Probably not, since there are other templating languages.
Maybe, but the advantages provided by frameworks in other languages are also available in PHP, so comparing the relative safety of one language to the relative safety of a framework in another language seems unfair.

Although PHP does offer the option of using the "PHP framework", which the other languages don't, so, yes, when used in one particularly bad way, PHP is particularly unsafe.
We’ve built a framework for developing applications in PHP specifically designed to allow for fast innovation in the high-load, high-performance environment we live in every day while still keeping the API extremely simple to deal with.

Why go with PHP and have to roll your own framework, when you can go with something else, and leverage all the great work that has been done by the Django/Rails/whatever folks? This post tells me all that they have accomplished, which is cool, but doesn't tell the most important thing: why did they choose PHP?

I have to take missions in PHP (Symfony2 and Zend Framework) from time to time, and it really makes me appreciate how much more advanced Rails is. And I don't mean advanced as giving me lots of options for doing obscure things. I mean advanced as doing for me all the repetitive stuff that I would have to do anyway, so that I have much less code to write, much less room to introduce bugs, and I can focus on what really matters. The PHP ecosystem is trying to replicate that, but so far, it's still quite far behind.
Yeah the world is full of wrong things. That doesn't mean much when you have to choose between something that takes you a day to set-up to get going against something you can just start with. Thats the secret of PHP.

The limits of the language means nothing to 95% of it's users and even when they do as in the case of facebook it's a problem of success and has been solved.

Lets not make it harder than it is.
I guess here: https://github.com/davidmcclure/humanist
Show HN: Snapchum – builds social relationships
So here is a suggestions. Develop the other languages to be as easy to get started with as PHP and I will be the first to try it out.

Cause for me it was the ease of use. I am nowhere near a programmer let alone good at programming but I can solve most of my problems with a combination of PHP, JS and CSS/HTML why should i develop in another language that takes me longer time to setup?

Edit: Why the downvote? If you want to have people start learning "better" languages then it's up to you to find ways to get them to try it out.
I both love and use Javascript and Go.
There's a lot of things that can be easily attempted. That can't be the sole basis for trying something, especially something that has already been tried a lot but doesn't seem to have taken off. (at least without there being something different about how you are approaching it, that is)
No. The value of knowing your system well far exceed the value of supposedly best system (of which is really arguable). Especially if it's a rush job, using tools you know well will drastically reduce time needed, because you already know in and outs of such tools, and is able to identify buggy part quickly.

Also, as we are talking about web development, what is best tools? ASP.NET? Rails? Django? Go? J2EE?
The 2014 US Elections That Ended in a Tie
You just have to override the new operator (C++) or use a different malloc (C). All you need is to replace brk() with an appropriate mmap(). Don't know how it goes for Rust.

C++ is especially appealing, because you can embed file-backed mmap allocations in chosen classes by overriding their new operator. So you could for example create a float array class that automagically allocates itself in a file-backed mmap region by a simple new Array() call.

Edit: Python's numpy has a file-backed array:
http://docs.scipy.org/doc/numpy/reference/generated/numpy.me...
Decentralisation is overrated. Email is decentralised, but there are still powerful actors (Gmail, Outlook, Yahoo, DNSBLs). In Bitcoin they're the miner pools, which, while currently diverse and seemingly quite good at self-regulation[0], have ultimate say over who gets to transact what.

In many ways a centralised, but highly anonymous, digital cash system puts stronger practical limits on the power of a single individual. In such a system the the only way the central authority (bank etc) to doctor history, once money has moved out of their hands, is to drive the entire currency in to the ground and start over.

[0] http://www.coindesk.com/ghash-commits-40-hashrate-cap-bitcoi...
" Any distributed consensus system on the Internet must sacrifice one of these features."

is incomplete: a distributed consensus system (which is, at heart, a distributed database) can not have all three features... but there is no guarantee that a distributed database has any of those features.

As with everything else, execution matters.

If you're going to be recording history for financial transactions, you need to put immutability as your first goal. This is not compatible with unlimited space-time separation of trusted inputs, so the second thing you need is to decide how you're going to resolve inconsistent histories. Doing so always involves a centralized trusted system, even if it is fed from a distributed system: someone needs to decide what transactions really happened. You can claim that you have a distributed algorithm to do so (consensus) but that itself will always fall into the same distribution problem.

And that's what seems to have happened here.
Polyresin statues| handicraft gift items
Handicraft Items
So, just another BI/decision support system, which uses this spiral visualization? It is sorta neat it tries to find some patterns for you, but I imagine once your data exceeds simple spreadsheets it becomes far less cool.
https://codewords.hackerschool.com/feed.xml seems to work for me in theoldreader.
If this can work and we can get the gov't behind this sort of solution, this seems good. Wouldn't this create a bit of water shortages downhill though? Like when you build a dam? Or is the quantity captured not on the same scale.

I guess the desalination plant is something that a single rich person can do, whereas going around drilling holes all over California is a bit more complicated. Sometimes we come up with solutions that work well in Sim City, but reality proves a bit more complicated.
$200 adsense earnings with 5k visitors? That's must be a misunderstanding. That would be a CPM of $40. The best I ever heard of is $8.
Awesome!
This goes right into my userscripts.
90% of all photos posted on the internet contains a human face. Having a human face as a test picture makes perfect sense and this one has been used forever so it's a good benchmark that people can compare and relate to. It's not like she's totally naked or anything like that either.
The problem is that there are many languages that can do the job better and faster (especially in the non-compiled world). By arguing that "PHP is good enough", you're effectively arguing for mediocrity. Regardless of whether it's "good enough", it still isn't the optimal solution, and calling it subpar is still justified.
On-Disk Microbenchmark: Embeddable Key/Value Stores
>Why go with PHP and have to roll your own framework, when you can go with something else, and leverage all the great work that has been done by the Django/Rails/whatever folks?

To be fair, no one has to roll their own framework in PHP, it has frameworks aplenty. I don't know why anyone would do that.
So the problems are real, it's just that XML and XSLT (and now JSON schema et al.) solve them badly (to your taste)?
I can't help but notice how virtually every PHP "proponent" is arguing how PHP is "not completely terrible", rather than arguing how PHP is "good". That's rather telling.
The issues are not big enough for most people to care. So I would question how big those issues are from anything than a puritan point of view.

They obviously does not hinder you from creating successful companies and that is frankly all I care about.
"XSLT? I has it."

http://www.youtube.com/watch?v=CjWYbcbpiWA

:)
Try Node.js, with Express if you plan on doing web development.
I don't approve of censorship, but for a counterargument:

I think it is good that there exist websites dedicated to free speech, where it is possible to post content disapproved of by governments.

I think it is also good that there exist politically neutral websites dedicated to technical work, relatively un-interfered with by censorship. (Not everyone has the means to set up VPN, and even those who do, would sometimes rather be getting on with their jobs instead of dealing with that.)

It strikes me as necessary and appropriate for these to be separate sites.
I was a bit unclear. When I get database dumps, I get them as Excel files or as an XML document.

Most of the times the documents I get are hierarchically structured.

Yes, JSON could be fine as well. But it simply lacks a standard toolchain which XSLT ans its ilk proides.

I am not trying to defend XML in any way. I just want to say the two things:

a) my customers never deal with JSON, but often with XML, so JSON (and other formats) are not an issue for me
b) There is a very nice toolchain for XML, including formatters, tranformation tools, database publishing tools (my very own: https://speedata.github.io/publisher/index.html) and many others. I have not found such a toolchain for other formats.
Nice strawman.

Thats not at all what people are saying.
Also: https://github.com/rossgoodwin/plotgen Generates novels from tvtropes.org and erowid.org
Some reasons I can think on top of my head. (Which mean this may not be actual reason for mailchimp).

First is ease of finding developers. This may not be so true now, but the post is from four years ago.

Second, and this may be more important: when initial prototyping the original developer is most fluent in PHP, thus he/she hack away first version in PHP. Thus this make the system PHP-based.

Personally, while I know the goods and awesome features of Rails, Django, etc. my most fluent language is still PHP (from using it years ago). If I happen to have some awesome idea to implement fast, I would still do it in PHP.
For something more or less related, check out the calculation of the date of Easter: http://en.wikipedia.org/wiki/Computus. Some versions, like Gauss' algorithm, also relied heavily on moduli.
I took a KI(RF)SS stab at a JSON schema description language, attempting to avoid the insanity of the XML world but still provide a bit of structure for JSON, a while back:

http://jschema.org/

Haven't touched it in a few years, but I think the core idea is sound: as much schema as can be packed into 15 additional productions beyond the original 15 in the JSON spec.

I wrote a typeloader for Gosu based on it:

http://vimeo.com/29348322
Perhaps it mean bad as in not deserving of much praise, and terrible as in malevolent.

Such a word might be a good description of, say, reality television.
It's not a strawman; it's what I'm observing from not just this thread, but also other discussions in the past.
I don't understand the reason for the quotes around 'proponent', but it's perfectly reasonable to say that, yes, despite its flaws, PHP is adequate for its purpose. There are valid reasons to choose it, and valid reasons not to.

Of course, you could say that about every language, and many do[0].

[0]https://wiki.theory.org/YourLanguageSucks
Hello. PHP is good. It is still far faster and easier to put together a website in PHP than any other language. It has enabled millions of people to become web developers. It powers about 90% of the web and best of all it offends language snobs
"Leftist ideology used as a vehicle for tabloid clickbait" would be more accurate.
Modern SSDs can handle a thousand years of use
> nonsense and false information

Such as?
I wrote an API at work which was originally written in Laravel because it was fast to prototype in.

I've since replaced it with my own "framework" which is mostly a very thin wrapper for several really good packages (router, DI container, events dispatcher and query builder wrapper).

I'm getting 10x performance out of it than I was with Laravel, and overall it's a very small codebase which is easy to understand and test.

So yes, no one "has to roll their own framework in PHP", but there sure are advantages to do so if you know exactly what you need and how to get there.
I put quotes around "proponent" because it applies to pretty much all arguments I've seen in favour of PHP, not just those of people who try to actively 'promote' it. I couldn't find a more accurate word to use there, really, so I settled for quotes.
> ...how you're going to resolve inconsistent histories. Doing so always involves a centralized trusted system

False, the Bitcoin system resolves inconsistent histories in a completely decentralized manner.
I've seen XSLT done well, and I've seen the mess it can be when written by someone with only a passing knowledge. As a consultant I usually have dealt with the latter, and that usually goes hand in hand with a poorly designed XML schema.

One space that XSLT can demonstrate its strength is when transforming some horribly serialized interoperability data structure. If the system from which you are receiving data, produces terse XML, you aren't going to solve anything by rewriting the upstream system to produce equally lousy JSON. If you don't have the ability to fix the upstream service to produce better structured data, XSLT and XPath are wonderful tools to morph it into something more manageable. That transformation process is better written with XSLTs than it is in trying to do the same thing by slurping the data directly into some business object and trying then to work with a bad model. Don't go down the path of "garbage out, garbage in."

If you have access to both sides of the process, it might be worth rewriting the upstream system, but when working with a legacy system XSLT might be the best glue technology in your arsenal.
I don't agree that Stellar is an "obviously inferior" technology. Stellar just makes different tradeoffs.

I particularly enjoy this quote from http://adamierymenko.com/decentralization-i-want-to-believe/:

A centralized alternative to Bitcoin would be a simple SQL database with a schema representing standard double-entry accounting and some meta-data fields. The entire transaction volume of the Bitcoin network could be handled by a Raspberry Pi in a shoebox.

Instead, we have a transaction volume of a few hundred thousand database entries a day being handled by a compute cluster comparable to those used to simulate atomic bomb blasts with physically realistic voxel models or probabilistically describe a complete relationship graph for the human proteome.
Fair enough. If it's lightweight then it makes sense.
What does that mean, "thugs and a##holes"? Is Uber depriving people of their property or forcing them to do something against their will? Are they driving around blaring unpopular music and loudly pointing out poor fashion choices?

I'm no huge fan of Uber, but when I read this story it isn't Uber that strikes me as acting like thuggish a##holes.
JSP is an improvement on PHP, I've heard.
Vacuuming the ATLAS detector
> and deployment is as hard "git push gandi master && ssh login@host 'deploy default.git master'"

That really isn't on the same level as "ftp index.php to shared webhosting provider" for most people and that's exactly the point the parent comment is trying to make.
If You Can’t Beat Diseases, Domesticate Them
Hackers Send Emails to Sony Employees
> Why is is so difficult to just remember?

Probably because there is almost a pattern, but not quite.
Although it's too close to one day, that it might be a bit unethical to say it were two...
That's a shame, it'd be nice to have a formula that "wrapped around" properly.

I've been happy with the rhyme for a while. I can't remember it properly (in my head it ends "all the rest have strawberry jam, except my grandmother who rides a bicycle"), but it's obviously enough.

Now that I see it all laid out, though, I wonder if I can do better -- "Odd is 31 days to July, then it flips." Now the people in school counting on their knuckles all makes sense.
From Flickr to Slack: B.C.'s Silicon Valley golden boy finds success in failure
Your customers in the field you work in, perhaps, but it's hard to tell that's what you mean when you write data exchange. It's a wide field that is not limited to the publishing business or your customers.
Lands – World generation using simulation of plates, rain shadow, erosion, etc.
Are there similar resources for social sciences, preferably marketing/micro-econ.? And also preferably in R.
>>Benefit #1: Portability

> You know that a technology has got serious problems when the best thing you can say about it is "well, it is at least preinstalled everywhere"!

... plus it's not even true. For any collection of XSL stylesheets, representing any kind of real world complexity, the chances you can port them as-is from A to B is highly dependent on which XSLT features were used (1.0, 2.0 and now 3.0 ), what the XSL processor supports plus "host" framework idiosyncrasies ( Java, .NET, PHP ( http://php.net/manual/en/xsltprocessor.registerphpfunctions.... ! , etc. ).
In Java the thirteenth month is "Undecimber". Works better for me, I always associate Smarch with lousy weather.

http://en.wikipedia.org/wiki/Undecimber
cat-v is actually pretty nice. A lot of their stuff looks a bit like "Oh my god, why" and "That person just doesn't have a clue". I thought the same with so many technologies that I got into. I always thought KISS was nice and I always felt like abstraction is a good way to reach that KISS.

Turns out it is not. Things can fail, really badly even and they do fail, really often even, even when there are companies with big pockets standing behind it and then good luck debugging the mess. This is true even for really proven technologies, but might be less obvious on those.

At some point when you are good at some technology, even if it's really popular, mainstream, be it some big SQL database (yes, all of PG, SQLite and MySQL even though I love some of those), C, C++, Java, C# or Python/Ruby/Perl/Node.js you will constantly end up with the implementation of the underlying technology.

I am not saying XSLT or any of the above don't have their use cases, but actually that a lot of them are over-engineered. Using most of these technologies I know there are issues, send bug reports and patches and hey, things get fixed really quickly. That's all good and you never can fully avoid these things, but the more simpler you get the less there is that end up biting you and causing you to start out with lets say you having your SASS to CSS compiler having an issue, digging deeper through every library finding a GCC bug or whatever. Such things happen.. more often than one would think. So based on developer pay and the issues it causes (often being a blocker for a whole team) that's actually a really big problem.
I once braindumped a similar idea on https://github.com/eteeselink/relax-json (inspired by RELAX NG, one of the few great things to come out of the XML world).

A core difference between it and your JSchema is that it, itself, is not JSON - just like XML, I don't think JSON makes for a good format to write down schema definitions. In fact, I don't think JSON is very human friendly at all[0], which is OK for a data interchange format, occasionally read by humans but hardly ever written by hand.

I did not further develop RELAX JSON, however, when I realized that TypeScript interface definitions[1] are a great JSON schema language:

enum Color { Yellow, Brown };

interface Banana {
color: Color;
length: number;
}

interface FruitBasket {
bananas: Array<Banana>;
apples: Array<{color: Color; radius: number}>?;
}

It's best to use interfaces and not classes, because interfaces allow for optional fields (with the `?` suffix), which is pretty common in APIs and wherever JSON is used.

I will write a validate-JSON-with-TypeScript-type-definitions checker as soon as I find a need for it. Open to ideas here, guys! (or alternatives)

[0] Compare gruntfiles to webpack configs (tl;dr: they're JSON and JS-that-returns-an-object, respectively. the latter allows code, comments, unquoted keys, etc etc).

[1] http://www.typescriptlang.org/Handbook#interfaces