ygrek has quit [Remote host closed the connection]
ygrek has joined #ocaml
anemator has quit [Client Quit]
anemator has joined #ocaml
anemator has left #ocaml []
anemator has joined #ocaml
ihm1 has quit [Quit: ihm1]
anemator has quit [Quit: Page closed]
Guest18507 has quit [Remote host closed the connection]
talzeus has joined #ocaml
yacks has quit [Quit: Leaving]
cdidd has quit [Remote host closed the connection]
yezariaely has joined #ocaml
cdidd has joined #ocaml
pkrnj has quit [Quit: Computer has gone to sleep.]
Snark has joined #ocaml
ggole has joined #ocaml
ihm1 has joined #ocaml
cdidd has quit [Remote host closed the connection]
bondar has quit [Ping timeout: 248 seconds]
cdidd has joined #ocaml
cdidd has quit [Remote host closed the connection]
manud has quit [Quit: manud]
manud has joined #ocaml
dnm has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
manud has quit [Quit: manud]
ben_zen has quit [Ping timeout: 256 seconds]
ttamttam has joined #ocaml
csakatok_ has joined #ocaml
ulfdoz has joined #ocaml
csakatoku has quit [Ping timeout: 240 seconds]
talzeus has quit [Remote host closed the connection]
talzeus has joined #ocaml
ia0 has quit [Ping timeout: 246 seconds]
ulfdoz has quit [Ping timeout: 260 seconds]
cesar_ has joined #ocaml
cesar_ is now known as Guest45006
ia0 has joined #ocaml
djcoin has joined #ocaml
ygrek has joined #ocaml
gour has joined #ocaml
cdidd has joined #ocaml
<GlenK>
so I'm still having trouble compiling this opa thing. if I've installed ocaml to my home directory, are there any enviornment variables I need to set specific to ocaml? right now, I'm just going with my standard setup, PATH and LD_LIBRARY_PATH and whanot set to where junk is installed
zarul has quit [Read error: Connection reset by peer]
zarul has joined #ocaml
ygrek_ has joined #ocaml
pkrnj has joined #ocaml
ygrek has quit [Ping timeout: 240 seconds]
<adrien>
that's it but afaiu, you need ocamlfind too
<adrien>
(don't know through what you've installed ocaml though)
Guest45006 has quit [Remote host closed the connection]
ihm1 has quit [Quit: ihm1]
Simn has joined #ocaml
thomasga has joined #ocaml
chambart has joined #ocaml
ihm1 has joined #ocaml
ihm1 has quit [Client Quit]
<GlenK>
adrien: hi! =)
<GlenK>
I've seen a lot of the docs mention ocamlfind. but what is that exactly? seemed like something optional to me so I've been skipping it. should I start from scratch and go with ocamlfind for things from now on?
<adrien>
nowadays it's going to be painful if you try to skip it and it's really useful
ttamttam1 has joined #ocaml
mort___ has joined #ocaml
ttamttam has quit [Ping timeout: 268 seconds]
ousado_ has joined #ocaml
ousado has quit [Read error: Connection reset by peer]
ousado_ is now known as ousado
ousado has quit [Changing host]
ousado has joined #ocaml
ttamttam1 has quit [Read error: Connection reset by peer]
ttamttam has joined #ocaml
sgnb has quit [Read error: Connection reset by peer]
troydm has joined #ocaml
Simn has quit [Quit: Leaving]
Simn has joined #ocaml
julm has quit [Ping timeout: 246 seconds]
julm has joined #ocaml
yezariaely has quit [Ping timeout: 268 seconds]
ollehar has joined #ocaml
yezariaely has joined #ocaml
yezariaely has quit [Quit: Leaving.]
tvn_ has joined #ocaml
tvn_ is now known as Guest22740
q66 has joined #ocaml
Kakadu has joined #ocaml
tnguyen has joined #ocaml
Guest22740 has quit [Quit: Leaving]
tnguyen has quit [Client Quit]
Kakadu_ has joined #ocaml
Kakadu has quit [Ping timeout: 248 seconds]
csakatok_ has quit [Remote host closed the connection]
csakatoku has joined #ocaml
troydm has quit [Ping timeout: 264 seconds]
f[x] has joined #ocaml
csakatoku has quit [Remote host closed the connection]
csakatoku has joined #ocaml
<kerneis>
GlenK: have you tried opam?
<kerneis>
if you need ocaml installed in your home directory, and easy access to various packages, it's a really useful tool
<kerneis>
(some kind of package manager for ocaml compilers, tools and libraries)
ygrek_ has quit [Ping timeout: 268 seconds]
ttamttam has quit [Quit: ttamttam]
ttamttam has joined #ocaml
Kakadu_ has quit [Ping timeout: 250 seconds]
Kakadu has joined #ocaml
<Kakadu>
gour: Pros about js_of_ocaml are so amazingly described in caml-list that probably you will go with it instead of some desktop-oriented toolkits...
<ggole>
I forget: is there some way to pass arguments to the parsing functions generated by ocamlyacc?
csakatoku has quit [Remote host closed the connection]
mfp has joined #ocaml
troydm has joined #ocaml
ttamttam has quit [Read error: Connection reset by peer]
ttamttam has joined #ocaml
ttamttam has quit [Read error: Connection reset by peer]
ttamttam has joined #ocaml
csakatoku has joined #ocaml
beckerb has joined #ocaml
ben_zen has joined #ocaml
ollehar1 has joined #ocaml
ollehar has quit [Ping timeout: 268 seconds]
ben_zen has quit [Ping timeout: 248 seconds]
darkf has quit [Quit: Leaving]
skchrko has joined #ocaml
ttamttam has quit [Read error: Connection reset by peer]
ttamttam has joined #ocaml
ttamttam has quit [Read error: Connection reset by peer]
ttamttam has joined #ocaml
ttamttam has quit [Read error: Connection reset by peer]
ttamttam has joined #ocaml
ttamttam has quit [Read error: Connection reset by peer]
ttamttam has joined #ocaml
ttamttam has quit [Read error: Connection reset by peer]
ttamttam has joined #ocaml
ttamttam has quit [Read error: Connection reset by peer]
ttamttam has joined #ocaml
ttamttam has quit [Read error: Connection reset by peer]
ttamttam has joined #ocaml
ttamttam has quit [Read error: Connection reset by peer]
ttamttam has joined #ocaml
ttamttam has quit [Read error: Connection reset by peer]
ttamttam has joined #ocaml
ttamttam1 has joined #ocaml
ttamttam has quit [Read error: Connection reset by peer]
<gour>
Kakadu: heh. let me try extjs bindings as well...would you do the same in my case?
<Kakadu>
Probably. I believe that js_of_ocaml is awesome
<gour>
i also have to explor extjs' capabilities for desktop app
ontologiae has quit [Quit: WeeChat 0.4.0]
ontologiae has joined #ocaml
csakatoku has quit [Remote host closed the connection]
Drup has joined #ocaml
chambart has quit [Ping timeout: 260 seconds]
Drup has quit [Ping timeout: 245 seconds]
dsheets has joined #ocaml
talzeus has quit [Remote host closed the connection]
Neros has joined #ocaml
Drup has joined #ocaml
chambart has joined #ocaml
chambart has quit [Ping timeout: 260 seconds]
ben_zen has joined #ocaml
f[x] has quit [Ping timeout: 264 seconds]
Kakadu has quit [Quit: Page closed]
Kakadu has joined #ocaml
ben_zen has quit [Ping timeout: 248 seconds]
weie_ has joined #ocaml
weie has quit [Ping timeout: 256 seconds]
cago has quit [Ping timeout: 240 seconds]
breakds has joined #ocaml
Kakadu has quit [Ping timeout: 250 seconds]
<bernardofpc>
if I do #load "./foo/bar.cmo" ;;, how do I refer to it ? Bar ? Foo.Bar ? And if foo starts with _, as in "_build" ?
<adrien_oww>
Bar
<adrien_oww>
but you should
<adrien_oww>
-I foo bar.cmo
<bernardofpc>
I see, but It's a bit sad to quit toplevel to re-load the module
<bernardofpc>
(and Bar does not work for me, I don't know why...)
<bernardofpc>
Error: Unbound module
<adrien_oww>
-I foo?
<bernardofpc>
(with -I foo, it works, so maybe that's beacuse the .cmi is not there...)
<adrien_oww>
yes
<bernardofpc>
is there any way out of "-I" ?
<adrien_oww>
why?
<adrien_oww>
what's the issue with -I?
<bernardofpc>
that if I want to add another dir, I'll have to restart the toplevel
yezariaely has joined #ocaml
<bernardofpc>
it's maybe a detail
<bernardofpc>
or a convenience
<adrien_oww>
you can include more dirs through some toplevel directive even though I don't remember which one
<CissWit>
#directory "foo";;
<bernardofpc>
Oh, thanks
<bernardofpc>
I don't know why I didn't see that on the page
<yezariaely>
is there constructor to built a pair in ocaml? I have a list of elements and want it to make a tupled list. Thus: map (fun x -> (1,x)) lst
<yezariaely>
Can I somehow do a map (1,?) lst or something short?
<yezariaely>
similar/short
<ggole>
No, you have to write the function
<ggole>
Constructors are functions in ML (and Haskell?), but not OCaml
<technomancy>
curious, what's the rationale behind that?
<ggole>
yezariaely: for the special case of lists and pairs, though, there is List.combine
Kakadu has joined #ocaml
<yezariaely>
ggole: thx.
<technomancy>
historical accident?
<ggole>
No, wait: you want a constant argument. Never mind.
<ggole>
I'm not sure.
<yezariaely>
ggole: I could blow up a list of constants with the same length and then combine them ;-)
<yezariaely>
s/with/to/
<yezariaely>
technomancy: in Haskell you can use (,) which is the pair constructor.
<ggole>
Appel wrote a critique of ML in which I think he mentions the topic
<pippijn>
since it was a 1 day effort, it lacks a lot of functionality and optimisations
<pippijn>
but I'm happy with where it is going
ollehar has joined #ocaml
<pippijn>
wmeyer``: maybe you can help with GADT typing
<wmeyer``>
adrien: I am not sure about disabling warnings, we should be keeping all the warnings as errors for time being. I will try to come up with something better.
<wmeyer``>
pippijn: yeah if I had time :) but I like the idea, in the same spirit we could do, pythontypes
<pippijn>
yes
<pippijn>
but I don't like python, so I won't do it
<wmeyer``>
we could do fortrantypes as well
<pippijn>
no
<wmeyer``>
or coboltypes
<pippijn>
fortrantypes would be as difficult as ctypes
<wmeyer``>
that was just a joke :)
<pippijn>
I did perltypes, because it's much easier
<pippijn>
it has runtime type checking
<wmeyer``>
not that difficult, easier than ctypes actually, fortran 77 is much simpler
<pippijn>
and only a few types
<pippijn>
yes
<pippijn>
but you have to do native calls
<wmeyer``>
yes
<pippijn>
with perl, you just build an array of SV* and call the perl subroutine
<pippijn>
and kind of bad, because it may be unsound
<pippijn>
but I think it's sound
<mrvn>
[&args] (SV **sp) { ... } What does that do?
<pippijn>
lambda function with capture
<pippijn>
by-ref
<mrvn>
Is that an Array.map?
<pippijn>
that's a List.iter
<pippijn>
a kind of rev_map actually
<mrvn>
too much magic.
<pippijn>
where?
<pippijn>
on the C side?
<mrvn>
in ml_Perl.cpp
<pippijn>
where is the magic?
<mrvn>
all those templates and the lambdas
<pippijn>
oh
<pippijn>
yes, I guess it's not necessary
* pippijn
simplifies the templates
<mrvn>
EXTEND (SP, argc); Where does SP come from?
<pippijn>
SP is sp
<pippijn>
yeah, that's not so nice
<pippijn>
I changed it to sp now
<mrvn>
So the "fill_args" part copies the ocaml values onto **sp and returns a pointer to the end of it?
<mrvn>
reversing the order in the process
<pippijn>
yes
<mrvn>
where does sp get allocated?
<pippijn>
it's inside the perl interpreter
<pippijn>
the perl stack pointer
<pippijn>
dSP declares a local copy of it
<pippijn>
PUTBACK puts it back into the interpreter
<pippijn>
EXTEND reallocs it so it has enough space
<mrvn>
I'm looking at ml_Perl_call().
<pippijn>
it gets the sp from perl_call
dsheets has quit [Ping timeout: 268 seconds]
<mrvn>
right, because its a lambda. it gets called from inside perl_call where is had the sp.
<pippijn>
yes, though it could also not be a lambda
<pippijn>
but yes
<pippijn>
I don't know if I did exception handling right
<pippijn>
since I don't know how exceptions ought to be handled in either language, it's probably wrong
<pippijn>
actually it's definitely wrong, because I use caml_callbackN without _exn
<mrvn>
you are missing calls to caml_enter/leave_blocking_section()
<pippijn>
mrvn: everything is blocking for now :)
<mrvn>
or caml_release_runtime_system/caml_acquire_runtime_system for the new names
<pippijn>
I think I need to put the exception into an SV*, then raise that into perl and when it falls out of perl into ml_Perl_call, get the exception object back out and raise that to ocaml
beckerb has quit [Ping timeout: 240 seconds]
dpk` has joined #ocaml
<pippijn>
but I'm just letting it blow up for now
<pippijn>
I have other things to do
<mrvn>
should be fine I think.
<pippijn>
if I do it like I described?
<mrvn>
unless it skips some c++ destructors this way
<pippijn>
no, but what about perl stuff?
<mrvn>
LEAVE; ends the perl stuff or not?
<pippijn>
yes
<mrvn>
and you failwith after LEAVE
<pippijn>
that's for perl exns
<pippijn>
what if an ocaml callback throws?
<mrvn>
pippijn: you mean in invoke_closure?
<pippijn>
yes
<mrvn>
you have to check the value there and then indeed throw it to perl
<pippijn>
right
<pippijn>
right now I use callbackN
<pippijn>
no callback_exnN
<mrvn>
not sure how you will translate an ocaml exception into a perl one
<pippijn>
N_exn
<pippijn>
in perl, I can just throw any SV*, I think
<pippijn>
maybe I need to wrap it in a perl reference, first
<mrvn>
Say the callback throws Unix.unix_error for EAGAIN. that should produce a perl EAGAIN exception
<pippijn>
oh
<pippijn>
haha
<pippijn>
no :)
<pippijn>
I really don't want to go there
<mrvn>
well, maybe not EAGAIN. But what about Not_found or End_of_file?
<pippijn>
hm
<pippijn>
maybe yes
<pippijn>
perl usually throws strings as exception
<pippijn>
I can throw a stringised version of the ocaml exception along with the actual exception pointer
<pippijn>
if perl doesn't catch it, I can get the pointer back out and re-raise it instead of failwith
<mrvn>
and if it falls out of perl again then you go back to the ocaml pointer
<pippijn>
yes
<mrvn>
sounds good
<mrvn>
but I would put that for V2.0
<pippijn>
yes :)
<mrvn>
or V9.0 or something. It's amazing you are doing callbacks already
<pippijn>
the callbacks are bad, though
<pippijn>
$cb->($arg1)->($arg2)->...
<pippijn>
and every time, it wraps the resulting curried function
<pippijn>
this works and doesn't need another C function
<mrvn>
only for a limited number or args
<pippijn>
yes
<pippijn>
mrvn: I think to_sv doesn't type with that way
<pippijn>
of course, it could, if the external function is typed in an unsound way :)
<pippijn>
right now, it segfaults if perl doesn't provide the correct number of arguments
<pippijn>
I think I'll put in a check for that
<pippijn>
done
<pippijn>
Fatal error: exception Failure("expected 2 args, got 1 at -e line 8.
<pippijn>
")
ggole has quit []
dpk` has left #ocaml []
ohama has quit [K-Lined]
<pippijn>
mrvn: do I need to take special care with caml_failwith?
<pippijn>
cleaning up some frames or something?
<pippijn>
I get Fatal error: out of memory.
darkf has joined #ocaml
<pippijn>
coming from ocaml
<pippijn>
I get that on the next call after having raised and caught an exception
<pippijn>
hm, something bad happens
gour has joined #ocaml
<pippijn>
ah, my mistake
<pippijn>
mrvn: exceptions work now
<pippijn>
mrvn: version 9.0 is ready ;)
ollehar has quit [Quit: ollehar]
_andre has quit [Quit: leaving]
<jpdeplaix>
gasche_: about my feedback for -plugin-tags is that we should have a warning/error if there is no myocamlbuild.ml and be careful for ocamlbuild functions used in toplevel (like it is the case in ocamlbuild-js_of_ocaml) because nothing will be really executed
tani has joined #ocaml
ihm1 has joined #ocaml
tane has quit [Ping timeout: 264 seconds]
<adrien>
wmeyer``: \o/
<adrien>
wmeyer``: well, for the disabled warning, if it includes the config, there will always be unused variables; that said, I always welcome proofreads, comments and betters patches
<Kelet>
Ouch, was looking forward to reading Real World OCaml this weekend (new to the language), but had no idea about Core (used in the book), which apparently does not have a viable Windows port at the moment. Opam also lacking a port. Hopefully one day the OCaml community gets some more people interested in porting.
<adrien>
we have interest in porting, definitely
<adrien>
that opam is ported or not is a 3rd-party tooling issue actually
<adrien>
about core, I don't know the details but I guess it binds some low-level C functions that aren't available on Windows
<adrien>
there's µCore (or something like that) which aims at doing a small Core library without these unportable bits afaik
<Kelet>
adrien, Thanks for the response. Do you know of any bug reports or additional information I could see on what's holding the Windows port of Core?
<adrien>
no, I don't use Core
<adrien>
actually, if I had to find out what the issues were, I'd probably get the sources and grep for "^external.*" and look at the C functions that are involved
<adrien>
(the "external" keyword means it's not a C function)
<kerneis>
adrien: you mean it *is* a C function
gour has quit [Quit: WeeChat 0.4.1]
<adrien>
when it's not an OCaml function, yes :)
<adrien>
it could be a function in any language that has the proper calling convention :)
<adrien>
thanks for catching that
<adrien>
going to bed now :P
dsheets has joined #ocaml
dtg_ has quit [Read error: Connection reset by peer]
dtg has joined #ocaml
tani has quit [Quit: Verlassend]
<GlenK>
adrien: thanks for the info
<GlenK>
kerneis: I will definitely check out opam, thanks.
mort___ has quit [Ping timeout: 245 seconds]
UncleVasya has quit [Ping timeout: 245 seconds]
dnm has quit [Read error: Connection reset by peer]
dnm has joined #ocaml
demonimin_ has joined #ocaml
demonimin has quit [Ping timeout: 245 seconds]
chambart has joined #ocaml
demonimin_ is now known as demonimin
<GlenK>
haha, I want opam to get ocaml. But I need ocaml to compile opam. sucky
<GlenK>
seems I want ocamlbrew then?
<GlenK>
god damn, the ocaml pros are far from web development pros though. that site is starting to hurt my feelings.
<mfp>
GlenK: broken CSS :/ <- any OCamlPro guys listening? you can disable the .anchor-toc rule to prevent eye cancer
ollehar has joined #ocaml
q66 has quit [Quit: Leaving]
ben_zen has joined #ocaml
Simn has quit [Quit: Leaving]
q66 has joined #ocaml
<pippijn>
mrvn: this is odd..
<pippijn>
mrvn: it gets slowel
<pippijn>
slower*
<pippijn>
after some time
<pippijn>
after a short time, actually
<chambart>
mfp: thanks
<chambart>
this should be fixed in the next generation batch
<mfp>
chambart: great, thanks!
<mfp>
chambart: you should also freeze the repository while you're at it ;-) < heh @ 512 packages
<pippijn>
the number of calls before failure is perfectly deterministic
<pippijn>
the weird string is not
ihm1 has quit [Quit: ihm1]
<pippijn>
but it depends on how many calls per cycle I make
<pippijn>
with 100K calls per cycle, I get the failure after 515726, with 99K calls it doesn't happen at all, with 98K it happens after 405267
<pippijn>
oh well, it depends on some other things, as well, because now I changed some other code and it doesn't happen at 100K anymore
<pippijn>
specifically, I added one printf and two calls to Unix.gettimeofday
ollehar has quit [Ping timeout: 240 seconds]
<GlenK>
man...ocamlbrew is nice, real nice. but it's bugging me in that when I set OCAMLBREW_BASE to something, stuff goes into $OCAMLBREW_BASE/ocamlx.x.x/bin and whatnot as opposed to $OCAMLBREW_BASE/bin and whatnot. ah well. easily remedied I guess. Just gotta muck with my path some more
<pippijn>
I'm going to blame perl for now :)
ben_zen has quit [Ping timeout: 240 seconds]
<CissWit>
is there an equivalent to "Unix.select" for ocaml in and out channel ?
<CissWit>
i want to use channels as it looks much easier to do "lexbuf = Lexing.from_channel" instead of creating a new lexbuf for every received string
<CissWit>
but i also have many connections and select is nice to deal with this
<def-lkb>
Unix.in_channel_of_descr then Unix.select ?
<GlenK>
argh! haha. opam is installing stuff to ~/.opam now. this is getting messy
<CissWit>
well, here is what i'm doing: http://pastebin.com/2wqY1TZm it doesn't work because it seams that the "channel" mecanism reads all the byte available in in the socket and buffers it in some way. So, if i receive two messages at once, my loop only read the first one
<CissWit>
the lexbuf was initialized with "Unix.in_channel_of_descr"
<pippijn>
mrvn: finally I ran into a GC problem :)
<pippijn>
mrvn: where CAMLlocal etc. were required and I didn't have them
<pippijn>
mrvn: those things are apparently *very* rarely a problem (once in several hundred thousand calls), but they happen