Re: [Haskell-cafe] Haskell programmers in São Carlo s - SP - Brazil?

2009-05-26 Thread Andrei Formiga
I don't think there's one, but I would subscribe to it.

-- 
[]s, Andrei Formiga


2009/5/26 Maurício :
> Is there already any mailing list or group in Portuguese? I would
> like that if it were a list for Portuguese speakers, no matter
> they are from Portugal or Moçambique.
>
> Maurício
>
>
>> Hey, we have enough people for a São Paulo Haskell User Group.
>> Anyone else interested?
>>
>> Best regards,
>> Daniel Yokomizo
>>
>> 2009/5/21 Fernando Henrique Sanches :
>>> São Caetano, SP, Brazil - right next to São Paulo. UFABC Student.
>>>
>>> Fernando Henrique Sanches
>>>
>>>
>>> 2009/5/19 Maurí­cio 
>>>> Anybody else around here?
>>>>
>>>> Best,
>>>> Maurício
>>>>
>>>> ___
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Comments from OCaml Hacker Brian Hurt

2009-01-15 Thread Andrei Formiga
On Thu, Jan 15, 2009 at 1:44 PM, Wouter Swierstra  wrote:
>
> Would you call function composition (on endofunctions) "appending"? The join
> of a monad? A semi-colon (as in sequencing two imperative statements)? How
> do you append two numbers? Addition, multiplication, or something else
> entirely?
>
> All these operations are monoidal, i.e., are associative and have both left
> and right identities. If that's exactly what they have in common, why invent
> a new name? "Appendable" may carry some intuition, but it is not precise and
> sometimes quite misleading.
>

I think this highlights an interesting point: Haskell is more abstract
than most other languages. While in other languages "Appendable" might
just mean what Brian suggested in his post, "something with an empty
state and the ability to append things to the end", in Haskell it
applies to numbers and everything else that has an associative
operator, that is, everything that is a monoid. So "Appendable" for
numbers would be quite wrong; either it would never be used in
situations where one wanted to "append things to the end" (which is
limiting), or it would be used in these situations, which would be
quite confusing.

I think it is much more important to have good documentation about the
typeclasses (and everything else in the library). This issue was
mentioned recently in a discussion about monads, and the documentation
for the Haskell library is quite uninformative. It would be nice if 1)
people would not be scared of names like "monoid" and "functor" and 2)
the documentation clearly stated what these things are, in a
programming context, preferably with some examples. I think 2 would
mitigate some of the fear mentioned in 1, if newcomers started to
experience things like "hey, that's one funky-named stuff this monoid
thing, but I see here in the documentation that it is quite simple".


-- 
[]s, Andrei Formiga
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Time for a new logo?

2008-12-17 Thread Andrei Formiga
On Wed, Dec 17, 2008 at 7:26 PM, Andrew Coppin
 wrote:
>>
>> (Also, "coroutines"? Seriously? That's hardly an obscure term in
>> programming circles.)
>>
>
> Well now, I'm curios. I've been writing computer programs since I was 9
> years old. I hold a diploma *and* an honours degree in computer science. And
> I have never even *heard* of a coroutine. To this day I still don't know
> what it means. I rather suspect I'm not the only "programmer" on earth who
> finds themselves in this position. ;-)
>

I read about coroutines the first time a good number of years ago in
"Programming in Modula-2" by Niklaus Wirth. It's true that they have
fallen out of favor somewhat, but neither the concept nor the name are
exclusive to Haskell. The fact is that programming is a technical
endeavor, and as any other technical field, it needs jargon. Of
course, it's always possible to overuse jargon, but I seriously don't
know why anyone should be afraid of a name like "Existential
Quantification". I understand some people are afraid of such a name,
but it shouldn't be so.

Well, this is getting back to Monads x WarmFuzzyThings...

-- 
[]s, Andrei Formiga
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Re: Solving a geometry problem with Haskell

2008-01-12 Thread Andrei Formiga
On Jan 12, 2008 7:12 PM, Achim Schneider <[EMAIL PROTECTED]> wrote:
> what about
>
> module Main where
>
> isPerfectSquare :: Integer -> Bool
> isPerfectSquare n = sqrrt == fromIntegral (truncate sqrrt)
> where sqrrt = sqrt $ fromIntegral n
>
> ? It's a hell alot faster, but I have no idea if some numerical
> property of square roots could make it give different results than your
> version, in rare cases.
>

I did something similar:


isSquare :: Integer -> Bool
isSquare x = x == (sqx * sqx)
where sqx = round $ sqrt $ fromInteger x

perfectSquares :: [Integer]
perfectSquares = zipWith (*) [1..] [1..]

findSorted :: [Integer] -> Integer -> Bool
findSorted xs x = h == x
where h : _ = dropWhile ( test 10
(True,False)

-- 
[]s, Andrei Formiga
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe