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

OCaml is getting that much money from quantitative finance firms &c. if you are curious. There are a not insignificant number of them that use OCaml, and it is the only time I have heard of OCaml being used.


OCaml is used for code verification tools too (Microsoft z3, CEA Frama-C, INRIA Coq, AbsInt Astree, Facebook pfff, ...) and for system programming a lot (Citrix Xen Toolstack, MLstate OPA, MyLife.com, MLdonkey, Unison, ...). If you have heard of OCaml only for finance, you have probably not searched enough.


APL programmer (rarely used outside finance, too) gets you 94 kilobucks. I guess the OCaml average contains very few samples.


I went to college at 13 (I've graduated now, obviously), and essentially had to answer this question over and over. I went to college, without the getting drunk, without the frat (I did get to do original research, though), and without the getting laid (for the most part). I did it because I loved learning. I still do, but colleges are essentially bureaucratic hucksterism. So a lot people think I missed out -- on high school, college, everything. And I explain, I lead a pretty active life, and I got some awesome chances to do cool things. Now I can spend these years really _focusing_ on doing irresponsible and stupid things.

Why is everyone such a punk about not being able to do cool things if you aren't enrolled in a degree-seeking program?

(Also, I'm American, so all I can do is confirm people have exactly the same social dysfunction you think they do.)


Here is how you do it: input is the list of words, with duplicates you need an additional list (let's call it x) and an integer (let's call it i) for each item in the list, if it isn't in x, add it, increment i, and print it followed by a space if it is in x, print a newline, and spaces equal to the number of characters in each preceding word after index i in x + 1 for each word in that range. There should be x.index(item) - i things, and this loops. Python indices, I would think, take care of the special case where you need to loop around, sans the printing of a newline, so make sure you do that after you print the spaces for the last item.

I'm sorry you seemed to have not gotten help on this. The title seemed a little silly to me.


Also, the formatting was goofed up, sorry about that. Really isn't too bad a problem when you think about it in terms of, where do things go when you print them, and where is the cursor. That's what x and i are respectively.


Thanks but I am sorry but I don't understand this solution.

In my problem, I get a string s that user enters in a form.

I append that to an empty list L = []

then I test if the last saved string is the same as the new string. If same, I write it on the same column; if not the cursor moves to next column (I was trying to do this with tables) and as long as the user types the same string the cursor stays on the same column. If a new string is typed; a new column is started; and so on.

I don't think your solution is to this problem. You assume that there is a list with duplicates.

Does this make sense?


Okay, here's the thing: That's not actually what your example seems to be doing. If you have a b a Then the second a should go in the first column, right? If not, then this is trivial. If so, then the input is all appended to the list.


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

Search: