skysight-inc/HackerNews huggingface dataset:
I believe gw's intended notion of a data structure extends beyond Lists and Hashmaps. For example consider the following two structs.

struct Point { int X; int Y; ... }
struct Size { int Width; int Height; ... }

In either case the data structure is (int, int). But they're typed differently: one is typed as Point and the other as Size. This makes it very annoying to write functions that are compatible with both. Let's say we write

AddThenSquare(Point A, Point B) {
return new Point((A.X + B.X)*(A.X + B*X),
(A.Y + B.Y)*(A.Y + B.Y));
}

To make Size compatible with that function you need to either refactor your code so that both Point and Size adhere to the same interface, or alternatively implement conversion functions. The latter option is what C#'s .NET framework opts for where Point and Size are taken as parameters to each others constructors. But it doesn't scale. What happens when you use a third party math library with its own point implementation? Your number of conversion functions grow by n*(n-1) where n is the number of classes that need to be converted between. To be fair I think C# has technical reasons for not having an interface between Point and Size (structs don't play nicely with interfaces) but even if it was included it would still be a royal pain making sure all other math libraries adhered to the same one.

In practice it's rare anyone will have the foresight to put interfaces everywhere they're needed, and it's even rarer that programmers will use the same interfaces across libraries. It begins to sound like the "specialization within functions that inhibits and penalizes casual cooperation" that Alan Perlis was talking about.

At some point you start to wonder why the compiler cares at all what the name of the data is if the underlying information is the same. You could have dodged the headache altogether if you were in Python where a point is a tuple (x, y).

Still I'm not convinced static typing is to blame... it's more that the kind of static typing employed by Java, C++, C# is especially rigid.
I got into beekeeping recently, and it's like this, except applied to everything.
Often different editors on a project (hell, even between computers for the same user) may display the same file different ways, and you almost always end up with weird mixes of spaces/tabs when indenting things (especially if you're super picky like I can be and really, really care about things lining up).

Simply having the editor expand tabs (to whatever people agreed on, usually 4 for C/C++ that I've seen) and save spaces, always, makes life simpler.

EDIT:

See Grandpa Zawinski's post on same: http://www.jwz.org/doc/tabs-vs-spaces.html
So... tabs or spaces?
This is a huge speculation based only on personal observations, but I'd guess people who got started coding in editors where a space was only a space, so I could indent with one keystroke, tab or with 4+, spaces.

These days I use spaces, because apparently that what is "correct" these days, but I still press tab. Sublime just turns it into spaces and displays the indent as a tab.
I'm not sure if there's an "issue" with tabs, but I have to agree that I pretty much never come across tabs in any of the languages I use regularly and find it jarring when I do so despite the obvious theoretical benefit of flexible tab widths enabling user preference.

I can't come up with a particularly good reason for it, but I'm so used to spaces at this point that tabs feel very wrong.

If anyone else has a good explanation I'd love to hear it.
This sort of thing is great for messages in real time systems or robotic systems where firing up a JSON parser / serializer just isn't an option. We use something similar in our system but I've had my eye on Cap'n Proto for a while...
When you tell your neighbors that it is your first time, they will gut you ever so quickly. New players are usually just too unpredictable and unreliable to trust. Best you can hope for is to promise to be someone's slave and do exactly what they say so maybe you can avoid being the first one eliminated.
No, Fitz is not advocating tabs over spaces in coding. He is saying gofmt loses a large part of its purpose if it does not enforce a particular style, and the Go devs happen to prefer tabs.

It sounds like he's fine w/ anyone using a tool to format by spaces.

That said, this is quite un-newsworthy.
> "professional artist"

I understand the novelty of drawing on an iPad. But I've tried it many times and it's just not accurate at all. You just have to look at the tip of those pens to understand that. IMO Cintiq is the only way to go if you're serious about "art". On the other side, if you use that kind of things for notes and rapid prototyping, why not.
Was the recursive "every package include its dependencies" done just because it was easier? Or was it a conscious design choice.
There's a sequel out now, at http://triton.ironhelmet.com that has the option of progressing time in steps once everyone confirms orders.

So you can set it to 12h steps, get payday every 2 steps, or whatever you feel like. With the right settings, if everyone is active during the day you can get maybe 4 or 5 steps complete and then nothing happening over the weekend.
A modern front-end stack looks like:

For structure/content: raw HTML, or less commonly a language that compiles to HTML (Haml, Jade, etc.).

If the HTML is being rendered and served from the backend, you might use a templating language like Django's templating or Jinja (Haml and Jade also have these features).

If you are creating an application that does a lot of AJAX, you will also often use a JavaScript templating system like Handlebars.

For styling: raw CSS, or fairly commonly a CSS pre-processor like SASS, Less, or Stylus. Very often you will use a CSS framework like Bootstrap or Foundation to give you pre-made forms, buttons, grids, and other essentials.

For logic/interaction: JavaScript. Many people will also use compile-to-JS languages like CoffeeScript, TypeScript, or ClojureScript (in decreasing order of frequency). There are a lot of libraries/frameworks that can be used here. Most commonly you'll use jQuery and jQuery UI widgets. For more complex applications, single page app frameworks like Backbone, Angular, or React come into play.

Build process: For more complex projects, build tools like Grunt or Gulp to watch for changes to the filesystem and re-compile files (typically when you're using CoffeeScript or a CSS preprocessor), to package everything for deployment (minifying JavaScript, etc), and to run tests.

Packaging: Often you'll use a tool to keep track of modules/packages. These tools are quite different. Bower, RequireJS, Browserify, Component, and other tools occupy this space.

Often you'll use Node's npm to keep track of build process and testing packages!

Testing: For testing you'll often see frameworks like Jasmine or Mocha/Chai for unit tests/integration tests. For end-to-end tests you might see things like Selenium (run tests in a browser window). There are also test-runner frameworks like Karma.

Debugging: Chrome's developer tools (or Firebug/Firefox/Safari).

For someone starting out this is probably overwhelming. The important things to realize are that:

1) No one uses all these tools

2) Most of these tools are only useful for large complex codebases with large teams.

2) The most common stack is raw HTML, raw CSS, raw JS, jQuery, jQuery UI, Bootstrap, no build process, no packaging, no testing.
And what's great; no Go developer will notice.
In the time I spend writing e-mails for one turn in an on-line game I probably could play most of a face-to-face game.
Unfortunately that thing looks terrible. Looks like a generic iphone with ugly android wrapper. They really need something flashy to somehow pull it over rather than have any new features. Afterall smartphones are still status symbols for a couple more years.
Reading: The Struggle
I'd say it's newsworthy to large Go shops that use spaces with gofmt and now have to change indentation in their repos. This isn't insignificant. Also it requires additional flags for things like blame/diff to ignore whitespace changes.
Any ideas in the following "solution" that could work? I am sure there are problems with it, but it contains a general approach I have not seen suggested:

If a miner wants to be part of a pool they must publish their participation in that pool (signed with their private sig) prior to the next block being worked on (or longer if deemed necessary, we are still talking minutes). They can only change pools once a day. Anyone in the pool solving the block will result in the block chain dividing the winnings among the pool.

Then there is a rule that no pool can win more than once a day (or some other time limit).

This allows small miners to pool together to reduce their risk, while incentivizing pools to stay under a certain percentage of computing power as going over that would actually decrease their expected returns.

Small miners get the complete advantage of reduced risk, while large miners are incentivized to stay under a limit.

This may not be a foolproof solution, but perhaps it contains elements useful to a solution.
Grabbing some Clojure code because it's nearest to hand.

Look here: https://github.com/clojure/clojure/blob/master/src/clj/cloju...

I want the bindings being declared within that let to line up with one another. the first one immediately follows "(let [" so I need the rest to be indented six characters past where the let was originally indented. Six, not N times whatever the tab width happens to be in whichever editor someone's looking at the code in. This is the problem with tabs.
Can you give some examples? I'm really curious.
Well at least there is no possibility of conflicts(unlike some other pm). The problem is people writing modules that have like 1 function while requiring 10 other modules that have just 1 function themself that require 10*10 other modules ... Of course it doesnt scale,and of course the package manager wont scale either...

But it's not a NodeJS problem it is a NPM problem.NodeJS has other problems though(the lack of governance by a dedicated foundation is the most important one,the obvious second one is nodejs dependency on what google does/doesnt do,since google maintains V8).
The right way to solve all this tabs/spaces indentation mess would be to use Elastic Tabstops¹.

1) http://nickgravgaard.com/elastictabstops/
I do. Tabs are universal. Three indentations? Three tabs. The same cannot be said for spaces. You have to agree upon the width and make sure everyone sticks to that width.

Now, with tabs, anyone may customize how the width is VIEWED, but the representation on disk is universal.
Seems like hosting it on GitHub Pages would accomplish that.
This closes off some avenues to you, but isn't a career killer, particularly if e.g. you work in security. (Of all things.)

I don't know why you'd disclose this without first being asked. If they don't ask, it isn't because they don't want to know, it's simply because it isn't in their decision calculus. I would not inject it into their decision calculus, in the same fashion as I wouldn't say "Don't have great reasons to not hire me? I can think of three!"

Your recent potential employer has a curious understanding f how much VCs notice non-founder employees, to my understanding. Feel free to check that with people who do this for a living, but I'd bet on most VCs being unable to name non-founder non-management employees, to say nothing of running background checks on them.
The way people solve that is tabs for indentation and spaces for alignment. In my opinion this is a terrible compromise as mixing tabs and spaces is sacrilegious.
The only interesting part of this comment was learning that the article has a 0 for an o in it.
It seems like a pretty silly argument. As long as there's a standard defined, any competent text editor can handle it for you. Go now has a standard - use tabs instead of spaces - and so the debate is over for this language, everybody set your editors accordingly.
gofmt already uses elastic tabstops.
Their source control will notice.
Virtually every Go programmer does, at least.
Are you downvoting me because you can't stand different opinions?
MySpace's website before they turned into a social network
No, Arial Unicode MS: 22,1 MB. https://en.wikipedia.org/wiki/Unicode_font

And you clearly don't understand that a) this thread contains unicode that my browser still doesn't show, despite your magic fallback and b) the fonts stil contain garbage that has nothing to do with fonts.
no such large go shops exist.
I'm personally in the spaces camp but my favorite point in favor of tabs no one has mentioned is all of the bytes you're saving. In a large codebase you can save kilobytes to megabytes by switching from spaces to tabs. :)
i'm doing a lot of json encoding/decoding in a web app. does capn proto or another help speeding up? it seems like it is not like one funcion call to use these.
Why would you want to write a function onto such different data types? Yes, both are (Int, Int) but the elements of the 1st one are not correlated and the elements of the 2nd one are (somewhat) correlated.

I can't think of a meaningful function that should be able to support both Point's and Size's. Except for prettyprinting or serialization maybe, but that can be handled in statically typed languages, no?
Fun fact: the airlines are still regulated as common carriers, even after much of the deregulation.

No one is arguing for the FCC to set pricing, and having a universal service fund for broadband makes sense. USF funding was always levied at communication providers, not folks like plumbers that used the communication system.

Your arguments against common sense, limited regulations of the most important communication infrastructure in the country are a whole bunch of FUD. There's no way the FCC is every going to start charging email providers or taxing What's App.

I can see some sort of argument against the VoiP tax if there's a USF for broadband, but honestly, it's not a precedent that's heading anywhere.
Getting 404 error.
English autological terms
Your Company Is Not a Family
Nice Amazon affiliate link
The title looks exaggerated. I thought NodeJS cannot just run on Windows anymore. It's not the case though, it does - it's just it creates folders that are nested.
Me too pretty sure it's not a bad link though
There is nothing wrong with mixing tabs and spaces. It works great.
To each their own I guess. I would call this the "what you don't know can't hurt you" approach. What would this threat and risk analysis be based on? Known threats? Unknown threats? How can you quantify "proper"?

In my opinion, if the threat could actually be defined, then there would be no security industry. Everyone would know the answer, and everyone would be secure. The reason this industry exists is because you cannot define the threat, it is constantly evolving. Doing nothing because it does not matter (really?), or justifying a lack of security by lowering the value of the customer's data sounds like an unprofessional approach.
The Writing's On the Wall (Made in one cut)
Well, ideally, the "new resource" is also genetically matched living brain, and given the plasticity of brain tissue, and maybe by way of a novel as-yet-uninvented means of coaxing, the two would mutually recognize the severed gap between the two pieces, and heal back together. I mean I'm not a brain surgeon, so I'm operating with possibly a great deal of very wrong assumptions about how the brain recovers and heals from lacerations.

Would it be like trying to mend a spinal cord injury, which we still haven't quite mastered? Or since it would be surgery, would the brain take to it like rejoined pieces of healthy brain tissue, after the removal of a malignant tumor? I suppose a lot of that would depend on the quality of the custom grown tissue, and the technique of the operation.

Either way, nerve cells are essentially highly specialized finicky amoeba, with dendrites acting as elaborately decorated pseudopods. They don't quite "swim" like white blood cells, but sort of creep along, and test each other out, delicately and selectively. And apparantly human cells can specialize to the point where a single cell can recognize key concepts of individualized external human identities (the article mentions Jennifer Aniston and Luke Skywalker).

So, in the sense that dendrites are pseudopods, and pseudopods are, along their external surface, celluar membranes (lipid bi-layers, decorated with embedded proteins), the proteins are the specialized structures that ultimately drive the behavior of the cell to direct it's psuedopods this way or that way. It's a mixture of chemical reactions all the way down, even if there is a layer of very fundamental electrical processes mixed in, due to the deliberately maintained PH value, and shifting electrolytic potential of the chemicals involved.

There was an article describing brain behavior as analogous to a swarm of ants. This makes sense, since ant communities guide their collective behavior by tagging their territories with scent, which gets reinforced with increased ants marching along pathways. So, at the end of the day, some kind of transplant process would probably require an arm of research tackling the micro-scale and nano-scale structures and living behavior of the tissue, but also the chemical aspects of how neurons sniff each other out, and decide to stimulate each other through the electric polarity fluctuations of their electrolyte juices.
Personally, I consider the way Node does module loading one of its best features. No need to worry about version conflicts, because every module can (optionally) pull in a specific version if necessary. And no need to worry about constructing some ridiculous environment variable, because of the implicit relative pathing.

I've been writing Python and Go for the last 12 months, and by comparison their module systems are absolute disasters.
Is it that unbelievable to you that a company that previously used other languages with spaces for indentation would desire to have a consistent indentation policy, especially considering that up until now the tooling supported such desires?
I predict that this change will be reverted in a few months when the Go team realizes that code is read in a lot of different places, most of which never display hard tabs correctly.
This definitely seems more like a Windows issue than a Node issue.
Ask HN: Can we get colapsing comments?
Hi, could we have the comments at least the top ones to have a colapsable > on them?

The reason for this is that sometimes the discussion on a post is not relevant to it but it gets to the top of the comments for some reason. And I have to scroll through a huge block of random things to get to the actual comments. Which is very confusing since it's hard to get the indentation of the lower ones without seeing the top.

So I would like to be able to close that just like in any IDE allows you to do in order to read the others topics.

What do you think?
What percent of the node.js community will this effect?

What's the design reason for Windows tools to only have a max of 260 file path chars? If it's not the OS, but the tools he is using, why not use tools that work? Isn't this the tools bug?

Honestly, if he is doing web development, his life will be easier with a linux distro.
What is Flash Fiction? Can everyone become a Writer?
Until Python. Then it doesn't.
Some annotations of my own, all coming from memory and experience.

The theoretical basis for most collision algorithms is the separating axis theorem(SAT). It simply states that for any two convex shapes there exists an axis partitioning them - and as a consequence, deriving this axis(the algorithm of which will depend on what kinds of shapes you're working with) gives you the collision boundary of the shapes.

What SAT does not do is specify how to resolve shapes that start in an overlapping position, how to resolve turning more than one axis of movement into a _single_ axis of separation, and how to resolve overlaps of more than one shape. Those things are all where a lot of collision code goes astray. Some solutions to these problems include:

Maintain either a "lookahead" of where shapes will be in the future based on their physics parameters, or a "timeline" of previous shape positions; then the collision resolution can incorporate this information to determine direction of travel prior to the moment of collision(and thus accurately approximate pushout, bounce, etc.)

Perform collision resolution in a buffered fashion: before changing position state, create "plans" for movable objects. Test the plans in multiple passes to ensure that they satisfy all the potentially colliding shapes.

Step along the axes of movement in independent collision steps; e.g. first you test to go up, then you test to go up and right, finally you move. Stacking each axis on top of the previous in a fixed order ensures that at no point is the colliding object "squashing" one of the tests when another passes(which causes typical stuck-in-walls glitches). It causes a distortion to appear when travel is diagonal, but its impact depends on the speed of movement and whether "cutting corners" matters.

Alternately, one may test each ordering and choose a "best" one heuristically so that diagonal movement is consistent in all cases.
Right on, thank you for the thoughtful reply. Much appreciated.
> Your psychiatrist might be uninformed or maybe what he means

I think I am able to judge the competence of the doctor I am using, and, as their patient, determine the value their opinion better than a person on HN that happens to read a lot on the Internet and quotes an article with gaps in logic and no scientific proof that mushrooms actually help cure mental illness in people.

> In fact, I bet it would be detrimental for the whole industry if you could treat your mental issues in one or two settings and not use expensive psychiatric drugs for years.

Yeah, I bet it's the same with diabetes and cancer.
Structured Generative Models of Natural Source Code [pdf]
Just want to chime in as a regular requester here - mTurk is a major part of our business, and we've found that treating mTurk workers with respect (answering their emails promptly, communicating with them on forums, giving a fair pay rate) results in extremely high quality work that we can verify as high quality.

Our trick is to give a slightly lower base pay rate and then give bonuses to workers who provide higher quality work so they're more likely to come back. We watch our turkopticon ratings very closely to make sure we're doing right by them.

There are a lot of bad requesters and a lot of bad workers, but if you know how to use it the work can actually be immensely valuable. As a requester, having workers voluntarily post your HITs to forums and /r/HITsWorthTurkingFor/ tends to drive the largest number of high quality results.
Sorry to hear the sad story. But there is always hope.

Start taking 5000 UI vitamin D daily and buy 10K LUX lamp which you should use for 1 hour a day minimum. London is a gloomy city, overcast most of the time (from what I remember). Most of us are Vitamin D deficient (dwelling all day) and lack at least 1 hour of direct sun light. This affects our mood (leads to SAD) and spirals into depression. Get a blood test to confirm vitamin D deficiency if you need the additional data / motivation.

Before making any major decisions like quitting jobs or similar address your body's biological needs to balance it out. And then when in good spirit and mind make the right decision.