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
<yziquel> Can someone point me to some code using pycaml?
mbishop__ is now known as mbishop
jargonjustin has quit []
<julm> yziquel: FWICS pycaml is old and buggy :/
alexyk has joined #ocaml
<yziquel> julm: thanks. seems like i'll have to rewrite what I need. Couldn't start the python interpreter with it.
alexyk has quit []
<julm> yziquel: perhaps try to write to Thomas Fischbacher http://caml.inria.fr/cgi-bin/hump.en.cgi?contrib=608 he may give you his work on pycaml
<yziquel> julm: thanks for the tip.
<julm> de rien :)
komar_ has joined #ocaml
seafood has joined #ocaml
travisbrady has quit []
komar_ has quit [Read error: 113 (No route to host)]
alexyk has joined #ocaml
pantsd has joined #ocaml
travisbrady has joined #ocaml
pants1 has quit [Read error: 113 (No route to host)]
jamii has joined #ocaml
alexyk has quit []
alexyk has joined #ocaml
pantsd has quit [Read error: 113 (No route to host)]
pantsd has joined #ocaml
Alpounet has quit ["Quitte"]
pantsd has quit [Read error: 110 (Connection timed out)]
Associat0r has quit []
pantsd has joined #ocaml
hydo has joined #ocaml
komar_ has joined #ocaml
jeddhaberstro has quit []
Camarade_Tux has joined #ocaml
hkBst has joined #ocaml
hydo has quit ["Leaving"]
julm has quit [Read error: 113 (No route to host)]
julm has joined #ocaml
alexyk has quit []
rAphael has joined #ocaml
Mr_Awesome has joined #ocaml
schme has joined #ocaml
Snark has joined #ocaml
yziquel has quit [Read error: 110 (Connection timed out)]
angerman has joined #ocaml
hkBst has quit [Remote closed the connection]
Yoric[DT] has joined #ocaml
Ched has joined #ocaml
Yoric[DT] has quit [Client Quit]
ikaros has joined #ocaml
jmou has joined #ocaml
seafood has quit []
julm has quit [Read error: 110 (Connection timed out)]
aym has joined #ocaml
sgnb has quit [Read error: 54 (Connection reset by peer)]
sgnb has joined #ocaml
jeanbon has joined #ocaml
delroth has quit [Read error: 110 (Connection timed out)]
seafood has joined #ocaml
Axioplase has joined #ocaml
ikaros has quit [Remote closed the connection]
authentic has quit [Connection timed out]
authentic has joined #ocaml
ulfdoz has joined #ocaml
delroth_ has joined #ocaml
delroth_ is now known as delroth
komar_ has quit [Read error: 60 (Operation timed out)]
komar_ has joined #ocaml
youscef has joined #ocaml
<youscef> hi
ulfdoz has quit [Read error: 113 (No route to host)]
Ched has quit [Read error: 110 (Connection timed out)]
jmou is now known as julm
Camarade_Tux_ has joined #ocaml
Camarade_Tux_ is now known as Giacomo
Giacomo has quit [Client Quit]
Ched has joined #ocaml
_zack has joined #ocaml
Associat0r has joined #ocaml
seafood has quit []
_JFT_ has joined #ocaml
Dylan16807 has quit [Read error: 104 (Connection reset by peer)]
Dylan16807 has joined #ocaml
travisbrady has quit [Read error: 104 (Connection reset by peer)]
travisbrady_ has joined #ocaml
julm has quit [Read error: 60 (Operation timed out)]
_zack has quit ["Leaving."]
julm has joined #ocaml
Alpounet has joined #ocaml
schme has quit [Read error: 113 (No route to host)]
acatout has quit [Read error: 113 (No route to host)]
lzpol has joined #ocaml
Ched has quit ["Ex-Chat"]
Ched has joined #ocaml
Ched has quit [Client Quit]
Ched has joined #ocaml
sgnb has quit [Remote closed the connection]
sgnb has joined #ocaml
sporkmonger has quit []
Ched has quit ["Ex-Chat"]
Ched has joined #ocaml
travisbrady_ has quit [Read error: 54 (Connection reset by peer)]
travisbrady has joined #ocaml
_zack has joined #ocaml
_JFT_ has quit []
Ched has quit ["Ex-Chat"]
Ched has joined #ocaml
Ched has quit [Client Quit]
Ched has joined #ocaml
Ched has quit [Client Quit]
Ched has joined #ocaml
Ched has quit [Client Quit]
Ched has joined #ocaml
Ched has quit [Client Quit]
Ched has joined #ocaml
lzpol has quit [Remote closed the connection]
schme has joined #ocaml
alexyk has joined #ocaml
alexyk has quit []
<palomer> so...what type system extension allows (fun (x:forall y. y-> y) -> (x 1, x true)) (fun x -> x) ?
ulfdoz has joined #ocaml
* thelema tries to figure out what's going on with all palomer's arrows
<thelema> x is 'a -> 'a
<thelema> and you want to apply it to two different types -- 1 and true
<flux> palomer, type id = { f: 'a.'a -> 'a } not good enough for you?
<thelema> I think you can do this in ocaml with records
<flux> (fun x -> (x.f 1, x.f true)) { f = fun x -> x };;
<mfp> palomer: rank-2 polymorphism, encoded in OCaml the way flux showed
<palomer> flux, yeah, that's fine
<palomer> just wanted a name
<palomer> rank 2 polymorphism also allows (fun (x: forall y. y -> (forall z. z -> z)) -> (x 1 true, x true 1)), right?
<mrvn> palomer: sure. type id = { f: 'a. 'b. 'a -> 'b -> 'c }
sporkmonger has joined #ocaml
<palomer> mrvn, isn't my type slightly different?
<mrvn> palomer: then modify type id
<palomer> it would be type id2 = {g: 'b . 'b -> 'b} type id = {f: 'a. 'a -> id2}
<mrvn> type 'z id = = { f: 'y. 'y -> 'z } and then you have type id2 id
Axioplase has quit ["hop!"]
<flux> isn't that the same as { f: 'a.'b. 'a -> 'b -> 'b } ?
<palomer> I don't think so
<mrvn> yeah
<palomer> consider (fun (x : y -> y) -> ...) (f true)
<palomer> err
<palomer> consider (fun (x : forall y. y -> y) -> ...) (f true)
<mrvn> I wonder that type (f true) has in { f: 'a.'b. 'a -> 'b -> 'b }
<mrvn> s/that type/what type/
<thelema> # type id = { f : 'a. 'b. 'a -> 'b -> 'c };;
<thelema> Error: Parse error: ident_of_ctyp: this type is not an identifier
<thelema> what am I doing wrong?
<mrvn> thelema: 'a. 'b. isn't allowed
<thelema> only one 'x per type?
<julm> that's ['a 'b.]
<mrvn> as far as I figure.
<thelema> julm: thanks
<mrvn> Error: Syntax error
<flux> hm, I thought it was allowed
<mrvn> flux: the problem is what type should (f true) have?
<flux> oh well, it makes sense from the point of view of mrvn's question
<thelema> julm's suggestion worked for me.
<thelema> # type id = { f : 'a 'b. 'a -> 'b -> 'b };;
<thelema> type id = { f : 'a 'b. 'a -> 'b -> 'b; }
<thelema> # {f=(fun x y -> y)}.f true;;
<thelema> - : '_a -> '_a = <fun>
<mrvn> saddly values can't have type 'b. 'b - 'c.
angerman has quit []
<flux> oh, I must've messed it up just as I tried it :)
<flux> ah, I used 'a'b which is illegal
<flux> 'a' 'b is as illegal too, though
<flux> so it's not that "identifiers can have the '-character"; apparently not in that case
<flux> no, it's legal as long as it isn't lexed as a character literal :)
alexyk has joined #ocaml
<thelema> '_ isn't allowed
<thelema> it really is looking for a..z
<thelema> although 'A is allowed
schme has quit ["Lost terminal"]
Slower has quit [Read error: 110 (Connection timed out)]
rwmjones_ has joined #ocaml
Amorphous has quit [Read error: 110 (Connection timed out)]
_zack has quit ["Leaving."]
Amorphous has joined #ocaml
<palomer> http://pastebin.com/m443fb702 <--omake is giving me this error
alexyk has quit []
alexyk has joined #ocaml
<Camarade_Tux> I'm debugging a C++ project for a friend of mine and it's quite funny to see recursive classes(modules) in different files are not handled ;p
<rwmjones_> oh dear unlucky for you :-(
alexyk has quit [Client Quit]
<Camarade_Tux> hopefully the project is small and it really all came down to recursive header includes :P
<palomer> I'm an idiot:O
<palomer> ocamlfind ocamlc -syntax camlp4o -package unix,pcre,oset,seditable -warn-error A -g -I . -custom -o test.run test.cmo -linkpkg
<palomer> /usr/bin/ocamlc: don't know what to do with /usr/local/lib/ocaml/3.10.2/seditable/SEditable.cmxa.
<Camarade_Tux> take this and whip yourself :)
angerman has joined #ocaml
Yoric[DT] has joined #ocaml
angerman_ has joined #ocaml
Snark has quit ["Ex-Chat"]
angerman has quit [Read error: 113 (No route to host)]
<Camarade_Tux> and it was actually bad coding style : probably "pfff, that's ugly but that won't be a problem" :D
alexyk has joined #ocaml
<palomer> http://pastebin.com/m5d1da4bb <---how is this possible??!?
Camarade_Tux has quit ["Leaving"]
<palomer> UTF8.length str returns 1 but UTF8.get str 0 throws an exception
* palomer looks at the extlib people
<julm> palomer: what is your testing string?
<julm> does it contain a non-ASCII character (code > 127) ?
<thelema> what exception?
ulfdoz has quit ["brb"]
<thelema> you've probably got an invalid UTF8 string that you're working with.
<thelema> UTF8.length doesn't actually check that the extra needed bytes exist - it stops calculating length as soon as i >= String.length s
<thelema> if we change that to [if i > String.length s then failwith "invalid UTF8 string - missing trailing bytes" else if i = String.length s then ...
<thelema> hmm, except length = 1 means that the one character you have is less than 0x80
ulfdoz has joined #ocaml
slash_ has joined #ocaml
<thelema> n/m, c+1 no matter what your first byte
Yoric[DT] has quit ["Ex-Chat"]
Jedai has quit [Read error: 110 (Connection timed out)]
Jedai has joined #ocaml
angerman_ has quit [Read error: 113 (No route to host)]
<palomer> err
alexyk has quit []
<palomer> so what's the solution?
<palomer> how do I compose a utf8 string?
<palomer> oh, wait, I can just read the chars off of it
<palomer> http://pastebin.com/m7ba021ca <---here it is
<palomer> the string is "é"
pants1 has joined #ocaml
<julm> palomer: in UTF-8 "é" is "\xc3\xa9"
pantsd has quit [Read error: 60 (Operation timed out)]
<palomer> according to that table its \xe9
<julm> \xe9 is the unicode code point
<julm> not the UTF-8 sequence
<palomer> oh
<palomer> im building my utf8 string by appending unicode characters
<palomer> how do I fix this?
<julm> find how youur library convert Unicode integers to an UTF-8 string
<julm> converts*
<palomer> I'm using both extlib and camomile
<palomer> extlib is probably easiest
<julm> no idea
<palomer> there doesn't seem to be a way
<palomer> oh, right
<palomer> convert to a buf
<palomer> add the character
<julm> yep
<julm> there must be a way
hkBst has joined #ocaml
rAphael has quit ["Soooo looooooooooong"]
<palomer> fixed!
<palomer> whew
<julm> :)
jamii has quit [Read error: 110 (Connection timed out)]
alexyk has joined #ocaml
pipping has joined #ocaml
<pipping> hi. i'm trying to compile ocaml 3.10.2 on x86_64.
<pipping> when making the opt target, I get:
<pipping> Files printf.p.cmx and string.p.cmx
<pipping> make inconsistent assumptions over implementation String
<pipping> is that a known issue?
aym has quit [Read error: 60 (Operation timed out)]
<hcarty> pipping: Not that I know of. Are you using the OCaml source files directly from INRIA? And what OS?
<pipping> linux.
<pipping> ocaml works fine for me when built using 'make -j1'
<pipping> i wanted to make it work with 'make -j3' or even 'make -j'
<pipping> for that, i changed the order of some make targets
<pipping> as a result, i seem to have miscompiled ocaml, yielding the above message
<mrvn> seems there are more concurrency problems in ocaml than running programms.
<hcarty> pipping: I have not tried "make -j n" with the OCaml sources... you could check the Changelog to see if there is any information there
<hcarty> It would be a nice thing to have working
<hcarty> pipping: You could try the ocamlbuild compilation method. It would likely require hacking some of the build files as well, but perhaps its parallel build support would do a better job.
<pipping> i seem to have found a path that works...
<pipping> i moved opt further to the beginning, before world
<pipping> what's ocamlbuild?
<hcarty> pipping: Would you be willing to file a bug report about this with your changes?
<hcarty> ocamlbuild is an OCaml-based build system included with OCaml versions since 3.10.0
alexyk has quit []
<pipping> i see. i see there's an ocamlbuild directory.
<pipping> but no README :/
<hcarty> The INSTALL or README file in the base directory should have some information on using the ocamlbuild-based build for OCaml
<hcarty> I haven't used 3.10.x in a little while though so I'm not certain about that.
<pipping> ./build/fastworld.sh
<pipping> i see
<pipping> there's no targets test or check. is there a way to test if what i just build actually works?
komar_ has quit [Remote closed the connection]
<pipping> nvm, there's make bootstrap
* pipping tries fastbuild
jeanbon has quit [Read error: 110 (Connection timed out)]
<pipping> that script isn't parallel, though
<pipping> Finished, 1936 targets (846 cached) in 00:02:48.
youscef has quit ["KVIrc 3.4.0 Virgo http://www.kvirc.net/"]
<pipping> so it works but i suppose it's not any better than `make -j1` :/
<pipping> i suppose nobody likes the autools in the ocaml world? :/
qwrgw0 has joined #ocaml
seafood has joined #ocaml
<pipping> now I even managed to get
<pipping> Exception File "ocamlbuild/my_unix.ml", line 59, characters 51-57: Assertion failed.
pants1 has quit [hubbard.freenode.net irc.freenode.net]
gl has quit [hubbard.freenode.net irc.freenode.net]
pants1 has joined #ocaml
gl has joined #ocaml
seafood_ has joined #ocaml
seafood has quit [Read error: 110 (Connection timed out)]
seafood has joined #ocaml
<pipping> okay the asmrun/Makefile is totally parallelization-hostile
<pipping> the rest is just a matter of missing dependencies
hkBst has quit [Read error: 104 (Connection reset by peer)]
qwrgw0 has quit ["Leaving"]
slash_ has quit [Client Quit]
seafood_ has quit [Read error: 110 (Connection timed out)]
seafood_ has joined #ocaml
<pipping> does the order opt -> world -> opt.opt -> bootstrap -> bootstrap even remotely make sense?
Alpounet has quit [Remote closed the connection]
<mfp> pipping: not that much, it's normally bootstrap -> world -> opt -> opt.opt or so
<pipping> yeah i saw that. but that was causing problems with -j :D
<mfp> most of the gains should come from parallelizing camlp4
<mfp> the compiler+stdlib take comparatively little time
rwmjones_ has quit [Read error: 113 (No route to host)]
<pipping> hm
<pipping> having bootstrap fail and running it again isn't so nice
<pipping> -> boot/Saved/Saved.prev/Saved.prev/Saved.prev/Saved.prev/Saved.prev
seafood has quit [Read error: 110 (Connection timed out)]
seafood has joined #ocaml
Ched has quit [Read error: 104 (Connection reset by peer)]
seafood_ has quit [Read error: 110 (Connection timed out)]
travisbrady_ has joined #ocaml
travisbrady has quit [Read error: 104 (Connection reset by peer)]
alexyk has joined #ocaml
alexyk has quit [Client Quit]
pipping has quit ["g'night!"]
Camarade_Tux has joined #ocaml
Camarade_Tux has quit ["Leaving"]