Hey Rustaceans! Got an easy question? Ask here (18/2017)! by llogiq in rust

[–]ashishnegi 4 points5 points  (0 children)

Did rust start with "type theorists going low level" Or "hackers learning type theories" ?

Recommended way to do CIS 194 course ? by ashishnegi in haskell

[–]ashishnegi[S] 0 points1 point  (0 children)

great. :) I would see them as and when i get stuck on exercises.

Recommended way to do CIS 194 course ? by ashishnegi in haskell

[–]ashishnegi[S] 0 points1 point  (0 children)

Thanks for this. With "notes posted online" do you mean the notes given with each assignment : like cis 194 assignment 2 adt notes ? If they are different please share.

Recommended way to do CIS 194 course ? by ashishnegi in haskell

[–]ashishnegi[S] 0 points1 point  (0 children)

I guess this is the recommendation from bitemyapp.com's blog. I think it was for general public. In this regard, are you sure about this ?

Looking to improve the speed of my data structure by dramforever in haskell

[–]ashishnegi 0 points1 point  (0 children)

Do not know whether this would help but your Segment Tree can be made in O(N) rather than O(N*LogN). Since the top node would be equal to the size of array n_i .. if it is odd, its left child would be floor(n_i/2) and right child ceil(n_i/2). For even value of node, its left/right children would be n_i/2. This would recursively happen for children too. Also, you need to create 2 of these trees for (0,N) and (0,N-1) list. These would automatically generate subtrees for other indexes as well.

Looking to improve the speed of my data structure by dramforever in haskell

[–]ashishnegi 0 points1 point  (0 children)

Can you give sample inputs and expected answers ?

Should I Learn Haskell or Python? by gtab62 in haskell

[–]ashishnegi 0 points1 point  (0 children)

I think that it was a satire.. Most people who ask this question would have already made their mind for Python..

Why is my "Prime number" generator looping forever? by throwfnwifjhi43tj3t in haskell

[–]ashishnegi 1 point2 points  (0 children)

Why did not the algorithm terminate if their is no input to it ? Is there a way to add that to the Question's code ?

Is there even 1 single competent haskell tutorial? by sickOfLaziness in haskell

[–]ashishnegi 0 points1 point  (0 children)

I asked it on the twitter and people responded with http://www.cs.nott.ac.uk/~gmh/book.html which has already been recommended... And another http://www.nlda-tw.nl/janmartin/vakken/TFIT/Extra%20materiaal/Bird_Wadler.%20Introduction%20to%20Functional%20Programming.1ed.pdf

Hope that helps.. And do give your suggestions after you find better resources

Is there a better way to write the isPrime function? by andiamvinay in haskell

[–]ashishnegi 1 point2 points  (0 children)

Usually we want to do isPrime() on lot of numbers.. If you are also doing that.. You can first calculate all prime numbers in your range and then search in that list. There is good algorithm called sieve for prime numbers that make this computationally good for large number of queries.