You don't want to do that. If there is an exploit and an ability to gain root access, those libraries could be modified and affect everything else that uses those libraries outside the chroot jail. Best to just copy them.
Bollocks. I use my health insurance (publicly funded - I'm Canadian) for oil changes and checkups, and Canada still manages to spend about half, per capita, on health coverage as the US.
Not only that, but most employers offer supplementary insurance of one form or another to provide for the things not covered by public insurance. Because they don't have to worry about most of the Big Things (except dental and usually optometric), it's far easier and cheaper for them to offer some of the smaller things (massage, orthotics, etc.).
"Even" or "especially"? I'm very inexpert on this stuff, but I thought the folklore was that Apache is appropriate when you need its configurability or when most of the time spent servicing each request is spent doing real work rather than web-server overhead, and that you want things like nginx/lighttpd/... for cases when you're serving mostly static files and care about pushing them out as fast as possible. Am I way out of date?
Does anyone have any suggestions for beginner Haskell projects?
I've read through some Haskell material before and tried following tutorials, but I always end up dropping it because I can't think of anything for which I would use it.
I have no problem with functional and functional-esque programming (Erlang, Common Lisp, etc.), but I just can't come up with anything to do in Haskell. :(
EDIT:
Thanks for the great suggestions, everyone! I think I'll do some crpyo-based maths work in Haskell since that is what holds my interest at the moment. :-)
I always end up dropping it because I can't think of anything for which I would use it.
What do you normally program? Do that, but in Haskell. It's a general-purpose programming language, and there are plenty of libraries to help you in any area.
As someone who sympathizes with the OP's way of learning programming languages, I think what I'm interested in seeing is some commentary on where Haskell's "sweet spot" may be. There are tons of languages out there, and I don't want to learn new ones just for the sake of it. Ok, actually I do if I'm honest with myself, but I need some kind of practical justification for it:-) With Erlang it's easy to say "oh, cool, this is really, really good for this type of application". Haskell seems like it's fairly fast and perhaps good for doing calculations, but that's the only vague notion I have of what it might be useful for in the real world.
I've been busy learning Haskell on and off between classes since December. And the main points I noticed so far are:
tl;dr version:
1) It's a pretty language.
2) It's fast.
3) Static typing (and its optional companion "formal verification") rock.
4) Higher-order functions, Algebraic Data Types, Polymorphism and currying are our friends.
5) Exceptions are evil[1], explicit error handling is safer. Finally a language that hands me more convenient way of explicit error handling then:
int result = someCLibraryCall();
if (result == -1) {
fprintf(stderr, "Ach, mein leben!");
exit(EXIT_FAILURE);
}
Long verbose version:
1) Haskell comes with lots of nice syntactic sugar:
Arbitrarily changing prefix into infix functions or vice versa:
elem foo list == foo `elem` list
1 + 2 == (+) 1 2
Python-like indenting for blocks instead of braces (you could also use braces, but I've gotten allergic to them since learning python)
2) For a language as high-level as Haskell, it's FAST. Most of the benchmarks show it pretty consistently in the C/Java performance regions (depending on what you're doing of course).
3) I used to hate static typing and think dynamic typing was the "end all, be all" of typing solutions until I start learning Haskell and suddenly realized I don't hate static typing, but that I hate crappy static typing implementations (Java, C, I'm looking at you).
A bonus of this is that it makes program verification of Haskell programs A LOT easier. During my class on protocol validation the mu-calculus we used for verifying programs was almost trivial to translate to Haskell (and vice versa).
I'm a firm believer in "formal verification" as a means to detect/prevent bugs. And while it might not be an issue for the programming world at large right now[2] (who cares if a word processor or browser crashes), it is important for mission critical software on things like cars, train, airplanes and space shuttles...
As a side note, I still like and use dynamic systems like python, but only for "trivial" code. i.e. quick scripts and stuff where I don't care if it breaks.
4) I find that with Haskell I'm usually working on a much higher level of abstraction then otherwise. Which means I'm spending more time thinking and scribbling on my white board and less time writing code and fixing stupid mistakes.
5) Monads like Maybe and Either allow for various convenient ways to do explicit error handling (there's probably a gazillion more ways to do explicit error handling with monads, but I don't grok them enough yet).
While Haskell still has exceptions they're far more limited and more sparsely used then in other languages.
EDIT: Removed very verbose and vague description of the Maybe monad, examine the example posted by jmillikin below instead.
In conclusion, what's Haskell good for? Well, I find it lends itself pretty well for high-level, abstract, meta sort of programming. The type a lot of people advertise Lisp for. And while Lisp macro's might be a tad more expressive[3], Haskell is most certainly prettier. And as behoofs any (ex-)python programmer I'm convinced readability matters.
All this while still being fast, reasonably good at stopping you from writing bugs and relatively easy to debug. Sounds like good enough reasons to use it, for me.
[1] - I'm not gonna argue "why" here, if you want to know I recommend Googling "Exceptions considered harmful" or "why exceptions suck" and you'll find plenty of in-depth explanations.
[2] - Actually, I do think it is relevant to ALL programmers. But that's more of a personal opinion which not a lot of people seem to share.
[3] - This is a hunch, learning Lisp/Scheme/Clojure is still on my todo list, so I'm not entirely sure if Lisp macro's can do things which are impossible in Haskell or not.
Lisp's macros are a lot more expressive. They don't look weird (unlike Template Haskell) within the language, they look like normal constructs. And they're native to Lisp. I miss Lisp in Haskell because I can't define, e.g., my own macro to do this:
case fileExists "sausage.txt"
True -> putStrLn "Gonna do something with the sausage."
False -> putStrLn "Woop."
And/or
if do fileExists "sausage.txt"
then putStrLn "Gonna do something!"
else putStrLn "Woop."
Or lambda with alternate lambda cases.
(\case of (Just a) -> a; Nothing -> b)
I wrote a little mini-lang to do this to see how much I liked it. I liked it a lot, Lou!
But Haskell is terse and predictable so one puts up with not having macros.
The Computer Language Shootout Haskell samples are low level, if you read them. Some are high level but many are nearly C, using malloc and such. But this is a good thing; you can write the "tight loops" that you need within Haskell.
I'll second that. 48 hours is optimistic as heck (or I'm just that bad), but it definitely has helped me wrap my head around Haskell a little better than it was before.
I learned the basics of Haskell by doing some problems from http://projecteuler.net. It's probably not as exciting as actually building something using the language, but it's definitely worth checking out.
Probably true. At least you will see some Haskell-syntax.
Writing an extension for XMonad may be worthwhile, though. Or learning about its inner workings. (There are some good introductions floating around the net. They put a lot of thought into the types in XMonad.)
There are plenty of large sites e.g., yellowpages.com and urbandictionary.com (which switched from PHP) which are built using Rails.
Even if you have scaling problems that are around that of, say, Twitter, your application code still isn't your bottleneck; talking to your database is. No amount of framework (or lack thereof, as you propose/promote) will save you from the ramifications of poorly-constructed SQL.