Banana changed the topic of #ocaml to: OCaml 3.08.1 available! | Archive of Caml Weekly News: http://sardes.inrialpes.fr/~aschmitt/cwn/ | A tutorial: http://merjis.com/richj/computers/ocaml/tutorial/ | A free book: http://cristal.inria.fr/~remy/cours/appsem/ | Mailing List: http://caml.inria.fr/bin/wilma/caml-list/ | Cookbook: http://pleac.sourceforge.net/
mlh has joined #ocaml
<Nutssh> Try str.cma first on the command line and not second.
GreyLensman has joined #ocaml
mrsolo_ has joined #ocaml
mrsolo_ has quit [Read error: 104 (Connection reset by peer)]
<judge> if i get an error like Uncaught exception: Failure "int_of_string"
<judge> can i trap it in the debugger to get a backtrace?
monochrom has quit ["Don't talk to those who talk to themselves."]
<Nutssh> Yes, run in the debugger and do a 'step -1' to go back in time.
<judge> thank you
CosmicRay has joined #ocaml
tewk has quit [Read error: 54 (Connection reset by peer)]
<dan2> CosmicRay: hey
<CosmicRay> hello
cjohnson has joined #ocaml
zigong__ has quit ["Leaving"]
mrsolo_ has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
zigong_ has joined #ocaml
avlondono has joined #ocaml
binary42 has left #ocaml []
mrsolo_ has quit [Read error: 104 (Connection reset by peer)]
mrsolo has joined #ocaml
arty has joined #ocaml
mrsolo has quit [Read error: 104 (Connection reset by peer)]
arty has left #ocaml []
CosmicRay has quit [Read error: 104 (Connection reset by peer)]
monochrom has joined #ocaml
zigong_ has quit ["Leaving"]
mrsolo has joined #ocaml
skylan has joined #ocaml
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
skylan has quit [Read error: 232 (Connection reset by peer)]
GreyLensman has quit ["Leaving"]
grom358 has joined #ocaml
<grom358> Is there a binding for wxWidgets?
monochrom has quit ["Don't talk to those who talk to themselves."]
cjohnson has quit [Read error: 104 (Connection reset by peer)]
grom358 has quit [Read error: 113 (No route to host)]
mrsolo has quit [Read error: 104 (Connection reset by peer)]
mrsolo has joined #ocaml
vezenchio has joined #ocaml
pango has quit ["Client exiting"]
gpciceri has joined #ocaml
pango has joined #ocaml
shawn_ has joined #ocaml
_shawn has quit [Read error: 104 (Connection reset by peer)]
mlh has quit [Client Quit]
gpciceri has quit ["Ciao, sono un virus dei messaggi di quit. Sostituisci la tua vecchia linea di quit con questa cosi potro continuare a moltipl]
Herrchen has joined #ocaml
<Nutssh> google?
kinners has joined #ocaml
mlh has joined #ocaml
mayhem has joined #ocaml
srv_ has joined #ocaml
srv has quit [Read error: 232 (Connection reset by peer)]
mlh has quit [Client Quit]
kinners has quit ["leaving"]
_fab has quit []
Herrchen has quit [zelazny.freenode.net irc.freenode.net]
Hadaka has quit [zelazny.freenode.net irc.freenode.net]
mellum has quit [zelazny.freenode.net irc.freenode.net]
Herrchen has joined #ocaml
Hadaka has joined #ocaml
mellum has joined #ocaml
srv_ has quit [Read error: 232 (Connection reset by peer)]
srv has joined #ocaml
mellum has quit [zelazny.freenode.net irc.freenode.net]
Herrchen has quit [zelazny.freenode.net irc.freenode.net]
Hadaka has quit [zelazny.freenode.net irc.freenode.net]
Herrchen has joined #ocaml
Hadaka has joined #ocaml
mellum has joined #ocaml
docelic has quit ["brb"]
CosmicRay has joined #ocaml
docelic has joined #ocaml
docelic has quit [Remote closed the connection]
docelic has joined #ocaml
monochrom has joined #ocaml
mayhem has left #ocaml []
zigong has joined #ocaml
_fab has joined #ocaml
cjohnson has joined #ocaml
monochrom has quit ["Don't talk to those who talk to themselves."]
mrsolo has quit ["Leaving"]
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
pango has quit ["Leaving"]
Demitar has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
mfurr has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
<jason__> Hm, I keep getting this really weird error when trying to use ocamlmktop.
<jason__> gcc: topstart.cmo: No such file or directory
<jason__> Like, it's trying to run gcc on topstart.cmo.
jason__ has quit ["Client exiting"]
jason__ has joined #ocaml
<jason__> Hm, I'm not sure if my last message was actually posted, or if my client was dead. So please excuse me if I'm posting it again.
<jason__> I'm getting a strange error with ocamlmktop, gcc: topstart.cmo: No such file or directory
pango has joined #ocaml
<jason__> Any have any clue why gcc would be run on topstart.cmo?
<Tristram> maybe because a new top is a native program
<Tristram> and I think that ocamlc uses gcc
monochrom has joined #ocaml
<Tristram> sorry ocamlc.opt
<jason__> Isn't a cmo inherantly bytecode, though?
<pango> ocamlopt doesn't use gcc for sure, and I doubt ocamlc does
<Tristram> extract of man ocamlopt :
<Tristram> -ccopt option
<Tristram> Pass the given option to the C compiler and linker.
<pango> yes, when you link C code with ocaml code
<Tristram> may be
<Tristram> I not a specialist about that at all
<pango> but it's said somewhere else that ocaml compiler speed and generated code efficiency were achieved by generating native code directly
<pango> (vs. what caml light did, I suppose)
<jason__> .. It generates ASM, I know.
<avlondono> it outputs assembly
<jason__> ocamlopt -S.
<pango> yup
<avlondono> still needs the assembler and the linker
<jason__> Yeah, I'm sure this has something to do with the native code I'm trying to link.
<jason__> It's very peculiar.
<jason__> C interface code.
<jason__> Hm, Lunch time.
<jason__> Thanks for your help :)
<avlondono> good time
<pango> avlondono: ok
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
gpciceri has joined #ocaml
Gliptic has quit ["Leaving"]
pango has quit ["brb"]
<Nutssh> 'mktop' uses gcc to link the c-coded runtime against the ocaml basic runtime (pervasives and/or linkage code), and the other stuff.
pango has joined #ocaml
Herrchen has quit ["bye"]
vezenchio has quit ["None of you understand. I'm not locked up in here with you. YOU are locked up in here with ME!"]
ez4 has joined #ocaml
salo has joined #ocaml
<salo> noob question: how can i define a record containing a variable length tuple?
<pango> variable length tuple is an oxymore
<pango> tuples have a fixed length
<salo> ah, i see
<pango> but maybe you meant something else than tuple
<salo> i want a data structure that represents an ordererd variable length collection of arbitrary types
<pango> forget about arbitrary types
<pango> now, what do you want ?
<Nutssh> Closest you can get is a type unified = Int of int | Float of float | .... and use a unified array.
<salo> tuples contain arbitrary types, no?
<Nutssh> Yes, but they also have a fixed type, eg 'int * string * float * int' and such a tuple can store exactly one type vector.
<salo> so no exact analog of lisp lists? i see. i think i see what you're getting at with the unified type tho
ez4 has quit [Remote closed the connection]
<pango> salo: or a parametrized type, if that's really what you want
<pango> type 'a myrecord = { foo: int; bar: 'a } ;;
<pango> { foo = 7; bar = (3, "hello", [3.14]) } ;;
<pango> - : (int * string * float list) myrecord =
<pango> {foo = 7; bar = (3, "hello", [3.14])}
* salo stares at the code
gzl has left #ocaml []
<pango> last two lines are outputs
<Nutssh> No analog. One of the artifacts of strong typing at compile time.
* salo nods
<Nutssh> Unifed isn't a replacement for lisp lists, because there are an infinite number of possible types so you can't list all of em there.
<salo> so instead of arbitrary, i need to define a custom type foo that captures the specific possibilities, and then i can have a foo list.
<Nutssh> Yup that will work, but are you sure that you need a design that requires that?
<jason__> .. There are Linked Lists.
<jason__> Functional linked lists.
<jason__> .. But, they can only hold one type.
<jason__> Unless you want each value to have to carry some kind of dynamic type information that can be evaluated at run-time, you just avoid having lists of differing types.
<salo> i need a type that contains a function symbol, and paramaters for that function. i would like the paramaters to be any form of number, or a symbolic expression, so that i can do both inexact and exact math
<jason__> So, you want a type that contains a union of a function, and the arguments for that function.
<jason__> (int -> int, 5)..
<jason__> Something like that, so you can evaluate it later or something?
<jason__> salo, what exactly are you trying to do?
<salo> yes, where the domains of the functions are not known a priori, and the paramaters are either numbers or number valued expressions
gpciceri has quit ["Ciao, sono un virus dei messaggi di quit. Sostituisci la tua vecchia linea di quit con questa cosi potro continuare a moltipl]
<jason__> salo: So you want to store a list of functions associated with their paramaters, but the paramaters are unknown at compile-time?
<salo> yes. i bet you are about to tell me that is impossible
<pango> salo: define the recursive type that will be used for the syntaxic tree of your parameters
<jason__> Right.. You could make a type that represents all of the values that 'could' be in your list.
<salo> i can have a type that is either a float, or a float valued function, right?
<Nutssh> type exp = Plus of exp * exp | Var of string | Int of i // and use 'exp list' or 'exp array' as an argument type.
<jason__> For instance, "type mList = Int of int | Func of (unit->int);;
<jason__> Something like that.
<jason__> Right.
<jason__> salo, that would be: type mVal = Float of float | Func of (unit->float);;
<jason__> Then, you just have to pattern match the types comming out of the list, and construct them apropriately when you add them to the list.
<jason__> let eval = function x -> Float x -> x | Func mFunc -> mFunc ();;
<salo> i think i follow
<jason__> So, when you pattern match it, you evaluate all of the possible types it could be.
<jason__> There aren't any lose ends.
<salo> ocaml has support for the same numeric types as scheme? real, int, complex, rational, in inexact, exact, and bignum forms?
<jason__> It has bignum, but as a module.
<jason__> It's not an internal value.
<jason__> It has float, and int.
<jason__> Not the same as scheme I'd assume.
<jason__> It has support for complex numbers, but they're just records with a imaginary and a real part.
<jason__> Basically it has: int(31-bit signed), float(double in C), string, unit, char(8-bit ASCII), bool.
<jason__> You can check out the "Complex" module.
<jason__> salo: What is "inexact" and "exact" in Scheme?
<salo> i was being redundant. just the difference between machine rep and symbolic rep.
<pango> they're also rational numbers... and Numerix lib as an alternative
<jason__> Ah.
<salo> great. thanks all for the help. i'm sure i'll be back with more questions before long
salo has quit []
cjohnson has quit [Read error: 110 (Connection timed out)]
cjohnson has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml
Lemmih has left #ocaml []
CosmicRay has quit ["Client exiting"]
<jason__> What does this mean: type c_obj = c_enum_tag c_obj_t
<jason__> c_enum_tag is (type c_enum_tag = [`SWIG_FAKE | int of int])
<jason__> And c_obj is (type `a c_obj_t = C_void etc)
<jason__> What does it mean to define a type that is one type next to another separated by a space like that?
<Smerdyakov> Haven't you used lists?
<jason__> Yes.
<Smerdyakov> Then you've seen the same thing before
<jason__> I think it's making a c_obj_t of type c_enum_tag, then.
<jason__> It was a bit confusing by the syntax.
m3ga has joined #ocaml
mfurr has quit ["Client exiting"]
m3ga has quit ["Client exiting"]
skylan has joined #ocaml
kinners has joined #ocaml
cjohnson has quit [Read error: 110 (Connection timed out)]
CosmicRay has joined #ocaml
cjohnson has joined #ocaml
zigong has quit [Read error: 104 (Connection reset by peer)]
zigong has joined #ocaml
cjohnson has quit [Connection timed out]
cjohnson has joined #ocaml