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...
Message search is now enhanced, find messages faster. Take it for a spin.

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 2805 - 2834 of 11541   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand   (Group by Topic) Author Sort by Date ^
2805
Dmitry, Thanks a lot for the patch. I was finally able to test it and it fixes my problem. I have been able to successfully compile and install Ocaml 3.08.2...
zakaluka
Offline Send Email
Dec 4, 2004
2:28 am
2806
Hi, I've been using Ocaml for some time now, but have not tried profiling before (iirc). When I run my program after compiling with "ocamlopt -p" I get a...
andrew cooke
andrew@...
Send Email
Dec 6, 2004
1:00 pm
2807
Ah. I need to run the program for longer to get more sample hits. The sampling is apparently finer on Linux, for some reason. Andrew ... -- ` __ _ __ ___...
andrew cooke
andrew@...
Send Email
Dec 6, 2004
1:50 pm
2808
I've just started working with ocaml, trying out various functions. The following code let data = [1,2,3,4,5,6];; let s = (List.fold_left (+) data) in...
Joe Polanik
jpolanik
Offline Send Email
Dec 8, 2004
8:34 pm
2809
In fact let data = [1,2,3,4,5,6];; defines a list containing only one element: the 6-tuple (1,2,3,4,5,6). I think you mean let data = [1;2;3;4;5;6];; -- ...
Simão Melo de Sousa
spinningtower
Offline Send Email
Dec 8, 2004
8:45 pm
2810
... A list constant is delimited with ';'. What you have there is a list with one element which is six-tuple. What you want is: let data = [1;2;3;4;5;6];; ......
Karl Zilles
kzilles
Online Now Send Email
Dec 8, 2004
8:45 pm
2811
... Welcome to the tribe! ... Okay, there are two problems with your code. First, your list syntax: list element are separated with semicolons, not commas. So...
Matt Gushee
mcgushee
Offline Send Email
Dec 8, 2004
8:56 pm
2812
Hi, let data=[1;2;3;4;5;6] !!!!! "," is for nuple (1,2,3,4,5) is a 5-uple of type int * int * int * int * int [1;2;3;4;5] is a list of type int list Cheers ...
Frédéric Gava
frederic.gava@...
Send Email
Dec 8, 2004
9:32 pm
2813
... Not true. first::rest will not match the empty string, and the empty string will not match any non-empty string, so you can put the patterns in either...
Karl Zilles
kzilles
Online Now Send Email
Dec 9, 2004
1:01 am
2814
... Oops! You're right, of course. I must have been thinking of something a little different. -- Matt Gushee Englewood, CO, USA...
Matt Gushee
mcgushee
Offline Send Email
Dec 9, 2004
1:22 am
2815
_____ From: Karl Zilles [mailto:zilles@...] Sent: quarta-feira, 8 de Dezembro de 2004 20:44 To: ocaml_beginners@yahoogroups.com Subject: Re:...
Henrique
henriecosta
Offline Send Email
Dec 9, 2004
12:10 pm
2816
... Hello, ocaml sees '(*' as the beginning of a comment, and it just waits for you to close it by '*)'. Use '( * )' instead, so that no confusion will be...
Virgile Prevosto
virgilepr
Offline Send Email
Dec 9, 2004
12:46 pm
2817
... ^^^^^ (*) starts a comment try ( * ) I got a warning "This is a start of a comment." And now it says "*) : this is not the end of a comment." Heiko...
Heiko.Kuhrt@...
heikuh
Offline Send Email
Dec 9, 2004
12:54 pm
2818
_____ From: Heiko.Kuhrt@... [mailto:Heiko.Kuhrt@...] Sent: quinta-feira, 9 de Dezembro de 2004 12:58 To: ocaml_beginners@yahoogroups.com ...
Henrique
henriecosta
Offline Send Email
Dec 9, 2004
2:32 pm
2819
Evidently, I don't get exponentiation and/or the map function. After: open List;; let listIn = [1;2;3;4];; let listFloat = (map ( float ) listIn);; The...
Joe Polanik
jpolanik
Offline Send Email
Dec 9, 2004
4:24 pm
2820
... ( **2. ) is not a valid ocaml expression. In fact, ** is an infix operator, and you can use it in two ways: - x ** y - ( ** ) x y in the latter,...
Virgile Prevosto
virgilepr
Offline Send Email
Dec 9, 2004
4:56 pm
2821
_____ From: Joe Polanik [mailto:jpolanik@...] Sent: quinta-feira, 9 de Dezembro de 2004 16:24 To: ocaml_beginners@yahoogroups.com Subject:...
Henrique
henriecosta
Offline Send Email
Dec 9, 2004
5:29 pm
2822
This seems to work. Remember the spaces; (**) would be the start of a comment. # let listSquares = (map ( ( ** ) 2. ) listFloat) in List.iter (fun y -> ...
Aaron W. West
awilliamwest
Offline Send Email
Dec 9, 2004
7:09 pm
2823
... Well, it runs. But it clearly doens't do what he expects it to do. That's because ( ( ** ) 2. ) is the function f(x)=2^x, and not f(x)=x^2 like he wanted....
Karl Zilles
kzilles
Online Now Send Email
Dec 9, 2004
8:18 pm
2824
... Right. I wanted squares of numbers not powers of two. Here's what I was working on at the time, s program that computes a standard deviation: (Note:...
Joe Polanik
jpolanik
Offline Send Email
Dec 9, 2004
8:39 pm
2825
... The map and fold functions are definitely in the function spirit. I would avoid using an object at all, and just create a standard deviation function: open...
Karl Zilles
kzilles
Online Now Send Email
Dec 9, 2004
9:53 pm
2826
Hello ocamlers, yesterday Joe Polanik came up with a program reading lines from "Deviation.dat". I changed 'getData' to what I think is functional progamming...
Heiko.Kuhrt@...
heikuh
Offline Send Email
Dec 10, 2004
9:25 am
2827
... My understanding is that OCaml does not specify the order in which it evaluates the arguments to a function. In your case, the function is the (::)...
Karl Zilles
kzilles
Online Now Send Email
Dec 10, 2004
9:41 am
2828
... Actually, I did that first and came up with something very similar. But I was uncomfortable with all those 'in' statements. Do successive 'in' statements...
Joe Polanik
jpolanik
Offline Send Email
Dec 10, 2004
2:31 pm
2829
... They do, but you don't need to worry about this. I happily write code like this: let foo = ... in let foo = ... in let bar = ... in etc. Note that it's...
Richard Jones
rwmjones
Offline Send Email
Dec 10, 2004
3:28 pm
2830
... You can also use let foo = ...;; ... -- Seth Fogarty sfogarty@[gmail.com|rice.edu|livejournal] Neep-neep at large AIM: Sorrath "I know there...
Seth J. Fogarty
aravthamis
Offline Send Email
Dec 10, 2004
4:52 pm
2831
... You can do. Actually what I meant, but didn't make clear, was use of "let foo = ... in" within functions. A concrete example from COCANWIKI...
Richard Jones
rwmjones
Offline Send Email
Dec 10, 2004
5:12 pm
2832
... I'm sure there are cases where reusing names is useful, and this may be one of them--it appears here that, conceptually speaking, the first and second...
Matt Gushee
mcgushee
Offline Send Email
Dec 10, 2004
7:19 pm
2833
On Sat, 11 Dec 2004 03:28, Joe Polanik wrote: [SNIP] ... Yep, as long as all objects are of the same type. ... Yep again. Here is how you'd return a reference...
Tony Edgin
tonyedgin
Offline Send Email
Dec 10, 2004
8:06 pm
2834
... [good discussion of when to reuse names, and when not] Another way to write this which also avoids leaking names is to use further nesting: let page = let...
Richard Jones
rwmjones
Offline Send Email
Dec 10, 2004
9:58 pm
Messages 2805 - 2834 of 11541   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