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 10448 - 10479 of 11541   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Simplify | Expand   (Group by Topic) Author Sort by Date ^
10448
Hi, When I run ocaml within emacs I am not able to #load properly (my own) object files (*.cmo). For example: # #load "/path/to/myfile.cmo";; # Myfile.myfun;; ...
citromatik
miguel.pignatelli@...
Send Email
Dec 1, 2008
8:28 am
10449
... You can't do what you want to do. The representation of lists (as singly-linked lists) allows you to write: match xs with x :: _ -> x because that matches...
Richard Jones
rwmjones
Offline Send Email
Dec 1, 2008
11:58 am
10450
Hi, I am trying to print the values and types of the fields of a C struct. I use the below code (based on simplify.ml) to get the list of fields of a struct,...
Rekha Bachwani
rnbach
Offline Send Email
Dec 1, 2008
7:26 pm
10451
... You might be better off asking on the CIL list. However it's my understanding that the information you want to print isn't available. CIL analyzes the...
Richard Jones
rwmjones
Offline Send Email
Dec 1, 2008
9:07 pm
10452
Is there a way to leave a field in an object unbound? The following example code fails to compile: object val mutable (x : string) initializer x <- "hello...
deech_99
Offline Send Email
Dec 2, 2008
10:40 pm
10453
... Can't be done. This is a feature: when you have a value of a type, you actually have a value of the type; there's no possibility that your program will...
Jake Donham
jake.donham
Offline Send Email
Dec 2, 2008
10:48 pm
10454
If I use the second approach, how do I get/set the value of x? I managed to get a Stack Overflow error when I tried: # class test = object val mutable s = (fun...
deech_99
Offline Send Email
Dec 3, 2008
12:31 am
10455
... You want something like s <- let s = s () in (fun () -> "brave" ^ s) but I'll let you figure out why....
Jake Donham
jake.donham
Offline Send Email
Dec 3, 2008
12:39 am
10456
... All these are good options, maybe we could even add another one. If your attributes have to be initialised through some computations, instead of using the...
Florent Monnier
fmonnier@...
Send Email
Dec 3, 2008
6:49 am
10457
I'm trying to write an insertion sort, and I've got something working, but it seems horribly inefficient. It works as follows: - Keep a state variable to pass...
Zach
toolshed37
Online Now Send Email
Dec 4, 2008
2:12 am
10458
... Just to ask the obvious question: why are you writing an insertion sort? It's always going to have worse asymptotic runtime than your favorite O(n log n)...
Mac Mason
macfoobar
Offline Send Email
Dec 4, 2008
3:51 am
10459
-[ Wed, Dec 03, 2008 at 10:50:56PM -0500, Mac Mason ]---- ... The fact that an algorithm is demonstrably better on large and random data sets does not tells us...
Cedric Cellier
rixed
Offline Send Email
Dec 4, 2008
10:46 am
10460
Hi, I need to share an abstract type between 2 modules. I don't know if the best solution is to nest them, because they perform different tasks (one is for ...
citromatik
miguel.pignatelli@...
Send Email
Dec 4, 2008
11:08 am
10461
... I see 2 solutions: - use a doubly linked list: http://ocaml-extlib.googlecode.com/svn/doc/apiref/Dllist.html - use an array, and do operation in-place...
Sylvain Le Gall
gildor16478
Offline Send Email
Dec 4, 2008
12:19 pm
10462
... No, it doesn't. I don't really know why. Martin -- http://mjambon.com/...
Martin Jambon
BioMim
Offline Send Email
Dec 4, 2008
1:39 pm
10463
... This is the commented function List.stable_sort -- Mehdi Dogguy مهدي الدقي http://www.pps.jussieu.fr/~dogguy Tel.: (+33).1.44.27.28.38...
Mehdi Dogguy
mehditou
Offline Send Email
Dec 4, 2008
1:52 pm
10464
... Indeed, my fault -- I was reading it with a non-syntax highlighting editor and skip the comment. Sorry for misinformation. Regards Sylvain Le Gall...
Sylvain Le Gall
gildor16478
Offline Send Email
Dec 4, 2008
2:27 pm
10465
Hi all, Has anyone managed to get Oracaml working? I downloaded it, edited the Makefile with my ORACLE_HOME etc, but I can't compile it: $ make ocamlc -g -c...
gaius hammond
gaius@...
Send Email
Dec 4, 2008
5:01 pm
10466
... I knew this question would come up. :) It's really just an exercise in trying to "think" in Ocaml, having come from a C++ background....
Zach
toolshed37
Online Now Send Email
Dec 4, 2008
8:38 pm
10467
... [...] ... A slightly simpler function, but the same idea: # let rec insert n x xs = if n = 0 then x :: xs (* [1] *) else match xs with ......
Richard Jones
rwmjones
Offline Send Email
Dec 4, 2008
9:47 pm
10468
Given Ocaml's eager evaluation, I am having a bit of trouble understanding why I am able to define infinite circular data structures. ... And the following...
deech_99
Offline Send Email
Dec 5, 2008
1:12 am
10469
... Circular data structures are not incompatible with eager evaluation. You can obviously make them with refs or mutable record fields. OCaml also gives you a...
Jake Donham
jake.donham
Offline Send Email
Dec 5, 2008
2:02 am
10470
Now I feel dumb. Ah the joys of getting comfortable with another language. I appreciate all your responses. -deech ... structures....
deech_99
Offline Send Email
Dec 5, 2008
3:28 am
10471
... Really your best bet is to use a single module (and file), and use a folding editor[1]. ... I don't know what you mean by "nesting both modules". If the ...
Richard Jones
rwmjones
Offline Send Email
Dec 5, 2008
8:34 am
10472
Hi, Thanks for your reply, ... Yes, that's what I thought, but I must be making something wrong. Please, consider this: iof.mli ... type t val get_t : unit ->...
citromatik
miguel.pignatelli@...
Send Email
Dec 5, 2008
11:45 am
10473
... You hid the implementation of t, so ... ... ... in this case you need to use a private type: ...
Richard Jones
rwmjones
Offline Send Email
Dec 5, 2008
12:10 pm
10474
... Well, I meant nesting Iof inside F (and making type t available for both): module F : sig type t module Iof : sig val get_t : unit -> t end val get_i :...
citromatik
miguel.pignatelli@...
Send Email
Dec 5, 2008
12:53 pm
10475
I'm trying to get labltk working on my Redhat EL 4 box, and having trouble with the Tcl dependency. Redhat thinks I have the latest versions of the tcl and...
andru@...
andru_myers
Online Now Send Email
Dec 5, 2008
4:08 pm
10476
... It might be possible to use some specialized version of Huet's zippers (see <http://en.wikipedia.org/wiki/Zipper_(data_structure)>). Basically, the sorted...
Virgile Prevosto
virgilepr
Offline Send Email
Dec 5, 2008
7:55 pm
10479
I was working on a function that referenced a variable without first defining it. It took me a long time to find this error, because at some point during my...
Zach
toolshed37
Online Now Send Email
Dec 6, 2008
3:10 am
Messages 10448 - 10479 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