I love it how Haskell is becoming more and more widespread and widely known. More and more people use Haskell at universities and in the industry, enrich the ecosystem and work on GHC. It is really gaining a foothold in the programming world. If there's any language that deserves to displace some of the ancient crap that's plaguing the mainstream, it is Haskell. It really shows that academic soundness means real practical productiveness.
>>6
Shalom, Moishe! It is indeed! Except it was created by smart Jews for smart Jews, not by a stupid Jew for goyim like Python was!
Want to easily create diagrams, graphs, visualizations and just pretty pictures? Try Diagrams! For free, Moishe! Consider it a present for your bar mitzvah! http://projects.haskell.org/diagrams/
Name:
Anonymous2014-03-01 12:03
>>7
>mfw the jew want to make goyim to use haskell by saying these things
good goy, use haskell, you can trust me!
Name:
Anonymous2014-03-01 12:09
GHC translates all code to several IRs including the Core language, the C-- language and the spineless tagless graph rewriting machine language - all of that before emitting native machine code, possibly via an LLVM or C representation!
That makes GHC the ultimate code obfuscation tool that will easily let you conceal your kosher closed-source code from the prying eyes of the goyim.
Name:
Anonymous2014-03-01 12:11
>>8
We don't "want to" make you use Haskell - it's already happening to thousands of goyin worldwide. We're merely informing you that Haskell is the growing new player on the field.
Name:
Anonymous2014-03-01 12:16
Good enough for a Jew. Simple enough for a goy. Ezekiel. The cabalistic Yesod you can use to get to your Kether.
Name:
Anonymous2014-03-01 13:35
Programmers are discovering the joys of job security! Any idiot can write a fizzbuzz these days, so obfuscate your program by forcing the use of IO monads.
You want to call your logger from this function? Great, have fun changing the type of every function that calls it.
Updating a field on a structure? Yeah, we got lenses for that. How about the ~.+ operator, or maybe ~#^= or ~8==D?
Name:
Anonymous2014-03-01 13:38
nigger shit
Name:
Anonymous2014-03-01 13:45
THE FORCED USE OF THE MONADS
Name:
Anonymous2014-03-01 14:45
>>12
"Forced use of monads" is a good thing because it forces you to be explicit about your effects. This is good for safety, correctness and compiler optimizations.
And if you're sick of changing the type of every function, there's Debug.Trace - an escape hatch just for such cases.
And updating fields with lenses is done with "+=", "-=" and the like - just like in imperative languages. Example:
zoom (units.traversed.position) $ do
x += 10
y += 10
See how we don't have to write units.traversed.position.x += 10
units.traversed.position.y += 10
It's just an example of how lenses are first-class and can be composed around, zoomed, traversed, inverted and all sorts of funky shit the imperative languages don't let you do. That's because the imperative languages are "monkey see, monkey do" - they understand only direct fucking orders. Haskell is more intelligent because it allows you to manipulate everything the way you want to, and only executes things when it's necessary, or when you tell it to. Haskell understands abstraction while the imperative languages are numbskull working grunts.
>>15 It's just an example of how lenses are first-class and can be composed around, zoomed, traversed, inverted and all sorts of funky shit the imperative languages don't let you do.
You don't do that shit in real languages because you don't have to.
Haskell programming is like tying both your hands behind your back, and inventing elaborate devices that with some training let you accomplish everyday tasks using only your feet.
>>25
C++ templates are Touring complete. What a splendid language!
Name:
Anonymous2014-03-01 23:35
Can your toy language do this? :m +Unsafe.Coerce
unsafeCoerce [67,104,101,99,107,109,97,116,101,44,32,97,116,104,105,101,115,116,115,46] :: String
Name:
Anonymous2014-03-02 2:54
>>27
ConvertDecimalsToChars? Its practically in every language.
If you have pride in your language having this function, there is something wrong and naming it cryptically doesn't help
Name:
Anonymous2014-03-02 4:46
>>28
I bet your language can't do this. Get on my level. Type level. type family Map f x where
Map f '[] = '[]
Map f (x ': xs) = f x ': Map f xs
>>24
That's like saying that Assembler programmers don't use classes and inheritance because they don't have to. Hence, C++/Java/C# programming is like tying both your hands behind your back, and inventing elaborate devices that with some training let you accomplish everyday tasks using only your feet.
Name:
Anonymous2014-03-02 6:47
>>24
"Don't have to" or "cannot"? Don't forget that language limitations shape thinking limitations.
How about a simple demonstration: you've got a bunch of same-class objects (units in a game), each of them has a field "position" (with three sub-fields x, y, z), a field of "armor" and a field of "health". You need to decrement the health of all units within radius 10 from the point (10, 20, 30) by 5, multiply the coordinates of all units by 1 and then get the list of armor values of all the units. Let's see you do that without lenses, Mr. "I don't need your shit even if what I have is inferior".
Name:
Anonymous2014-03-02 7:21
Haskell is growing
Nothing unusual. The cadaver of a dead dog becomes bloated due to the bacteria in the gut begin to break down the tissues of the body, releasing gas that accumulates in the intestines, which becomes trapped because of the early collapse of the small intestine.
>>32
var damageCentre = Vector3(10, 20, 30);
var damageRadius = 10;
foreach (var unit in unitManager.getInSphere(damageCentre, damageRadius)) {
unit.damage(5);
}
var armourValues = from unit in unitManager.getAll() select unit.armour;
{-# LANGUAGE FlexibleInstances, OverlappingInstances, MonadComprehensions #-}
instance Num a => Num [a] where
(+) = cyclingZipWith (+)
(*) = cyclingZipWith (*)
(-) = cyclingZipWith (-)
abs = map abs
signum = map signum
fromInteger = return . fromInteger
instance (Num a, Monad m) => Num (m a) where
xs + ys = [x + y | x <- xs, y <- ys]
xs * ys = [x * y | x <- xs, y <- ys]
xs - ys = [x - y | x <- xs, y <- ys]
abs xs = [abs x | x <- xs]
signum xs = [signum x | x <- xs]
fromInteger = return . fromInteger
cyclingZipWith _ [] _ = []
cyclingZipWith _ _ [] = []
cyclingZipWith f x_ y_ = go x_ y_ where
go (x : xs) (y : ys) = f x y : go xs ys
go [] y = zipWith f (cycle x_) y
go x [] = zipWith f x (cycle y_)
A great thing about Haskell is that functions don't have to be defined before you refer to them. No headers, no interface files, no forward declarations. Everything can be mutually recursive (even modules, but most compilers don't allow that). You can put declarations in the file in whatever order you want. Why don't more languages do this?
Name:
Anonymous2014-03-02 14:08
kek'em
Name:
Anonymous2014-03-02 14:20
>>41
The FORCED EXCLAIMATION POINTING OF CODE version? No, it was awful. Thanks for removing that shit Nikita.
Name:
Anonymous2014-03-02 14:26
>>43
A great thing about plain C is that functions don't have to be defined before you refer to them. No headers, no interface files, no forward declarations. Everything can be mutually recursive (even modules, but most compilers don't allow that). You can put declarations in the file in whatever order you want. Why don't more languages do this?
Name:
Anonymous2014-03-02 14:37
>>46
C has le type inference too xDDDDD!!!!
f(n) {
return (double)n;}
As a gay man, I take positive representations where I can get them. Any time a same-gender relationship is portrayed in a positive but very real light benefits us all. The same can be said of Haskell, which, much like being gay, will likely remain a minority programming language in a world that seems married to object oriented paradigm, and never really "come out of the closet" and be truly ready for acceptance in the industry. But anytime we can get some good press, it helps us all. I'm a big fan of Haskell (even over Ruby!) and I'm proud that Facebook has taken a stand and acknowledged that some of us are different, and thats ok.
You can make type-level monads with poly-kinded type families. You can define >>= and Return as type families and make different instances for each kind. All you need is type-level do notation.
>>55
You should be asking: ``Should I learn me a haskell?''
Name:
Anonymous2014-03-02 20:16
if I learn me a Haskell can I make money?
Name:
Anonymous2014-03-02 20:27
Haskell can overload functions on return type with typeclasses. It's an amazing feature. class C a where f :: Char -> a
instance C Bool where f = (`elem` ['a'..'z'])
instance C Int where f = fromEnum
False = f 'a' && f '0'
9 = f '9' - f '0' :: Int
>>45
No, the one before he introduced that, and the forced exclamation point indentation of the code still remains merely as the forced horizontal bar indentation of the code.
>>62
That's because of the way the standard library is designed. It's not polymorphic enough. There's a (++) for [] and a separate one for Vector when it could just as easily work on any Monoid. map works only on lists when it could really work on any Functor. Folds can work on any Foldable.
There are alternate preludes that fix these things.
>>64
Yes, I am a pedophile. So? I dont see any problem. I embraced my childlover soul long ago and I am happy together with my girlfriend (who is a cute 6 y/o loli!). We fuck a lot of her friends with and without their consent and I am pretty slim and good looking. But thanks anyway asshole. Go and watch your stupid porn with grown women in it while I have SEX with my underaged girlfriend.
>>66
Yes, I am a pedophile. So? I dont see any problem. I embraced my childlover soul long ago and I am happy together with my girlfriend (who is a cute 6 y/o loli!). We fuck a lot of her friends with and without their consent and I am pretty slim and good looking. But thanks anyway asshole. Go and watch your stupid porn with grown women in it while I have SEX with my underaged girlfriend.
>>69
Yes, I am a pedophile. So? I dont see any problem. I embraced my childlover soul long ago and I am happy together with my girlfriend (who is a cute 6 y/o loli!). We fuck a lot of her friends with and without their consent and I am pretty slim and good looking. But thanks anyway asshole. Go and watch your stupid porn with grown women in it while I have SEX with my underaged girlfriend.
>>72,74
Yes, I am a pedophile. So? I dont see any problem. I embraced my childlover soul long ago and I am happy together with my girlfriend (who is a cute 6 y/o loli!). We fuck a lot of her friends with and without their consent and I am pretty slim and good looking. But thanks anyway asshole. Go and watch your stupid porn with grown women in it while I have SEX with my underaged girlfriend.
>>76
Yes, I am a pedophile. So? I dont see any problem. I embraced my childlover soul long ago and I am happy together with my girlfriend (who is a cute 6 y/o loli!). We fuck a lot of her friends with and without their consent and I am pretty slim and good looking. But thanks anyway asshole. Go and watch your stupid porn with grown women in it while I have SEX with my underaged girlfriend.
>>78
Yes, I am a pedophile. So? I dont see any problem. I embraced my childlover soul long ago and I am happy together with my girlfriend (who is a cute 6 y/o loli!). We fuck a lot of her friends with and without their consent and I am pretty slim and good looking. But thanks anyway asshole. Go and watch your stupid porn with grown women in it while I have SEX with my underaged girlfriend.
>>1
Yes, I am a pedophile. So? I dont see any problem. I embraced my childlover soul long ago and I am happy together with my girlfriend (who is a cute 6 y/o loli!). We fuck a lot of her friends with and without their consent and I am pretty slim and good looking. But thanks anyway asshole. Go and watch your stupid porn with grown women in it while I have SEX with my underaged girlfriend.
>>82
Yes, I am a pedophile. So? I dont see any problem. I embraced my childlover soul long ago and I am happy together with my girlfriend (who is a cute 6 y/o loli!). We fuck a lot of her friends with and without their consent and I am pretty slim and good looking. But thanks anyway asshole. Go and watch your stupid porn with grown women in it while I have SEX with my underaged girlfriend.
>>83
Yes, I am a pedophile. So? I dont see any problem. I embraced my childlover soul long ago and I am happy together with my girlfriend (who is a cute 6 y/o loli!). We fuck a lot of her friends with and without their consent and I am pretty slim and good looking. But thanks anyway asshole. Go and watch your stupid porn with grown women in it while I have SEX with my underaged girlfriend.