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_)