News for hackers. Stuff that matters.

atnnn

I find this easier to visualize with an equivalent way to pick points: drop four (n) lines through the center of the circle. For each line, randomly pick one of the two points that intersect the circle.

Independent of the lines dropped, there are eight (2n) ways to pick adjacent points and sixteen (n^2) different combinations of points.

There are four (n) adjacent points iif the points lie on the same half of the circle (proof by interactive visualization).

So the answer is eight sixteenths (2n/2^n).

Re:Untranslatable on Friday January 26, 2024 @03:32PM (#39147878)
I would say "donc" is used where some might say "so" in English (aka shorter and less pompous "therefore").

I think the meaning of "Agreed" or "Right on" is rare and more implicit. Like saying "therefore" might mean "I accept the premise".

As a question, "donc?", like "so?", can mean "and then?", "then what?", "meaning what?", "what next?" or "so what?"

As an interjection or at the beginning of a sentence, "donc", like "so", can mean "now then", "that said", "moving on" or "without further ado".

Re:Show HN: Nomouse on Sunday March 12, 2017 @06:34AM (#13850130)
Using a mouse is distracting. It steals our focus away.

Programming can seem like a slow process because the bulk of the process happens in our minds. Keeping our focus on our precious mental models makes us more productive.

Keyboard shortcuts become mechanical. When we're in the middle of editing code, whether we type "F8" "C-c C-l" or ":make", we can keep your focus where it belongs. But if we use a mouse to click on the "Build" button instead, we lose part of our focus looking for and aiming at the button. Menus and file explorers are especially bad at this: when opening a menu item or looking for a nested file, every single subfolder or submenu steals more of our focus away.

I know a few programmers who never use auto-completion for file names or methods. It surprised me and frustrated me a lot at first. Typing long file names without tab completion can be so. much. slower. But then I realised we can be much more efficient that way! Auto-completion interrupts our focus. We need to take in new information and make decisions. It's all about eliminating the step where we ask ourself "Why did I open this file?" or "What goes next?". It is easier to think about what arguments we want to pass to a method when we're not focused on selecting that method from a drop-down list. That is also why precise touch-typing is so important. We don't want to focus on either the pointer or the keyboard, we want to focus on our code.

The mouse itself isn't the problem, in fact some editors such as ACME or Blender make very good use of the mouse. The problem is inefficient UI design that interrupts our concentration.

Re:MongoDB 3.4.0-rc3 on Wednesday February 08, 2017 @11:18AM (#13599407)
Re:RethinkDB Postmortem on Wednesday January 18, 2017 @12:10AM (#13424149)
Some of us are keeping the RethinkDB database and community alive. The code is open source, and development continues slowly. The next release is almost ready. It'll have new features and performance improvements.
Re:Developer Preview: RethinkDB Now Available for Windows on Wednesday February 10, 2016 @05:57PM (#11076872)
RethinkDB uses custom abstractions to hide the lower-level OS-specific code. We were able to port the low-level code to Windows with very little changes in these abstractions, and thus minimal changes to the rest of the code base.

The proper way to use libuv would be to replace those abstractions with libuv's own, which would affect a lot more code and possibly break a lot of implicit invariants.

In retrospect, perhaps we should have given alternatives like libuv, libevent or boost::asio more consideration.

Re:A Comprehensive Guide to Moving from SQL to RethinkDB on Tuesday April 07, 2015 @01:56PM (#9335810)
The RethinkDB query language can be very expressive.

What you shudder to think of could be expressed as

    row('species').contains(function(s){ r.expr(['Saiyan', 'Human', 'Android']).contains(s) })
Or also as:

    row('species').setIntersection(['Saiyan', 'Human', 'Android']).isEmpty().not()
The succintness of ReQL depends on that of the host language. JavaScript's bulky syntax for functions and lack of operator overloading make queries a lot more cluttered.
Re:Video Streaming with RethinkDB Changefeeds on Saturday March 21, 2015 @02:08PM (#9243603)
RethinkDB's `.changes()` command doesn't support this directly. Here is the corresponding github issue: https://github.com/rethinkdb/rethinkdb/issues/3579

The code in the demo does this by performing a separate `between` query.

Re:Video Streaming with RethinkDB Changefeeds on Saturday March 21, 2015 @12:44PM (#9243252)
Changefeeds are meant to be used by an app that isolates the user from the database.
Re:Video Streaming with RethinkDB Changefeeds on Saturday March 21, 2015 @12:21PM (#9243157)
An app usually sit between the database and the user, isolating them from each other. This demo does not isolate the database, it is just a proof of concept.
Re:Video Streaming with RethinkDB Changefeeds on Saturday March 21, 2015 @12:08PM (#9243107)
I told ffmpeg to use `-r 25` but the console output says `fps=7.6`.

I just put it together in a few hours to see if it was possible. Given the unexpected interest in it, I'll put some more work to see where we can take it.

Re:RethinkDB 1.15: Geospatial queries on Thursday September 25, 2014 @02:39PM (#8368836)
Hello. Etienne here. I did the packaging for this release.

It looks like the lucid package is no longer compatible with wheezy.

You may have better luck using precise, trusty or saucy instead of lucid in your sources.list

I will run some tests and update the docs on rethinkdb.com.

Re:RethinkDB now available on AWS marketplace on Wednesday August 21, 2013 @04:30PM (#6253116)
The documentation is misleading. RethinkDB instances launched from the Marketplace all run on an EBS volume.
Re:Ask HN: What's your motivational saying? on Monday February 04, 2013 @03:09AM (#5163053)
If it's not worth doing your best, it's not worth doing at all.
Re:RethinkDB's first community client driver is for Haskell on Wednesday November 28, 2012 @08:04PM (#4845735)
> The next step is to make this a monad!

It already is! Each expression is a simple wrapper around a monad, similar to this datatype:

data Expr = Expr (QueryM Term)

Where QueryM is the monad that helps build the query and Term is the raw protobuf expression that gets sent to the server.

Re:Answers to common questions about RethinkDB on Saturday November 17, 2012 @05:07AM (#4797752)
t.forEach(t.insert(t.without("primaryKey"));

Only try this at home.

Re:Bitcoin is Not Anonymous on Sunday July 24, 2011 @10:41PM (#2801082)
All transactions are public.

It is one of the central ideas behind bitcoin and leaves no doubt about the anonymity of the transactions.

It is a well publicised idea and it is even mentioned on the main page of the bitcoin wiki (http://bitcoin.it).

I love the idea and the implementation, I've been looking for something like this. If you could filter by language it would be a lot more useful. Is that possible?