Modern dining philosophers - <AUTHOR> http://lucteo.ro/2018/12/28/modern-dining-philosophers/ <comment><USER2> This is kind of cheating. :)

This solution doesn't really cover the core problem in the dining philosophers puzzle - that your philosophers can't communicate with each other or some external system to coordinate!

Having a single external controlling process allocating all forks makes the whole problem trivial (at least until one of the philosopher processes crashes and never notifies the controller that they are done with the forks they were using). This solution also uses a library that provides the underlying thread- safe communication, which hides another layer of complexity.

If your problem lets you get away with this, then HECK YES, do it! This is a fantastic solution that avoids most of the resource sharing gotchas. This kind of solution pops up pretty naturally in Erlang/Elixier with extremely lightweight processes and built-into-the-language safe message passing.

If you can change the constraints a little to make a hard problem into a simple problem, do it!

</comment><comment><USER3> Did the original version use forks and spaghetti? I was taught chopsticks and rice, which makes more sense to me; you clearly need two chopsticks to pick up rice, but you don't need two forks for anything, let alone spaghetti.

Obviously the metaphor doesn't bear close inspection in any version, but that bugged me a bit.

<comment><USER4> Hoare formulated the problem in _Communicating Sequential Processes_ , using spaghetti and two forks. See page 55.

[http://www.usingcsp.com/cspbook.pdf](http://www.usingcsp.com/cspbook.pdf)

</comment></comment><comment><USER5> I really appreciated the explanation and diagrams of the DPP. No comment on the solutions discussed though.</comment>


Advice from some old people - <AUTHOR> http://imgur.com/gallery/ygq7RK8 <comment><AUTHOR> OP: Wish I had this list when I was 25 years old. Now at 62 I know too well this is good advice.</comment>


Show HN: tmuxp – session manager for tmux - git-pull http://tmuxp.git-pull.com/ <comment><AUTHOR> I've mentioned this before but will mention my setup again because I think it's so great :)

ITerm has native TMux integration so you don't have to re-learn how to use TMux terminal (ex. copy and paste work differently, etc). I used to use Mosh + TMux for super durable connections and that worked beautifully. Unfortunately Mosh doesn't play well with ITerm's native integration so you can achieve a poor man's Mosh by using [http://www.harding.motd.ca/autossh/](http://www.harding.motd.ca/autossh/).

All-together it looks something like this: Open iTerm. autossh -t myRemoteHost "tmux -CC -A"

(Of course I have an alias for this)

<comment><USER2> The main reason why I learned tmux was so I can ssh into any server and use what I already know to work productively while having a durable session that doesn't break when the connection gets flakey.

Learning tmux and it's default bindings is a very good skill too have

<comment><USER3> This is the exact reason I continue to use Screen. It is much more widely available on the boxes I use (and possibly in general) than tmux.

</comment></comment></comment><comment><USER4> Can someone explain the advantage of this (or tmuxinator, etc) over launching a bash script or custom per-session tmux config file that sets up windows and panes and launches the right apps?

I see there's a --freeze option that saves the layout of the current session but that's a partial solution as it can't really freeze and restore the state of the applications running in the terminal windows (which is a deal breaker for me as I need to be working in a "blessed" environment for Android development with certain env variables, etc set up by a script).

Side note: tmux has an annoying misfeature that panes can't be named nor does their numbering stay stable. It's a bit tricky to programmatically set up a bunch of panes (can't do `tmux split-window -t mysession:mywindow.mypane` because mypane will change with every split) in the correct layout. So to get a specific layout, you need to do all your splits in a specific order. I did read somewhere that naming panes is a feature under development, though.

<comment> git-pull The declarative nature of having a YAML/JSON config that consistently abstracts out the commands you'd make. It prevents the mistakes and repetition scripting tmux entails.

In addition, there's no need to worry about shell scripting portability across systems. I personally use macOS, Linux and BSDs, so I have to take extra time to ensure my scripts work on machines without Bash.

For some shortcuts, tips, and tricks on tmux, I have a section in a book I've recently published at [https://leanpub.com/the-tao-of-tmux/read#scripting- tmux](https://leanpub.com/the-tao-of-tmux/read#scripting-tmux). It's freely available online. It covers command aliases, pattern matching, targets and formats.

> Side note: tmux has an annoying misfeature that panes can't be named nor > does their numbering stay stable. It's a bit tricky to programmatically set > up a bunch of panes (can't do `tmux split-window -t > mysession:mywindow.mypane`

The internal pane_id stays the same. If you're using a library like libtmux ([https://libtmux.git-pull.com](https://libtmux.git-pull.com)), you can keep reference to the pane after split-window commands and stuff.

> So to get a specific layout, you need to do all your splits in a specific > order.

Yes, this is one of the reason tools like tmuxp, tmuxinator and tmuxomatic exist.

tmuxp goes the extra mile and has integration tests across a matrix of tmux versions to assure complex configurations produce the intended result upon loading a session. ([https://github.com/tony/tmuxp/tree/master/tests](https://github.com/tony/tmuxp/tree/master/tests))

Writing those tests took time, but were highly worth it when minor changes in the behavior of tmux popped up across versions.

</comment></comment><comment><USER5> This and every other tmux manager.. written in ruby or some other high level lang.. idiotism. These should be C or Go or whatever lang without shitloads installation required for these.

<comment><USER6> Haha... I understand that feeling... which is why I wrote one in Go.

[https://github.com/davinche/gmux](https://github.com/davinche/gmux)

<comment><USER5> neat, I will look into this!

</comment></comment></comment><comment><USER7> Personally I use [https://github.com/tmux-plugins/tmux- resurrect](https://github.com/tmux-plugins/tmux-resurrect)

It's not as configurable, but doesn't really need much configuration.

<comment><USER8> I use the same but doesn't it just save only one session? This one seems to have multiple sessions based on the config that you pass.

</comment></comment><comment><USER9> I'm often skeptical about ruby/python wrappers but I've been using tmuxp the last year and have no complaints.

I never configure it. I have three sessions configured that I start, whether at work or at home.

Shells - Irssi, vim, bash.

SSH - All my ssh

Vim - My development (inside I then use vim tabs for different areas of a project)

My experience from configuring tmuxp in Yaml is not overall good, it felt clunky and immature. But like I said, I never touch it anymore. It just works.

</comment><comment><USER10> My preferred tmux session manager : [https://github.com/oxidane/tmuxomatic](https://github.com/oxidane/tmuxomatic) Has the easiest configuration I've seen, I can only advise to try it out!

</comment><comment><USER11> I keep meaning to change to tmux, but for some reason I still stick to screen. I know tmux is so much better, but I still find all the features I need in screen, and it happens to be installed on most hosts I am using.

<comment><USER12> If you're happy with `screen` then there's little point changing. The tech industry can often have an air of elitism with regards to tools we're told we "should" use. While sometimes there will be reasonable arguments for or against specific tools, usually the overriding deciding factor is just personal preference.

That all said, I do completely relate to your "[screen] happens to be installed on most hosts" point. That's also the main reason I've never switched to zsh over bash and why I don't run fancy vim plugins.

</comment></comment><comment><USER13> I built a tmux session manager for myself, It uses a ruby configuration file similar to the one below, You can find it at [https://github.com/minhajuddin/tummy](https://github.com/minhajuddin/tummy) . I feel ruby is more flexible at configuration than yaml.

        session "statictrain"
        directory "/home/minhajuddin/r/st/web"

        window "src", [
          pane("vim TODO"),
        ]

        window "server-iex", [
          pane("iex -S mix phoenix.server"),
          # the last argument is passed to tmux as raw arguments
          #pane("iex -S mix", :horizontal, "-l 8"),
          pane("git status; tail -f log/debug.log", :vertical),
        ]

        # if you comment this out it will focus the first window when the session is started
        #focus_window "server-iex"
        # focus_window 0 # you can even focus a window by index starting at 0

        # vim: filetype=ruby

</comment><comment><USER14> I love tmux and use it locally as well as on remote servers. However I have not found a good way to nest remote sessions in a local session because of conflicting key bindings. Does anyone have an easy solution to this? My current solution is a separate terminal window for each remote session (connected via mosh user@host -- tmux attach). This is a minor annoyance.

My other problem is that when I restart my laptop I lose all local tmux sessions. It looks like this might be a solution via `tmuxp freeze`. Will this save bash history and stdout or only pane layouts?

I am also looking for a way to grep unified bash history across all hosts I use.

One idea I have to improve workflow / keep state across restarts is to vpn to a remote server and use my "main" terminal from there. When I need to run something locally I do it via mosh to local IP on vpn. This way local screen state is saved even across restarts (since server is up 24/7). However this is super convoluted and not ideal for many reasons.

<comment><USER15> How often do you restart your laptop?

Restarting is a pain, having to restore tmux and emacs and chrome and whatnot, but since I restart about once per month it's still acceptable.

<comment><USER14> Well, I restart about once per month too. But that's not ideal. I would like to apply security updates as soon as they're available, but I always put it off because I know I'll have to restart and lose all session state.

</comment></comment></comment><comment><USER16> Other than the configuration form, does this have uses cases that are different from a bash script(s) with tmux commands.

</comment><comment><USER17> I do most of my work from within a single tmux session, so this isn't super useful for me. However, I heavily use tmuxifier [1] which I've extended with some custom shell scripts which further enhance my workflow.

Instead of launching tmux with a predefined session configuration, I launch a fresh session and then use tmuxifier to load window configurations as needed.

A large benefit of tmuxifier is that it's all written as a collection of shell scripts, so there are no additional dependencies. It also has really good tab completion.

1: [https://github.com/jimeh/tmuxifier](https://github.com/jimeh/tmuxifier)

</comment><comment><USER18> I'm not a big user of tmux sessions, but i quite like all these tools pop up around tmux.

I am switching to Kakoune IDE, which doesn't have pane splitting/etc, it relies on a tool such as tmux to do splitting instead. So, needless to say Tmux has become even more crucial to my environment.

</comment><comment><USER19> This is the kind of thing I really wish tmux had native support for, so I could use it on any system.

<comment><USER20> I find most systems don't have tmux installed by default anyway. But with the --user flag to pip, you can easily install tmuxp into your home directory.

</comment></comment><comment><USER21> Im pretty new to this and use tmuxinator from a recommendation by my dev team. Can someone explain to me the difference between this and tmuxinator?

<comment><USER22> The About Page lists the differences: [http://tmuxp.git- pull.com/en/latest/about.html#differences-f...](http://tmuxp.git- pull.com/en/latest/about.html#differences-from-tmuxinator-teamocil)</comment></comment>


Ask HN: Best encrypted cloud storage option? - <AUTHOR> What is the best option for storing my files in the cloud, completely encrypted and secure?
Not like Dropbox, or other services where a government entity could force the company in giving up someone's files. Completely secure.
If rolling my own from home is the best option, any software recommendations?
Thanks! <comment><USER2> I use Tarsnap for storing backups of my files. Data is encrypted client-side, so the server can't decrypt it. Tarsnap is designed for backups, though, not for general file storage.

Some encrypted cloud storage offerings are mentioned here: [https://news.ycombinator.com/item?id=16451396](https://news.ycombinator.com/item?id=16451396)

</comment><comment><USER3> I'm using [http://duplicity.nongnu.org/features.html](http://duplicity.nongnu.org/features.html) incremental backup with GnuPG encryption.</comment>


AR Drone controller using RubyMotion - <AUTHOR> https://github.com/daraosn/ardrone-rubymotion-controller

<comment><USER2> I think this made an appearance here some time back, as well... [AR Drone + Node] <https://github.com/felixge/node-ar-drone>

<comment><AUTHOR> Of course, that's a great library from Felix Geisendoerfer, made in node.js

This one, is a small example I wanted to share using RubyMotion (ruby for iOS).</comment></comment>


Music recommendations without collaborative filtering - <AUTHOR> https://theshfl.com/about_us <comment><AUTHOR> I did a Show HN where I just put my website 38 days ago, either it was terrible then and it's terrible now, or I didn't explain anything. I should have really made a comment. The link is the comment, the reasons why I made the thing. It's hard to write about why you are spending all of your time doing something you intuitively feel needs to be done! I feel like people should just magically understand me. I mean I don't feel like that if I think about it, but I kinda feel like that.

I can't be the only one who can't stand being recommended music by machines. I love machines but goddammit, I tell them what to do, not the other way around. The thought of some matte-black server somewhere, blinking, dot-producting my vector with god knows whos other vectors, making sure all the songs have the same musicalness, or acousticness, or whatever, ugh. I don't like it. Probably a personal issue that I should get over.</comment>


Ask HN: Accesing a vitual machine thorugh web browser? - <AUTHOR> Hi there,
Would you recommend AWS over MS Azure to setup a virtual machine for academic purposes? Or any other tool you may know specially if it is cheap. In order to spend some death-time learning something.
Also, do you know any web based ssh tool (reliable in terms of privacy) to access the above mentioned virtual machine Or any other tool for this matter?
Thanks.
P.S. I can't install any software on my machine without the whole IT Staff being involved and lots of bureaucracy. <comment><USER2> Cloud providers will provide a console based access in the browser (not sure about AWS, but GCE and other smaller guys do, like DO, Linode, Vultr that i know of). Alternatives include 1\. [https://github.com/liftoff/GateOne](https://github.com/liftoff/GateOne), will need local install, pip should be fine.

</comment><comment><USER3> Hi,

I'd recommend a bog standard VPS from any provider you can get - AWS and Azure are flexible but they do require some time until you understand everything.

SSH cannot usually be done over the web, at least I wouldn't trust anyone with my SSH keys... PuTTY SSH client can be run without installing it.

</comment><comment><AUTHOR> Thanks a lot for your answers guys. I'll be using the things you mentioned. (y)</comment>


Digital Ocean Networking Issues Due to Internet Backbone Provider Outage - <AUTHOR> https://status.digitalocean.com/incidents/3rcxl72y4mrp <comment><USER2> CenturyLink has suffered a pair of fiber cuts that are impacting their network nationwide. Word is the damage is extensive.

\--- __* CASCADED EXTERNAL NOTES 21-Apr-2020 15:48:56 GMT From CASE: 18572279 - Event The Transport NOC reports that one Field Operations team is set to arrive in Milwaukee, WI momentarily, and the secondary Field Operations team remains in transit to the gateway facility in Zion, IL. An ETA of 17:00 GMT remains expected.

Update: Network Operations Center reports that services are impacted by multiple fiber cuts that are impacting the CenturyLink network. Field Operations and all necessary repair personnel have arrived to the first fiber cut location and are currently working to pull in the slack on the fiber span. Approximately 3,000 feet of new fiber will be required to pulled in.

</comment><comment><USER3> This is hitting me hard, most of our infrastructure is unavailable and I am pretty much unable to do anything about it at the moment.

<comment><USER4> You are not alone. I have already received tons of angry emails from our clients :(. Not a good last 30 mins or so.

</comment></comment><comment><USER5> [https://status.digitalocean.com/incidents/3rcxl72y4mrp?u=b3l...](https://status.digitalocean.com/incidents/3rcxl72y4mrp?u=b3lscnqqyzbm)

</comment><comment><USER6> More ticket updates are appearing in this Reddit thread. Fiber splicing is ongoing

[https://old.reddit.com/r/networking/comments/g5h8ho/level3_o...](https://old.reddit.com/r/networking/comments/g5h8ho/level3_outage_chicago/fo3xw9z/)

</comment><comment><USER7> Ugh, recently started a new job...Today was launch day for the first project that i got handed on this new job...and then this now. I'm not fully blaming DO, since it seems to be backbone/upstream provider, but it still hurts.

</comment><comment><USER8> Anyone hear from DO on when the expect it to come back?

<comment><USER4> [https://twitter.com/DOStatus](https://twitter.com/DOStatus)

</comment></comment><comment><USER9> Does anyone have a link to a statement from the provider? Or at least their name?

<comment><USER10> Not an official statement, but CenturyLink/Level3 is reporting service disruptions due to a fiber cut.

[https://twitter.com/CenturyLinkHelp/status/12526545920699514...](https://twitter.com/CenturyLinkHelp/status/1252654592069951488)

</comment></comment><comment><USER4> This is really bad for us. Lot of our infrastructure sites are down. Oops.

</comment><comment><USER11> Wonder if Github is affected by this somehow.

</comment><comment><USER12> I am getting severely screwed by this

</comment><comment><USER13> [https://aws.amazon.com/premiumsupport/knowledge- center/creat...](https://aws.amazon.com/premiumsupport/knowledge- center/create-and-activate-aws-account/)

<comment><USER14> If you have a statement to make, please put it in words so we can have a proper debate. Otherwise, as you see, you're getting downvoted.</comment></comment>


Mathematicians Catch a Pattern by Figuring Out How to Avoid It - <AUTHOR> https://www.quantamagazine.org/mathematicians-catch-a-pattern-by-figuring-out-how-to-avoid-it-20191125/ <comment><USER2> I was confused by this article. It says that for every k, then all sufficiently large sets have an arithmetic progression of length k.

But suppose we set k = 3, and take the set {1, 2, 4, 8, ..., 2^n}. Then no matter how big n is, we have no arithmetic progression of length 3.

Looking into this, it appears that the article misstated the result, called Szemerédi's theorem: "if the positive integers are partitioned into finitely many classes, then at least one of these classes contains arbitrarily long arithmetic progressions". [https://www.semanticscholar.org/paper/A-new-proof- of-Szemeré...](https://www.semanticscholar.org/paper/A-new-proof-of- Szemerédi's-theorem-Gowers/3e47e427a64759a41e54dd60c27e5663068886ca)

<comment><USER3> The theorem you quoted is Van der Waerden's theorem [0], not Szemerédi's. It is significantly easier to prove than Szemerédi's result.

The article correctly states Szemerédi's theorem, if you interpret "sufficiently large" to mean "positive density": For every density delta > 0 and length k, there exists an n0 such that every subset of {1, ..., n} (n > n0) of density at least delta (that is, at least delta * n elements) contains an arithmetic progression of length k.

For n large, your set has density roughly (log N)/N (where N = 2^n), which is not bounded from below by any constant delta > 0; this is why Szemerédi's theorem does not apply. Speaking of your example, you might be interested in Behrend's construction [1], a way of constructing "large" sets (for another definition of large) with no 3-term arithmetic progression.

Szemerédi's theorem easily implies Van der Waerden's theorem because if you colour the integers with finitely many colours, you can apply Szemerédi's theorem to the largest colour class.

[0] [https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem](https://en.wikipedia.org/wiki/Van_der_Waerden%27s_theorem) [1] [https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1078964/pdf/pna...](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC1078964/pdf/pnas01693-0039.pdf)

</comment></comment><comment><USER4> > catch a pattern by figuring how to avoid it

In my own research, the main focus is to take a (usually known) property and to rephrase it so that the new statement is self-dual. The analogy would be that you "understand a pattern only if you know how to phrase it in a self- dual context".

None of these different approaches necessarily try to presuppose or subsume each other, but they hint towards your outlook and interests. That is why independent discoveries are usually "clearly" independent, in the sense that the whole framework is usually different.

This happened for example with Lawvere and the eventual standard definition of a topos; so too with Grothendieck toposes and the eventual standard definition of a topos. Newton and Leibniz would be the more accessible example.

</comment><comment><USER5> Bounds for sets with no polynomial progressions

Abstract:

Let P_1,..., P_m ∈ Z[y] be polynomials with distinct degrees, each having zero constant term. We show that any subset A of {1,..., N} with no nontrivial progressions of the form x, x + P_1(y),..., x + P_m(y) has size |A| ≪ N/(log log N)^(cP1,...,Pm) . Along the way, we prove a general result controlling weighted counts of polynomial progressions by Gowers norms.

[-1] [https://arxiv.org/pdf/1909.00309.pdf](https://arxiv.org/pdf/1909.00309.pdf)

</comment><comment><USER6> These observations have a bit of the flavor of the birthday paradox and pigeonhole principle: if the size of a certain object is at least so and so, then a certain property is guaranteed. If we have more than 365 people, then a birthday has to repeat.

Also, the Mean Value Theorem comes to mind for some reason.

<comment><USER4> The mean value theorem also guarantees existence (of a parallel line tangent).

</comment></comment><comment><USER7> Did not read the paper but it seems to me bit weird definition: that adding a constant to geometric progression makes it polynomial progression.

<comment> pure-awesome When you say "weird definition", do you mean it's a strange concept, or a strange name for that concept?

Edit: Or do you mean that "polynomial progression" has an existing definition, and this definition is equivalent, but is a strange way of stating it? Or do you mean the definition as stated in the article is wrong / differs from the standard definition?

<comment><USER8> Possibly that it doesn't seem to warrant an entirely new name? that "shifted geometric progression" or something might as well do.

<comment> pure-awesome See my other response to rini17 for more info.

But yeah, seems to me these "shifted geometric progressions" are actually just a special case of a more general concept of a "polynomial progression".

</comment></comment></comment></comment><comment><USER9> I am a Math student and I am curious about the topics in this article.

I am curious as to what all branches of Mathematics is the paper related to? It's a result about polynomials, so Algebra and Analysis?

<comment><USER10> This area is usually known as "additive combinatorics".

[https://en.wikipedia.org/wiki/Arithmetic_combinatorics](https://en.wikipedia.org/wiki/Arithmetic_combinatorics)

<comment><USER9> Thanks! The Math in that paper is mind boggling! I hope to get to a point to understand it someday.

Very naive question: the paper uses integrals (perhaps Lebesgue --- can you tell how naive I am, yet?) for proving some lemmas etc. As a beginner it's hard for me to understand how integrals come into picture in number theory.

Not that it is my plan to do so, can you tell me what all fields of Math (specifically textbooks) and techniques I need to be familiar with to understand the paper?

For e.g., Abstract Algebra (D&F), Functional Analysis (graduate), Combinatorics etc.?

This will give me a much clearer picture on how various fields of Mathematics come into play.

Thanks again!

<comment><USER10> If you want to understand Peluse's paper, I think the most directly relevant background reading would be Tao and Vu's _Additive Combinatorics_.

Dummit and Foote's _Abstract Algebra_ is an excellent book -- even if not very directly relevant to additive combinatorics. Analysis background would be useful, such as to be found in Stein and Shakarchi's series. Some introductory combinatorics would also be good (e.g. Stanley's _Enumerative Combinatorics_ , or Van Lint and Wilson).

Finally, analytic number theory would also be good to learn. For example, you might read Davenport's _Multiplicative Number Theory_. (Especially if you want to see integrals come into the picture.)

<comment><USER9> Thank you! This is exactly what I was looking for. This gives me a sense as to where I stand relative to understanding this paper.

</comment></comment></comment></comment></comment><comment><USER11> > Peluse answered that question in a counterintuitive way — by thinking about > exactly what it would take for a set of numbers not to contain the pattern > you're looking for.

Proof by contradiction isn't that counter intuitive.

And it's utterly bizarre that this article doesn't explain that this technique is proof by contradiction, or give an example of what it is. The proof that the square root of two can't be expressed as a ratio of integers (hence is not-ratio-able, or irrational) is approachable by highschool freshmen, and would add so much to the article.

<comment><USER12> When I was coming up with and solving problems with a math friend I learned that proof by contradiction was perhaps the most common way to prove things. It's strange to people who don't work with math everyday, to everyone else it's secondhand.

<comment><USER13> It's not just math, it's a pretty basic concept in philosophy, or any area where critical thinking is required</comment></comment></comment>


What You Get for $1,500 Rent in 30 Most Populous US Cities - <AUTHOR> http://www.rentcafe.com/blog/apartment-search-2/what-does-1500-rent-you-apartment-size-in-the-top-us-cities/ <comment><USER2> Interesting. There is a lot here that runs counter to expectations.

For one thing, NYC is still more expensive than San Fran.

For another, there are a bunch of cities more expensive than Detroit.

Still, quite interesting. I'd love them to overlay some other factors:

1\. Growth in rents

2\. Price/rent ratio

3\. Total cost of renting or ownership

4\. Variance in rent within a city</comment>


Free and open source alternative to Uber/Lyft - <AUTHOR> https://libretaxi.org/ <comment><USER2> I suspect a lot of work has gone into creating this, but there are more than a few challenges that need to be overcome.

1) one of the great benefits of the existing rideshare services is the lack of needing cash. Payments are going digital, but bitcoin isn't there yet so many of us rely on credit/cash cards. This new service does not accept credit card payments and they tout this as a feature. I'm not so sure.

2) If the app is free for drivers and riders, how is the high cost of operations going to be managed? There are servers that need to be paid for, lots of geo-lookups at scale, which isn't free, etc etc.

3) Anyone can drive any car. No quality assurance, no background checks. Is there even a revue system?

4) Negotiable pricing?? I don't know about you, but I don't want to haggle on the price of a ride. When Lyft or Uber say the price is "x", I accept it, or decide to take another form of transportation. Often, it's the latter.

5) Network effects. How are they going to get drivers & riders. That is the biggest question. How will they manage routing, availability, etc. etc.

<comment><USER3> Having ridden existing rideshares, there is precious little quality assurance a simple voting system could not solve, as it has for uber/lyft.

</comment></comment><comment><USER4> What assurances do the riders have that the vehicle they're riding in is mechanically sound? That their driver doesn't have a history of violence? What happens if a rider damages the vehicle?

<comment><USER3> No other rideshare inspects cars, this is a problem with uber also.

<comment><USER5> Lyft definitely inspects cars. it's very basic, but they do inspect them. Uber does as well.

</comment></comment></comment><comment><USER6> Huh. It's a telegram bot. [https://github.com/ro31337/libretaxi](https://github.com/ro31337/libretaxi)

</comment><comment><USER7> Thread from 2017: [https://news.ycombinator.com/item?id=13529213](https://news.ycombinator.com/item?id=13529213)

</comment><comment><USER8> I rarely use Uber, but when I do I feel safe. I don't know that I'd feel safe doing it completely anonymously.

<comment><USER3> But you are no safer than hitchhiking. Its an illusion.</comment></comment>


Quicksort (1961) [pdf] - <AUTHOR> https://www.cs.ox.ac.uk/files/6226/H2006%20-%20Historic%20Quicksort.pdf <comment><USER2> It's fascinating that this is only six pages long. The complexity analysis and corresponding math is sufficiently light as to be both straightforwardly comprehensible and inline with the body of the paper (instead of thrown into a "Theorem Appendix" at the end). The entire paper is exceptionally readable.

In contrast, new research that could be called "fundamental" in algorithms and theoretical computer science is typically several times longer and more complex. On one hand it seems intuitive that the more mature a field is, the higher the prerequisites for review and contribution. Computer science papers from the 60s seem much easier to read these days that what's been put out in the JACM since 2000, and modern papers in pure mathematics research are dense and incomprehensible (and commensurately more difficult to publish results in) even when placed next to modern research in computer science.

On the other hand, a fundamental improvement to Quicksort was developed in 2009 and the author's paper comes in only five pages [1]. Is that because the improvement is "minor", because the author is exceptional at explaining the fundamental ideas clearly and succinctly, or because the author was relatively lazy about putting in the things usually demanded for publication (long sections on methodology, historical context, problem motivation, complexity analysis in different implementation contexts...)? It's hard to know whether some of these academic papers actually require their significant length, or if the presentation of material is simply inefficient. Cuckoo hash [2] was developed in 2001, but its paper comes in at 26 pages despite it being a fairly intuitive construction. The authors didn't just explain the fundamental result, they included two full pages of reference citations, a section on empirical performance characteristics and complete details of their experimental lab setup.

I'm not advocating that modern papers should necessarily be shorter, but I think it's an interesting question.

__________________________

1\. [http://codeblab.com/wp- content/uploads/2009/09/DualPivotQuic...](http://codeblab.com/wp- content/uploads/2009/09/DualPivotQuicksort.pdf)

2\. [http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.25....](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.25.4189&rep=rep1&type=pdf)

<comment><USER3> This is why, when new to a subject area, I prefer reading older papers before trying to read anything recent.

Gratuitous complexity builds over time. (And there is no subject area where I have seen such gratuitous complexity as with computers.)

I have always thought this was because either authors assume knowledge of the earlier papers and/or they have become "too familiar" with the concepts, but I could be wrong. In the later case, perhaps an analogy would be a singer who has to perform the same song thousands of times. When an artist sings it for the 999th time it may sound different and maybe there is assumption everyone has heard it before.

Whatever the reason, it is common to see the fundamental concepts either glossed over or not even mentioned in recent papers.

The exception to this, for me, where subsequent papers are helpful, is when they succinctly summarise prior research or track a subject area over time, e.g., annual reviews.

Anyway, when I am searching for older papers, it often feels "counterintuitive" since I see many people studying an area for the first time who want only the latest research. Perhaps an analogy here could be software. There seems to be a fascination on HN with software that is "new" and being changed on a daily basis versus software that is finished and has been in use for a long time.

A related idea is university textbooks. Many students believe they must have the latest editions, for a variety of reasons. However the changes from one edition to the next may be relatively small and easily summarized. IME, sometimes a topic may be more clearly explained in earlier editions. Reading the earlier edition's treatment of a topic followed by the later edition's treatment is sometimes illuminating in ways that reading only the latest edition is not.

In summary, I find it easier to read the old, 1-3 page paper that lucidly discloses an original concept and then build understanding from there, reading subsequent research, than to read something written, e.g., this year and assume that old research, by virtue of it date, is just a minor detail and no longer important.

<comment><USER4> Right. I've noticed in multiple areas of science that often the pioneers of some technique/theory knew how to do it properly, but lacked the right computational, or other, technology, and had to fudge it in some way they were clear about, but others aren't. People then persist with that unsatisfactory approach, or data produced with it, long after they shouldn't. Reading the original work is definitely worth risking a little wasted time.

</comment></comment></comment><comment><USER5> I had the pleasure of attending a talk by Tony Hoare when I was at Microsoft in 2007. He was a staff member at Microsoft research UK and was visiting the Redmond campus. Having studied and appreciated quick sort in freshman CS it was like being in the presence of God :)

</comment><comment><USER6> Tony was 27 when he came up with QuickSort. Impressive

</comment><comment><USER7> Quicksort should be the first sort you try on your rando dataset. The native search implementation is nearly always competitive with the best algorithm for your particular lunch. And it can be tweaked to specialize on datasets.

<comment><USER8> How can you tweak it to specialize?

<comment><USER9> Probably on how you select your pivot.

</comment></comment></comment><comment><USER10> Interestingly there is no pseudo code describing the solution.

<comment><USER11> There's a reference to a paper that contains ALGOL code instead.

</comment></comment><comment> Ono-Sendai Quicksort is great, but the name is not great. It would have been better named as 'partition sort'.

</comment><comment><USER12> 6:47 minutes to sort 2k items.

We've come a long way. Python isn't even the fastest of languages

      $ time python3.6 -c "import random; l = random.choices(range(1_000_000), k=2_000); l.sort()"

      real	0m0.033s

... and this also takes into account creating the 2k random ints.

<comment><USER13> And Python doesn't even use quicksort any more.

</comment></comment><comment><USER14> Nice find, bookmarked for nostalgia (even tho I wasn't born yet).</comment>


Google Inactive Account Manager - <AUTHOR> https://www.google.com/settings/account/inactive

<comment><AUTHOR> This was brought to my attention in a comment by ToastyMallows: [https://news.ycombinator.com/item?id=6472243](https://news.ycombinator.com/item?id=6472243)

It's a Google Account settings page that allows you to decide what happens with your Google Account data, and to notify others if you haven't used their account for a specified amount of time (presumably you've died).</comment>


Ridiculous Things To Do With CSS3 Box Shadows - <AUTHOR> http://www.viget.com/inspire/39-ridiculous-things-to-do-with-css3-box-shadows/

<comment><USER2> I know HTML5 and CSS3 are cool and exciting new opportunities, but these examples use just as much CPU (if not more) as they would if built in Flash. Insane CPU usage is part of the reason I ditched Flash.

<comment><USER3> There will be more hardware acceleration to come for CSS3. Gotta give Google, Apple, Mozilla, and Microsoft a high bar to shoot for.

Someone should gather all these cool demos for browser "certification."

<comment><USER4> Yeah, in the future there will be ads saying you should buy the latest nVidia graphics card for your fucking browser.

<comment><USER3> They already do.

<http://www.asus.com/News/s3uOpCJHYLTl31xy/>

Why is that bad? Everyone uses a browser. Now all we need is a popular web game to use as a benchmark.

</comment></comment></comment></comment><comment><USER5> Of course this is not exclusively using box shadow but all kinds of clever CSS3 properties such as transform, gradients, etc - non the less very well done.

It really shows what kind of freedom CSS3 brings to the web.

</comment><comment><USER6> Most of these things (if not all) can be done in Firefox. I'd assume the point of this is to show off the cool things you can do with "HTML5"-- and making it work in just one browser seems to go against the goal.

<comment><USER7> box-shadow is CSS3, not HTML. HTML is markup for text, CSS is formatting that text.

It's not about making it only work in one browser — it's that currently these effects collectively (as Arnorhs points out, this isn't just box-shadow) are only rendered properly by that one browser (actually it's the rendering engine which is most important here — WebKit — which means I can view them fine in Safari 5.1).

<comment><USER8> I not sure why the developer labels it "Chrome only". I use Webkit Nightly (Safari) as my main browser, and it's slightly annoying when developers don't seem to realize that Safari and Chrome are both Webkit browsers and as such their support of the CSS3 spec is exactly the same.

<comment><USER9> The difference is the version of webkit included in the browser. I'm also running nightly Webkit, and all the examples work fine, however in default Safari 5 only about 60% render correctly

</comment></comment></comment></comment><comment><USER10> This rocks so hard. I'm definitely going to have to find a way to get these effects into my CSS editor.

</comment><comment><USER11> Impressive! More eye-opening than any HTML5 (Canvas) demo that I've seen

<comment><USER8> Really? Even one from 2009 is pretty impressive.

<http://9elements.com/io/projects/html5/canvas/>

<comment><USER11> Yes, much more impressive than that.

Recreating old Flash demos from 2004 in HTML 5 Canvas is nothing special. If you got drawCircle() and setBrush() in your framework, it's not a giant leap to add animation following the mouse. It's not impressive because that's what such an API is supposed to allow. It's like being impressed that the statement echo "Hello World" printed something to the screen when that's exactly what it's supposed to do.

I found the CSS demo more impressive because it did something _unexpected_ and creative with CSS. They turned the concept of a "box shadow" on its head.</comment></comment></comment>


'Eternal' camera can take pictures forever - <AUTHOR> http://www.bbc.com/news/technology-32353655

<comment><USER2> I've heard of the light powered camera before. Cool concept, needs work though. Defiantly a stepping stone!

Question though, is it 'light' or 'solar' powered?

It appears to be light powered by photons which is crazy.</comment>


The Most Dangerous Border in the World - <AUTHOR> http://www.foreignpolicy.com/articles/2013/05/03/china_india_most_dangerous_border <comment><USER2> Registration required, didn't read.

<comment><USER3> Mailinator is your friend.

<comment><USER2> Yes. But no, no and no.

Seriously, I use Mailinator for stuff I _NEED_ to register to, but not for accessing an article on HN. There are close to a hundred new articles every twelve hours on the HN feed, I select about 30 of them that may seem interesting because I don't have time to read everything.

Now, having to spend more time opening another tab to mailinator, registering for a fake account, waiting for the confirmation mail and finally logging myself in to read the article? That's attention I can't give out freely.

<comment><USER4> Ever heard of Chrome's inspector and just deleting certain nodes? 3 seconds you're done.</comment></comment></comment></comment>


The War Nerd: Here's everything you need to know about "too extreme" I.S.I.S - <AUTHOR> http://pando.com/2014/06/16/the-war-nerd-heres-everything-you-need-to-know-about-too-extreme-for-al-qaeda-i-s-i-s/

<comment><AUTHOR> The money quote (and the headline I would like to have submitted this under but for HN regulations): "ISIS is a physics demonstration in guerrilla form"

Context:

> It's amazing how well combat selects for talent. Nothing rewards talent less > than a peacetime army, and nothing rewards it faster than an army actually > in combat. And irregular forces, which usually suffer something like a 10:1 > casualty rate against conventional occupiers, go through a nightmare-quick > selection process.

> ISIS went through a lot of commanders before one stuck. He was a product of > Islamic schools and US prison camps. He called himself Abu Bakr al Baghdadi, > which means exactly nothing except that he's claiming to be from Baghdad. He > got out of prison in 2009 and walked into a leadership vacuum created by an > airstrike which killed his predecessor—nothing like airstrikes to make room > at the top—and oversaw ISIS's move away from pressure once again, out of the > cities toward the deserts of Anbar Province where Sunni sheikhs maintained > strong clan networks. It wasn't much, but it was a safe base, and that's > something any mixed militia/guerrilla force requires.

> ISIS got its second great break when The Syrian Civil War exploded in 2012. > They looked west, across the Anbar deserts, and saw a huge organizational > opportunity opening up in Syria. Assad's troops had abandoned most of > Eastern Syria to focus on defending the Alawite heartland along the coast. > That vacuum created an opportunity for lots of people: The Syrian Kurds, who > occupied a tier along the Turkish border in the northeast; dozens of local > mafia/resistance groups, who mobilized to profit from the wide-open borders; > and the nucleus of ISIS, who saw a chance to set up a little emirate in this > new no-man's-land in the wastelands of eastern Syria, along the borders with > Anbar.

> That's the key here: ISIS is a physics demonstration in guerrilla form. It > began as a Jordanian insurgent group. Jordan was too tough to crack, and the > group was under deadly strain until Bush and Cheney gave it new life with > the 2003 invasion. It moved into Iraq, first to the north, in Kurdistan, and > then, as the pressure grew up there, to the south and west, landing in > Anbar. And when a new low-pressure system opened up to the west in Syria, > ISIS flowed into it like a rain cloud—right along a natural pathway, the > Euphrates River, which flows eastward into Anbar from Syria.

<comment><USER2> Thanks for posting this. A great read and I'm now following the author on Twitter.</comment></comment>


Bruce Schneier is blessed in his enemies - <AUTHOR> http://freethoughtblogs.com/pharyngula/2013/11/05/bruce-schneier-is-blessed-in-his-enemies/

<comment><AUTHOR> (Note: I linked to a discussion instead of the original article because its headline is probably not going to stay that way for long.)</comment>