Hacker Newsnew | past | comments | ask | show | jobs | submit | daivd's commentslogin

Thanks for this one. Extremely well written.


I also use org-mode for my daily journal. Have been for about a year and I'm very happy with it. I used to use Evernote, but I like the idea of keeping it to myself with encrypted backups better.


It is not a conventional quantum computer. You cannot use it to factor numbers. You use it to find approximate solutions to optimization problems.


Well, I will tell one relevant problem that can be annihilated with this: ads placement. Google advertisement adwords is all based on a auction mechanism at the end of which you have to find the best allocation of ads to bidders (to slots) - which has an evident combinatorial nature, to find optimum you should try all possibile combinations. This is typically solved in approximated ways. It may not be a "conventional quantum computer" but it's pretty usefull anyway:) I can't wait to toy with one..


So in a way it's similar to the analog computers that were around for decades (or, really, for millennia). It's just smaller and faster than most.

https://en.wikipedia.org/wiki/Analog_computer


I have never quite understood all these desktop emotions. I run Kubuntu, but almost never interact with any desktop features. What is it in your workflow that requires you to interact with Gnome/Unity? (just curious)


The main thing that springs to mind is that the only way to get a half decent desktop is through extensions. I installed a whole load of useful ones about a year ago, but currently only about 1/5th of them are still working due to gnome version incompatibility.

One of the most noticably broken parts of Gnome Shell for me is that my Pidgin notifications/alerts seem to be broken. They neither flash the item in the taskbar, nor give me a popup to let me know that a new message has arrived. I had an extension to fix this, but that has since broken upon Gnome version change. There is a messenger integration into the user account menu in the top right, but there is no way of changing the client from the default to Pidgin.

I only use Gnome on my travel laptop, so I get little snapshot peeks at how it's going. I've had these problems I've mentioned for quite a while now (and many more besides), it only seems to be getting worse. The Gnome devs seem to be completely ignoring the community and charging off down their own path of weird unusability.

For my main desktop I just run AwesomeWM, which is almost completely pain-free and gets the hell out of my way.


alt+tab. Used to work perfectly. Now broken. I've returned to debian stable, which comes with a gnome-2 legacy option that works out of the box just as well as it did a decade ago.


Go to [0], install, configure to either "all windows" or "all windows in current workspace", and alt+tab probably works like you want again. It's not terribly difficult.

[0] https://extensions.gnome.org/extension/15/alternatetab/


Or, you know... just keep using an old, stable, dependable version. But you can't do that with GNOME since they are such rabid fans of the CADT model.


Have you tried the "Simple App Switcher"? It's the good old alt+tab from yester years. You can enable it through Compiz Settings Manager.


Alt-Tab, Super+[1,2,3...0], App launching from the Dash and window spread.

I can't live without the Super+[1,2,3,4...] shortcuts.


No, it does not exclude that possibility (print the final list of pairs if you want to check). The calculation is correct. The result is counter-intuitive to almost everyone, which is why I made the program, so you can convince yourself.


Nope, sorry, it's wrong. Here are the possibilities for someone with 2 children were at least one of them is a boy borne on tuesday:

  01) 1BT 2BM
  02) 1BT 2BT
  03) 1BT 2BW
  04) 1BT 2BR
  05) 1BT 2BF
  06) 1BT 2BS
  07) 1BT 2BY
  
  08) 1BT 2GM
  09) 1BT 2GT
  10) 1BT 2GW
  11) 1BT 2GR
  12) 1BT 2GF
  13) 1BT 2GS
  14) 1BT 2GY
  
  15) 1BM 2BT
  16) 1BT 2BT
  17) 1BW 2BT
  18) 1BR 2BT
  19) 1BF 2BT
  20) 1BS 2BT
  21) 1BY 2BT 
  
  22) 1GM 2BT
  23) 1GT 2BT
  24) 1GW 2BT
  25) 1GR 2BT
  26) 1GF 2BT
  27) 1GS 2BT
  28) 1GY 2BT
Your program counts possibility # 2 and 16 only once, because at first glance they are identical. But they are not, because each child has independent probability. This is why models that graph this information on a grid also fail to get the right answer. The above probability table gives you the proper result of 14/28, or 1/2.


Actually you are still wrong.

Try something easier, for example two dice. The probability to roll 1 1 is less than to roll 1 2, because 1 2 can be rolled either by first rolling a 1 or a 2, while 1 1 can be rolled only by first rolling a 1. That information is used often in dice games like backgammon.

Same with children: BT BT can only be "rolled" if your first child is BT, whil BT BW can be "rolled" if your first child is either BT or BW.

Do you see?


The probability that you will roll 1 1 is indeed less then rolling 1 2 or 2 1, but that's only because you are allowing for twice as many acceptable outcomes.

The Wiki article you reference in your own code explains it well. The problem is in the assumptions made by the person answering a riddle. Just because you have a child, and it's a boy, and he is born on Tuesday, it does not mean that your next child is more likely to be a girl. If you agree with that statement, then the original answer must be false.


The wiki article is not valid, since it considers a subtly different problem than the one I do. If you read the comment at the top of the code, you will see that I changed the question to be less ambiguous.

In the problem I pose, the person does not randomly come forward and tell me "I have a boy born on a tuesday". In my problem I ask random people who I know have two children if they have "at least on boy born on a tuesday" until someone says yes.


My python is really rusty, but if you convert this sudocode to python, you will see that the answer is 50/50. I'll write this up in Javascript when I have time. If you do this in Python, please post.

   girl = 0
   boy  = 0

   do 10000 times {
      child1Sex = randomSex;
      child1Day = randomDay;
      child2Sex = randomSex;
      child2Day = randomDay;
      if ( (child1Sex == "B" AND child1Day == "Tu") OR (child2Sex == "B" AND child2Day == "Tu") ) {
         if (child1Sex == child2Sex){
            boy++
         } else {
            girl++
         }
      }
   }

   print "Ratio of boys and girls is " + boy " : " + girl;


I whipped together something here, before I saw that someone else did it too: http://ideone.com/jyPOhs

It is the most counter-intuitive statistic problem I know (worse than Monty Hall), it trips everyone up at first.

No problem about the stubborness ;)


Here's my attempt in python: http://pastebin.com/tSDK1uRv

the range(0,10000) may not be correct, it might need to be 1,10000


Wow, works good. I should learn python :) But yeah, you were absolutely right! It was hard for me to figure out because I was trying to find a mathematical reason for this, and I was wrong. I finally figured it out mathematically. The way you posit the problem the probability that the asked parents have another boy is (1/2)-(1/7/2).

This is really counter intuitive, the open vs. closed probability set through me off. Hey, thanks for putting up with my stubbornness!


One subset for each TLD would be nice. Or, if you can afford more CPU-power, per language, using a good open language detector.


I have a fundamental issue with bitcoins that I have not seen anyone address. Sooner or later a better bitcoin will be invented. One that can perform transactions faster, or is more anonymous or where mining for the coin helps some nice project (SETI@home, math proofs, protein folding, etc), or something completely different. When an alternative better currency catches on, at some point it will become obvious that bitcoins will be obsolete and the value should suddenly be 0 again.

It is the nature of technology that bitcoins will someday become MySpace.

I am open to be convinced otherwise by someone knowledgeable.


Not always the best technology is the one which success. If that better bitcoin is invented too late, bitcoin can have a large infrastructure and accepted by a large proportion of merchant to be switched. Just think about VHS and Beta or OS/2


No, you are correct. The oil money is hardly spent at all. It is invested for future security.


I agree that syntax is more important than us "rational" programmers like to let on. The syntax will be similar to Python, but nothing fantastic.

I think switching the usual meaning of = and == will be confusing. O'Caml uses = and == for deep and shallow comparison respectively and <- for assignment. That is a possibility.


I plan to sneak in something similar with a capable type system and contracts for stuff that you can't express in the types. That way you could "one day" use a solver like Z3 and start proving or disproving some of the tractable contracts, without having to even change the programs. A bit like LiquidHaskell.

Not exactly dependent types, but practical, I think.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: