skysight-inc/HackerNews huggingface dataset:
Ask HN: Algorithms for inline comments?
I want to put inline comments on my blog. Like GitHub allows you to do (or BitBucket, Diigo, Medium etc).

However, I want the comments to 'stick' to the item (paragraph, sentence, image): if I move it to another place in the document, if I make text amends - even if I merge two paragraphs, the comment should remain visible. OK, the comment may not be relevant any more, but then I can 'archive' them with he previous draft (preserving a full history of comments plus text changes).

In my research I've found BitBucket's post [1] about how they built theirs, but it lacks detail. I imagine the technical challenges to be similar to Real-time Collaborative Editing [2] - keep track of text changes and re-apply comments to the right place.

So I appeal to the HN Community : Are there sample open source implementations out there? What terminology should I be searching for (finding the language of a new problem domain is challenging)? How would you implement it? Are there papers/web pages you can recommend? I believe Operational Transforms [3] are the way to go, but I have no basis for that.

1. http://blog.bitbucket.org/2012/10/30/building-inline-comments-for-pull-requests-and-commits/
2. http://en.wikipedia.org/wiki/Collaborative_real-time_editor
3. http://en.wikipedia.org/wiki/Operational_transformation
While this looks really cool, I also agree that you should lose the -uino
You didn't address anything I said at all. So, why is your post a reply to me?
It is a progress, but not an advancing-the-state-of-the-art progress. Often "progress" is used to mean an advancing-the-state-of-the-art kind in some context. I believe this is the case here.

So you are just disagreeing on the definition.
So you've enjoyed all the marketing and Google employee upvoting?
You could try whitelisting only numbers that are in your contact list.
That must be what all the ducts in the movie were!
You should read this: http://soimovedhere.wordpress.com/2013/03/04/stop-generalizi...
The analogy is a little flimsy, but I'll run with it anyway: I consider Go today to be similar in some ways to Java at around the time of Java 1.1 or 1.2.

Obviously, Go is modern and is in many ways better than today's Java 1.7. But I am trying to illustrate its maturity level and the trajectory that I believe it's on. If you recall the days of Java 1.1, it was already seeing a great deal of early traction. The early traction of Go seems roughly the same to me. Also Java in its 1.1/1.2 years was on a clear trajectory to become a dominant language. I think Go will only grow in popularity for years to come in the same fashion. Even as a primarily Java developer, I look forward to Go being a clear and viable alternative.

I could be wrong about the trajectory, of course.

But I believe a short answer to your question is: if you're considering it, take some time to actually do something with Go. At first something experimental, then something for production use.

As a long-time JVM user, I've been trying to explain to other developers for a while now that assuming you use a modern approach to Java development, the performance of the JVM allows you to be (in my opinion) even more efficient than a dynamic language because you can code your application fairly recklessly. You can defer optimization in all of its forms for a long time, perhaps infinitely. The resulting mindset is a dramatically reduced concern about performance. When I work with most dynamic languages, I can never fully set aside the inner voice saying, "this is going to perform like crap." Trouble is, the voice is often right.

Go brings the same ballpark of performance as the JVM and a style that I believe is more appealing to Python developers than a modern Java stack (although I don't think modern Java stacks are given much of a fair shake because of Java's legacy, but that's a separate rant entirely).
you can't sprinkle debug prints in Haskell? really? (honest question)
I know it's cliche, but I still can't live without generics or a macro-like approximation thereof. I suffered under Java 2 for too long to go back to that.
Any Turing-complete language can do any computational task that is computable by Turing-complete languages, so by that criteria every language is the same. Obviously, in practice they are not.

>>> Well it is subjective, but the nebulous consensus is that Ruby has a cleaner and more readable syntax than PHP.

Consensus of whom? "Nobody I know voted for him", right?
School district hires company to follow kids' Facebook, Twitter
Fire Tracker: Tool To Monitor Blaze Near Yosemite
Take note that Musk's Hyperloop prototype was created on a 3-D printer,

What prototype? Did Musk actually show a model?
Doesn't the game theory for this sort of always point to the last, smallest member to join the coalition gets to make the most demands relative to it's size?

If it's get my party with it's 4 seats on board or fail and hold new elections, I can make demands way in excess of what those 4 seats should get me, right? And then once the government's installed, why not just hold them hostage again?

I mean, assuming your parliamentarians have no sense of shame. Maybe that's my bias from watching American legislators.
So you ignored the part where the OP described having actually used it in development and liking it?
And like Java 1.2, it is still missing some critical deal-breaker features for a lot of people.
Comments like this never, ever improve threads.
I can't be the only person who thinks Go is really interesting, but can't get over the 'package' hump... It's just too wonky for 'real-world' from my experience. For example, how do you create clear lines of separation with internal modules? If you want to use 'namespaces' then each namespace has to be it's own package, which then requires its own Repo that you have to 'go get'. There's unsustainable for a project of any useful size.

I must be missing something.
I have taken different approach. I decided that the best way is to train by own brain how to trade. Basically my approach was to trade as much as possible and have results, without waiting for the market to let me know how I was doing.
So I wrote my own program called turtrades (test your trades). It basically presentments you with random stock in random past date and lets you trade or pass. Doing this I am using real historical market data and train my brain to spot winning patters and I get instant result.
For those interested you can find it here http://www.turtrades.com

Yes it is as selfish plug but program is free and I have nothing to gain.
Mobile Safari sends your name and mail address to any server that asks
Oh yes, some outstanding thinkers have gone into mind boggling depth on the meanings of fundamental maths concepts. This started getting a proper treatment in the early 20c. (see https://en.wikipedia.org/wiki/Principia_Mathematica ) and presumably has come a long way since then.

Edit: Of course one has to take a different approach for pedagogical purposes.
Commenters are partially motivated by the upvotes they receive for astute observations, which is a good thing. But this also encourages critics to compete for that "score: 5, Insightful" by finding the first chink in the armor.

I also prefer to leave it up the voters to reward/discourage behavior, rather than content campaigning.
then so should be the word mongoDB
> Thank you Mozilla.

Don't forget Google either. The Web Components spec [1] was created by Googlers (along with contributions from lots of other people, of course).

[1]: http://www.w3.org/TR/2013/WD-components-intro-20130606/
Interesting goes against directly what they claim on their own page. Its tested on a four core machine. I'm suspecting the 16 default threads were the problem, since Unicorn only ran with 4 processes not 16.

http://puma.io/
While designed to make things easier for newcomers -- I think these features are actually some of the biggest culprits in making things _harder_ for newcomers, because they fail at so many edges, and when they do fail, there's so much magic going on that it's nearly impossible for a newcomer (or even an intermediate user!) to figure out what's going on and why.

I think the heavy emphasis on auto-loading was a mistake, that someone writing a new framework would be wise to learn from and not repeat.

The reloading in dev mode is HUGELY convenient, I have to admit so I have trouble calling it a mistake -- but is also a huge mess when it fails, and does not work under multi-threaded request dispatch. That latter will, I think, become an increasing problem as more people use multi-threaded request dispatch in Rails -- Rails4 has multi-threaded request dispatch on by defualt in production mode. But I think not in development mode, precisely because of the code-reloading problem. But I'm not sure diverging the dev and production environments (violating 12-factor, incidentally) is a good sustainable solution.
We use it in similar way. We also use skype for ad hoc, private group chats/im.

More about how we use hipchat here: http://blog.netguru.co/post/45142686929
You can potentially install adblock and never see said ad (or any other ad) unless you need to disable adblock. It's a case of simple and effective retargetting.
It (should) mean free as in libre: http://en.wikipedia.org/wiki/Gratis_versus_libre#.22Free_bee...

"Free as in beer" and "free as in freedom" confuse me too, because beer sets you free, and freedom has no monetary definition for some people.
Exactly. The maturity level is about the same--obviously in different ways--but I think you get what I mean.

Will they ever add generics? Not sure. Will Java ever have proper first-class functions? Not sure.
I do think it's important to note that they're generally wrong in the same direction.. they tend to be overly positive, not overly negative (or an even mix of both). That particular skew is more likely to implicate the "publish or perish" incentive system as the culprit than the other two.
Eh. Detaining David Miranda did what it was supposed to. Of course it's not gonna scare away journalists from doing their jobs. Their idols are often people who brought big news despite govnt opposition.

But the common man, the man that has most opportunities to blow a whistle? They don't want to be detained at the airport, they don't have the protections that journalists do (like, say, having close journalist friends that can get your story out on the same day).

Arresting Miranda does not deter Greenwald, but it might deter other people from following his act.
Trading costs have to part of your model, but at Interactive Brokers for example you only pay $0.005/share (with a $1 minimum) to trade. At that rate you can try to trade for an average of pennies per share (including winners and losers). When an algorithm fizzles, my experience is that it stops making small amounts of money per trade on average and starts losing small amounts of money per trade on average, with more volatility.

As you see then, you may automate trading itself, but then your discretion is shifted from deciding what stock to buy or sell short to when to turn on or off an algorithm. The advantage I suppose is that an algorithm isn't necessarily directly tied to market direction.
I'm one of the authors behind Phusion Passenger (https://www.phusionpassenger.com/), a polyglot web server for Ruby, Python and Node.js.

What you said is basically correct. And yes, it is possible to combine event loops with threads in the way you described to get CPU concurrency as well. Whether it is actually helpful depends on the use case. The Phusion Passenger core is evented (similar to Nginx and Node.js) since version 4.0. We considered a multithreaded-evented architecture as well, but it turned out to be less beneficial than we hoped because the applications themselves use plenty of CPU already, and because we rely on shared in-memory state for proper load balancing between processes, thus having a source of contention. In the end, the single-threaded evented architecture in Phusion Passenger turned out to be more than enough.
Family and close friends get my cell number. Everyone else gets my Google Voice number.

If I don't want to be bothered by unimportant calls, I launch the Google Voice app and enable do not disturb.

If I permanently want certain numbers, or unknown numbers to go straight to voicemail permanently, I set it up. I don't hear a ring. I get a push notification if they leave a voicemail.

If Google Voice isn't your cup of tea and you have an iPhone, use iOS's Do Not Disturb feature. You can enable it either manually via a switch, or on a time period basis. You can set exceptions for no one, or for your favorites, or for specific contact groups.

The funny thing is, I willfully refrain from using my smartphone in public or when in groups of whenever possible. I'm commonly the only parent at a park that is playing with their kids and doesn't have their face buried in their smartphones doing god knows what. This is causing me to question whether a smartphone plan is worth it as I use so little data when out and about. So I'm pondering going with some cheapo prepaid options.

Edit: Check out the below reply from ericdykstra for a similar solution for Android.
I think we need more than 1 account of Go in production before we start high-fiving each other about Go in the mainstream.

And to be fair to the person you are responding too, there has been an inordinate amount of Go articles on HN over the last few months compared to anywhere else on the internet tech/dev wise, so much so that a number of my friends have independently made a joke of it.
As much as you've enjoyed the "GENERICS OR BUST" and anti-Google, downvoting crowds.
Algorithmic trading and high frequency trading are orthogonal concepts.

High frequency trading typically refers to two concepts. 1) how long you hold your position, 2) how quickly you can send/cancel existing orders. Though I'll hedge and say there isn't a really accepted definition of high frequency.

Algo trading on the other hand refers to using a computer to automate trading strategies. The typical example is a pair trade with Ford and GM. When they deviate you sell one and buy the other, when the prices come back together you reverse the trade and sell the first leg and buy the second.

Algo trading is here to stay. High frequency has typically been more arbitrage focused and its followed the pattern that happens to all arbitrage opportunities and gone away as more people got in on the action.
> Large projects need a complete solution that Java has to offer

I'm not sure that as true as it is popularly perceived to be; I think it may be more true that there is such a history of use of Java and similar platforms (e.g., .NET) in the environments that produce large systems that there is a cultural bias to thinking it is necessary and that much of the current experience of large systems is centered on that kind of platform.

Arguably, building large systems with less dependence on the kind of pervasive system-wide compile-time interdependencies fostered by Java and similar platforms and instead relying on smaller components with minimal compile-time interdependencies integrated at runtime using well-documented communications protocols and interaction standards -- a real platform agnostic, potentially heterogenous, decoupled Service Oriented Architecture (without, particularly, the return to compile-time interdependency fostered by the approach to SOAP/WSDL common on Java and similar platforms) -- would be better for large systems, particularly when the large systems have components that need to adapt rapidly to changing needs.
I don't believe it's YouTube that he's complaining but rather the retargeting campaign by DigitalOcean themselves. I've had a few companies that retarget me on YouTube relentlessly. Ads themselves don't bother me, but seeing the same one dozens of times a day gets irritating.
there are a few phonemes that are hard for me to discriminate but i've found asking friends who can discriminate to describe the physical arrangement of their lips/tongue for each of the sounds helps. i still can't discriminate between the sounds of certain phonemes but i can discriminate between how they feel when i vocalize them
Yep tried that, too :-)

I've long had this prob. with getting interrupted by calls.

Again, people would get mad that I ignored them, or that I wasn't available.

Somehow, since you don't have a cell phone they don't get offended or complain (I'm talking about clients in particular).
Ah, I only skimmed the article describing it, and originally jumped to the conclusion they had actually claimed that "memory state" (IE factual encoding) was being stored in methylation.

Modification of gene expression of genes associated with memory (in the form of changes to neuronal toplogy and excitation thresholds) seems like a more mundane and reasonable explanation.
Show HN: Concurrent, Promises/A+ with Scala Awesomeness
My weekend project to implement Promises in node
Tesla Model S REST API Authentication Flaws
> One of the applications I'm talking about is a physician portal meant specifically to be used over the public internet.

Ouch. That just screams 'this company doesn't understand security at all'.
How do you know that it is true cost? Given the number of inner city hospitals with serious financial trouble, I strongly suspect that they've gone below true cost!
http://googleblog.blogspot.com2013/03/transparency-report-sh...
Without a cell phone you are still unreachable, so how exactly is this solving that issue?

The real problem here is that the people contacting you do not respect your desire to not be on-call 24/7. In my opinion, this lack of respect is good enough reason to not feel bad about ignoring them. Put your phone on mute and stop letting inconsiderate people push you around. Or just continue not having a phone because that works too.
The US has a deficit that's ~35% of the budget in the last few years, and most of the budget is spent on healthcare, fighting wars and other things that can easily be scaled back if needed (even though politicians say they can't).

As they say, the markets can stay irrational much longer than you can stay solvent.
Antirez, the developer of Redis, addresses this on one of his blog posts. Essentially, it was a design choice. He made the trade off of having a single threaded application to speed up development timelines and not have to worry about the short comings of developing in a multi-threaded application (atomic operations, locks, etc).

He delves into the multi threaded debate about half way down the article:

http://oldblog.antirez.com/post/update-on-memcached-redis-be...

edit: I suppose a work around would be to shard multiple redis instances on separate cores of the same box. This would give you some of the benefits of multi-threading.
I'm one of the authors behind Phusion Passenger (https://www.phusionpassenger.com/), a polyglot web server for Ruby, Python and Node.js.

We've recently written a comprehensive comparison between Puma and Phusion Passenger, which you can read here: https://github.com/phusion/passenger/wiki/Puma-vs-Phusion-Pa...
The comparison covers things like concurrency models, I/O models, security, clustering, multi-app support, documentation, memory usage, performance and more. Although the comparison is between Puma and Phusion Passenger, a lot of the points are relevant to a Unicorn-Puma comparison as well.
If they can create incentives for people to help each other (ie karma points), it would be great. Getting help with a direct feed of your command-line is just 2 commands away: pip install shellstream && startstream

I really like the idea and it has a lot of potential.
Getting Feedback for your SaaS App
I can see a vast majority here are very positive on this news. Just wonder in areas that are yet to be covered by Stripe, what are you guys using? Also, I recall a few months ago PayPal introduced a revamped set of APIs which claims to be more developer friendly. Anybody cares to chime in on that front?
Get ArchLinux set-up rolling much faster with it, edit for custom
All of the servers listed here are standalone servers, while Passenger is a module for existing servers. I don't really see why you couldn't include Passenger here, but it seems like they're only comparing like to like, which I guess is fair.
I don't think that is what my experience taught me. Writing in Scheme got to the heart of the algorithms part much faster than MIX. With MIX I spent much more time trying to get syntax correctness than understanding what I was doing.

Further doing these things in Scheme has had long lasting benefits when I need to work in a functional programming space. In my experience, going from functional to imperative was easy, my colleagues that had to go the other way seem to struggle more.

That said, some data structures & some algos need to be written at a very low level to understand why standard Big O algo analysis can occasionally lead you astray. But I don't think they all need to be.
>>Rails does overload Ruby's autoload (naturally - no core functionality can remain un-monkeypatched. ;-))

Are you sure about that? To me it seems that if you pass a path to autoload, it does work like ruby STL
https://github.com/rails/rails/blob/master/activesupport/lib...
All right... So I'm not 100% crazy! :-)

I forget to mention the money! My plan was about 50€, too...

After a year, I regularly talk to my wife and other people via email or Messages.

Both are a lot less invasive than your cell phone ringing.
Letting employees make the most out of their own fitness
OmniKeyMaster: Upgrade Pricing for Mac App Store Customers
I'm looking at the 'Puma' section in Jesse Storimer's book "Working With TCP Sockets" and that seems to be the general idea behind it... uses a thread pool for concurrency, monitors persistent connections with an evented reactor.

I'm not affiliated with the author, but this was such a nice book to get an intro to webservers and their architectures/tradeoffs from.

Really fueled my love of sockets :)
Using Python to code by voice
The other thing that never improves threads is everyone only posting what they think might get upvoted instead of saying what they actually think, especially when there might be a grain of truth in it. Tedious comment back-patting is the death of good communities.
Afraid someone will steal your idea?
It sounds like the OP was burned at least once by a freelancer in the past. We come across folks like this every so often at matchist (http://matchist.com).

The biggest problem we often see (and I've seen in my previous experience as a freelance developer) is a lack of trust between the two parties. The client doesn't trust the developer to do their job and/or the developer doesn't trust the client to do their job.

The OP has some good ideas about how to establish trust between the two parties (communicating regularly and effectively, but most of his ideas appear to stem from the fact that he simply doesn't trust freelancers from the get go.
Scripting News: The Atlantic on diffs betw genders
There are plenty accounts of Go in production: (Google's dl.google.com) https://groups.google.com/d/msg/golang-nuts/BNUNbKSypE0/E4qS..., (CloudFlare's Railgun) http://blog.cloudflare.com/go-at-cloudflare, (Bit.ly) http://word.bitly.com/post/29550171827/go-go-gadget, (SoundCloud) http://backstage.soundcloud.com/2012/07/go-at-soundcloud/, (Disqus's realtime-backend) http://blog.disqus.com/post/51155103801/trying-out-this-go-t..., etc
More concisely, and yes, cliché: you're getting married.

In fact, it's more serious than that. You'll be together more and under more stress than marriage, but without the makeup sex.

Then again, people make arranged marriages work. Share goals, stay focused on "us versus them" instead of against each other, and you'll find rapprochement.