Send Beginners mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  Haskell as a useful practical 'tool' for intelligent
      non-programmers (Lorenzo Bolla)
   2. Re:  Haskell as a useful practical 'tool' for intelligent
      non-programmers (Michael Orlitzky)
   3. Re:  Haskell as a useful practical 'tool' for intelligent
      non-programmers (Lyndon Maydwell)
   4. Re:  Haskell as a useful practical 'tool' for intelligent
      non-programmers (umptious)


----------------------------------------------------------------------

Message: 1
Date: Sun, 29 Apr 2012 15:28:15 +0100
From: Lorenzo Bolla <[email protected]>
Subject: Re: [Haskell-beginners] Haskell as a useful practical 'tool'
        for intelligent non-programmers
Cc: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset="us-ascii"

On Sun, Apr 29, 2012 at 03:32:48AM -0400, Michael Orlitzky wrote:
> On 04/29/2012 02:35 AM, Mike Meyer wrote:
> > On Sun, 29 Apr 2012 01:20:22 -0400
> > Michael Orlitzky <[email protected]> wrote:
> > 
> >>
> >> They're wrapped in Proc objects, but those objects can be treated like
> >> any other in the language. Everything else is just syntactic sugar on
> >> top of Procs.
> > 
> > That makes *Procs* first class object, not functions.
> > 
> 
> What's the difference? You're not passing around the actual function, in
> any language.

$ python
Python 2.7.3 (default, Apr 14 2012, 23:17:33) 
[GCC 4.7.0 20120407 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> def f():
...     print 'foo'
... 
>>> def g(f):
...     print 'bar'
...     f()
... 
>>> g(f)
bar
foo

Also: http://en.wikipedia.org/wiki/First-class_function#Language_support

L.


-- 
Lorenzo Bolla
http://lbolla.info
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20120429/e0219afe/attachment-0001.pgp>

------------------------------

Message: 2
Date: Sun, 29 Apr 2012 10:56:10 -0400
From: Michael Orlitzky <[email protected]>
Subject: Re: [Haskell-beginners] Haskell as a useful practical 'tool'
        for intelligent non-programmers
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=ISO-8859-1

On 04/29/2012 10:28 AM, Lorenzo Bolla wrote:
>>
>> What's the difference? You're not passing around the actual function, in
>> any language.
> 
> $ python
> Python 2.7.3 (default, Apr 14 2012, 23:17:33) 
> [GCC 4.7.0 20120407 (prerelease)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> def f():
> ...     print 'foo'
> ... 
>>>> def g(f):
> ...     print 'bar'
> ...     f()
> ... 
>>>> g(f)
> bar
> foo
> 
> Also: http://en.wikipedia.org/wiki/First-class_function#Language_support
> 

You're not passing around the function, you're passing around the name
of the function or a pointer. Python happens to know that when you write
f(), you want to evaluate the function named f, much like when you say
f.call() in Ruby.

Ruby doesn't even have functions, only methods, so you have to entertain
the idea that the same thing can have two different names to even have
this discussion. Passing functions to other functions is so fundamental
to Ruby that it's baked into the language:

  irb(main):001:0> [1, 2, 3].map { |x| 2*x }
  => [2, 4, 6]

They're not called functions, but the distinction is imaginary. For an
imperative language, the culture pretty strongly encourages you to use
map, filter, fold etc. which are all passed functions (Procs) using the
block syntax.



------------------------------

Message: 3
Date: Sun, 29 Apr 2012 23:08:30 +0800
From: Lyndon Maydwell <[email protected]>
Subject: Re: [Haskell-beginners] Haskell as a useful practical 'tool'
        for intelligent non-programmers
To: Michael Orlitzky <[email protected]>
Cc: [email protected]
Message-ID:
        <CAM5QZtw-1ktG+ro1uT-4qqEX-1bUAxDU=_-x=7kkyqzcsa5...@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8

If you're interested in OS integration, it may be worth learning C# if
you're on windows. It's certainly quite amenable to 'glue', and it's
gaining more functional features all the time. Also, you have the
option of branching out to F# if you enjoy the .Net environment, but
crave a purer language.

I'd probably consider some combination of .Net and Mathematica if I
were doing trading on Windows and didn't mind paying for the software,
but it might not be a popular opinion :-)

Disclaimer -  I don't really know how trading works in practice.

On Sun, Apr 29, 2012 at 10:56 PM, Michael Orlitzky <[email protected]> wrote:
> On 04/29/2012 10:28 AM, Lorenzo Bolla wrote:
>>>
>>> What's the difference? You're not passing around the actual function, in
>>> any language.
>>
>> $ python
>> Python 2.7.3 (default, Apr 14 2012, 23:17:33)
>> [GCC 4.7.0 20120407 (prerelease)] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>>>>> def f():
>> ... ? ? print 'foo'
>> ...
>>>>> def g(f):
>> ... ? ? print 'bar'
>> ... ? ? f()
>> ...
>>>>> g(f)
>> bar
>> foo
>>
>> Also: http://en.wikipedia.org/wiki/First-class_function#Language_support
>>
>
> You're not passing around the function, you're passing around the name
> of the function or a pointer. Python happens to know that when you write
> f(), you want to evaluate the function named f, much like when you say
> f.call() in Ruby.
>
> Ruby doesn't even have functions, only methods, so you have to entertain
> the idea that the same thing can have two different names to even have
> this discussion. Passing functions to other functions is so fundamental
> to Ruby that it's baked into the language:
>
> ?irb(main):001:0> [1, 2, 3].map { |x| 2*x }
> ?=> [2, 4, 6]
>
> They're not called functions, but the distinction is imaginary. For an
> imperative language, the culture pretty strongly encourages you to use
> map, filter, fold etc. which are all passed functions (Procs) using the
> block syntax.
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners



------------------------------

Message: 4
Date: Sun, 29 Apr 2012 18:07:28 +0100
From: umptious <[email protected]>
Subject: Re: [Haskell-beginners] Haskell as a useful practical 'tool'
        for intelligent non-programmers
To: [email protected]
Cc: [email protected]
Message-ID:
        <cae20bnvhx1f-a3hnfcnuryam23h4s1egkdk7qxgb62csnor...@mail.gmail.com>
Content-Type: text/plain; charset="windows-1252"

On 28 April 2012 22:50, Nicholas Kormanik <[email protected]> wrote:

> ** **
>
> Greatly appreciate your sharing these thoughts.****
>
> ** **
>
> A bit frustrating that you mention four as candidates: ?Groovy, Clojure,
> Ruby, Python.?****
>
> ** **
>
> But it sounds like you are leaning toward recommending Python as the best
> way to start. ****
>
> ** **
>
> Nicholas****
>
> **
>

No. I'm the person who mentioned all four of those as examples of languages
that are good for web scraping. I then went on to say that given what I
**guess** you might need to do that Python is the "no-brainer" best. You
really don't say enough for anyone to be sure though - if you want to
implement some very time consuming numerical algorithms and have them run
fast then CUDA might be the only option. (In which case you're probably out
of luck, because CUDA programming isn't for amateurs.) Or for less
demanding numerics centred around stats and matrix ops, the R could be a
better choice than Python and Sagemaths:

http://en.wikipedia.org/wiki/R_%28programming_language%29

..and R will webscrape too:

http://www.programmingr.com/content/webscraping-using-readlines-and-rcurl

If you want to do stuff like time series analysis then you'll probably find
more books and papers using R:

http://www.stat.pitt.edu/stoffer/tsa2/R_time_series_quick_fix.htm


>> Mike Meyer: Ruby makes a bad fit if Haskell is a goal (and that's a good
goal)

I don't see it as being a goal for this guy! He just wants to be able to
write utilities he needs without bogging down in "becoming a programmer."

>> While Clojure is a
great language, the most popular implementation is hooked into the
JVM, and you wind up needing to deal with a lot Java infrastructure
fairly quickly. Being able to use that infrastructure is a design
goal, but adds to the learning curve. I haven't looked into Groovy,
but suspect some of the same issues will arise (and hope a Groovy
programmer will correct me if I'm wrong).<<

I played around with Groovy for a weekend to write some utilities and a
music generation program. I can't remember having to put any effort into
"needing to deal with a lot Java infrastructure," even though I was using a
midi library written for pure Java. But I'm not really sure what you mean
(installing a Java compiler?? doesn't seem like a lot) and it doesn't
matter - Python/Sagemaths and R seem like the most reasonable tools without
spending big money.

Re. the OP's needs: learning a programming language isn't enough to write
programs that work correctly. You will need to learn how to design and
debug code if you're writing more than very trivial apps. Take a look at
something like Kernighan and Pike's "The Practice Of Programming." There is
no magic language that let's you write code "without becoming a
programmer." Some are easier to learn than others or offer more
functionality in particular areas, but writing even moderately complex
programs that really work - rather than just seeming to - requires
reasonable practice, some book knowledge, and lots of discipline. Programs
are treacherous and deceptive and it requires skill just to verify that
they are working reliably.




> **
>
> ** **
>
> *From:* umptious [mailto:[email protected]]
> *Sent:* Saturday, April 28, 2012 9:39 AM
>
> *To:* [email protected]
> *Cc:* [email protected]
> *Subject:* Re: [Haskell-beginners] Haskell as a useful practical 'tool'
> for intelligent non-programmers****
>
> ** **
>
> ** **
>
> On 27 April 2012 21:16, Nicholas Kormanik <[email protected]> wrote:****
>
>
>
> So, my question is: Does it make practical sense to spend time learning
> Haskell for the purpose of adding it to my assortment of 'tools' -- to
> quickly do this or that, as the need arises?
>
> Is there any better general practical 'tool' (or, if you want, 'programming
> language') to add to my arsenal.****
>
>
> No one can give you advice on what tool to use without knowing what the
> task or who you are in more detail than you provided. And you're often
> better with several tools than "general" one - trying to saw with a hammer
> isn't easy.
>
> Unless you're unusually smart in the IQ sense and/or have a maths or
> formal logic background, then I'd say that Haskell would be a miserable
> choice for a first programming language.
>
> As for tools you might look at for tasks that I ***guess*** that a trader
> is likely to want to do:
>
> - For web scraping and text mining, Groovy, Clojure, Ruby, Python and
> (maybe) Perl are reasonable choices
>
> - For both number crunching and symbolic maths, look at sagemaths (which
> is scripted in Python) - it's a reasonable free alternative to both Matlab
> (number crunching) and Mathematic (symbolics)
>
> ..Which I suppose makes Python the no-brainer choice. Python is easy to
> learn, the community is supportive, there are lots of reasonable books and
> tutorials. I think it also has stuff around for working with Excel
> spreadsheets, which I'd imagine you might want to do.
>
> Haskell is actually a better language than any of the above (leaving aside
> learnability and without defining "better") but for real world use
> libraries count more than language features. It would take you years to
> write the equivalent of sagemaths in Haskell, which rather negates
> Haskell's advantages if you need that functionality.****
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://www.haskell.org/pipermail/beginners/attachments/20120429/b8bcf930/attachment.htm>

------------------------------

_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners


End of Beginners Digest, Vol 46, Issue 50
*****************************************

Reply via email to