Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

ocaml_beginners · Ocaml Beginners

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 13589 - 13618 of 13890   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#13589 From: Nicolas FRANCOIS <nicolas.francois@...>
Date: Sun Aug 5, 2012 12:06 pm
Subject: Two questions about lex/yacc and lablgtk/gl
eul_bofo
Send Email Send Email
 
Hi.

I'd like to create a 3D dynamic geometry application. I developped
DrGeoCaml a few years ago, but it's now quite old, and my Caml practice
is a bit rusty. So a few questions to start on the right tracks :

1) I'd like to create a parser, with the help of ocamllex/yacc, but
I don't find the help pages very instructive. Is there a good
tutorial like "Ocamllex for complete numbs" ?

2) I'd like to use lablgtk for the graphic interface, and lablgl for
the 3D visualization. It's mentionned in lablgtk documentation that
this can be done, but once again, i didn't find much help. Any clue ?

Thanks for any tip.

\bye

--

Nicolas FRANCOIS                      |  /\
http://nicolas.francois.free.fr       | |__|
				       X--/\\
We are the Micro$oft. 	        _\_V
Resistance is futile.
You will be assimilated.         darthvader penguin

#13590 From: Gerd Stolpmann <gerd@...>
Date: Sun Aug 5, 2012 1:16 pm
Subject: AW: [Caml-list] Two questions about lex/yacc and lablgtk/gl
g_stolpmann
Send Email Send Email
 
Am 05.08.2012 14:06:41 schrieb(en) Nicolas FRANCOIS:
> Hi.
>
> I'd like to create a 3D dynamic geometry application. I developped
> DrGeoCaml a few years ago, but it's now quite old, and my Caml
> practice
> is a bit rusty. So a few questions to start on the right tracks :
>
> 1) I'd like to create a parser, with the help of ocamllex/yacc, but
> I don't find the help pages very instructive. Is there a good
> tutorial like "Ocamllex for complete numbs" ?

I don't know of any such tutorial, but you can also watch out for a lex
tutorial (i.e. for C), because the matching algorithm is exactly the
same. The syntax is of course different, but I guess this is the easier
part, and extractable from the manual (or sample code).

Regarding ocamlyacc, consider to use Menhir instead. It includes a mode
where grammar conflicts are explained by example, and in my experience
this is the difficult part of developing a grammar. And it has macros,
and other convenience features.

Gerd

> 2) I'd like to use lablgtk for the graphic interface, and lablgl for
> the 3D visualization. It's mentionned in lablgtk documentation that
> this can be done, but once again, i didn't find much help. Any clue ?
>
> Thanks for any tip.
>
> \bye
>
> --
>
> Nicolas FRANCOIS                      |  /\
> http://nicolas.francois.free.fr       | |__|
> 				      X--/\\
> We are the Micro$oft. 	        _\_V
> Resistance is futile.
> You will be assimilated.         darthvader penguin
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa-roc.inria.fr/wws/info/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
>
>

--
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany    gerd@...
Creator of GODI and camlcity.org.
Contact details:        http://www.camlcity.org/contact.html
Company homepage:       http://www.gerd-stolpmann.de
------------------------------------------------------------

#13591 From: oliver <oliver@...>
Date: Sun Aug 5, 2012 1:36 pm
Subject: Re: [Caml-list] Two questions about lex/yacc and lablgtk/gl
oliver@...
Send Email Send Email
 
Hello,

On Sun, Aug 05, 2012 at 02:06:41PM +0200, Nicolas FRANCOIS wrote:
> Hi.
>
> I'd like to create a 3D dynamic geometry application. I developped
> DrGeoCaml a few years ago, but it's now quite old, and my Caml practice
> is a bit rusty. So a few questions to start on the right tracks :
>
> 1) I'd like to create a parser, with the help of ocamllex/yacc, but
> I don't find the help pages very instructive. Is there a good
> tutorial like "Ocamllex for complete numbs" ?
[...]


Ocamllex-Tutorial:
   http://plus.kaist.ac.kr/~shoh/ocaml/ocamllex-ocamlyacc/ocamllex-tutorial/

Ocamlyacc-Tutoprial:
   http://plus.kaist.ac.kr/~shoh/ocaml/ocamllex-ocamlyacc/ocamlyacc-tutorial/


Ciao,
    Oliver

#13592 From: Nicolas FRANCOIS <nicolas.francois@...>
Date: Mon Aug 6, 2012 12:14 pm
Subject: Re: "ocaml_beginners"::[] Re: [Caml-list] Two questions about lex/yacc and lablgtk/gl
eul_bofo
Send Email Send Email
 
Thank you everyone for your kind help.

Clearly, everyone subscribes to both the mailing lists, so any will
do :-)

I'll contact you later for more help.

\bye

PS : The Ocamllex/yacc tutorials are great, but I can't get the pdf
versions.

--

Nicolas FRANCOIS                      |  /\
http://nicolas.francois.free.fr       | |__|
				       X--/\\
We are the Micro$oft. 	        _\_V
Resistance is futile.
You will be assimilated.         darthvader penguin

#13593 From: Esther Baruk <esther.baruk@...>
Date: Mon Aug 6, 2012 4:23 pm
Subject: Re: "ocaml_beginners"::[] Static analysis for OCaml
surdinal09
Send Email Send Email
 
Hi,

Maybe you should try asking on  caml-list@...

Regards,

Esther Baruk


On Sun, Jul 29, 2012 at 11:46 PM, Johan Mazel <johan.mazel@...> wrote:

> **
>
>
> Hi
> I am looking for a tool to perform static analysis (an especially
> useless code detection) on OCaml code.
> I already found pfff and Oug.
> The former only has a preliminary support for OCaml and is, for
> example, not able to find useless code.
> The latter, Oug has more functionalities, but looks harder to set up
> for a big project (but maybe I didn't try hard enough). I found an Oug
> makefile inside a Github project
> (https://github.com/maximedenes/native-coq/blob/master/dev/Makefile.oug)
> but I am having a hard time trying to understand how it works.
> Please tell me if you know any other tool that can do the job.
> Regards.
> Johan
>
>


[Non-text portions of this message have been removed]

#13594 From: Nicolas Braud-Santoni <nicolas.braudsantoni@...>
Date: Mon Aug 6, 2012 5:02 pm
Subject: Re: "ocaml_beginners"::[] Static analysis for OCaml
nicolasbraud...
Send Email Send Email
 
Seconded.
Also, you should try looking into binary annotations and the API
exposed by the compiler.


Regards,

Nicolas Braud-Santoni

2012/8/6 Esther Baruk <esther.baruk@...>:
> Hi,
>
> Maybe you should try asking on  caml-list@...
>
> Regards,
>
> Esther Baruk

#13595 From: Brian Hurt <bhurt@...>
Date: Mon Aug 6, 2012 5:59 pm
Subject: Re: "ocaml_beginners"::[] Static analysis for OCaml
bhurt42
Send Email Send Email
 
I recommend using the static analyzer built into ocamlc.  Especially
warning F, S, U, Y, and Z.  Or just A (my preferred setting).

On Sun, Jul 29, 2012 at 5:46 PM, Johan Mazel <johan.mazel@...> wrote:

> Hi
> I am looking for a tool to perform static analysis (an especially
> useless code detection) on OCaml code.
> I already found pfff and Oug.
> The former only has a preliminary support for OCaml and is, for
> example, not able to find useless code.
> The latter, Oug has more functionalities, but looks harder to set up
> for a big project (but maybe I didn't try hard enough). I found an Oug
> makefile inside a Github project
> (https://github.com/maximedenes/native-coq/blob/master/dev/Makefile.oug)
> but I am having a hard time trying to understand how it works.
> Please tell me if you know any other tool that can do the job.
> Regards.
> Johan
>
>
> ------------------------------------
>
> Archives up to December 31, 2011 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
>
>
>
>


[Non-text portions of this message have been removed]

#13596 From: Ashish Agarwal <agarwal1975@...>
Date: Thu Aug 9, 2012 10:53 am
Subject: CUFP 2012 - Call for Participation
ashish_a1975
Send Email Send Email
 
Early registration deadline is TODAY. Please note this year CUFP features
Introductory Tutorials, targeted at those new to functional programming. Be
sure to refer your colleagues who have been looking for a way to get
started with FP. The usual half-day tutorials are also being held, and this
list will especially be interested in Real-World OCaml.

-----
COMMERCIAL USERS OF FUNCTIONAL PROGRAMMING 2012
                               CUFP 2012
                        http://cufp.org/conference
                         CALL FOR PARTICIPATION
                          Copenhagen, Denmark
                               Sep 13-15
                       Co-located with ICFP 2012
                          Sponsored by SIGPLAN

Functional programming has been at the forefront of a new generation
of programming technologies: Companies employing functional
programming use it to enable more effective, robust, and flexible
software development.

The annual CUFP workshop is designed to serve the growing
community of commercial users of functional programming: Practitioners
meet and collaborate; language designers and users can share ideas
about the future of their languages; experts share their expertise on
practical functional programming.

CUFP 2012 features introductory tutorials by top-notch language
experts; advanced tutorials on special topics, and the final day of
talks about industrial applications of functional programming.

More information about CUFP 2012 is available on the CUFP web site at

http://cufp.org/

Registration is via the ICFP 2012 web site at:

http://icfpconference.org/icfp2012/registration.html

Note that early-registration discounts are available until August 9.

Introductory Tutorials
======================
Thursday, September 13:
Scala Primer
(Heiko Seeberger, Typesafe)

Friday, September 14:
From functional concepts to real-world F#
(Tomas Petricek, University of Cambridge)

September 13 / 14:
Introductory Haskell / Concurrent Haskell
(Jeremy Gibbons, University of Oxford; Simon Marlow, Microsoft Research)

Advanced Tutorials
==================

Thursday, September 13:
Morning:
Real-World OCaml
(Anil Madhavapeddy, University of Cambridge; Yaron Minsky, Jane Street)

Afternoon:
Erlang web frameworks
(Steve Vinoski, Basho Technologies)

Friday, September 14:
Morning:
Haskell for the lazy web developer: an Introduction to Happstack
(Jeremy Shaw, SeeReason, LLC)

Afternoon:
Hands on Real-World Clojure
(Lau Jensen, Best In Class; Karl Krukow , University of Aarhus)

Talks
=====

Keynote:
Adopting Functional Programming (Kresten Krab Thorup, Trifork)

Jane Street Status Report (Yaron Minsky, Jane Street)

Transmitting customised ads to set-top boxes with Erlang (Laura M. Castro,
University of A Coruña)

Functional Big-Data Genomics (Ashish Agarwal, NYU)

Using F# to Prove Stabilization of Biological Networks (Semin Ishtiaq,
Microsoft)

Developing an F# Bioinformatics Application with HTML5 Visualization (Adam
Granicz, IntelliFactory)

Functional Programming @ Ghent IT Valley (Romain Slootmaekers, Nicolas
Trangez, Ghent IT Valley)

The Awesome Haskell FPGA Compiler (Peter Braam, Parallel Scientific)

Functional programs connected to the power grid (Sebastian Egner, Entelios)

Clojure iPad analytics dashboard in energy sector (Kevin Lynagh, Keming
Labs)

Developing Medical Software in Scala and Haskell (Stefan Wehr, factis
research)

From Streams to Functions (and Back Again) (Frank McCabe, Starview)

Development under Security Guidelines (Manuel Maarek, SafeRiver)

Haskell for XenClient (Matthias Görgens, Citrix)


[Non-text portions of this message have been removed]

#13597 From: Johan Mazel <johan.mazel@...>
Date: Thu Aug 16, 2012 6:29 pm
Subject: [OASIS help] Code in subdirectories for executable
johan.mazel
Send Email Send Email
 
Hi
I am using OASIS 0.3.0 and OCaml 3.12.1.
I am trying to switch one of my projects to OASIS. However, I cannot
find a way to tell OASIS that the field path "src" actually contains
several other sub-directories and to create a _tags file that takes
this into account.
However, if I manually add directories in the _tags file with several
lines like "<src/sub-directory>: include", "ocaml setup.ml -build" is
working.
I cannot find anything in OASIS documentation regarding this problem.
Does anybody has an idea on how to fix this ?
Thanks in advance for your time.
Johan

#13598 From: Philippe Veber <philippe.veber@...>
Date: Fri Aug 17, 2012 9:34 am
Subject: Re: "ocaml_beginners"::[] [OASIS help] Code in subdirectories for executable
philippeveber
Send Email Send Email
 
Hi Johan,

If I understand you correctly, the files for your executable are scattered
in several sub-directories of src, right? In that case, there is no other
way that what you did to my knowledge, but what you did is just fine. Be
sure to add your include directives outside the automatically generated
part.

ph.

2012/8/16 Johan Mazel <johan.mazel@...>

> Hi
> I am using OASIS 0.3.0 and OCaml 3.12.1.
> I am trying to switch one of my projects to OASIS. However, I cannot
> find a way to tell OASIS that the field path "src" actually contains
> several other sub-directories and to create a _tags file that takes
> this into account.
> However, if I manually add directories in the _tags file with several
> lines like "<src/sub-directory>: include", "ocaml setup.ml -build" is
> working.
> I cannot find anything in OASIS documentation regarding this problem.
> Does anybody has an idea on how to fix this ?
> Thanks in advance for your time.
> Johan
>
>
> ------------------------------------
>
> Archives up to December 31, 2011 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
>
>
>
>


[Non-text portions of this message have been removed]

#13599 From: Johan Mazel <johan.mazel@...>
Date: Fri Aug 17, 2012 6:05 pm
Subject: Re: "ocaml_beginners"::[] [OASIS help] Code in subdirectories for executable
johan.mazel
Send Email Send Email
 
You understand correctly. Thanks a lot for your answer. :)

I have another question.
I keep some generic code in a directory different than my project's root
(relative path from project's root is something like ../OCaml_Common_Code).
I know that the cleanest way to use generic code is to create a library.
However this generic code experiences a lot of change, and this kind code
structure allow me to easily modify the code.

I managed to compile projects with ocamlbuild by creating a link between
the directory containing the generic code and a directory located in my
project's root.

In this this project, I use a src directory that contains my code. Thus
from the point of view of my project's root, I create a link between
src/OCaml_Common_Code and ../OCaml_Common_Code.
However, I have a compilation error that tells me that ocamlbuild cannot
find modules located in ../OCaml_Common_Code.
Is this a known behavior of ocamlbuild in OASIS ?

Thanks again for your time.
Johan

2012/8/17 Philippe Veber <philippe.veber@...>

> **
>
>
> Hi Johan,
>
> If I understand you correctly, the files for your executable are scattered
> in several sub-directories of src, right? In that case, there is no other
> way that what you did to my knowledge, but what you did is just fine. Be
> sure to add your include directives outside the automatically generated
> part.
>
> ph.
>
>
> 2012/8/16 Johan Mazel <johan.mazel@...>
>
> > Hi
> > I am using OASIS 0.3.0 and OCaml 3.12.1.
> > I am trying to switch one of my projects to OASIS. However, I cannot
> > find a way to tell OASIS that the field path "src" actually contains
> > several other sub-directories and to create a _tags file that takes
> > this into account.
> > However, if I manually add directories in the _tags file with several
> > lines like "<src/sub-directory>: include", "ocaml setup.ml -build" is
> > working.
> > I cannot find anything in OASIS documentation regarding this problem.
> > Does anybody has an idea on how to fix this ?
> > Thanks in advance for your time.
> > Johan
> >
> >
> > ------------------------------------
>
> >
> > Archives up to December 31, 2011 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
> >
> >
> >
> >
>
> [Non-text portions of this message have been removed]
>
>
>


[Non-text portions of this message have been removed]

#13600 From: Esther Baruk <esther.baruk@...>
Date: Sat Aug 18, 2012 8:26 pm
Subject: Companies using OCaml
surdinal09
Send Email Send Email
 
Dear OCaml Beginners list,

Some of you might already have heard about the OCaml Website
project<http://github.com/agarwal/ocamlweb> started
after its announcement at the last OCaml Meeting in April 2011.
There will be a page on the website where we list all companies using the
OCaml language.
We listed almost all well known companies (see the list at the end of this
mail), with a small description of the use of OCaml in the corresponding
company.
We wish to enrich this list as much as possible.
So, if you know or work in a company using OCaml and that is not in this
list, please tell us. And if you see some detailed descriptions that need
to be updated, let us know.

We also welcome new contributors to the project. You can submit pull
requests on Github (http://github.com/agarwal/ocamlweb) and also suggest
content to add, etc. We have a mailing list where you can subscribe:
https://lists.forge.ocamlcore.org/cgi-bin/listinfo/ocamlweb-devel

Thank you for your help.

Esther Baruk


List (sorted by country and company name):


    - England
       - Acunu <http://www.acunu.com/>
       *Acunu is writing, from the ground-up, a Storage and Analytics
       Platform for Massive Data.*
       - Citrix <http://www.citrix.com/>
       - Flying Frog Consultancy <http://ffconsultancy.com/>
       *Flying Frog Consultancy Ltd. consult and write books and software on
       the use of OCaml in the context of scientific computing. OCaml excels in
       the niche of intrinsically complicated programs between large-scale,
       array-based programs written in languages such as HPF and small-scale,
       graphical programs written in languages such as Mathematica.*
       - Merjis <http://merjis.com/>
       *Merjis Ltd. work on improving website return on investment by having
       a mix of good marketing and excellent understanding of the technology. We
       use OCaml because it represents the best of breed technology to use when
       building websites.*
    - France
       - Dassault Systèmes <http://www.3ds.com/fr/>
       **
       - Esterel Technologies <http://www.esterel-technologies.com/>
       **
       - LexiFi <http://www.lexifi.com/>
       *LexiFi is an innovative provider of software applications and
       infrastructure technology for the capital markets industry.
LexiFi Apropos
       is powered by an original formalism for describing financial
contracts, the
       result of a long-term research and development effort.*
       - MEDIT <http://www.medit.fr/>
       *MEDIT develops SuMo, an advanced bioinformatic
system<http://mjambon.com/phd.html> for
       the analysis of protein 3D structures and the identification of
drug-design
       targets. SuMo is written entirely in OCaml and provides interfaces to
       several commercial molecular-modelling packages.*
       - Motion-Twin <http://www.motion-twin.com/>
       *Motion-Twin is building web-based Flash video games for several web
       sites such as Frutiparc <http://www.frutiparc.com/> and
Prizee<http://www.prizee.com/>
        and KadoKado <http://www.kadokado.com/>. Because controlling the
       technology is critical for us, we're developing a lot of in-house tools
       using OCaml to gain development time and stability advandages over
       competitors. Using OCaml enables us to quickly develop robust
software that
       we need to build our games.*
       - MLstate <http://www.mlstate.com/>
       *MLstate is the creator of Opa <http://opalang.org/>: an open-source
       web development platform. It consists of a new programming
language, a new
       web server, a new database and a new distributed execution engine, all of
       them tightly integrated to provide a great experience for web developers.
       Opa is concise, simple, concurrent, dynamically secure and secure out of
       the box. It is written mainly in OCaml and uses OCaml as an intermediate
       language for compilation.*
       - OCamlPro <http://www.ocamlpro.com/>
       *OCamlPro develops and maintains a development environment for the
       OCaml language. They provide services for companies deciding to
use OCaml.
       Among these services: trainings, necessary expertises, tools and
libraries
       long-term support, and specific developments to their applicative domains.
       *
       - RunOrg <http://runorg.com/>
       **
    - Japan
       - IT Planning <http://www.itpl.co.jp/>
       *We use Ocaml for some kind of enterprise systems (i.e. production
       control, portfolio risk management and web services).*
    - Poland
       - Narrow Gate Logic <http://nglogic.com/>
       *Narrow Gate Logic is a company using Ocaml language in business and
       non-business applications.*
    - Sweden
       - Framtidsforum I&M <http://www.exceleverywhere.com/>
       *Framtidsforum I&M sells ExcelEverywhere, which creates web pages
       that look and function the same as your MS Excel spreadsheet.
JavaScript is
       used for calculation. Supports 140 Excel-functions. Typically used for
       expense report, survey, order forms, reservation forms, employment
       application, financial advisor, ROI. There are also versions
that generate
       ASP, ASP.NET <http://asp.net/> and JSP/Java code. The compiler is
       written using Ocaml.*
    - Uganda
       - Digital Solutions <http://dsmagic.com/>
       *General programming, with wide base and experience in Mobile
       Telephony programming and web application development.*
    - United States
       - Galois <http://www.galois.com/>
       *Galois has developed a domain specific declarative language for
       cryptographic algorithms. One of our research compilers is
written in OCaml
       and makes very extensive use of camlp4.*
       - JaneStreet <http://www.janestreet.com/>
       *Jane Street is a quantitative proprietary trading firm that operates
       around the clock and around the globe. They bring a deep understanding of
       markets, a scientific approach, and innovative technology to bear on the
       problem of trading profitably in the world's highly competitive financial
       markets.
       Jane Street is perhaps the largest commercial user of OCaml, and has
       attracted a very strong team of functional programmers. They use
OCaml for
       everything, from research infrastructure to trading systems to operations
       and accounting systems. Jane Street has over 50 OCaml
programmers and over
       a million lines of OCaml, powering a technology platform that trades
       billions of dollars every day.*
       - MrNumber <http://mrnumber.com/> (formerly
Skydeck<http://www.slideshare.net/jaked1/from-o-caml-to-javascript-at-skydeck>
       )
       - MyLife <http://mylife.com/> (formerly Wink)
       MyLife has developped a powerful people search tool that will empower
       those in need to find anyone, regardless of years past and the life that
       was built in between.
       - Psellos <http://psellos.com/>
       - PRUDENT Technologies and Consulting,
Inc.<http://www.prudentconsulting.com/>


[Non-text portions of this message have been removed]

#13601 From: Sylvain Le Gall <sylvain@...>
Date: Wed Aug 29, 2012 8:34 am
Subject: Re: [OASIS help] Code in subdirectories for executable
gildor16478
Send Email Send Email
 
On 16-08-2012, Johan Mazel <johan.mazel@...> wrote:
> --MSZAH53qNVnmw7IMWRYlJVCerZXfC6jCcJo75Qf
> Content-Type: text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding: 7bit
>
> Hi
> I am using OASIS 0.3.0 and OCaml 3.12.1.
> I am trying to switch one of my projects to OASIS. However, I cannot
> find a way to tell OASIS that the field path "src" actually contains
> several other sub-directories and to create a _tags file that takes
> this into account.
> However, if I manually add directories in the _tags file with several
> lines like "<src/sub-directory>: include", "ocaml setup.ml -build" is
> working.
> I cannot find anything in OASIS documentation regarding this problem.
> Does anybody has an idea on how to fix this ?
> Thanks in advance for your time.
> Johan
>

Just add the relative path to your module:

Library foo
   Path: src
   Modules: bar/Baz, Foo

It will include src/ and src/bar automatically. However, you won't find
a "src/bar": include in you _tags because it is handled in
myocamlbuild.ml in a more precise way.

The problem with the _tags line is that it includes the subdirectory for
everything in your project. Using myocamlbuild, as OASIS does, allow to
only include directories for Library/Executable that uses "Library foo".
It also make a difference between InternalModules (which should be
hidden) and Modules (which are public interfaces). So you can even go
further and have src/foo and src/foo/internal, if you want to be 100%
sure that other Libraries/Executables doesn't use internal stuff.

Cheers
Sylvain

p.s.: please CC sylvain@... for this kind of questions, I am not
reading caml-list as frequently as before.

#13602 From: Markus Weissmann <markus.weissmann@...>
Date: Tue Sep 4, 2012 5:37 pm
Subject: [OASIS help] packed library, separate interface
markus.weissmann@...
Send Email Send Email
 
Hi Sylvain and everyone,

I'm trying to switch my library over to Oasis and have a few problems.
My library consists of several modules that get packed into a single module for
which exists a "global" mli file.

So its something like: src/mylib.mli, src/a.ml, src/b.ml, src/c.ml

1.) I found the Pacl option in the source code (still missing from the docs);
and wrote this:

------
OASISFormat: 0.3
Name:        mylib
Version:     0.1
Synopsis:    do stuff
Authors:     Markus Weissmann
License:     BSD3
Plugins:     META (0.3)

Library mylib
   Pack: true
   Path: src
   BuildTools: ocamlbuild
   Modules: A, B, C
-------

This works, but _also_ installs all modules separately to the system along with
META, mylib.a, etc. I get a.ml, a.cmi etc. -- is this a bug or a feature?

2.) How do I make oasis install my "global" interface 'mylib.mli'?


Thanks & regards

-Markus

--
Markus Weißmann, M.Sc.
Technische Universität München
Institut für Informatik
Boltzmannstr. 3
D-85748 Garching
Germany
http://wwwknoll.in.tum.de/

#13603 From: Philippe Veber <philippe.veber@...>
Date: Tue Sep 4, 2012 5:58 pm
Subject: Re: "ocaml_beginners"::[] [OASIS help] packed library, separate interface
philippeveber
Send Email Send Email
 
Hi Markus,

If I'm not mistaken I had a similar problem with ocaml-r, here is its
_oasis file:

https://github.com/pveber/OCaml-R/blob/master/_oasis

The trick was not based on Pack but on the InternalModules option. I hope
this may help you, let me know if you have questions.

Philippe.



PS Note that this _oasis file will not work with oasis 0.3 because of the
new Object section. But this is not related to your problem I think.

2012/9/4 Markus Weissmann <markus.weissmann@...>

> Hi Sylvain and everyone,
>
> I'm trying to switch my library over to Oasis and have a few problems.
> My library consists of several modules that get packed into a single
> module for which exists a "global" mli file.
>
> So its something like: src/mylib.mli, src/a.ml, src/b.ml, src/c.ml
>
> 1.) I found the Pacl option in the source code (still missing from the
> docs); and wrote this:
>
> ------
> OASISFormat: 0.3
> Name:        mylib
> Version:     0.1
> Synopsis:    do stuff
> Authors:     Markus Weissmann
> License:     BSD3
> Plugins:     META (0.3)
>
> Library mylib
>   Pack: true
>   Path: src
>   BuildTools: ocamlbuild
>   Modules: A, B, C
> -------
>
> This works, but _also_ installs all modules separately to the system along
> with META, mylib.a, etc. I get a.ml, a.cmi etc. -- is this a bug or a
> feature?
>
> 2.) How do I make oasis install my "global" interface 'mylib.mli'?
>
>
> Thanks & regards
>
> -Markus
>
> --
> Markus Weißmann, M.Sc.
> Technische Universität München
> Institut für Informatik
> Boltzmannstr. 3
> D-85748 Garching
> Germany
> http://wwwknoll.in.tum.de/
>
>
>
> ------------------------------------
>
> Archives up to December 31, 2011 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
>
>
>
>


[Non-text portions of this message have been removed]

#13604 From: "Markus W. Weißmann" <markus.weissmann@...>
Date: Tue Sep 4, 2012 8:11 pm
Subject: Re: "ocaml_beginners"::[] [OASIS help] packed library, separate interface
markus.weissmann@...
Send Email Send Email
 
Hi Philipp,

I solved problem 1.) by replacing "Modules" with "InternalModules"; as I only
have submodules and no "mylib.ml", "Pack: true" seems to be the way to go.
The missing piece now is 2.), that my "mylib.mli" interface file is not getting
installed.


-Markus

On 4 Sep 2012, at 19:58, Philippe Veber wrote:

> Hi Markus,
>
> If I'm not mistaken I had a similar problem with ocaml-r, here is its
> _oasis file:
>
> https://github.com/pveber/OCaml-R/blob/master/_oasis
>
> The trick was not based on Pack but on the InternalModules option. I hope
> this may help you, let me know if you have questions.
>
> Philippe.
>
>
>
> PS Note that this _oasis file will not work with oasis 0.3 because of the
> new Object section. But this is not related to your problem I think.
>
> 2012/9/4 Markus Weissmann <markus.weissmann@...>
>
>> Hi Sylvain and everyone,
>>
>> I'm trying to switch my library over to Oasis and have a few problems.
>> My library consists of several modules that get packed into a single
>> module for which exists a "global" mli file.
>>
>> So its something like: src/mylib.mli, src/a.ml, src/b.ml, src/c.ml
>>
>> 1.) I found the Pacl option in the source code (still missing from the
>> docs); and wrote this:
>>
>> ------
>> OASISFormat: 0.3
>> Name:        mylib
>> Version:     0.1
>> Synopsis:    do stuff
>> Authors:     Markus Weissmann
>> License:     BSD3
>> Plugins:     META (0.3)
>>
>> Library mylib
>>  Pack: true
>>  Path: src
>>  BuildTools: ocamlbuild
>>  Modules: A, B, C
>> -------
>>
>> This works, but _also_ installs all modules separately to the system along
>> with META, mylib.a, etc. I get a.ml, a.cmi etc. -- is this a bug or a
>> feature?
>>
>> 2.) How do I make oasis install my "global" interface 'mylib.mli'?
>>
>>
>> Thanks & regards
>>
>> -Markus
>>
>> --
>> Markus Weißmann, M.Sc.
>> Technische Universität München
>> Institut für Informatik
>> Boltzmannstr. 3
>> D-85748 Garching
>> Germany
>> http://wwwknoll.in.tum.de/
>>
>>
>>
>> ------------------------------------
>>
>> Archives up to December 31, 2011 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
>>
>>
>>
>>
>
>
> [Non-text portions of this message have been removed]
>

--
Markus Weißmann, M.Sc.
Technische Universität München
Institut für Informatik
Boltzmannstr. 3
D-85748 Garching
Germany
http://wwwknoll.in.tum.de/

#13605 From: Philippe Veber <philippe.veber@...>
Date: Tue Sep 4, 2012 8:28 pm
Subject: Re: "ocaml_beginners"::[] [OASIS help] packed library, separate interface
philippeveber
Send Email Send Email
 
I suggested to remove the Pack option so that you could declare Mylib in
"Modules" and create a mylib.ml file that would contain:

module A = A
module B = B
etc ...

That way you get 1 and 2, at the expense of packing modules manually. This
may seem unsatisfying at first glance but this is not as bad as it seems
(core and batteries have that kind of module for instance). I don't think
you can declare Foo as a module if foo.ml (or foo.mly) is not present. I
would have thought it would fail, but at least it does not work as you'd
expect and I'm not sure you could force it to. Maybe somebody on the oasis
mailing will have a clue?

ph.

2012/9/4 "Markus W. Weißmann" <markus.weissmann@...>

> Hi Philipp,
>
> I solved problem 1.) by replacing "Modules" with "InternalModules"; as I
> only have submodules and no "mylib.ml", "Pack: true" seems to be the way
> to go.
> The missing piece now is 2.), that my "mylib.mli" interface file is not
> getting installed.
>
>
> -Markus
>
> On 4 Sep 2012, at 19:58, Philippe Veber wrote:
>
> > Hi Markus,
> >
> > If I'm not mistaken I had a similar problem with ocaml-r, here is its
> > _oasis file:
> >
> > https://github.com/pveber/OCaml-R/blob/master/_oasis
> >
> > The trick was not based on Pack but on the InternalModules option. I hope
> > this may help you, let me know if you have questions.
> >
> > Philippe.
> >
> >
> >
> > PS Note that this _oasis file will not work with oasis 0.3 because of the
> > new Object section. But this is not related to your problem I think.
> >
> > 2012/9/4 Markus Weissmann <markus.weissmann@...>
> >
> >> Hi Sylvain and everyone,
> >>
> >> I'm trying to switch my library over to Oasis and have a few problems.
> >> My library consists of several modules that get packed into a single
> >> module for which exists a "global" mli file.
> >>
> >> So its something like: src/mylib.mli, src/a.ml, src/b.ml, src/c.ml
> >>
> >> 1.) I found the Pacl option in the source code (still missing from the
> >> docs); and wrote this:
> >>
> >> ------
> >> OASISFormat: 0.3
> >> Name:        mylib
> >> Version:     0.1
> >> Synopsis:    do stuff
> >> Authors:     Markus Weissmann
> >> License:     BSD3
> >> Plugins:     META (0.3)
> >>
> >> Library mylib
> >>  Pack: true
> >>  Path: src
> >>  BuildTools: ocamlbuild
> >>  Modules: A, B, C
> >> -------
> >>
> >> This works, but _also_ installs all modules separately to the system
> along
> >> with META, mylib.a, etc. I get a.ml, a.cmi etc. -- is this a bug or a
> >> feature?
> >>
> >> 2.) How do I make oasis install my "global" interface 'mylib.mli'?
> >>
> >>
> >> Thanks & regards
> >>
> >> -Markus
> >>
> >> --
> >> Markus Weißmann, M.Sc.
> >> Technische Universität München
> >> Institut für Informatik
> >> Boltzmannstr. 3
> >> D-85748 Garching
> >> Germany
> >> http://wwwknoll.in.tum.de/
> >>
> >>
> >>
> >> ------------------------------------
> >>
> >> Archives up to December 31, 2011 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
> >>
> >>
> >>
> >>
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
> --
> Markus Weißmann, M.Sc.
> Technische Universität München
> Institut für Informatik
> Boltzmannstr. 3
> D-85748 Garching
> Germany
> http://wwwknoll.in.tum.de/
>
>
>
> ------------------------------------
>
> Archives up to December 31, 2011 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
>
>
>
>


[Non-text portions of this message have been removed]

#13606 From: "pinomugo149" <pinomugo149@...>
Date: Tue Sep 11, 2012 10:22 am
Subject: type constructor question
pinomugo149
Send Email Send Email
 
HI
I'm very newbie in programming, and I'm trying to learn OCaml bases..
first of all SORRY for my bad english ;))
Well. I do not understand why in this example of a guide that i'm
reading ther're two "paired" args declared in e Constructor Node:

# type 'a tree =
        Empty
        | Node of 'a * 'a tree list ;; (* here " 'a tree " type arg with
list type arg without *--??? then I don't know as I have to call: Node
(_, bs) *)
# let rec height =
         let max_list l = List.fold_left max 0 l in
             function
                 Empty -> 0
               | Node (_, bs) ->  1 + (max_list (List.map  height bs)) ;;
    val height : 'a tree -> int = <fun>

But if I call:
# height  [1; 2; 3]
Error: This function is applied to too many arguments;  ---(* ????*)..
maybe you forgot a `;'

I did not understand why, and where is the problem and why "too many
args to Node...
Thanks in advace for your help!!!


[Non-text portions of this message have been removed]

#13607 From: Dan Bensen <danbensen@...>
Date: Tue Sep 11, 2012 10:54 am
Subject: Re: "ocaml_beginners"::[] type constructor question
danbensen...
Send Email Send Email
 
# type 'a tree = Empty | Node of 'a * 'a tree list

> type constructor question

Node is a value constructor (data constructor).
The type constructor is tree.

> I do not understand why in this example of a guide that i'm
reading ther're two "paired" args declared in e Constructor Node:

The first element in Node (x,nodes) is the label of the node.
The second element is the subnodes.

> I did not understand why, and where is the problem and why
> "too many args to Node...

It sounds like you called Node x nodes instead of Node (x,nodes).
All OCaml data constructors  with more than one argument take
the arguments together in a tuple.

I didn't get the "too many args" error.  From the session
you posted, I got a type error:

# height [1; 2; 3];;
Error: This expression has type 'a list
        but an expression was expected of type 'b tree

But it works with a node:

# height (Node (1,[Node (2,[Empty]);Empty]));;
- : int = 2

--Dan





________________________________
From: pinomugo149 <pinomugo149@...>
To: ocaml_beginners@yahoogroups.com
Sent: Tue, September 11, 2012 5:22:32 AM
Subject: "ocaml_beginners"::[] type constructor question


HI
I'm very newbie in programming, and I'm trying to learn OCaml bases..
first of all SORRY for my bad english ;))
Well. I do not understand why in this example of a guide that i'm
reading ther're two "paired" args declared in e Constructor Node:

# type 'a tree =
Empty
| Node of 'a * 'a tree list ;; (* here " 'a tree " type arg with
list type arg without *--??? then I don't know as I have to call: Node
(_, bs) *)
# let rec height =
let max_list l = List.fold_left max 0 l in
function
Empty -> 0
| Node (_, bs) ->  1 + (max_list (List.map  height bs)) ;;
val height : 'a tree -> int = <fun>

But if I call:
# height  [1; 2; 3]
Error: This function is applied to too many arguments;  ---(* ????*)..
maybe you forgot a `;'

I did not understand why, and where is the problem and why "too many
args to Node...
Thanks in advace for your help!!!

[Non-text portions of this message have been removed]




[Non-text portions of this message have been removed]

#13608 From: "pinomugo149" <pinomugo149@...>
Date: Tue Sep 11, 2012 2:03 pm
Subject: Re: "ocaml_beginners"::[] type constructor question
pinomugo149
Send Email Send Email
 
HI Dan and THANKS for your help!
Yes, the problem was that!!I called data costructor without tuple..
now the story begins to become clearer ;)
my doubt  was about:

type 'a tree =
      Empty
     | Node of 'a * 'a tree list ;;

  the type of second Node's argument : 'a tree list;
  then it sounds like  a list that embeddeds a "tree value costructor"..Is that
right?
Thanks again!

#13609 From: "pinomugo149" <pinomugo149@...>
Date: Sun Sep 16, 2012 8:30 pm
Subject: easy exercise....but
pinomugo149
Send Email Send Email
 
HI
I should write a function that takes four parameters and that cheks to see  if
Fermat 's theoreme holds; ok so far so good becpuse it's very simple:

# let chek_fermat  a b c n =
       if  n > 2.  &&  a**n +. b**n = c**n
           then  print_string "Fermat was wrong!"
       else print_string "Doesn't work";

But the second part of exercise says : Write a function that prompts the user to
input values for a, b and c, convert them to integers and use chek_fermat to
chek whether they violate Fermat's theoreme; here I have problems, my wrong
program is this(first I declare chek_format and after I call it with float args
(from "stdin"...)...but i'm not sure if it's also a "semantic error" and not
only synthax error...

# let chek_format  a b c n =
       if  n > 2.  &&  a**n +. b**n = c**n
           then  print_string "Fermat was wrong!"
       else print_string "Doesn't work";

# let chek () = print_string "enter the four numbers";
# let a = read_float()
    and b = read_float()
    and c = read_float()
    and n = read_float() in
        chek_format  a b c n ;;

but Error syntax raises.....
can someone help me??
thanks in advance!!!!!!!!

#13610 From: Nicolas Braud-Santoni <nicolas.braudsantoni@...>
Date: Sun Sep 16, 2012 11:01 pm
Subject: Re: "ocaml_beginners"::[] easy exercise....but
nicolasbraud...
Send Email Send Email
 
Hello,

chek_fermat (sic) is written « chek_fermat » and not « chek_format »

#13611 From: Virgile Prevosto <virgile.prevosto@...>
Date: Mon Sep 17, 2012 7:54 am
Subject: Re: "ocaml_beginners"::[] easy exercise....but
virgilepr
Send Email Send Email
 
Hello,

2012/9/16 pinomugo149 <pinomugo149@...>:
> # let chek_format  a b c n =
>       if  n > 2.  &&  a**n +. b**n = c**n
>           then  print_string "Fermat was wrong!"
>       else print_string "Doesn't work";
>
> # let chek () = print_string "enter the four numbers";
> # let a = read_float()
>    and b = read_float()
>    and c = read_float()
>    and n = read_float() in
>        chek_format  a b c n ;;

apart from the spelling of your identifiers already mentioned (this is
not an issue for OCaml itself, but as soon as you start having
slightly longer code, having properly named function is really
important if you want to have a chance to understand what's going on),
the problem lies in the single semicolon at the end of "chek_format"
function. Namely, a double semicolon (like at the end of 'chek') marks
the end of a toplevel phrase, in your case of global definitions. On
the other hand, a single semicolon separates two statements, in your
case the if ... then ... else ... of "chek_format" and what appears to
be the definition of a _local_ variable "chek", for which there's no
corresponding 'in' before the end of the toplevel definition, hence
the syntax error.

Best regards,
--
E tutto per oggi, a la prossima volta
Virgile

#13612 From: "pinomugo149" <pinomugo149@...>
Date: Mon Sep 17, 2012 11:47 am
Subject: Re: easy exercise....but
pinomugo149
Send Email Send Email
 
Perfect...""Grazie virgile!!! ;))
now it's clear!!!;))
thanks for your help!!!

#13613 From: "pinomugo149" <pinomugo149@...>
Date: Mon Sep 17, 2012 11:48 am
Subject: Re: "ocaml_beginners"::[] easy exercise....but
pinomugo149
Send Email Send Email
 
--- In ocaml_beginners@yahoogroups.com, Nicolas Braud-Santoni
<nicolas.braudsantoni@...> wrote:
>
> Hello,
>
> chek_fermat (sic) is written « chek_fermat » and not « chek_format »
>

;)) sorry!!You are right ;)
thanks

#13614 From: "pinomugo149" <pinomugo149@...>
Date: Sat Oct 6, 2012 1:10 pm
Subject: Help on exercize semantic and synthax
pinomugo149
Send Email Send Email
 
HIin this exerc. I have  a string and I want to count how many times
some letters appears; for that i can use a hashtable with characters as
keys and "int counters" as value:
let rec verify str hash =       let len = String.length str in
if len = 1 then  hash          else               match str.[0] with
'p'  -> Hashtbl.replace hash "p" (Hashtbl.find hash "p" + 1)
| 'e' -> Hashtbl.replace hash "e"(Hashtbl.find hash "e" + 1)
| 'r' -> Hashtbl.replace hash "r" (Hashtbl.find hash "r" + 1)
| _ -> () ;            verify (String.sub str 1 (len - 1)) hash;;

But  the following error raise :
Characters 165-217:               'p' -> Hashtbl.replace hash "p"
(Hashtbl.find hash "p" + 1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Error: This
expression has type unit but an expression was expected of type
(string, int) Hashtbl.t
I still do not understand whyI still do not understand why  an
expression was expected of type(string, int) Hashtbl.t  but  not
"unit'"?...wher is my error?and  furthermore the semantic that I used is
correct or I could write the function in a better way?thanks in advance!


[Non-text portions of this message have been removed]

#13615 From: "pinomugo149" <pinomugo149@...>
Date: Sat Oct 6, 2012 1:15 pm
Subject: Re: Help on exercize semantic and synthax
pinomugo149
Send Email Send Email
 
PS.
for this message I used a rich-text-editor but the text formatting was lost!!and
the code can not be read in clear way!!
Why?
thanks again

#13616 From: Rémi Vanicat <remi.vanicat@...>
Date: Sun Oct 7, 2012 10:08 am
Subject: Re: Help on exercize semantic and synthax
dl_ens
Send Email Send Email
 
"pinomugo149" <pinomugo149@...> writes:

> HIin this exerc. I have  a string and I want to count how many times
> some letters appears; for that i can use a hashtable with characters as
> keys and "int counters" as value:

Your code correctly indented is:

  let rec verify str hash =
    let len = String.length str in
    if len = 1 then  hash
    else match str.[0]
      with
        'p'  -> Hashtbl.replace hash "p" (Hashtbl.find hash "p" + 1)
      | 'e' -> Hashtbl.replace hash "e"(Hashtbl.find hash "e" + 1)
      | 'r' -> Hashtbl.replace hash "r" (Hashtbl.find hash "r" + 1)
      | _ -> () ;
        verify (String.sub str 1 (len - 1)) hash;;

Note that the ; don't end the last match case, you need to enclose it
into a begin end for the recursive call to be evaluated every time.


Bye the way your code is really very very inefficient: creating the sub
string is costly, and you do it a lot. You would probably be better
doing a plain for loop.

[...]

>
> [Non-text portions of this message have been removed]

Please, don't post in html here, use plain text.


--
Rémi Vanicat

#13617 From: "pinomugo149" <pinomugo149@...>
Date: Sun Oct 7, 2012 12:30 pm
Subject: Re: Help on exercize semantic and synthax
pinomugo149
Send Email Send Email
 
HI thanks for answered!
ok but I would know why this error occurs:

.....Hashtbl.replace hash "p" (Hashtbl.find hash "p" + 1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^Error:
This expression has type unit but an expression was expected of type
(string, int) Hashtbl.t...

why this expr isn't :of type (string, int) Hashtbl.t?? but unit?

and another question: Ocaml leads that this expr must be of type """(string,
int) Hashtbl.t""" becouse in the """ if len = 1 then hash...""" we declare 
"hashtable type" with "hash"?(that is an Hashtable..)??? and then also "else"
must return an hashtable type?? it's right or else can return  also a different
type?
thanks for your help!!!
ps. I'll change the semantic of this code with a for loop...thanks

#13618 From: X Chen <iamindcs@...>
Date: Sun Oct 7, 2012 1:16 pm
Subject: How to use OCaml in XCode?
jackinlost
Send Email Send Email
 
Hello all.

I am a Mac and XCode user.

My Mac OSX version is 10.7.4 and my XCode version is 4.5.

I downloaded OCaml for mac from here: http://caml.inria.fr/download.en.html.

I downloaded
Binary distribution for MacOS X

    - Binary MacOS X package (4.00.1) for Intel-based
Macs<http://caml.inria.fr/pub/distrib/ocaml-4.00/ocaml-4.00.1-intel.dmg>


After I installed the package, I launched XCode, but I can't find way to
create a OCaml project.

Can anyone give me a guide to how to write OCaml in XCode?

Thanks


[Non-text portions of this message have been removed]

Messages 13589 - 13618 of 13890   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help