Search the web
Sign In
New User? Sign Up
ocaml_beginners · Ocaml Beginners
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Messages 2733 - 2762 of 11549   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand   (Group by Topic) Author Sort by Date ^
2733
Where can I find a clear description of how OCaml executes code. In particular, I want to understand when functions with several values are evaluated - is the...
andrew cooke
andrew@...
Send Email
Nov 3, 2004
7:03 pm
2734
... No, for example # let f1 x = x;; val f1 : 'a -> 'a = <fun> # let f2 x = -x;; val f2 : int -> int = <fun> # let example1 a b x = let a' = f1 a in let b' =...
Issac Trotts
issac_trotts
Offline Send Email
Nov 3, 2004
7:56 pm
2735
On Wed, 3 Nov 2004 16:03:20 -0300 (CLST), andrew cooke ... These two are equivalent. I have a question, however, for the list. Why does example2, when so...
Seth J. Fogarty
aravthamis
Online Now Send Email
Nov 3, 2004
10:28 pm
2736
Thanks for the reply. Just to get this straight, because i think I wasn't anything like clear enough (I was not talking about function signatures, but about...
andrew cooke
andrew@...
Send Email
Nov 4, 2004
12:54 am
2737
On Wed, 3 Nov 2004 21:54:11 -0300 (CLST), andrew cooke ... let example1 a b x = let a' = f1 a in let b' = f2 b in f3 a' b' x let example2 a b = let a' = f1 a...
Seth J. Fogarty
aravthamis
Online Now Send Email
Nov 4, 2004
1:17 am
2738
... You guys can play with the hidden counter example. The problem is: create a function that takes as argument the first value of a counter that should be...
Martin Jambon
BioMim
Offline Send Email
Nov 4, 2004
1:46 am
2739
Thanks! (I hadn't even thought about how you might preserve polymorphism within the loop). Andrew ... -- ` __ _ __ ___ ___| |_____ work web site:...
andrew cooke
andrew@...
Send Email
Nov 4, 2004
8:03 pm
2740
That seems easy to do with a reference, but how does it shed light on the relative optimisations for examples 1 and 2? Are you saying that the optimisations...
andrew cooke
andrew@...
Send Email
Nov 4, 2004
8:05 pm
2741
... Yes. OCaml is not a pure functional language. It is possible to make a program compute things in a specified order without difficulties. And the compiler...
Martin Jambon
BioMim
Offline Send Email
Nov 4, 2004
10:39 pm
2742
RE: counter example. That was easy enough. Still not sure why # let f1 x = x;; val f1 : 'a -> 'a = <fun> # let f2 x = x;; val f2 : 'a -> 'a = <fun> # let f3 a...
Seth J. Fogarty
aravthamis
Online Now Send Email
Nov 5, 2004
1:13 am
2743
... I don't know why it is like this (but I don't want to know :-) There are a few paragraphs about this topic in the FAQ if you did not read it yet: ...
Martin Jambon
BioMim
Offline Send Email
Nov 5, 2004
2:28 am
2744
I had seen those, yes. Still don't really undersand it. Are the pages translated? On Thu, 4 Nov 2004 18:28:21 -0800 (PST), Martin Jambon ... -- Seth Fogarty...
Seth J. Fogarty
aravthamis
Online Now Send Email
Nov 5, 2004
3:29 am
2745
... The monomorphic types '_a and others are needed in order to ensure type safety. for example : let id x = x let f = ref id ... if it's type was 'a -> 'a ,...
Nicolas Cannasse
ncannasse
Offline Send Email
Nov 5, 2004
8:49 am
2746
... Thanks... that's the example I needed to fit this in my head. I'm still slightly bothered by the fragility with which '_a is introduced or not. # let f a b...
Seth J. Fogarty
aravthamis
Online Now Send Email
Nov 5, 2004
8:57 am
2747
On Wed, 3 Nov 2004 16:03:20 -0300 (CLST), andrew cooke ... The awnser of Issac is correct, but I wabt to insist one one thing : the ocaml semantic is the more...
Remi Vanicat
dl_ens
Offline Send Email
Nov 5, 2004
11:22 am
2748
... It's easy. You get monorphic variables every time you having polymorphic variables on the right side of a let x = ... expression . That means for values...
Nicolas Cannasse
ncannasse
Offline Send Email
Nov 5, 2004
12:13 pm
2749
... well, when the typer compute the type of an expression, he only know the type of the part of the computation. So if two function do have the same type, and...
Remi Vanicat
dl_ens
Offline Send Email
Nov 5, 2004
12:52 pm
2750
... It's called 'value restriction'. For full polymorphism, the expression on the right hand side of the '=' sign must be a value. ... (a,b) is a value. ... 'f...
Alwyn
david_alwyn
Offline Send Email
Nov 5, 2004
12:59 pm
2751
... And I think it's also true that '_a will only ever appear in the toplevel, never when writing proper applications. Rich. -- Richard Jones....
Richard Jones
rwmjones
Offline Send Email
Nov 5, 2004
1:10 pm
2752
... Well not exactly, if the value on the right hand side of the = is an hashtable for example, it is a value, but it won't be polymophic (it would be realy...
Remi Vanicat
dl_ens
Offline Send Email
Nov 5, 2004
1:19 pm
2753
... Not exatly, the fact is that if there is an '_a type in a proper application, this is an error, and the compiler will refuse to compile it....
Remi Vanicat
dl_ens
Offline Send Email
Nov 5, 2004
1:21 pm
2754
... I was under the impression that current O'Caml, like SML 97, employed a system of value polymorphism as suggested by Andrew Wright in his paper "Simple...
Alwyn
david_alwyn
Offline Send Email
Nov 5, 2004
5:46 pm
2755
Hi, How do I find the directory in which the executable is located (I want to be able to read data from files that are part of my program's install directory)....
andrew cooke
andrew@...
Send Email
Nov 5, 2004
5:59 pm
2756
... Compile the following code to find out: let () = let dir = Filename.dirname Sys.argv.(0) in print_endline dir...
Christophe TROESTLER
Christophe.Troestler@...
Send Email
Nov 5, 2004
8:28 pm
2757
... Of course, that only works if you supply the full path to the executable when you call it. If you have the executable somewhere in your path, for example,...
William D. Neumann
scoey13
Offline Send Email
Nov 5, 2004
8:51 pm
2758
... I've had a need to do this, too, and the only solution I could come up with was to preprocess the file during compilation so that the location is...
Matt Gushee
mcgushee
Offline Send Email
Nov 5, 2004
9:19 pm
2759
... Not on my system (Debian Linux). ChriS...
Christophe TROESTLER
Christophe.Troestler@...
Send Email
Nov 5, 2004
9:50 pm
2760
Yup. Alright, I will buy that. Still not sure why ; is treated fundementally different than if..then..else. ... -- Seth Fogarty...
Seth J. Fogarty
aravthamis
Online Now Send Email
Nov 5, 2004
10:35 pm
2761
... to ... This is system dependant issue and I have been reporting this problem to OCaml team. On windows for example, if your exe is in the PATH you can only...
Nicolas Cannasse
ncannasse
Offline Send Email
Nov 6, 2004
1:37 am
2762
... On Unix this isn't possible in general. For example, the executable might have been deleted. However there are various heuristics you can use to try to...
Richard Jones
rwmjones
Offline Send Email
Nov 6, 2004
10:59 am
Messages 2733 - 2762 of 11549   Oldest  |  < Older  |  Newer >  |  Newest
Advanced
Add to My Yahoo!      XML What's This?

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