47 karma · joined Sep 26, 2011 (15y ago) · 23 submissions
comment 11y ago · link · parent
You could say that "almost functional" does not really exist, just like "almost secure" does not exist.
And yes, you can still program with a non-functional language just fine he does not refute that.
comment 11y ago · link · parent
As in any lambda calculus, you can interpret the type system as a category where the objects are types and the arrows are functions. Classes like Functor and Monad are based on this interpretation.
comment 11y ago · link · parent
comment 12y ago · link · parent
comment 12y ago · link · parent
Of course this is a sad story, no one should ever get hurt by drug violence, let alone a defenseless baby. But i think we should not rush our opinions on these things.
It's easy to get all emotional and be all upset when we read these things.
But we are supposed to be intellectuals right? We should not make judgements based on one sensationalist article. We can do better than that.
I think we should all just act a bit more rational. Don't make snap judgements. Read more about a subject before you condemn people.
In the end, i don't care what YOU think is the truth. Just make sure you know what you're talking about before you shout out your opinions.
PS: iambateman, this is not really meant for you of course ;)
People will probably misinterpret my post. In no way i mean to say that police and government don't share any blame. I'm definitely against the militarization of police. But i won't be sending money to that family either.
comment 13y ago · link · parent
I don't think the arrest was entirely unnecessary. The guy was really provoking the police right from the moment when he arrives. He knows he's messing with them and I think taking that dog out of the car was just another thing done to annoy them. He was asking for trouble and he got it.
Off course it's sad that the dog was shot. That was handled poorly. I guess people do stupid things in stressful situations where they don't have time to think.
comment 13y ago · link · parent
comment 13y ago · link · parent
I don't think the author is saying everyone should use a physics engine now. I think he means that we should use real-world physics as a guide to making more realistic animations, be it with a simple effects library or a full-fledged physics engine.
comment 13y ago · link · parent
A separate folder for the gh-pages branch makes sense because this branch has nothing in common with any of the other branches. It doesn't share any code or commits with your master branch.
The repository actually has two base commits and it's like two repositories contained in one. Thus needing two separate folders.
comment 14y ago · link · parent
For programming languages, that means the result of a function is dependent on it's inputs ONLY. The function can not use any unspecified inputs like system time or an internal state.
In Nix, that means a package can only depend on dependencies which are specified beforehand. It's nearly impossible to use libraries or binaries which you did not specify.
That behavior makes it easier to reason about your whole system, like determining which packages are unused. This is similar to the advantages of referential transparency in functional languages
comment 14y ago · link · parent
Nix: A Safe and Policy-Free System for Software Deployment - http://www.st.ewi.tudelft.nl/~dolstra/pubs/nspfssd-lisa2004-...
I really hope nix will become standard practice, it has some significant advantages over existing package managers.
comment 14y ago · link · parent
For a sorted insert you need to do 2 things: find the right spot for insertion and the insert itself. An insertion sort does this n times.
For a simple array/vector that's:
search: O(n)
insert: O(1)
total takes (O(n) + O(1)) x O(n) = O(n^2)
For a linked list:
search: O(n)
insert: O(n)
total takes (O(n) + O(n)) x O(n) = O(n^2)
There we go, the algorithm takes O(n^2) for both data structures. The theory already proves that a linked list has absolutely no advantage over an array when using this algorithm. On top of that, iterating over a linked list is slower than over an array for various reasons, even thought they are both O(n). So that's where the difference is coming from.
The example he uses is clearly a wrong use case for a linked list, it's plain wrong to conclude that the whole data structure should never be used.
comment 14y ago · link · parent
Consider this: Of all the products made a 100 years ago, only 1% was made to last for a long time. Right now the other 99% is broken and thrown away and the 1% is still being used.
We only SEE old products which are well built. That doesn't mean all old products are that way.
There are still products being build which we can use for a long time, but they don't stand out and will only be noticed after a tens of years.