skysight-inc/HackerNews huggingface dataset:
> Do you consider any function which may raise an error to be "dynamically typed", then? (For example, any function which performs an array index; or any function which performs I/O; or, to be absurd, any function which allocates memory (since memory is a finite resource that may run out).)

That's a good question! Yes, in an idealised sense, I do; but, in practice, I think that I would make an exception for functions where the error comes from the host system, not from the program. (For example, if I were too strict about it, then I would have to disallow even the safest of Haskell functions because it might be executed on a computer whose hard drive is failing.) Thus, I would call Haskell's `head` function dynamically typed.

> Admittedly, gradual typing does not mean that calling into untyped code from typed code is "safe" from runtime type errors (although it is safe in the technical preservation-and-progress sense).

I think that I don't understand the definition. Isn't encountering a runtime error precisely getting 'stuck' (in the "opposite-of-progress" sense)?
Makes you wonder doesn't it, the dollars that got spent to have something blatant happen. Its not an industry I'd like to be in, with everything so compromised.
Ways to Get the Unemployed Auto Loans with Low Rate
> Plus JQuery - I don't see a point in doing it the Scala way when JQuery and other libraries are just as efficent and I will likely use them anyway.

I won't speak about Scala in particular, but using a statically typed language with a strong type system is much more about safety than about "efficiency" (whatever this means). Javascript is brittle, and the idea of doing any kind of refactoring on a large JS codebase is terrifying. Compiling to JS from a more typesafe language makes sense, and you can write bindings for most JS libraries.
A permanent vacation
You can look here for code examples for a given problem: http://rosettacode.org/wiki/Category:Perl_6

We also had an online training about binding C-libs (the first online training that I know of), but it was not recorded. Perhaps we should do so and put it on a youtube channel...
I'm curious to know the size of a scala.js hello world program.
Ask HN: GL Structure for Enterprise Software Startup?
We are an enterprise software company. We have about 50% of our revenues come from professional services, and the other 50% come from software sales. Our client count is very low and will remain low for a long time to come (<10 per year).

We are in the process of putting together some formal structure around our accounting. In particular, we are trying to decide what "cost centers" to include in our GL (general ledger). Our accountant suggested making one for each customer, and by breaking out the costs by "whatever we feel would be useful". However, when we asked for specific examples we got an "it depends" answer.

I would love to know if anyone has any resources they can point us towards to help answer the question. Or, if you can share your own anecdotal advice about particular things you found helpful to have in there.
A lot of people want money to be they deciding factor for success, even across the political spectrum.
:D
Was trying to demonstrate that its possible to set boundaries on the food items you pick. If I set the cheese requirement @ 0 (technically min=0, max=0), I can double the amount of bacon I get. It allows you to decide which is more important: Cheese or Bacon.
Very good analysis.

I think free university education is part of the solution.

It forces people to get over the neck of the hourglass (because all the competitors will have a degree). Yes it leads to worse level of university education, you cannot avoid that, but as long as it's over the neck - it will allow people to learn more on their own (we have internet after all), and they will have motivation.

This works in Poland (big unemployement 20 years ago might have been a big factor too - everybody knew that your kids must learn English and get M.A. if they want to have a job).

We had period where "you aint gonna need it" approach to math education was winning (they even made math optional in the final high-school exam), but in the end everybody realised it was a mistake.

The only problem with this model is - it's hard to get the best scientists to teach math to everybody. And hard to make public universities be able to afford the best scientists at all.

So this model produces huge amount of reasonably educated engineers, programmers, economists, analists etc, but it produces few world-class scientists.
What to Get Your Boyfriend for Valentine’s Day
Not everything is about utility for everyone
Top Valentine’s Day Gift Ideas for Her
Speaking of bank opening hours, this is something I really don't get. Where I live, all branches of most of the banks are open only Monday-Friday between 0900 and 1700, which is exactly when most people are at work. Every time I need to visit the bank in person (and 'till recently my bank didn't have cash deposit machines), I need to take half a day off at my work.

It's similar with some services, i.e. barbers. What I don't get is how do they make money when they're opened only when people don't have time to visit them. There must be something weird going on there, otherwise I'd expect the market to force them to shift opening hours so that working people could use those services.
Whenever big numbers are thrown around, there is a need to put them in perspective. However, I don't think "number of meals" or "teachers hired" are good or relevant perspectives.

The UK police budget is about £3.5 billion. So this expense is about 0.3% of that.

The UK budget is about £700 trillion, if I remember correctly. So this expense is about 0.0000014% of that.
Learning Angular Q&A
Okay, yeah, maybe it's like that.
> But what's the alternative?

Training the whole world in an artificial language like Esperanto.
On one hand, this has a cost now even English speaking people have to learn a second language, on the other hand an artificial language is MUCH easier to learn than our 'natural' languages with all their inconsistencies..
Is today a tretår day?
Drchrono is hiring iOS and Django developers, take our hacker challenge
items.map(item => item.interesting_property)
.filter(item => is_wanted(item))
.reduce((item1, item2) => combine_usefully(item1, item2), initial_value)

I'm not a JS programmer, but isn't this just

items.map(has_interesting_property)
.filter(is_wanted)
.reduce(combine_usefully, initial_value)

?
Yes. There is nobody in Sweden with the power to make such an advance promise. It's simply impossible, by law. This is generally a good thing.
Indeed, and I don't deny our ruling class has become an oligarchy, see for instance the recent writings of Angelo Codevilla starting with http://spectator.org/articles/39326/americas-ruling-class-an...

But they, or we, are singularly peculiar. Outside of NYC and DC, all of us with non-felony or domestic violence records can buy serious handguns and rifles, the very same stuff (or better :-) than our police and military are issued. (Machine guns are under a weird regime, but given their very limited utility until you get to the weights of light machine guns or GPMGs, 15-30 pounds, that's not much of an issue, and in most states we can still buy them.)

Historically unique, not counting regimes where it was decided that the reliable subjects should be strongly encouraged to be proficient in the weapons of the day (I'm thinking particularly of the English and long bows, and after Henry the VIII, "reliable" generally meant non-Roman Catholic; I've also heard much less reliably that in old times one or more of the kingdoms in Korea could in extremis muster just about everyone including the women and have a good chance of saving the situation).
Yeah, the Internet Archive e-book reader does it in 1-up layout mode. To change pages you scroll up and down...

most PDF readers work the same way.

I'm personally finding that on mobile, it works better for me than the skeumorphic turn-pages-like-a-book metaphor.
When I hear some people talk about homeschooled kids being "weird", I have to wonder how weird they themselves would seem to others if transported to some other time or place where the local conformists had conformed to a different set of cultural assumptions than those they had conformed to.

What if the local culture had expectations that they found objectionable? I have to wonder whether they would decide to re-conform to whatever happened to be the local fashion in thought and behavior, go along and get along, or whether they would choose a different path and be thought "weird". If they were willing to deviate from unfortunate social norms and risk being different, why not do it here and now?

It matters because I don't take for granted that the current culture in many public schools is the right one to conform to. It would be quite a coincidence if the local culture of the moment just happened to represent the best a human being could be.
Good to see the linked John Pilger piece repeats the disingenuous "not charged" claim
Hey Paul, it'd be great to work together! Although long-term storage isn't a SoundCloud priority right now (meaning it's going to be more of a free-time project with less time allocated), it's definitely important for many others and it would be great to have. I think we should start with Prometheus->InfluxDB write support first, and then approach the more complicated problem of reading back from InfluxDB through Prometheus. What's the best place to get informed about the new 0.9.0 data model?
£700 billion - not £700 trillion!
var is for declaration, set for assignment. This is an important contrast that some dynamic languages miss; ironically JavaScript got it right. Contrast this

var $x = "foo"; if $true { set $x = "bar" }; echo $x # outputs "bar"

with

var $x = "foo"; if $true { var $x = "bar" }; echo $x # outputs "foo"

The declaration/assignment contrast is very important when it comes to closures (and there are closures in elvish). In python 2, for instance, there is no way (!) to assign to outer variables in closures since `=` declares and assigns at the same time in a `def` block.

There are no variable expansions, but strings are concatenated implicitly when they run together. In sh:

echo "hello $name, welcome!"

In elvish:

echo "hello "$name", welcome!"

Implicit concatenation can read a bit weird at first, but it's actually conceptually much simpler and only slightly more cumbersome than string interpolation. It also makes the syntax much simpler.
In Perl a hash is any scalar value blessed into a class

In modern Perl the attibutes would be accessed through accessors so the original example needs tr/{}/()/
> The competitor received 16 upvotes on HN. Easypost's Show HN had 157.

This is important how? Are these ~150 extra up votes really worth $100 each? Really worth 7.5% of your funding round.
Yeah, yeah, yeah, visibility on HN is good but outside the HN bubble I think I'd rather have the 15k.
Hello worlds are about 100 KB not gzipped, but this is not a good measurement. As your application grows, this doesn't grow as fast. Scala.js is meant for medium to large size applications anyway.
JS is both logical and brilliant (and horrible)
Twitter Keeps Adding Features to Prove It Isn't Completely Dysfunctional
It starts with what you know. How much programming experience do you have? What front and back end technologies do you know? What operating systems? Have you built a dedicated server? Have you worked with cloud services? Is this just for you as a side project are is it your work?
New to App Development – Objective C or Swift
Tell HN: Developers.Google.com Down. Throws 500 Server Error
Having spent almost 4 years in healthcare IT. Very few healthcare organizations take security seriously. There is very much a security by anonymity ideal. I worked for a small medical company that had access to 20,000 PHI records, and I was explicitedly told, "why would anyone want to hack us, we are small potatoes." I left that company shortly there after.

Yet companies I work with now big and small look at security as just a bunch of checkboxes on a government audit form. As long as upper management continue to see security as a cost loss center, and continue to only do the minimum nessissary to pass said audits. These breaches will continue to happen.
There are (at least) two trapdoors. The first is that an operation on Rats which would produce a denominator which does not fit in a 64-bit unsigned integer will produce a Num instead. (If you're okay with your denominators growing in an unbounded fashion, you can use the FatRat class instead.)

The second "trapdoor" is that you can just explicitly work with Nums (ie C doubles). If your numeric literal has a exponent (eg 1e-15), it's automatically a Num. Or you can convert any Real numeric type to a Num by calling the .Num method on it.
Having seen this kind of "magic" as PHP calls it, come full force and then largely leave in the PHP ecosystem after we became tired of it, I can't say I miss it.

It's fun to play with but for actual work a clear, strongly defined API beats this sort of syntactic sugar like this any day.
Simple Scala.js JS "binaries" are quite big (from ~170kb before compression) because they add the part of the Scala standard library that they need.

From there, though, output size does not increase fast.
Think of Scala as a library for JavaScript. It's keywords are no more or less a part of JavaScript than jQuery's '$' or CoffeeScript operators.

Unlike CoffeeScript though, using Scala to generate JavaScript does not require attention to the way JavaScript works any more than JavaScript requires attention to x86 instructions when run on V8 via Node.
because we will be sending lots of small data bits, in chunks and one of our main features is 0% impact on performance. Now, clearly 0 is impossible but infinity close to 0 is a good goal to have. JSON is textual protocol, which carries the scheme inside every message, not the most effective use of network data traffic.
- library availability: in Scala.js you have quite a number of core libraries available (see www.scala-js.org), but you also have direct access to JavaScript libraries

- interoperability with JS: Scala.js has its own TypeScript-like definition classes. But you can also interop in a dynamically typed way with the js.Dynamic type. In any case, the interop is very natural. Even the Scala syntax is close to JS syntax so method calls and property access just look the same.

- Code size: not exactly great, but manageable.

- Code speed: Scala.js has a very good optimizer that brings down typical macro benchmarks between 0.7x and 2x the time of the JS version (yes, 0.7x means it's actually faster!)

- Debugging capabilities: because of Source Maps, you basically step through your Scala.js code and step break points right inside your browser. All modern compile-to-JS languages have that.
To put your numbers in perspective: the cost of Julian Assange being kept in the embassy is not policing all of the UK for a day or so.

That is, the cost of keeping Assange under watch is the same as what would be spent on 1 average day of policing for the entire country.

If I were a UK citizen concerned about local crime rates, I'd be mildly ticked off they were spending 1 nationwide police day on some guy rather than dealing with crimes over the entire rest of the country.
A few examples, impressive as they are, do not make the case that most of the world's programs can be replaced by programs of no more than one screenful. If you really know how to do this, you could achieve fame and wealth of Edison-like proportions as the person who revolutionized software development. If all you are going to do is brag about it in HN comments, that is not a profession, it is a hobby.
right, forgot about Avro.

s/“^/or avro”/
Unfortunately, a lot of us with some experience in IP law, albeit none of us lawyers, believe the additions to the master licence have meaning (else why are they there?), and do have a legal effect on the whole of Shen. See the other discussion I linked to for more, plus discussion on the Shen mailing list.

Maybe we're wrong, and you and Tarver are right, but as long as this is a debatable point most if not nearly all of the value of re-licencing has been negated.
The culprit of the 'ugly Perl' meme is the $ character, all the rest is just a rationalisation of the first impression: http://perlalchemy.blogspot.com/2011/01/is-responsible-for-u...
> This wastage does happens only in reference types? Tomorrow say if value types are been created, then these sort of issue will get resolved?

That would solve most of the issue, yes.

> Why of constant zeros? And in the line your saying "-- 1TB is 2^40", your referring 1TB of cache line?

He was not referring to cache line or anything like that. He was referring to the fact if you can address just 40 bits, upper 24 bits in a 64-bit pointer are wasted in a pointer. I think on x86 real virtual address size is currently 48 bits, so upper 16 bits are "wasted". This wastage will occur with heaps larger than 32 GB when using compressed pointers JVM option. And of course 4 GB (or 2 GB?) with that JVM option disabled.

Similarly, if you use "bool" type, it still takes a byte in current JVM implementations. So you could say 7 bits are wasted there.
Awesome points. Thanks for the feedback. You're right, target audience is pretty niche. Bodybuilders, figure athletes, gym rats, etc.

I probably didn't communicate it well but the value of the tool is this: How do you build a meal that meets your diet goals (fat, protein, carbs) given that foods have a mix of each type.
Exactly, capital over the past couple of decades has been unfairly undertaxed vs labour which has been overtaxed to some degrees in places.

If we don't alter this course we, I fear will end up at early 1900s distribution of ownership with a crippling economy because actual growth driven by labour will significantly decrease.
A polite, rational conversation does not get high viewership in the media. Television, radio, print all focus on the fringes because that's what generates viewers/listeners/readers which in turn creates revenue.

People in the US can agree on a great many things but media allows them to self reinforce extreme views. There are no requirements for balanced journalism reflecting reality. When 95% of experts agree on something and get the same 1 minute of air time that a representative of the 5% get it creates the appearance that both arguments have equal value.

I can't fault media companies for catering to extremes because they are businesses and the model has proven to drive more revenue. I don't think this will change until the public starts rejecting fringe reporting (not likely to happen anytime soon).
Comparing iOS and Android: Life Cycle Hooks
The reason I've written that comment is that I believe Perl lovers can, based on feedback like that, make better decisions about how to present their favourite language to the world. So if I would read a few articles on HN about how problems got solved with Perl in a way that Python wouldn't be able to, then I might start learning Perl soon. That's why I wrote that comment. Not for you guys to feel bad about your favourite language, but about helping you to present it better to people who don't know it yet.

The strong features of Perl that I know (which might be completely wrong): Regex and huge library. Both features are not distinct to Perl anymore though. Perl's regex might be a little better than Python's or AWK's but probably not enough to make it worth learning it.

And yes learning a new language to level that you not just know the syntax but also a few of the important libraries, blogs and developers is a huge task that takes several months. If you are not a student any more you really need to think hard before you commit to something like that. Sure there are people who just learn new languages for fun as a hobby. But that's not your target audience if you want your favourite language to become more popular.
That’s a good and very viable option to consideration, and is a factor for when you start focusing on the direction but I think it’s unwise to being with narrowing down the options based on such constrains as IMHO this does not lead to the optimal solution but instead to a compromise.

// (btw, totally OT) If you’d like to know where I’ve learned about this reasoning, kindly introduce self to http://hpmor.com (chapter 35-45, can’t remember more specific than that).
http://funscript.info/
Yes, one thing that can be done (in future) with elvish is writing wrappers for external commands that run the commands and convert their (bytes) output to strongly typed values.

For instance, `ls` outputs a bunch of lines where each line is supposedly a single file name, but this breaks when some file name contains a `\n`. It is possible to use `ls -b` to escape special characters, but now you have to un-escape the filenames when you pass them to other commands. With elvish it is possible to write a wrapper around `ls` that actually outputs a list (yes there are lists in elvish) of strings and each member of the list can be passed around without un-escaping.
Why computing’s Big Crunch will make liquid cooling inevitable
I think you could figure it out pretty quickly by tracking/making your own purchases.
Harry Potter and the Methods of Rationality (the podcast)
> The UK budget is about £700 trillion, if I remember correctly.

Almost, but the GDP of the entire world is less than 10% of £700t.

You're remembering £700b, which is roughly the UK gov't spending.

Whatever the number, a huge chunk of government spending is allocated to this bit of theatre, aimed -- as far as I can see -- at making sure the UK looks like a good ally to the US.

Anyone who thinks this has anything to do with an extradition to Sweden on sex-crime charges is a tool. The UK police don't just drop £10m on extradition compliance for one suspect.
I look at Google Glass as this decades 'Segway'. Hyped beyond all proportions, it failed as a mass market product, but found enough of a niche that you still see them to this day.

That will be the future of 'Glass.
Many of those statements aren't things where I merely disagree. They are factually false. There are plenty of examples of cartels forming in free markets without government intervention. The Silicon Valley wage fixing agreements is one recent example, but there are lots of others. It is quite, quite possible to do DoS attacks on Tor services (you don't even need the "distributed" part, but could do it anyway if you wanted to). Libertarianism is not the same thing as agorism under any definition I know of. He says in those articles he wouldn't allow weapons to be sold that were designed for use on crowds, but the Armory sold sub-machine guns. And so on.

Look, it's OK to be emotionally invested in some of the ideas Ulbricht stood for. That doesn't change the fact that many of the statements he made are flat wrong or simply contradictory.
If you think of the network as part of the memory hierarchy, transferring data to nodes in a distributed system is usually slower than even spinning disk storage. About the only thing slower are USB, floppy drives and tape.

So basically big systems only make sense if the computation time on a single system exceeds the transfer time off of that system to the remote nodes + the time for that data to work it's way up the local node memory hierarchy.

This can happen when the data is big and the computation has unavoidable serialism in each part of the computation. Otherwise you'r likely to be able to coax a single system to just do it faster and with far less complexity than working on a compute cluster.

(I'm ignoring big systems with fast shared memory, like classic super-computers, where there effectively is zero transfer time since each node uses the same memory pool)