caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] camlp4
@ 2003-06-10 14:22 Pierre CHATEL
  0 siblings, 0 replies; 31+ messages in thread
From: Pierre CHATEL @ 2003-06-10 14:22 UTC (permalink / raw)
  To: caml-list

Hello, i'm kinda new to the list, so i hope my newbie questions will 
not disturb everyone :))

So, i was wondering if there were something like Scheme's hygienic 
macros with the Camlp4 preprocessor, or even if it does make sense with 
it.
More generally, i'm looking for some good point-to-point comparison 
between OCaml and Scheme on the macro side...if u know some good 
ressource on that, please point it to me !

Thanks,

Pierre CHATEL

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 31+ messages in thread
* camlp4
@ 2010-02-06  1:16 Andy Ray
  2010-02-06 11:15 ` [Caml-list] camlp4 blue storm
                   ` (3 more replies)
  0 siblings, 4 replies; 31+ messages in thread
From: Andy Ray @ 2010-02-06  1:16 UTC (permalink / raw)
  To: caml-list

Hi,

My project would really benefit from some simple camlp4 syntax
extensions, however, I am put off by the lack of a reference manual
for it.

At the moment I am tempted to go for camlp5 instead - not least
because I was able to work through it's manual and get some examples
working a while back.

The reality is I would prefer to use camlp4 as it appears to the
official ocaml supported way, but can't see how to get into it as a
beginner due to the lack of documentation (and that appears to have
been the case for quite some time now).  What should one do?

Cheers,
Andy


^ permalink raw reply	[flat|nested] 31+ messages in thread
* camlp4
@ 2008-01-18 17:08 Christian Sternagel
  2008-01-18 18:56 ` [Caml-list] camlp4 Nicolas Pouillard
  2008-01-18 19:30 ` Olivier Andrieu
  0 siblings, 2 replies; 31+ messages in thread
From: Christian Sternagel @ 2008-01-18 17:08 UTC (permalink / raw)
  To: caml-list

When using `camlp4o -parser Camlp4ListComprehension' as preprocessor,
is the resulting code the naive translation, like in,

 [(x, y) | x <- xs, even xs, y <- ys]

=>

 List.flatten (
  List.map (fun x -> List.map (fun y -> (x, y)) ys) (List.filter even xs)
 )

or is there an optimization in order to avoid appends and minimize the
number of cons?

cheers

christian


^ permalink raw reply	[flat|nested] 31+ messages in thread
* Re: [Caml-list] novice puzzled by speed tests
@ 2004-01-04 16:49 Xavier Leroy
  2004-01-05 19:50 ` [Caml-list] camlp4 Ker Lutyn
  0 siblings, 1 reply; 31+ messages in thread
From: Xavier Leroy @ 2004-01-04 16:49 UTC (permalink / raw)
  To: dolfi; +Cc: caml-list

> Toying around with 3.07, I found that ocamlopt.opt -unsafe (on Mandrake
> 9.1, Pentium 4, 2.4 GHz) actually produces slower code than ocamlopt.opt.
> On my box, the corresponding C program (gcc -O3) is slightly slower than
> the ocamlopt.opt compiled O'Caml program, but about 25-30% faster than the
> -unsafe one:
> Of course it's good that range checking increases the speed of programs,
> but, being a long-time C user, I'm a little bit puzzled by miracles like
> this. I suspected that the sense of the -unsafe flag was inverted, but it
> isn't: the -unsafe program dies with SEGV when I deliberately introduce a
> range overflow, the safe one gets an exception.

Welcome to the wonderful world of modern processors.  It's not
uncommon to observe "absurd" speed differences of up to 20%.  By
"absurd" I mean for instance adding or removing dead code (never
executed) and observing a slowdown, or executing more code and
observing a speedup.

As far as I can guess, this is due to two processor features:

- Lots of instruction-level parallelism is available.  Thus, if your
main code doesn't use all of the computational units, adding extra code
(such as array bound checks) that can execute in parallel doesn't
reduce execution speed.

- Performance is very sensitive to code placement.  Things like code
cache conflicts, (mis-) alignment of branch targets, and oddities in the
instruction decoding logic can cause insertion *or deletion* of a few
instructions to have significant impact on execution speed.

These are just wild guesses.  The bottom line is that processors have
become so complex that explaining observed performances (let alone
predicting performances) has become nearly impossible, at least for
small performance variations (say, less than a factor of 1.5).  

(This makes compiler writers very unhappy, because they used to make a
living by cranking out 5% speed improvements, which are now lost in
the overall noise :-)

If you have access to a good performance analysis tool, such as
Intel's VTune, you could run it on your three executables and see if
some rational explanation comes out of VTune's figures.  But I
wouldn't bet on it.

- Xavier Leroy

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 31+ messages in thread
* [Caml-list] -unsafe and camlp4
@ 2003-07-08 12:49 "Dmitry Bely" 
  2003-07-08 13:38 ` Xavier Leroy
  0 siblings, 1 reply; 31+ messages in thread
From: "Dmitry Bely"  @ 2003-07-08 12:49 UTC (permalink / raw)
  To: caml-list

Can two things live together? When I run ocamlopt -unsafe -pp "camlp4 ..." ..., compiler prints warning and -unsafe seems to be ignored. Am I doing something wrong?

-- Dmitry Bely

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 31+ messages in thread
* [Caml-list] Camlp4
@ 2003-02-07 11:11 Daniel de Rauglaudre
  2003-02-08  0:26 ` Issac Trotts
  2003-02-08 17:23 ` Geoff Wozniak
  0 siblings, 2 replies; 31+ messages in thread
From: Daniel de Rauglaudre @ 2003-02-07 11:11 UTC (permalink / raw)
  To: caml-list

Hi everybody,

I am in regret to announce that I have stopped developping Camlp4 and
other OCaml applications. I am sure that the Cristal team is going to
find some good programmers able to maintain the Camlp4 part of OCaml
and I wish good luck to the language.

-- 
Daniel de RAUGLAUDRE
http://cristal.inria.fr/~ddr/
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 31+ messages in thread
* [Caml-list] Camlp4
@ 2002-05-17 13:19 Ohad Rodeh
  0 siblings, 0 replies; 31+ messages in thread
From: Ohad Rodeh @ 2002-05-17 13:19 UTC (permalink / raw)
  To: caml-list


List,
   I'm writing to check whether Camlp4 remains or not in the Caml
distribution.

I have a 60000 line system written in Caml, and I was seriously considering
using
Camlp4 for conditional compilation of debugging versions of some of my
modules.

      Ohad.

PS
    While I don't develop Caml, I personally think that:
o Caml needs a preprocessor, at least for conditional compilation
o The preprocessor needs to be in the primary distribution (not as an
add-on)
o Since there is a lot of code written in the old syntax, changing the
syntax is out
   of the question.
o The above point means that a preprocessor is needed to experiment with
new
    syntax without breaking the old syntax.

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

Ohad Rodeh
tel: +972-9-9527641
IBM Haifa, storage research


                                                                                                                         
                      Christopher Quinn                                                                                  
                      <cq@htec.demon.co.uk>         To:                                                                  
                      Sent by:                      cc:       caml-list@inria.fr                                         
                      owner-caml-list@pauill        Subject:  [Caml-list] Re: Camlp4/OCaml                               
                      ac.inria.fr                                                                                        
                                                                                                                         
                                                                                                                         
                      17/05/2002 02:22                                                                                   
                      Please respond to                                                                                  
                      Christopher Quinn                                                                                  
                                                                                                                         
                                                                                                                         



How can camlp4 be unimportant or a waste of time!

Here are some things I find useful about it:

o conditional compilation

o ability to add command line options to switch between one's own 'safe'
modules and their 'unsafe' versions which can only be done in the case
of Arrays and Strings with the standard compiler.

o one can always modify one's own copy of the parser,
but that's a bother when something in the original changes, and besides,
camlp4's extension mechanism allows a compact and manageable format.

o no matter how one redefines the syntax, just running the source
through camlp4 can reconstruct it in the vanilla form. So no one ever
needs to suffer another's idea of perfection!

o camlp4 seems to me to be one way to avoid the endless creation of
mini-languages for specific tasks that end up trying to do stuff beyond
their limited design. Better to start with the expressivity of the likes
of caml, maybe cutting down, and augment with p4 extensions. I'm
planning to embed some sql style DDL for my project.

o I can write code without_the_god_damn_awful_underscore character
stressing my hands and use-an-alternative-even
(though-I-am-no-fan-of-lisp)!


I felt these reasons were compelling enough to justify  switching to
camlp4 as my default parser.

The above doubtless has no bearing on the technical arguments for not
having camlp4 in the distribution.
I just want to say I think camlp4 is important and indispensible.

- chris

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives:
http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ:
http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners




-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2010-02-09 18:29 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-10 14:22 [Caml-list] camlp4 Pierre CHATEL
  -- strict thread matches above, loose matches on Subject: below --
2010-02-06  1:16 camlp4 Andy Ray
2010-02-06 11:15 ` [Caml-list] camlp4 blue storm
2010-02-06 12:14 ` Tiphaine Turpin
2010-02-06 12:44   ` Guillaume Yziquel
2010-02-09 15:30     ` Guillaume Yziquel
2010-02-09 18:29       ` Jake Donham
2010-02-07 17:19   ` Martin DeMello
2010-02-08  1:14     ` Ashish Agarwal
2010-02-08  2:01       ` Yoann Padioleau
2010-02-08  2:03       ` Erik de Castro Lopo
2010-02-06 13:37 ` Ed Keith
2010-02-07 13:51 ` Joseph Young
2008-01-18 17:08 camlp4 Christian Sternagel
2008-01-18 18:56 ` [Caml-list] camlp4 Nicolas Pouillard
2008-01-18 19:30 ` Olivier Andrieu
2008-01-18 19:53   ` Nicolas Pouillard
2008-01-19 15:09     ` Christian Sternagel
2008-01-20 15:23       ` Nicolas Pouillard
2008-01-22 13:33         ` Christian Sternagel
2008-01-22 13:42           ` Nicolas Pouillard
2008-01-22 14:06             ` Loup Vaillant
2008-01-22 14:26               ` Nicolas Pouillard
2008-01-22 16:43             ` Christian Sternagel
2008-01-22 18:20               ` Nicolas Pouillard
2008-01-24  9:01                 ` Christian Sternagel
2004-01-04 16:49 [Caml-list] novice puzzled by speed tests Xavier Leroy
2004-01-05 19:50 ` [Caml-list] camlp4 Ker Lutyn
2003-07-08 12:49 [Caml-list] -unsafe and camlp4 "Dmitry Bely" 
2003-07-08 13:38 ` Xavier Leroy
2003-07-08 15:38   ` [Caml-list] camlp4 Dmitry Bely
2003-07-22 11:14     ` Damien Doligez
2003-02-07 11:11 [Caml-list] Camlp4 Daniel de Rauglaudre
2003-02-08  0:26 ` Issac Trotts
2003-02-08 17:23 ` Geoff Wozniak
2002-05-17 13:19 Ohad Rodeh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).