"ocaml_beginners"::[] just saying hello.... OCaml IDEs?

View: New views
12 Messages — Rating Filter:   Alert me  

"ocaml_beginners"::[] just saying hello.... OCaml IDEs?

by derek.smyth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi, I hope this doesn't come across as spam. I've just joined and I'm really just posting a hello. Background is my bread and butter is .NET development on Windows and have been introduced to OCaml through F# but rather than learn F# on Windows I'd much rather learn OCaml on Linux first.

I am completely new to functional programming and OCaml and really happy this forum exists. Expect some basic questions.

At the moment I'm developing OCaml in Emacs with Tuareg, is this the standard (good) or are there better development enviroments out there?

thanks, again it's good to be here.


"ocaml_beginners"::[] Re: just saying hello.... OCaml IDEs?

by jshaw10 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Derek, you're in the right spot. Another IDE you can try is Camelia.

http://camelia.sourceforge.net/

Jeff

--- In ocaml_beginners@..., "derek.smyth" <t_d_f_23@...> wrote:
>
> hi, I hope this doesn't come across as spam. I've just joined and I'm really just posting a hello. Background is my bread and butter is .NET development on Windows and have been introduced to OCaml through F# but rather than learn F# on Windows I'd much rather learn OCaml on Linux first.
>
> I am completely new to functional programming and OCaml and really happy this forum exists. Expect some basic questions.
>
> At the moment I'm developing OCaml in Emacs with Tuareg, is this the standard (good) or are there better development enviroments out there?
>
> thanks, again it's good to be here.
>



Re: "ocaml_beginners"::[] just saying hello.... OCaml IDEs?

by Jon Harrop :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 08 October 2009 22:54:40 derek.smyth wrote:
> hi, I hope this doesn't come across as spam. I've just joined and I'm
> really just posting a hello. Background is my bread and butter is .NET
> development on Windows and have been introduced to OCaml through F# but
> rather than learn F# on Windows I'd much rather learn OCaml on Linux first.
>
> I am completely new to functional programming and OCaml and really happy
> this forum exists. Expect some basic questions.

Fire away. :-)

> At the moment I'm developing OCaml in Emacs with Tuareg, is this the
> standard (good) or are there better development enviroments out there?

I use Emacs and Tuareg.

--
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e

Re: "ocaml_beginners"::[] just saying hello.... OCaml IDEs?

by Lukasz Stafiniak :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Oct 8, 2009 at 11:54 PM, derek.smyth <t_d_f_23@...> wrote:
>
> At the moment I'm developing OCaml in Emacs with Tuareg, is this the standard (good) or are there better development enviroments out there?
>
> thanks, again it's good to be here.
>

Basically I believe there are two standards: Emacs (Tuareg+standard
distribution goodies: caml-types, debugger support), and Eclipse (I
think there are two bigger plug-ins, one is OcaIDE:
http://ocaml.eclipse.ortsa.com/).

Re: "ocaml_beginners"::[] just saying hello.... OCaml IDEs?

by Hugo Ferreira :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

derek.smyth wrote:
> hi, I hope this doesn't come across as spam. I've just joined and I'm really just posting a hello. Background is my bread and butter is .NET development on Windows and have been introduced to OCaml through F# but rather than learn F# on Windows I'd much rather learn OCaml on Linux first.
>
> I am completely new to functional programming and OCaml and really happy this forum exists. Expect some basic questions.
>
> At the moment I'm developing OCaml in Emacs with Tuareg, is this the standard (good) or are there better development enviroments out there?
>
> thanks, again it's good to be here.
>
>

More recently a new IDE for Ocaml was announced in the senior's list.
Take a look at the website:

        http://ocamlplugin.loki-a.com

I haven't tried it yet. I use OcalIDE.
Very usable and includes an interface to
the debugger.

Regards,
Hugo
>
> ------------------------------------
>
> Archives up to December 31, 2008 are also downloadable at http://www.connettivo.net/cntprojects/ocaml_beginners/
> The archives of the very official ocaml list (the seniors' one) can be found at http://caml.inria.fr
> Attachments are banned and you're asked to be polite, avoid flames etc.Yahoo! Groups Links
>
>
>


Re: "ocaml_beginners"::[] just saying hello.... OCaml IDEs?

by Thomas Hutchinson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Personally I think the IDEs for OCaml are pretty bad. I haven't tried  
the new NetBeans-based one though. Compared with basic features you'd  
find in an IDE for Java, tools for OCaml are pretty minimal.

Personally I use Emacs + Tuareg. Type throwback ( C-c C-t ) is great.  
If you compiled ocaml yourself, you should definitely recompile with  
OCaml Spotter. Though when you are just starting out these might not  
be that helpful. They are better when you are jumping into existing  
code.

---

By the way, if you are just learning functional programming for the  
first time, only use the functional part of OCaml. Don't use any  
references, loops, or objects. They have there time and place but for  
now you can get by without them entirely. Learn tail recursion too.

Tom

On Oct 8, 2009, at 11:54 PM, derek.smyth wrote:

> hi, I hope this doesn't come across as spam. I've just joined and  
> I'm really just posting a hello. Background is my bread and butter  
> is .NET development on Windows and have been introduced to OCaml  
> through F# but rather than learn F# on Windows I'd much rather learn  
> OCaml on Linux first.
>
> I am completely new to functional programming and OCaml and really  
> happy this forum exists. Expect some basic questions.
>
> At the moment I'm developing OCaml in Emacs with Tuareg, is this the  
> standard (good) or are there better development enviroments out there?
>
> thanks, again it's good to be here.
>
>
>
> ------------------------------------
>
> Archives up to December 31, 2008 are also downloadable at http://www.connettivo.net/cntprojects/ocaml_beginners/
> The archives of the very official ocaml list (the seniors' one) can  
> be found at http://caml.inria.fr
> Attachments are banned and you're asked to be polite, avoid flames  
> etc.Yahoo! Groups Links
>
>
>


Re: "ocaml_beginners"::[] just saying hello.... OCaml IDEs?

by Mac Mason-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Oct 9, 2009, at 7:20 AM, Tom Hutchinson wrote:
> Personally I think the IDEs for OCaml are pretty bad. I haven't tried
> the new NetBeans-based one though. Compared with basic features you'd
> find in an IDE for Java, tools for OCaml are pretty minimal.

I'm a known curmudgeon, but I use vim, with great success.

> By the way, if you are just learning functional programming for the
> first time, only use the functional part of OCaml. Don't use any
> references, loops, or objects. They have there time and place but for
> now you can get by without them entirely. Learn tail recursion too.

This is a very important point. If you try to use OCaml like a you'd use
a purely imperative language (many mutable variables, heavy reliance on
objects, etc.) you'll just get irritated. OCaml isn't designed to be
used that way, and it shows. The beauty of functional programming, of
course, is that doing it our way usually leads to code that's (a)
shorter (b) less buggy and (c) may as well be just as fast.

   --Mac

--
Julian "Mac" Mason      mac@...      www.cs.duke.edu/~mac


Re: "ocaml_beginners"::[] just saying hello.... OCaml IDEs?

by Hugo Ferreira :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

Tom Hutchinson wrote:
> Personally I think the IDEs for OCaml are pretty bad. I haven't tried  
> the new NetBeans-based one though.

I assume you haven't tried OcalIDE either.
Or if you did it must have been some time ago.

> Compared with basic features you'd  
> find in an IDE for Java, tools for OCaml are pretty minimal.
>

Maybe you could expound on this?

> Personally I use Emacs + Tuareg. Type throwback ( C-c C-t ) is great.

I personally use OcalIDE (http://ocaml.eclipse.ortsa.com/).
Not perfect but ... its feature set "is great":

     * Source editor for modules (ml files), interfaces (mli files),
parsers (mly files) and lexers (mll files)
     * Syntax coloring (colors and styles are configurable)
     * Automatic indentation while typing in the editor (configurable in
the preferences)
     * An integrated code formatter, and an interface to the camlp4
formatter (through an AST printer)
     * Completion
     * Standard library browser
     * Integrated debugger (a graphical interface to the O'Caml
text-mode debugger)
     * Highlighting of matching delimiters
     * Integrated toplevel
     * An O'Caml perspective inside of Eclipse
     * Shortcuts to the O'Caml elements in Eclipse
     * Building of O'Caml projects
     * Importation and exportation of O'Caml projects
     * Launching of O'Caml executables
     * A code outline
     * Displaying the inferred type of elements in the editor and outline
     * Descriptive popups on O'Caml definitions
     * Help on expected parameters for functions, exceptions and
constructors
     * Configurable shortcuts
     * Configurable paths for all the tools (and the paths are
automatically detected)
     * On demand makefile generation
     * Automatic interface generation
     * Hyperlinks for jumping to the definition of an element (variable,
type constructor...)
     * Error markers in the editor, editor's margin, Navigator view and
Problems view

To any newbies out there: try the IDE's yourself.
Be open minded about these IDE's that have taken so
much work to be developed. If you can, contribute
to these projects (for example using them and providing
constructive feedback).

Regards,
Hugo F.


> If you compiled ocaml yourself, you should definitely recompile with  
> OCaml Spotter. Though when you are just starting out these might not  
> be that helpful. They are better when you are jumping into existing  
> code.
>
> ---
>
> By the way, if you are just learning functional programming for the  
> first time, only use the functional part of OCaml. Don't use any  
> references, loops, or objects. They have there time and place but for  
> now you can get by without them entirely. Learn tail recursion too.
>
> Tom
>
> On Oct 8, 2009, at 11:54 PM, derek.smyth wrote:
>
>> hi, I hope this doesn't come across as spam. I've just joined and  
>> I'm really just posting a hello. Background is my bread and butter  
>> is .NET development on Windows and have been introduced to OCaml  
>> through F# but rather than learn F# on Windows I'd much rather learn  
>> OCaml on Linux first.
>>
>> I am completely new to functional programming and OCaml and really  
>> happy this forum exists. Expect some basic questions.
>>
>> At the moment I'm developing OCaml in Emacs with Tuareg, is this the  
>> standard (good) or are there better development enviroments out there?
>>
>> thanks, again it's good to be here.
>>
>>
>>
>> ------------------------------------
>>
>> Archives up to December 31, 2008 are also downloadable at http://www.connettivo.net/cntprojects/ocaml_beginners/
>> The archives of the very official ocaml list (the seniors' one) can  
>> be found at http://caml.inria.fr
>> Attachments are banned and you're asked to be polite, avoid flames  
>> etc.Yahoo! Groups Links
>>
>>
>>
>
>
>
> ------------------------------------
>
> Archives up to December 31, 2008 are also downloadable at http://www.connettivo.net/cntprojects/ocaml_beginners/
> The archives of the very official ocaml list (the seniors' one) can be found at http://caml.inria.fr
> Attachments are banned and you're asked to be polite, avoid flames etc.Yahoo! Groups Links
>
>
>


Re: "ocaml_beginners"::[] just saying hello.... OCaml IDEs?

by Jon Harrop :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday 09 October 2009 15:10:32 Mac Mason wrote:
> This is a very important point. If you try to use OCaml like a you'd use
> a purely imperative language (many mutable variables, heavy reliance on
> objects, etc.) you'll just get irritated. OCaml isn't designed to be
> used that way, and it shows.

OCaml is specifically designed as an impure functional language to be used for
both imperative and functional programming.

For example, if you write numerical code then OCaml goes to great lengths to
unbox your local floats but *only* if you write in an imperative style
using "for" loops instead of recursive functions.

> The beauty of functional programming, of
> course, is that doing it our way usually leads to code that's (a)
> shorter (b) less buggy and

Fair enough.

> (c) may as well be just as fast.  

No, functional programming almost always leads to much slower code.

Purely functional data structures (e.g. Map) are typically 10x slower than
their imperative equivalents (e.g. Hashtbl).

Purely functional language implementations (like Haskell) have insurmountable
difficulties with performance.

If you write numerical linear algebra routines in a purely functional style,
for example, then you can expect orders of magnitude performance degradation.

--
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e

Re: "ocaml_beginners"::[] just saying hello.... OCaml IDEs?

by Mac Mason-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Oct 9, 2009, at 3:25 PM, Jon Harrop wrote:
> On Friday 09 October 2009 15:10:32 Mac Mason wrote:
>> (c) may as well be just as fast.
>
> No, functional programming almost always leads to much slower code.

Hence "may as well be". Every programming language makes a tradeoff
between programmer time and machine time. The beauty of functional
languages is that you can get very low programmer time (near that of
Python or Perl, say) while also getting much faster-running code than
those languages provide.

> Purely functional data structures (e.g. Map) are typically 10x  
> slower than
> their imperative equivalents (e.g. Hashtbl).

Apples and Oranges, because immutable structures preserve history. Using
Map in an imperative fashion is an excellent example of trying use the
functional parts of OCaml in an imperative fashion and getting
irritated.  How does Map compare to making a deep copy of a Hashtbl
every time you mutate it?

   --Mac

--
Julian "Mac" Mason      mac@...      www.cs.duke.edu/~mac


"ocaml_beginners"::[] Re: just saying hello.... OCaml IDEs?

by derek.smyth :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hello again, what a wonderful welcome thanks to everyone who took the time to read and respond.

Lots of great suggestions on IDE's and I've been looking into those. Camelia looks like a great beginners IDE, simple enough to let you concentrate on learning the language and not the IDE. I've installed some of the other recommended IDE's as well, I'll make my mind up on them later (not too later though).

Thanks Tom for the advice of not falling back to OOP techniques and I believe this will be the biggest hurdle, trying to not think in objects all the time. This is one of the reasons I want to learn functional programming, to break out of always thinking in objects, it will make me a better programmer.

The other reason for learning functional programming was for multi-threading applications. I feel, and I suppose so do others, that functional programming techniques are the best way to take advantage of multi-core processors.

What does everyone here think about this? is functional programming the ideal programming approach for multi-core?


Anyway hopefully its ok that I haven't respond to you all individually but I did read and follow up on every reply. Going to see if the QT tool kit has finished compiling, it's been running for hours....

thanks again!






--- In ocaml_beginners@..., "derek.smyth" <t_d_f_23@...> wrote:
>
> hi, I hope this doesn't come across as spam. I've just joined and I'm really just posting a hello. Background is my bread and butter is .NET development on Windows and have been introduced to OCaml through F# but rather than learn F# on Windows I'd much rather learn OCaml on Linux first.
>
> I am completely new to functional programming and OCaml and really happy this forum exists. Expect some basic questions.
>
> At the moment I'm developing OCaml in Emacs with Tuareg, is this the standard (good) or are there better development enviroments out there?
>
> thanks, again it's good to be here.
>



Re: "ocaml_beginners"::[] just saying hello.... OCaml IDEs?

by Jon Harrop :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Friday 09 October 2009 23:05:21 Mac Mason wrote:

> On Oct 9, 2009, at 3:25 PM, Jon Harrop wrote:
> > On Friday 09 October 2009 15:10:32 Mac Mason wrote:
> >> (c) may as well be just as fast.
> >
> > No, functional programming almost always leads to much slower code.
>
> Hence "may as well be". Every programming language makes a tradeoff
> between programmer time and machine time. The beauty of functional
> languages is that you can get very low programmer time (near that of
> Python or Perl, say) while also getting much faster-running code than
> those languages provide.

The relative performance of OCaml, Python and Perl has nothing to do with
functional programming. OCaml is relatively fast because it is compiled and
static.

> > Purely functional data structures (e.g. Map) are typically 10x
> > slower than their imperative equivalents (e.g. Hashtbl).
>
> Apples and Oranges, because immutable structures preserve history. Using
> Map in an imperative fashion is an excellent example of trying use the
> functional parts of OCaml in an imperative fashion and getting
> irritated.  How does Map compare to making a deep copy of a Hashtbl
> every time you mutate it?

The main use of persistence is backtracking which is most efficiently
implemented by reversing state changing operations. If you do that instead of
a deep copy, a decent hash table will still be many times faster than any
purely functional general-purpose dictionary data structure.

Moreover, in most cases persistence is not used at all and a decent hash table
will be over 10x faster than any purely functional data structure.

--
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e