<raboof>
when i do 'ocamlopt /usr/lib/ocaml/3.10.2/xml-light/xml-light.cmxa test.ml' i still get 'Unbound module Xml'
<raboof>
how should i 'bind' the module?
<raboof>
oh, i need to include '-I' also
r0bby has quit [Connection timed out]
<raboof>
ok, i now got as far as "ocamlopt -I /usr/lib/ocaml/3.10.2/xml-light -I /usr/lib/ocaml/3.10.2/netclient /usr/lib/ocaml/3.10.2/unix.cmxa /usr/lib/ocaml/3.10.2/pcre/pcre.cmxa /usr/lib/ocaml/3.10.2/equeue/equeue.cmxa /usr/lib/ocaml/3.10.2/netsys/netsys.cmxa /usr/lib/ocaml/3.10.2/netstring/netstring.cmxa /usr/lib/ocaml/3.10.2/netclient/netclient.cmxa /usr/lib/ocaml/3.10.2/xml-light/xml-light.cmxa test.ml"
<raboof>
but now '/usr/bin/ld: cannot find -lnetsys' - libnetsys is in /usr/lib/ocaml/3.10.2/netsys/ , how do I add that to the path?
<raboof>
ah, -ccopt...
Jedai has quit [Read error: 113 (No route to host)]
Associat0r has quit []
ccasin has quit [Remote closed the connection]
Jedai has joined #ocaml
erickt has quit ["Leaving."]
Mr_Awesome has quit [Read error: 110 (Connection timed out)]
<tsuyoshi>
you should really use ocamlfind
verte has joined #ocaml
peddie_ has joined #ocaml
hkBst has joined #ocaml
peddie has quit [Read error: 113 (No route to host)]
Snark has joined #ocaml
<flx_>
seconded
seafood has joined #ocaml
<flx_>
with ocamlfind it would be: ocamlfind ocamlc -linkpkg -package xml-light,netclient,pcre test.ml
<flx_>
(you can use "ocamlfind list" to retrieve the list of package names)
<flx_>
while you're at it, stick the '#use "topfind";;'-directive into your ~/.ocamlinit ;)
angerman has joined #ocaml
julm has quit [Read error: 60 (Operation timed out)]
seafood has quit []
julm has joined #ocaml
seafood has joined #ocaml
seafood has quit []
_zack has joined #ocaml
seafood has joined #ocaml
seafood has quit [Client Quit]
julm has quit [Read error: 110 (Connection timed out)]
<raboof>
now parse_items and parse_entries both fetch some webpage and process it
<raboof>
this seems like an ideal thing to do concurrently, right?
<raboof>
what would be the way to do this?
<raboof>
do ocaml have some kind of mapreduce-like 'do_concurrent'-ish helper functions somewhere?
<Camarade_Tux>
that won't happen in parallel if that's what you want
<Camarade_Tux>
(when you mentionned concurrency)
ulfdoz has joined #ocaml
<flx_>
raboof, well, you could make use of streams
<flx_>
raboof, or the lazy lists of Batteries
<flx_>
actually the Enum of Batteries (or ExtLib if you think Batteries is too big of a dependency) will likely do well in this case
sramsay has joined #ocaml
<raboof>
flx_: hm, could you give an example?
hkBst has quit [Remote closed the connection]
Jedai has quit [Read error: 104 (Connection reset by peer)]
Amorphous has quit [Read error: 110 (Connection timed out)]
Amorphous has joined #ocaml
marteo has joined #ocaml
verte has quit [Read error: 60 (Operation timed out)]
verte has joined #ocaml
Pepe___ has joined #ocaml
Snark has quit ["Ex-Chat"]
<flx_>
raboof, I haven't much used them, only perused the documentation
slash_ has joined #ocaml
<flx_>
raboof, but Enum is a construct where you can provide a destructive 'next' function, plus it gives a bunch of utility functions
<flx_>
I would expect it to have Enum concatenation, for example
Pepe_ has quit [Read error: 110 (Connection timed out)]
Pepe___ is now known as Pepe
Pepe is now known as Pepe_
slash_ has quit [Client Quit]
slash_ has joined #ocaml
slash_ has quit [Client Quit]
slash_ has joined #ocaml
<raboof>
flx_: ok, but that'd still fetch the feeds in series rather than in parallel, right?
<hcarty>
raboof: There are a few options for parallel processing in OCaml. The most commonly used are probably jocaml, ocamlp3l and prelude.ml's parallel List and Array functions.
<flx_>
raboof, it depends on the lower level
<flx_>
raboof, if you can incrementally retrieve and parse the results, everything would be performed in parallel
<flx_>
however it seems likely the interface you use provides the whole contents as a single string
<flx_>
so processing that will likely to take an insignificant time compared to the time (also short ;-)) it took to retrieve it
<flx_>
in this case, when the operations are io-bound, you can use different threads to perform atleast the retrieval part
Serke2 has joined #ocaml
Associat0r has joined #ocaml
ccasin has joined #ocaml
verte_ has joined #ocaml
verte has quit [Nick collision from services.]
verte_ is now known as verte
ccasin has quit ["Leaving"]
ccasin has joined #ocaml
jeddhaberstro has joined #ocaml
verte has quit ["~~~ Crash in JIT!"]
Lomono has quit ["Don't even think about saying Candlejack or else you wi"]
sramsay has quit [Remote closed the connection]
Serke2 has quit [Read error: 104 (Connection reset by peer)]
Serke2 has joined #ocaml
Serke2 has quit [Client Quit]
bluestorm has joined #ocaml
_zack has quit [Read error: 113 (No route to host)]
julm has quit [Read error: 110 (Connection timed out)]
jm has joined #ocaml
yziquel has joined #ocaml
<yziquel>
hi. concerning writing C wrapper functions: is there any difference between writing CAMLparam2(x,y) and writing CAMLparam0(); CAMLxparam1(x); CAMLxparam1(y);?
<kaustuv>
If you look up the definition of the CAMLparam macros in caml/memory.h, that's how they're implemented, if I remember correctly
<yziquel>
kaustuv: yes and no: CAMLparam2 is implemented as CAMLparam0 and then CAMLxparam2. I want to replace CAMLxparam2 with two CAMLxparam1.
<yziquel>
kaustuv: i'm wondering if this has any weird implications.
<kaustuv>
it's possibly marginally slower, that's all
<kaustuv>
oh, and consumes some extra memory for the list of roots
jm is now known as julm
<yziquel>
humm. not sure this kind of optimisation is worth clobbering the c++ code in my swig module...
<Camarade_Tux>
yziquel: btw, what made you use swig, and how is it going/how do you find swig?
<yziquel>
Camarade_Tux: I'm using Swig because -1- it allows to wrap c++ code rather easily for the end user, specifically when using std::list<uglytype> types -2- i'm wrapping a rather big c++ library -3- the previous swig module thought ocaml is dynamically typed -4- there are already some usefule swig .i interface files.
<Camarade_Tux>
hmmm, I hadn't thought of templates, it's true they are likely very annoying to deal with
<yziquel>
Camarade_Tux: how do i find Swig? well, i believe it's legacy code, but quite useful. it does its job and is flexible to some extent. a perfect solution for c++ would probably be to use GCC XML to parse c++.
<Camarade_Tux>
yziquel: are you writing another swig module for ocaml? that wouldn't use Obj.magic everywhere? (as I've been told)
<yziquel>
Camarade_Tux: the big thing i do not like with Swig is that it is not possible to write a module for a target language without recompiling the whole of swig. a module is written by overriding methods of another class.
<yziquel>
Camarade_Tux: quite ugly.
<Camarade_Tux>
erg, yuck!
<yziquel>
Camarade_Tux: I am writing another Swig module. Won't use Obj.magic everywhere (this statement is rather unfair, though, for the previous module).
<yziquel>
Camarade_Tux: it maps c++ objects to OCaml objects.
<kaustuv>
Why does it matter that the toplevel prints one or the other side of a type abbreviation? Anyway, as long as you use new tokenizer_0, you might not get what you want. You'll have to write your own function that wraps new tokenizer_0
<kaustuv>
But worrying about this can only lead to madness
<Camarade_Tux>
yziquel: ok :)
jeddhaberstro has quit [Client Quit]
<yziquel>
kaustuv: not too worried about this, but well, it would have been nicer.
<yziquel>
kaustuv: i do not understand the "you might not get what you want" and the "you'll have to write your own function". Why?
<yziquel>
kaustuv: ah. ok. a val tokenizer_0 : string -> tokenizer would be better... instead of a class.
Associat0r has quit []
jli_ has joined #ocaml
jli has quit [Read error: 110 (Connection timed out)]
_zack has joined #ocaml
Alpounet has joined #ocaml
Submarine has joined #ocaml
Yoric[DT] has joined #ocaml
jm has joined #ocaml
r0bby has joined #ocaml
julm has quit [Nick collision from services.]
jm is now known as julm
Yoric[DT] has quit [Read error: 60 (Operation timed out)]
slash_ has quit [Client Quit]
Yoric[DT] has joined #ocaml
Yoric[DT] has quit [Read error: 110 (Connection timed out)]
Yoric[DT] has joined #ocaml
Yoric[DT] has quit [Read error: 104 (Connection reset by peer)]