flux changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | 3.11.0 out now! Get yours from http://caml.inria.fr/ocaml/release.html
seafood has joined #ocaml
<alexyk> how do I export a type from a module? I use the type defined in a module in a file which links with it, and can't see record labels
<alexyk> I have a record type used by a module; then I need to use it in the main calling module's functions. How do I reuse it except copying -- which works?
<jonafan> open ModuleName?
<alexyk> and if I don't want to import all names and refer to functions as Module.funname?
<alexyk> doing type = Module.type doesn't bring record fields into scope
<jonafan> you could rename the module as something short
<jonafan> module M = Module;;
sporkmonger has joined #ocaml
<alexyk> jonafan: doesnt' get the record type in
<jonafan> yeah, i don't think there's a way to import just the record type
<jonafan> but this is slightly nicer
<jonafan> {M.id = blah; M.name = "blah"}
<kaustuv> If you want to refer to the field f of type M.t as f, you have to write:
<kaustuv> type somename = M.t = <copy definition of M.t>
* jonafan wrong again
<alexyk> kaustuv: it only checks consistency, not avoiding copy?
<jonafan> if you copy, i don't think the records created in that file will be interchangable with the ones from the other file
<kaustuv> They will be fully interchangable as long as you have the proper manifest type (= M.t)
<alexyk> kaustuv: works; I've tried type t = M.t and it also works, so copying = {...} just brings fields in scope... no shorter way?
<kaustuv> The best way, as far as I know, to use record fields is just to use M.f to refer to field f defined in a type in M. It avoids the most problems at the cost of a few keystrokes. Use a short module synonym as jonafan suggested if the full name is annoying to type out.
<kaustuv> (Remember that you can use let module M = LongModuleName in ...)
sporkmonger has quit []
slash_ has quit ["leaving"]
angerman has joined #ocaml
angerman_ has joined #ocaml
angerman has quit [Connection timed out]
arquebus has joined #ocaml
arquebus has quit [Read error: 104 (Connection reset by peer)]
Yoric[DT] has quit ["Ex-Chat"]
alexyk has quit [Read error: 110 (Connection timed out)]
alexyk has joined #ocaml
<alexyk> what's an efficient way to fold over array with index?
<alexyk> i.e. foldli: ('a -> int -> 'b -> 'a) -> 'a -> 'b array -> 'a
coastermaster has joined #ocaml
vuln has joined #ocaml
<vuln> Hi everybody. I'm trying to compile a code in Ocaml to native machine code but it keeps telling me 'segmentation fault', even though when I compile to Bytecode it yells nothing
<vuln> Am I doing anything wrong?
naufraghi has joined #ocaml
yziquel has joined #ocaml
naufraghi has left #ocaml []
<vuln> humm..
jeremiah has quit [Read error: 104 (Connection reset by peer)]
<yziquel> anyone knows of a library to produce graphs? (in the sense of plotting 2D graphs, not in the sense of a graph data structure...)
alexyk has quit []
Ched has quit [Read error: 110 (Connection timed out)]
Ched has joined #ocaml
jeremiah has joined #ocaml
<vuln> Hi everybody. I'm trying to compile a code in Ocaml to native machine code but it keeps telling me 'segmentation fault', even though when I compile to Bytecode it yells nothing
<vuln> Am I doing anything wrong?
<det> You have to give more information than that
<vuln> det: I wrote a code with just ONE line: print_int 2;;
<det> Such as command the command line that is giving you the segfault
<vuln> Of course it works at toptool, and compiling as bytecode.
<vuln> But when I use ocamlopt it just yells seg fault
<vuln> ocamlopt -o a a.ml
<vuln> :}
<det> That is very odd
<det> What Arch/OS?
<vuln> i686 XandrOS (Eee PC)
<det> How did you install Ocaml ?
<vuln> apt-get install ocaml
<vuln> :)
<det> maybe try "catchsegv ocamlopt -o a a.ml"
<hcarty> yziquel: plplot
<vuln> /home/user> catchsegv ocamlopt -o a a.ml
<vuln> /home/user> ./a
<vuln> Falha de segmentação
tarbo2 has joined #ocaml
<vuln> :/
<hcarty> yziquel: http://plplot.sf.net
<thelema> camlopt segfaults?
<yziquel> hcarty: yes, i just noted your binding. trying to compile it.
<det> Oh
<vuln> thelema: yeah.
<det> so it isnt ocaml that is segfaulting
<det> it is running the resulting binary
<vuln> True.
<hcarty> yziquel: Please let me know how it goes
<vuln> So, what is your opinion about that?
<det> You can see if "catchsegv ./a" tells you anything useful
<vuln> it tells me nothing
<vuln> /home/user> catchsegv ./a
<vuln> /home/user>
<yziquel> hcarty: confused. the readme says 'type make', but no makefile... http://paste.lisp.org/display/76562
<yziquel> hcarty: got it from apt-get source plplot
<hcarty> yziquel: Which version?
<det> vuln, I don't know :/
<vuln> det: Thanks anyway :}
<hcarty> yziquel: You need to build the whole library
<yziquel> hcarty: 5.9.2
<yziquel> hcarty: so i have to remove the debian package to rebuild all of it?
<hcarty> yziquel: I'm not sure. I install from source since the OCaml packages are not included for Debian yet
<yziquel> hcarty: what a pain... thanks.
<hcarty> yziquel: It is setup to build the entire library, bindings and all, together
<hcarty> If you have deb-design experience, contributions are greatly appreciated :-)
<hcarty> yziquel: The build process takes about 5 minutes if you are interested
tarbo2_ has quit [Read error: 110 (Connection timed out)]
angerman_ is now known as angerman
AxleLonghorn has joined #ocaml
pogma has joined #ocaml
alexyk has joined #ocaml
<vuln> May anyone help me with the seg fault problem when I'm compiling with ocamlopt?
<thelema> vuln: do you get any errors when compiling your program?
<thelema> (as distinct from when *running* your program)
<vuln> thelema: none
<thelema> so only errors when running the compiled program
<thelema> can you compile with -g?
<thelema> ocamlopt -g -o a a.ml
<thelema> and then use gdb on the resulting executable:
<thelema> gdb a
<thelema> () run
<vuln> 1 sec
<vuln> there's no -g option :O
<thelema> ??
<thelema> ocamlopt -version
<vuln> 3.09.2
<vuln> Is it too deprecated?
<vuln> Or too old?
<thelema> no, it's two versions old... can you check ocamlopt -help to verify that there's no -g option?
<thelema> hmm, maybe ocamlopt doesn't provide -g except for backtraces, which were added in 3.10
<thelema> well, try gdb anyway... I'm interested in where the error hits
<vuln> gdb in a provided by ocamlopt -o a a.ml ?
<thelema> yes
<vuln> What is the syntax?
<vuln> gdb ./a?
<thelema> yes
<vuln> It gives me a console :/
<thelema> maybe even [gdb a]
<thelema> () run
<thelema> (don't type the (), IIRC, the prompt has parens around it)
<vuln> (gdb) run
<vuln> Starting program: /home/user/a
<vuln> Program terminated with signal SIGSEGV, Segmentation fault.
<vuln> The program no longer exists.
<thelema> the program no longer exists!
<vuln> so?
<thelema> got me. you say that bytecode compiled versions just do nothing?
<vuln> no
<vuln> When I write code in toptool OR compile with ocamlc (bytecode) it works awesomely
<thelema> just native code dies.
<vuln> exactly
<vuln> :)
<thelema> platform?
<vuln> i686 XandrOS GNU/Linux in an Eee PC
<thelema> [file a]
<thelema> [ldd a]
<thelema> [strace a] (pastebin these outputs)
<vuln> Ok
<vuln> :)
<thelema> hmm... I wonder if there's some wierd permissions problem... does xandros have any wierd in-kernel security modules?
<vuln> Unfortunatly, I don't know :(
<vuln> I don't even like XandrOS, I'm just waiting my computer back to install other OS in Eee PC and don't get worried about compatibility/wifi support
<vuln> But I've read somewhere else about the same problem in Debian
<thelema> it looks like it's failing to do a readlink: #
<thelema> readlink("/proc/self/exe", <unfinished ...>
<thelema> when I run the same program, my copy does:
<thelema> readlink("/proc/self/exe", "/home/thelema/Documents/a", 256) = 25
<vuln> sad :(
<vuln> If I update the Ocaml packages, you think it might work properly?
<thelema> It's segfaulting because of missing /proc/self/exe -> binfmt module. EEE has stripped kernel :(
<thelema> (from mailing list somewhere...)
<vuln> hm..
<vuln> bad
<vuln> hee
<vuln> hehe :). Thank you very much thelema
<thelema> this should be fixable in the ocaml side - the squeak guys seemed to think they could fix it.
<thelema> how interested are you in submitting this to the bugtracker?
<thelema> caml.inria.fr/mantis
<vuln> I'm always ready to help :)
<vuln> But, Could you help me how to proceed that?
<thelema> do you even have a /proc/self/exe file?
<vuln> I don't get what you mean about that.
<thelema> ls /proc/self/exe
<vuln> The file exe in this directory exists
<vuln> /home/user> /proc/self/
<vuln> cwd/ exe fd/ root/ task/
<thelema> ls -l /proc/self
<thelema> ls -l /proc/self | grep exe
<vuln> lrwxrwxrwx 1 root root 64 2009-03-06 00:45 /proc/self -> 27780/
<thelema> ls -l /proc/self/ | grep exe
<vuln> lrwxrwxrwx 1 user users 0 2009-03-06 01:28 exe -> /bin/ls
<vuln> Even though look it: /proc/self> stat exe File: `exe' -> `/bin/bash'
<thelema> hmm, I can't explain the problem... maybe it really is a problem with this kernel - what ocaml is doing should work.
<vuln> Ok. So, should I send a bug report about that?
<thelema> /proc/self is a bit magical, as for each process it points to a different folder inside proc
* thelema wonders what happens inside the readlink call...
<thelema> no but report to inria - their code is fair.
<thelema> If you wanted, you could build a custom ocamlopt that worked around this bug, but it's probably not worth it.
<vuln> I couldn't.. Isn't it hard? ..
<thelema> not much harder than a normal source build - I can send you a patched unix.c file
<thelema> but first... [ls -l a]
coastermaster has quit []
<vuln> -rwxr-xr-x 1 user users 117403 2009-03-06 01:12 a
<vuln> I will thank if you may do that for me :)
<vuln> thelema: Unfortunatly, I really have to go now. If you can send it to the e-mail address I sent you in private I would thank a lot
<vuln> see you later
vuln has quit ["leaving"]
<thelema> ok
AxleLonghorn has quit [Remote closed the connection]
AxleLonghorn has joined #ocaml
<AxleLonghorn> Check out the compiler-error at the bottom
<AxleLonghorn> why wont "Graph.Dot_ast.id * 'a" unify to "Graph.Dot_ast.node_id" when Graph.Dot_ast contains "type node_id = id * port option"
<thelema> Builder.G.V.label != string?
<AxleLonghorn> it does
<AxleLonghorn> "module Generic(G : Graph.Sig.IM with type V.label = string and type E.label = string) = struct ..." is the module in which the pasted code rests
<thelema> ah, your problem is the second argument - you're working with an attr, and you need to work with an attr list
<AxleLonghorn> (Graph.Dot_ast.id * Graph.Dot_ast.id option) list
<AxleLonghorn> compared with Graph.Dot_ast.attr list
<thelema> yes
<thelema> is different
<AxleLonghorn> why?
<AxleLonghorn> they're both lists, and Dot_ast.attr = (id * id option) list
<thelema> the second is (Graph.Dot_ast.id * Graph.Dot_ast.id option) list list
<thelema> attr list = (id * id option) list list
<AxleLonghorn> so I need to make my second argument take a list of lists
<thelema> yes
<AxleLonghorn> weird
<thelema> got me why, but that's the interface
<AxleLonghorn> yeah, that's really odd
<thelema> a list of attrs, each of which is already a list...
<thelema> maybe so you wouldn't have to flatten
<AxleLonghorn> I don't understand
<thelema> you = caller of function
<thelema> it takes work to flatten a list of lists into a list.
<thelema> much less work to make a list than to concatenate
Snark has joined #ocaml
<thelema> when given a bunch of lists
wsmith84 has joined #ocaml
<AxleLonghorn> well, thank you a lot
<AxleLonghorn> it works now
coastermaster has joined #ocaml
<thelema> n/p
coastermaster has quit [Client Quit]
palomer has joined #ocaml
<sanguinev> Is there a simple (i.e. without regex) ocaml function to determine if a string contains another string as a substring? (Boolean or index output is fine)?
<thelema> batteries, yes. stdlib... I'll have to check
<thelema> not in stdlib - only character searching functions, no string searches
<sanguinev> thelema: Damn, that's what I knew existed, was hoping there was a string one. Time to implement what I need explicitly I guess.
<thelema> you're welcome to use the code here: http://git.ocamlcore.org/cgi-bin/gitweb.cgi?p=batteries/batteries.git;a=blob;f=src/core/extlib/extString.ml;h=8a4a00f00c68201f42648a2d8665cb012ef44faa;hb=HEAD
<thelema> Line 78 has our implementation of find
<palomer> what's the easiest way to parse an xml document?
<thelema> it does use other batteries code, so you'll have to modify the algorithm for independent use.
<palomer> so its not in batteries:/
<thelema> depends on what you want to do with it, but maybe xml light
<thelema> no, batteries doesn't have an xml parser. :P
<palomer> so many options!
<thelema> I hope we avoid indirectly promoting XML by supporting it in batteries.
<palomer> but you don't support it in batteries
<thelema> it might be on someone's todo list
<thelema> it's on my not-todo list
aryx has joined #ocaml
angerman has quit []
wsmith84 has quit [Read error: 110 (Connection timed out)]
seafood has quit []
seafood has joined #ocaml
aryx has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
seafood has quit [Connection timed out]
aryx has joined #ocaml
angerman has joined #ocaml
ilor has joined #ocaml
<palomer> thelema, you said "I hope we avoid indirectly promoting XML by supporting it in batteries."
<palomer> did you mean "by not supporting it in batteries" ?
coastermaster has joined #ocaml
<palomer> hrmph, i'm trying to figure out how much time a function is taking to run
alexyk has quit []
naufraghi has joined #ocaml
<flux> palomer, "promoting XML by supporting" was the thing to avoid?
<palomer> flux, I'm saying his sentence implies that batteries supports xml
<flux> yeah that indeed is one interpretation, now that I read the sentence in my mind a few times over :). speech is hard..
<palomer> it's the only interpretation, methinks
<palomer> ok, there's another
<palomer> which is that he's intending to support it in batteries
<palomer> i'd like to transform an xml file to an html file and then display it
<flux> xml-light works for the first part
<flux> I don't know about the second
AxleLonghorn has left #ocaml []
ttamttam has joined #ocaml
yziquel has quit ["http://www.mibbit.com ajax IRC Client"]
<palomer> gettimeofday works for the second:O
Camarade_Tux has joined #ocaml
Associat0r has joined #ocaml
palomer has quit [Remote closed the connection]
jeremiah has quit [Read error: 104 (Connection reset by peer)]
verte has joined #ocaml
coastermaster has quit []
jeremiah has joined #ocaml
Associat0r has quit []
s4tan has joined #ocaml
bluestorm has joined #ocaml
_zack has joined #ocaml
ilor has quit [Read error: 60 (Operation timed out)]
ilor has joined #ocaml
Yoric[DT] has joined #ocaml
kelaouchi has quit [Client Quit]
kelaouchi has joined #ocaml
kelaouchi has quit [Client Quit]
kelaouchi has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
paul424 has joined #ocaml
kelaouchi has quit ["leaving"]
chickenzilla has joined #ocaml
kelaouchi has joined #ocaml
jeremiah has joined #ocaml
chickenzilla has quit ["J'y trouve un goût d'pomme."]
chickenzilla has joined #ocaml
naufraghi has quit [Read error: 145 (Connection timed out)]
angerman has quit [Read error: 110 (Connection timed out)]
ilor has quit [Read error: 113 (No route to host)]
naufraghi has joined #ocaml
th5 has joined #ocaml
hkBst has joined #ocaml
bluestorm has quit [Read error: 113 (No route to host)]
<paul424> hey could someone explain why this try - catch pharse won't work : http://codepad.org/ ???
<flux> I think you're supposed to add some identifying code after the url..
<paul424> great idea
<flux> so what happens?
l_a_m has quit ["Lost terminal"]
<paul424> line 16 syntax error
<paul424> funny now works
<paul424> just I had to remove the ;
<paul424> which I tried to do this already without it ............
<paul424> seems that only pasting code here can help in compiling program ;D
<flux> you know, it's a lot of work to investigate something that cannot be compiled without extensive modification
<flux> most wouldn't bother, but apparently you resolved the problem before I managed to make it into something that had chances to compile :)
<flux> in any case, I can compile your version by just adding a few definitions at the top
l_a_m has joined #ocaml
<paul424> yeap thanks any way
filp has joined #ocaml
paul424 has quit ["ChatZilla 0.9.84 [Firefox 3.0.6/2009011913]"]
kaustuv has quit [Read error: 113 (No route to host)]
angerman has joined #ocaml
Yoric[DT] has quit ["Ex-Chat"]
rwmjones_ has joined #ocaml
kaustuv has joined #ocaml
rwmjones_ has quit ["Closed connection"]
tab_ is now known as tab
<kaustuv> 'tis a pity he uses revised syntax.
|jedai| has quit [Read error: 110 (Connection timed out)]
<flux> for me the topmost annoyance I can think of in the current syntax is the problem with nested matches
<flux> other than that.. it's ok :)
<flux> also I'm not convinced the fix the revised syntax gives is all that great
<kaustuv> nested matches are no problem if you always use begin ... end around inner matches. Too bad the revised syntax forbids begin ... end.
<bjorkintosh> you can stick them into comments.
<flux> but the compiler will not check them then, will it?-)
<bjorkintosh> but programmers are smart, aren't they?
<kaustuv> have you *met* any programmers?
<bjorkintosh> they can create begin/end-in-comment pre-processors can't they? :D
jeremiah has quit [Read error: 104 (Connection reset by peer)]
<bjorkintosh> sure i have. they're full of themselves.
<flux> we're on #ocaml. we know programmers aren't perfect, and we like to work with the compiler to attain perfectness :)
<tsuyoshi> perfection, you mean
jeremiah has joined #ocaml
<bjorkintosh> so why was the new syntax introduced if you guys don't like it?
bzzbzz has joined #ocaml
l_a_m has quit ["Lost terminal"]
slash_ has joined #ocaml
l_a_m has joined #ocaml
<flux> perhaps someone else did like it?
<flux> it does have higher internal concistency
<flux> I wonder if I would mind had I begun with the revised syntax
<flux> or would I find the old syntax bad..
<th5> regardless of which is better - having two different syntaxes is too much of a burden - i'm not crazy about revised syntax but even if i was, any gains it gives are so outweighed by fragmenting the limited examples and documentation out there
<bjorkintosh> so i'm new to the game... does it mean the old examples are broken completely for the current o'caml compiler?
<flux> the new syntax is in its own syntax module
<flux> so no, by default you can compile old examples just fine
<th5> bjorkintosh: don't worry about revised syntax at all - they didn't change the syntax - someone made an alternative syntax to the standard - mostly comes up when reading about camlp4 (the whole camlp5 manual in this revised syntax)
Spiwack has joined #ocaml
filp has quit [Read error: 54 (Connection reset by peer)]
sporkmonger has joined #ocaml
aryx has left #ocaml []
filp has joined #ocaml
|jedai| has joined #ocaml
willb has joined #ocaml
rwmjones_ has joined #ocaml
|jedai| has quit [Read error: 110 (Connection timed out)]
willb has quit [Read error: 110 (Connection timed out)]
|jedai| has joined #ocaml
angerman has quit []
Ched has quit [Remote closed the connection]
Ched has joined #ocaml
joelr1 has joined #ocaml
<joelr1> good day folks
<joelr1> can you use ocamllex with a camlp4 parser?
<mrvn> How would you represent a struct of C function pointers that may be NULL?
<mrvn> Should default to NULL too.
<joelr1> opt
<joelr1> opt struct
<th5> thats what i was thinking
<joelr1> sorry, struct option
<mrvn> record of closure options?
<mrvn> The function pointers can be NULL. the struct must be there.
<mrvn> The option type means another indirection in the stubs code, right?
<mrvn> HOW are options actualy represented. Can't find it in the docs.
joelr1 has quit []
<th5> type 'a option = Some of 'a | None
ttamttam has left #ocaml []
vuln has joined #ocaml
<tab> mrvn: Val_none or a tuple of lenght 1
<mrvn> tab: thx.
wsmith84 has joined #ocaml
<vuln> I'm trying to compile my Ocaml packages, but it asks me for a -host option. I use GNU/Linux i686 (XandrOS) in a Eee PC
<vuln> What am I supposed to set as -host?
<Camarade_Tux> it's weird you have to set anything...
<olegfink> i686-linux-gnu should do.
<vuln> Thank you very much.
* Camarade_Tux wonders if there's not another, underlying, problem
<vuln> it doesn't work :(
<olegfink> vuln: are you speaking about ocaml's configure script?
<vuln> olegfink: yes :)
<tab> mrvn: forgot i had a define .. Val_none being Val_int(0)
<mrvn> So I can use option types. But how do I make them default to None?
<olegfink> vuln: try running config/gnu/config.guess and see what it says
<mrvn> tab: Camarade_Tux code has it.
<olegfink> (it's used in the configure script, so if it asks for -host, config.guess has failed)
<vuln> i686-pc-linux-gnu
<tab> mrvn: to have them set to None you just need to set them to Val_none in your C code
<vuln> Oh, the files was -x
<vuln> Invalid configuration `linux-gnu': machine `linux-gnu' not recognized
<vuln> Please specify the correct host type with the -host option
<olegfink> vuln: so does chmodding help?
<vuln> I did it already and it now gives me that message
<vuln> I show above
<olegfink> do you use -host?
<vuln> Yes.
<olegfink> try without it.
<mrvn> tab: They are created by the user. I don't want them to have to list 30 name=None; fields when they don't set the callback.
<vuln> OH
<vuln> Now it works.
<vuln> I wrote i686-pc-linux-gnu in the configure file in host variable.
<vuln> thelema: hi :)
<olegfink> you don't have to, it asks config.guess.
<th5> mrvn: just make it an optional parameter with the default to None
<mrvn> th5: let ops = { foo=None; bar=None; baz=None; .... 30 more }
<mrvn> But I know what I can do. I an export a default_ops and users can use let ops = { default_ops with foo = Some fn; }
<mrvn> s/an/can/
<vuln> olegfink: A file named unix.c is supposed to be in the asmrun/ directory?
angerman has joined #ocaml
<th5> mrvn: yeah so make a function that is your "constructor" - takes in 30 optional params and returns a struct
<mrvn> th5: whats wrong with the "default_ops with ...?
<th5> looks fine too
willb has joined #ocaml
<th5> whatever works
<th5> ive never tried to use C code with ocaml so dont listen to me anyway
<Camarade_Tux> mrvn, which library are you trying to bind ?
<vuln> olegfink: make[2]: *** [pervasives.cmi] Falha de segmentação
<vuln> make[2]: Saindo do diretório `/home/user/ocaml-3.11.0/stdlib'
<vuln> make[1]: ** [coldstart] Erro 2
<mrvn> libfuse
<vuln> :(
<vuln> (it happened when I was doing make world)
<Camarade_Tux> mrvn, if you have a record, you can use the 'with' extension like 'with default_params' :)
<olegfink> vuln: could you post some more backlog somewhere? and no, unix.c isn't in asmrun/ for me
<Camarade_Tux> mrvn, ok, I was just asking because "callback" sounded like you could have been binding some gtk app for which I have an automatic binder
<mrvn> Camarade_Tux: scroll a few lines up. Thought of that too.
kaustuv has left #ocaml []
<Camarade_Tux> right
<mrvn> Camarade_Tux: Any idea how to get around the options?
<vuln> olegfink: thanks.
<vuln> olegfink: a sec
<Camarade_Tux> none beside what th5 suggested (using a function with optional params to construct the record)
<mrvn> Camarade_Tux: I ment in the representation
<mrvn> I guess I could use (Obj.magic 0) as default value.
<tab> mrvn: why would you want to that ?
<tab> +do
<mrvn> tab: to avoid the indirection of the extra tuple in the C code.
<tab> mrvn: you could use empty string if your thing is a string option (you mentioned name..)
<mrvn> tab: it is a closure option
<tab> you could have an empty closure
<tab> i.e. (fun () -> ())
<mrvn> tab: yes. How do Idetect that in the C code then so I can set the C function pointer to NULL?
<tab> you really need the option then
<tab> there's no other way around
<tab> (well there is but they are just skanky)
th5 has quit []
<vuln> olegfink: so?
Ched has quit [Remote closed the connection]
<olegfink> vuln: sorry, was away. "Falha de segmentação" means "Segmentation fault"?
Ched has joined #ocaml
<vuln> Yes :)
<olegfink> which version of ocaml?
<olegfink> it's probably a bad match of hardware, kernel, gcc and ocaml.
<vuln> newest
<vuln> :( sad
<olegfink> 3.11.0?
<vuln> Yes.
<olegfink> at least it compiled for me.
<vuln> Kernel: 2.6.21.4-eeepc
verte has quit ["http://coyotos.org/"]
<olegfink> does gcc produce runnable output at all?
<vuln> Gcc gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
<vuln> E Ocaml the newest
<vuln> olegfink: no, it doesn't
<Camarade_Tux> that's a quite old gcc
<olegfink> vuln: er? I mean like, in a hello world test?
<vuln> olegfink: I don't get what you mean
<mrvn> ocamlopt -I ../lib -o fs fuse.cmxa fs.ml
<mrvn> ../lib/fuse.a(fuse.o): In function `camlFuse__fuse_forget_284':
<mrvn> (.text+0x318): undefined reference to `caml_fuse_reply_none_stub'
<mrvn> Now I need to write all the missing stubs.
<olegfink> vuln: can you compile a runnable binary with gcc?
<vuln> olegfink: of course
<vuln> I write codes in C and it never gave me a problem
<olegfink> vuln: then you could file a bug report/try debugging ocamlrun
ttamttam has joined #ocaml
<mrvn> Why does ocamlopt complain about caml_fuse_reply_none_stub though? The camlFuse__fuse_forget_284 function is not referenced by fs.ml. Shouldn't that get thrown out completly?
wsmith84 has quit [Read error: 110 (Connection timed out)]
vuln has quit ["leaving"]
slash_ has quit [calvino.freenode.net irc.freenode.net]
jlouis has quit [calvino.freenode.net irc.freenode.net]
Stefan_vK has quit [calvino.freenode.net irc.freenode.net]
mfp has quit [calvino.freenode.net irc.freenode.net]
maxote has quit [calvino.freenode.net irc.freenode.net]
mr_uggla has quit [calvino.freenode.net irc.freenode.net]
gildor has quit [calvino.freenode.net irc.freenode.net]
kg4qxk has quit [calvino.freenode.net irc.freenode.net]
bohanlon has quit [calvino.freenode.net irc.freenode.net]
mr_uggla has joined #ocaml
slash_ has joined #ocaml
jlouis has joined #ocaml
Stefan_vK has joined #ocaml
mfp has joined #ocaml
maxote has joined #ocaml
bohanlon has joined #ocaml
gildor has joined #ocaml
kg4qxk has joined #ocaml
kaustuv has joined #ocaml
s4tan has quit []
_zack has quit ["Leaving."]
ttamttam has left #ocaml []
angerman has quit []
ched_ has joined #ocaml
itewsh has joined #ocaml
Ched has quit [Read error: 110 (Connection timed out)]
sporkmonger_ has joined #ocaml
ttamttam has joined #ocaml
alexyk has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
filp has quit ["Bye"]
alexyk has quit []
sporkmonger has quit [Read error: 110 (Connection timed out)]
ttamttam has left #ocaml []
jeremiah has joined #ocaml
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
Snark has quit ["Ex-Chat"]
ilor has joined #ocaml
jeremiah has quit [Read error: 104 (Connection reset by peer)]
alexyk has joined #ocaml
alexyk has quit [Client Quit]
itewsh has quit [Read error: 110 (Connection timed out)]
Spiwack has quit ["Leaving"]
itewsh has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
Morphous has joined #ocaml
Alpounet has joined #ocaml
jeremiah has joined #ocaml
rwmjones_ has quit ["Closed connection"]
Alpounet has quit ["Quitte"]
<ehird> Can you do #use "topfind" without the help blurb?
sgnb has quit [Read error: 104 (Connection reset by peer)]
sgnb has joined #ocaml
Yoric[DT] has joined #ocaml
^authentic has joined #ocaml
thelema has quit [Read error: 110 (Connection timed out)]
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
<ehird> When building batteries...
<ehird> > File "src/libs/compilers/compilers.ml", line 1, characters 0-1:
<ehird> > Error: Could not find the .cmi file for interface
<ehird> > src/libs/compilers/compilers.mli.
weechat2 has joined #ocaml
<mfp> ehird: batteries' toplevel does it this way: let interactive = !Sys.interactive;; Sys.interactive := false;; #use "topfind";; .... Sys.interactive := interactive;;
<ehird> heh
wsmith84 has joined #ocaml
chicco has quit [Read error: 111 (Connection refused)]
authentic has quit [Read error: 110 (Connection timed out)]
^authentic is now known as authentic
naufraghi has quit [Read error: 110 (Connection timed out)]
^authentic has joined #ocaml
authentic has quit [Read error: 60 (Operation timed out)]
^authentic is now known as authentic
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
jlouis has quit ["Lost terminal"]
ttamttam has joined #ocaml
<ehird> hmmmmmm
<ehird> I think the issue is Compilers.mli vs compilers.mli
<ehird> case
<ehird> it's compilers.ml but Compilers.mli
Alpounet has joined #ocaml
itewsh has quit [Read error: 145 (Connection timed out)]
chupish has joined #ocaml
itewsh has joined #ocaml
Alpounet has quit [Remote closed the connection]
<Yoric[DT]> ehird: arf, I believe that's fixed in the git
<ehird> >___<
<ehird> I'm using godi
rwmjones_ has joined #ocaml
rwmjones has quit [Read error: 110 (Connection timed out)]
itewsh has quit [Read error: 60 (Operation timed out)]
itewsh has joined #ocaml
sporkmonger_ is now known as sporkmonger
alexyk has joined #ocaml
itewsh has quit [Connection timed out]
itewsh has joined #ocaml
m3ga has joined #ocaml
<itewsh> what's the best way to make a list from the standard input?
thelema has joined #ocaml
<itewsh> I do this : Array.init n (fun _ -> Scanf.scanf "%d " (fun x -> x)) for arrays, but for a list?
<m3ga> itewsh: Std.input_list? (val input_list : in_channel -> string list)
<m3ga> sorry, don't worry about me :-)
<itewsh> else, there is this ugly mean: let rec f = function 0 -> [] | n -> (Scanf.scanf "%d " (fun x -> x))::(f (n-1)) in f n;; ...
jonafan_ has joined #ocaml
<itewsh> or that Array.to_list (Array.init 5 (fun _ -> Scanf.scanf "%d " (fun x -> x)));;
chupish has left #ocaml []
jonafan has quit [Read error: 110 (Connection timed out)]
jlouis has joined #ocaml
jonafan_ is now known as jonafan
naufraghi has joined #ocaml
naufraghi has quit [Client Quit]
ttamttam has left #ocaml []
itewsh has quit [Read error: 110 (Connection timed out)]
itewsh has joined #ocaml
sporkmonger has quit [Read error: 110 (Connection timed out)]
wsmith84 has quit [Read error: 113 (No route to host)]
willb has quit [Read error: 110 (Connection timed out)]
itewsh has quit [Remote closed the connection]
mishok13 has quit [calvino.freenode.net irc.freenode.net]
mishok13 has joined #ocaml
willb has joined #ocaml
kelaouchi has quit ["leaving"]
kelaouchi has joined #ocaml
chickenzilla has quit [Read error: 110 (Connection timed out)]
alexyk has quit []
hkBst has quit [Read error: 104 (Connection reset by peer)]
Yoric[DT] has quit ["Ex-Chat"]
ilor has quit [Read error: 145 (Connection timed out)]
smimou has quit [Read error: 110 (Connection timed out)]
smimou has joined #ocaml