Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
dxbydt
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
89 ms
·
781.
▲
by
dxbydt
15y ago
Just an asie: Printing Pascal's triangle for upto 10 rows is trivial. The factorials don't get big enough so you can simply use binomial coefficients (like in your ruby solution). But if you want Pascal's triangle for the 10,000th row =>
782.
▲
by
dxbydt
15y ago
(So I had 10 minutes to kill) ----- import scala.collection.mutable.HashMap import scala.math.BigInt val pascals = HashMap[Int,List[BigInt]]() def pascal(row:Int):List[BigInt] = { val result:List[BigInt] = row match { case 1 =>List(1) c
783.
▲
by
dxbydt
15y ago
> the pain is in writing good GPU code A viable alternative is to not write the GPU code yourself. Write a code generator in Scala that spits out GPU code in C. For details see Claudio Rebbi's work, which uses Scala as a higher level co
784.
▲
by
dxbydt
15y ago
I've found that if the list is very large, using list.par.map(...) hits the memory limit & then simply hangs. I process upwards of a million facilities ( a facility is the exposure on a commercial loan a bank makes to a client ), tryin
785.
▲
by
dxbydt
15y ago
> wish schools taught math leading to statistics and probability instead of leading to calculus This is silly. All probability distributions are cadlag, so how can you even teach probability without the notion of right continous with le
786.
▲
by
dxbydt
15y ago
>I'm confused as to the meaning there. What is it about phone calls that follow an exponential distribution? Sorry for the confusion. Lemme clarify a bit. Say you work at an office. 9am to 5pm. 8 hours a day. scala> 60x60x8 res45: I
787.
▲
by
dxbydt
15y ago
>Would you agree, though, that customers wouldn't simply enter the shortest available line? I don't agree with that at all. In reality, some would and some wouldn't do what you suggest. If all of them did exactly what you are suggesting
788.
▲
by
dxbydt
15y ago
>everyone uses different variables and judgment to make that prediction. Those variables and those predictions don't show up when your model is based on distributions. Sorry but that's simply not true. everyone uses different variables
789.
▲
by
dxbydt
15y ago
Sorry, here's some R code ( profusely commented ) http://www.stanford.edu/class/cs109l/code/week5/exponential.... >Intuitively, this result doesn't seem obvious It isn't obvious because human arrival times at checkout counters follow
790.
▲
by
dxbydt
15y ago
>Try it with 1 queue which feeds into whichever of the three queues is currently shortest I have edited my original response to include that scenario as well. btw for M/M/1 vs M/M/3, here's a good reference: http://people.brunel.ac.uk/
791.
▲
by
dxbydt
15y ago
scala> import org.apache.commons.math.distribution.{ExponentialDistributionImpl=>expo} //pc = process customer, with a mean time mu per customer scala> def pc(mu:Int):Double= new expo(mu).sample // q = queue of n customers with
792.
▲
by
dxbydt
15y ago
>>the idea that all the most innovative people only exist in the United States (or even that people in the US are on average more innovative than others) is ridiculous Its not ridiculous at all. For what its worth, it happens to be
793.
▲
by
dxbydt
15y ago
I recently (well, a few years ago) went through functional programming in schools. They don't really teach you functional programming, as much as why you shouldn't program imperatively. Even when they're teaching functional programming, the
794.
▲
by
dxbydt
15y ago
Just a nit - sin(1) is transcendental ( by the Lindemann Weirstrass Theorem). All real transcendental numbers are also irrational, but the converse is not true ie. the square root of 2 is irrational but not transcendental. So I guess your t
795.
▲
by
dxbydt
15y ago
> Scala macros might be a solution to a problem nobody has Pls read slide 10 of this document - http://scalamacros.org/talks/2011-10-18-WhatsUp.pdf --Proposed Code snippet with macro --- class Queryable[T, Repr](query: Query) { macro
796.
▲
by
dxbydt
15y ago
I use google reader everyday at work on Internet Explorer 7.0 ( bank-mandated browser, don't ask ). Worked fine until this new layout change. Today I login. It says "Your browser is not supported" ! Hmmm...never happened before. Now I get 3
797.
▲
by
dxbydt
15y ago
I am a quant. I work at a bank. We do a fair amount of portfolio optimization & price-analytics, in Scala, Matlab,C++, CPLEX. Its not hard to get your feet wet with financial modeling, though reasoning about the models does take an MFE
798.
▲
by
dxbydt
15y ago
> Is this common? Well, its not uncommon. From my unscientific survey among my colleagues I'd say ppl who don't own machines is upwards of 60%. Its not hard to see why. Banks work you quite hard anyways. I stare at a PC 8 hours a day. P
799.
▲
by
dxbydt
15y ago
You are trying to count your chickens before they hatch.Before Netflix came along, the thinking was - if you like a movie you will just buy the DVD so you can watch it any number of times. Its just $10, why not just buy it ? Guess what, I w
800.
▲
by
dxbydt
15y ago
> Am I missing something? I think you are. I work fulltime at a bank for my paycheck. I have an internet connection in my apartment, and an office assigned wintel laptop. When I get home at 6ish, I can maybe put it 2-3 hours of coding.
801.
▲
by
dxbydt
15y ago
http://www.cs.uni.edu/~wallingf/blog-images/code/jmc-lisp.sc...
802.
▲
by
dxbydt
15y ago
I must have read this book a hundred times, no kidding. It is a great book, or rather, a great piece of writing. That said, it has nothing to do with economics. It should really be titled 'Hazlitt in One Lesson.' This man, armed with his rh
803.
▲
by
dxbydt
15y ago
>>It costs money. Then slap a Gogle Payments icon on the page and charge a dime per click. Or a nickel. They can make a pretty penny, no pun intended :)
804.
▲
by
dxbydt
15y ago
I put my math thesis ( PDF file ) on scribd and sent a link to my professor. He was like, you want me to pay $20 for your thesis ? It was quite embarassing considering he was on my thesis committee..morover the equations in the PDF were mes
805.
▲
by
dxbydt
15y ago
>As economics, as a field, becomes more powerful, the economy becomes more stable. umm..Nope. I can give you a subtle, nuanced argument about why that's plain false. However, I will defer to Dr. Derman here - http://blogs.reuters.com/
806.
▲
by
dxbydt
15y ago
>> A good economist ...can tell you what the economy will do. I was sipping a venti mocha when I read this and I laughed so hard there's mocha all over my keyboard. There are people here, actual paid economists, who are doubling up
807.
▲
by
dxbydt
15y ago
In the enterprise, there are no other languages that fit the bill besides Scala. You underestimate just how much java code exists out there in any commercial bank, IB, big corp., yada yada. Its an order of magnitude more than your wildest i
808.
▲
by
dxbydt
15y ago
166 violations, of the 4025 classes/interfaces in java 7: That's 4% of Sun's own JDK, not counting user defined classes. In my 15 years of Java pgmming, I've seen enterprise programmers almost always start out their OO design with a class n
809.
▲
by
dxbydt
15y ago
Heh. This is exactly what Infosys/Wipro/TCS do. If you've ever worked for a big financial services co or IBs and meet tons of Indian IT folk day in and day out and wonder hey where do all these people stay and how do they afford to live in
810.
▲
by
dxbydt
15y ago
Dude...its all such a blur..I'd have to rent a time machine and hit the computer graphics depts at all the ivies. But I did find some JTable code from way back then, in the bugfix archive http://www.mail-archive.com/classpath-patches@gnu.o
More ›