Who has written Haskell & deployed to production in the last 24h and if yes for what kind of app?
Their CEO Salar told me that that, among other things, it gives them a hiring edge. People move to Amsterdam from all kinds of places just so they can write Haskell professionally.
I'm off on other adventures now, but I have no skepticism about deploying Haskell in production. Yeah, it's still a bit obscure, but if you're looking for smart and eager programmers, Haskell is good bait.
http://engineering.imvu.com/2014/03/24/what-its-like-to-use-...
Haskell gets used in the oddest places, where one of two things is true:
1. Nothing else works (with reasonable LOC *and* performance)
2. The safety of an advanced type system is required
I'm not optimistic about Haskell appearing anywhere else for the time being, so I think it will stay an "exotic" language for awhile longer.The core api service is written in Yesod and various other components are written in Scotty and WAI.
Our build system for a large C project at work is written in Haskell.
Various other tools we use (cgrep, resolve-trivial-conflicts, etc) are in Haskell.
Afaict Perl 6 covers this case:
http://jnthn.net/papers/2015-fosdem-static-dynamic.pdf#page=...
Or am I missing something?
http://www.yesodweb.com/page/about
I suspect this is accomplished through safe vs. unsafe types. Imagine the only function from `unsafe___` to `safe___` is the escape function, and all functions giving text back in responses is require to be of type `safe___`.
Clearly you won't be able to prevent (nor would you want to) links like yours above from being a 404, so perhaps no more internal 404s would be more accurate.
If you're used to only programming in dynamic languages, it can be a shock, but yes, a good type system can do things you never thought possible.
If you were the downvoter, I'll take my vote back now.
First, I got
<hint>:1:8: parse error on input `='
Hm so apparently definitions aren't expressions? Or something?I decided to remove the `primes = ` part, which made my browser really slow and had no result. I'm assuming it was computing all primes in the background.
Now, of course, maybe I should try to understand the sieve example before running it, but isn't the whole point of having a REPL box on the front page that you can facilitate people who learn the other way around? It would be great if there'd be some code or expressions available at my fingertips that would actually work in that REPL.
In other words, maybe make the first example be something that actually terminates?
Please read this as constructive criticism, which is how it is intended.
EDIT: Only now I'm noticing that exactly the things I ask for are listed to the right of the "try" box. Pardon my lazy reading, I'm really enjoying the tutorial right now. Still, making the `sieve` example terminate would be nice. But I believe my nitpick is maybe a bit much of a nitpick now.
1. multi-line expressions aren't supported by the REPL.
2. You will need to use `let x = ..` syntax in the REPL (This is because the REPL are just so called IO-actions and the `let` syntax defines variables within its lexical scope)
You could try this:
> let sieve (p:xs) = p : sieve [x | x <- xs, x `mod` p /= 0]
> let primes = sieve [2..]
> primes !! 3
> primes !! 4
Nice part abou this code is eventhough you express calculating ALL primes. It will only calculate upto the 3rd and the 4th prime due to lazy evaluation. This is one of the great strengths of haskell.`let x = 4` is not an expression there.
Therefore, even if you were an old hand at GHC and GHCi and so on, you'd still be unable to run the code it shows at the top of the page.
This is probably bad website design. Especially since the website still lets randoms burn themselves by entering non-terminating code that makes their browsers slow.
As it says, you can evaluate a single line Haskell "expression" and top-level declarations (like the sieve example) are not expressions. In addition, the sieve example declares an infinite list so there's no sensible way to print it.
You can fix all the above by using a let-expression on single line and only evaluating a finite part of the list using the 'take' function.
let { primes = sieve [2..]; sieve (p:xs) = p : sieve [x | x <- xs, x `mod` p /= 0] } in take 10 primesMy best guess is that it's because it's implemented as an HTTP service that happens not to retain the ghci process between expressions.
If you want to get know more about it: http://learnyouahaskell.com/syntax-in-functions
primes = sieve [2..] where sieve (p:xs) = p : sieve [x | x <- xs, x `mod` p /= 0]
As their first example of Haskell. It's a prime generator based on trial division. And not even trial division up to sqrt of the number you test, but all the way up.
I like the idea of a small snippet showing of the power of haskell, but there are many much better examples imho. Perhaps the website could just choose one at random at each load?
Writing elegant non-real-world code is much easier (in any language!) than writing real code.
The sieve of Eratosthenes goes like this:
1) Mark 2 as prime. Let it be n.
2) Mark all numbers of the form i times n as composite, where i is a positive integer. (We can do this by stepping over multiples of n. No multiplication needs to take place.
3) The next unmarked number is prime. Let it be n. Goto 2
Notice how this alogorithm does not use division. Division in modern CPUs is slow.
The algorithm presented uses the `mod` operator, which does division. This algorithm is equivalent to the Trial Division Algorithm. Instead of "deleting" multiples of n as composite, this algorithm tests all numbers greater than n for divisibilty by n, and then only does it "delete" the number.
For a more detailed explanation, see http://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf
[1] https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes#Trial_di...
> л
mueval-core: Imports.hs: removeLink: does not exist (No such file or directory) ExitFailure 1
What did I do wrong?
do { line <- getLine; putStrLn line }1. Earlier, there was a lot of information on the Home Page. Now there's almost nothing. Yes the earlier page was a bit too busy, but crucially comprised simple HTML links and was fast to load. 2. Now there's a big banner saying "Open Source Community Effort for 20 Years" with Vimeo links, which itself is a bad idea. What happened to simple HTML anymore? Anyway, I don't care about the effort - show me the results e.g. Hackage, Hoogle, IDEs, etc. all of which was readily available in the old page but not anymore. 3. Earlier, it was easy to locate the Haskell platform for Windows. Now it takes to a cryptic download page and I am not sure what I am downloading. What is MinGHC?
These are just my initial impressions. Anyway, I wonder why people don't realize that not everything needs to be converted to the "modern web". Sometimes the old web is vastly superior to any modern alternatives.
By the way. the old website moved to https://wiki.haskell.org/Haskell
You can a sit in a small cubic room and whisper about yours ideas all day long, hoping that someday somebody will notice your thoughts and work on it further.
Or you can put up somewhere and present it in a way that causes least drag, so anyone with a slight interest can pick on it.
Or you can use a combination of both.
Today in our fast society, I think it's the balance that matters the most. If you have something interesting to talk about and you are not working hard to let others know about it, then you are doing everybody a disservice.
Usually out of focus areas should be used to bring the eye to an object in the photo that is in focus. But if such an object does not exist, then the eye wanders and tries to adjust itself to focus (the eye has its own focusing mechanism). But of course it cannot do so, so what you get as a result is strain on the eye and a headache.
Out of focus photos have no business in what hopes to be a mainstream website.
It makes me wonder though, what if news.ycombinator.com took that position. What if it were a page describing what Hacker News is, how posting and commenting and voting works, and how long the community had been around, etc. And then there were a link in a menu that said "Submissions" that took you to the actual content.
For someone currently learning the language (past the first 5 minutes) or that uses the language regularly, the only useful things on this front page are the four links along the top.
As for improvements, I think some sections (e.g. community banner) should be removed. I think the videos should, given the focus on brand new users, probably be removed too. The community banner is, I believe, only there to facilitate displaying the titles when people click on the videos. I haven't watched any of the videos, but from their titles I am skeptical that they should be watched before the next section (Features) is read, so they should, at a minimum, be moved further down the page. I don't like the alternating dark/light sections, so moving them further down would give you a more traditional dark header, light content, dark footer look.
I assume the videos are not going to change regularly, because they appear to all be from a single Vimeo account that has more recent videos than those that are displayed. If the videos are kept, I think the titles should be visible without clicking on the video, because I thought (which means some others will think) that clicking on the video would start playing it. Hovering one by one to see the title is not a good solution.
Congrats to the people who built and deployed this, I'm sure it took a long time to get it live (since I remember seeing this page hosted elsewhere many months ago).
Correct! See here for a complete report on the motivations behind each design decision: http://chrisdone.com/posts/haskell-lang#the-audience
> To me, a user of the language visits the site dozens or hundreds of times over the course of a career, while the average brand new user only visits it (I'm guessing here) 1.1 times.
In practice this isn't true—it's generally agreed in the Haskell community: nobody goes to the home page, they go to either Hackage, Hoogle or google something and reach a page on the Wiki.
Veteran users don't need any more encouragement.
You asked a year ago:
>You say it's used all the time -- so how about you give an example of a "lazy" solution to a problem in, say, C?
but I was just reading that old thread now, so replying here.
short-circuit evaluation would be an example in C, because the programmer can ask the compiler to do something, but at run-time it won't do it if the results aren't necessary - it just won't execute despite the programmer explicitly writing those instructions.
e.g. in the condition if (is_prime(a) && is_something_hard_to_compute(a)) then even though you're calling the function is_something_hard_to_compute() about a, at run-time if it's not necessary for the result, then purely out of laziness it won't get called. (i.e. if the first test returns false.)
this meets the condition you asked about.
reference: http://en.wikipedia.org/wiki/Short-circuit_evaluation
This feels amateurish, with enough people complaining about the interactive repl and lacking information, this should have gone through more iterations and feedback loops with people outside the Haskell community.
I fear that this style of childish and somewhat condescending tutorial content is becoming fashionable. Was it the best fit for the audience?
It's exciting to witness Haskell gain traction within industry. Facebook announced last week that its building an entirely new Haskell team to focus on distributed systems, data mining, and machine learning. They're also hiring for a second team to support Haxl [1].
For those eager to use Haskell in the workplace, I imagine the new design should make it easier to formulate a compelling business case. Being able to point your project manager and/or colleagues to a website that clearly explains what Haskell is--and what sets it apart--is a big plus.
The source code for the site can be found on GitHub [2]. Awesome work by Chris Done, who kicked this off last year; see his blog post about the motivation for the new site [3].
[1] http://www.reddit.com/r/haskell/comments/2useoq/haskell_oppo...
I wouldn't be surprised that the average time that users spend on haskell.org goes down as a result (assuming the Haskell team even cares about measuring these things).
As for the image, I don't know why it would be interesting to see a picture of a bunch of people at a conference, especially if you go back to the page frequently. Why not some original Haskell art like the Diagrams factoring image?
Regarding the 20 years in development, I agree this fact should be front and center, this is a serious tool that has had a lot of work by very high level thinkers, it is a world away from the origins of Java as far as engineering integrity.
The Haskell Platform is nowhere to be seen, why?
It looks nice on the surface, but the actual content needs work. And the link to more content is well-hidden at the absolute bottom of the page.
The sponsors section is confusing to me though, are these actual sponsors or just services that haskell.org uses? Its not actually clear to me based on the text and the relative prominence each is given.
The problem is: the input box doesn't get the quotes I write on my Mac. I tried double (") and single (') quotes
Typing in: map(+1) [1..5] won't advance to the next step (even though the interpreter handles it fine), but map (+1) [1..5] will (note the space after map).
Anyways, I'll always remember that cute cherry-flower (I guess) background on the old front page. It was nice first impression somehow.