Someone in #haskell used (***), and when I asked lambdabot to tell me its type, it printed out scary gobbledygook that didn't even fit on one line! Then someone used fmap fmap fmap and my brain exploded.
- from a book on haskell
I think /prog must unite its forces and remake apply into fap (Functional APplication). Really.
Name:
Anonymous2009-02-28 16:50
Let's petition Ron Paul Graham to make it so in arc. He likes short, concise names.
Name:
Anonymous2009-02-28 16:52
If we're going to rename apply, we need to rename eval.
Any suggestions?
>>3 tell the programming environment to evaluate the contents that immediately follow
Name:
Anonymous2009-02-28 17:28
will someone explain what fmap is good for ;_;
Name:
Anonymous2009-02-28 17:36
fmap
huurrr
what is it good for
absolutely nothin
Name:
Anonymous2009-02-28 17:43
>>9 The Future of Marine Animal Populations (FMAP) is a network of scientists within the Census of Marine Life trying to understand the past, present and future of marine life. FMAP has a strong emphasis on statistical modeling of patterns derived from biological data. Our focus is on data synthesis, often by means of meta-analysis, which is the formal integration of many data sets to answer a common question. Some of the questions that FMAP seeks to answer are:
- What are the global patterns of marine biodiversity?
- What are the major drivers explaining diversity patterns and changes?
- What is the total number of species in the ocean (known and unknown)?
- How has the abundance of major species groups changed over time?
- What are the ecosystem consequences of fishing and climate change?
- How is the distribution of animals in the ocean changing?
- How is the movement of animals determined by their behavior and environment?
FMAP Mission Statement
FMAP attempts to describe and synthesize globally changing patterns of species abundance, distribution, and diversity, and to model the effects of fishing, climate change and other key variables on those patterns. This work is done across ocean realms and with an emphasis on understanding past changes and predicting future scenarios.
Name:
Anonymous2009-02-28 18:23
Someone in #haskell used (***), and when I asked lambdabot to tell me its type, it printed out scary gobbledygook that didn't even fit on one line!
how does (***) :: (Arrow a) => a b c -> a b' c' -> a (b, b') (c, c') not fit on one line?
also, (uncurry(***).(($)***($))) is pretty awesome.
Name:
FrozenVoid2009-02-28 18:40
“FMAP attempts to describe and synthesize globally changing patterns of species abundance”
giving them a critical competitive advantage and taking them to the next level.
________________________________________________
orbis terrarum delenda est
Name:
Anonymous2009-03-01 2:00
>>12 (b -> c, b' -> c') -> (b, b') -> (c, c')
Doesn't sound reusable enough to memorize it.
($)***($) doesn't actually do anything useful. >>15
for things like (uncurry (***) .) . uncurry (***) . join (&&&) curry ((a, b) -> c) -> (a, a) -> (b, b) -> (c, c)
Name:
Anonymous2009-03-01 4:48
>>16
B-but what is fmap good for? I have only seen it used in useless loeb/y-combinator programs.
______________________________________
Free flow of information is the only safeguard against tyranny. The once-chained people whose leaders at last lose their grip on information flow will soon burst with freedom and vitality, but the free nation gradually constricting its grip on public discourse has begun its rapid slide into despotism. Beware of he who would deny you access to information, for in his heart he dreams himself your master.
Name:
Anonymous2009-03-01 11:57
>>21
This doesn't answer my question. Will someone real answer my question?
Name:
Anonymous2009-03-01 14:45
>>22
In Haskell, data is immutable. You cannot change what something is.
>>20
By which you mean... what? Convert a character to the equivalent integer or vice versa? Use the chr and [/code]ord[/code] functions. Convert a value to a string that represents that value? The show function will work on any type in the Show class (which is probably most types that actually contain data).
There are not, cannot, and never will be any functions in Haskell that reach into a value and change its type. Shit, you can't even do that in C except by fucking around with pointers.
Name:
Anonymous2009-03-01 21:29
IMMA FIRING MA MONAD
Name:
Anonymous2009-03-02 1:14
What I mean in >>20 was
how do I numberp in Haskell.
how do I charp in Haskell.
Sorry I was on crack.
Name:
Anonymous2009-03-02 1:24
>>27
With type declarations, if you must. All type information is sorted out at compile time, never at runtime. If you have a type declaration with several constructors (such as data Either a b = Left a | Right b) you can pattern match at runtime to extract the contents: case q of
Left x -> "omg hax"
Right x -> "GRUNNUR"
But remember, just because it's statically typed doesn't mean you have to declare the types. Usually you can just sit back and let type inference do its thing.
Name:
Anonymous2009-03-02 1:29
>>28
You overloaded the words "type declaration" in your poast
>>31
haskell nomads do not concern themselves with such trivial matters.
Name:
Anonymous2009-03-02 2:51
>>31
This is ambiguous. You could be writing anything in Lisp, or you could be writing a Lisp program in Haskell.
If the latter, note that Haskell's lists are homogenous, which means that its contents must all have exactly the same type. If you want to be able to put both a number and a string (for example) into the same list, you have to create a "wrapper" type that allows different constructors to have arguments of different types: data ListVal = SomeString String | SomeNumber Int
So now you can have: [SomeString "GRUNNUR", SomeNumber 47] :: [ListVal]
And then you just pattern match against that, exactly like in >>28