<Algebr>
....next time someone compares # of packages on npm to opam as measure of community
<Drup>
it's not a parody ?
yunxing has quit [Ping timeout: 244 seconds]
<Algebr>
doesn't seem so
<Algebr>
you can't make this up.
yunxing has joined #ocaml
<Algebr>
if you dig around their other libs, you'll find other goodies like :"...Functional version of &&"
<Algebr>
orbifx: line 60 looks suspcious? enters a blocking section but never leaves it?
<orbifx>
Will check in a little while Algebr, thanks
ollehar has quit [Remote host closed the connection]
ollehar has joined #ocaml
ollehar has quit [Client Quit]
Vintila has quit [Ping timeout: 244 seconds]
struk|desk|away is now known as struk|desk
<orbifx>
Algebr will check it and get back to you tomorrow
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
toolslive has quit [Ping timeout: 246 seconds]
<seangrove>
Don't mean to start a flamewar by any means, but is it fair to ask (as a newb) if the biggest advantage of lwt over Async is that lwt doesn't have any unix deps?
Emmanuel`_ has quit [Client Quit]
Emmanuel`_ has joined #ocaml
<Algebr>
i think the biggest adv of lwt over core is that most open source uses lwt
Ravana has quit [Ping timeout: 248 seconds]
struk|desk is now known as struk|desk|away
Ravana has joined #ocaml
silver has quit [Quit: rakede]
manizzle has quit [Ping timeout: 260 seconds]
toolslive has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
shinnya has quit [Ping timeout: 248 seconds]
<seangrove>
Algebr: Is that just momentum, or is there anything else?
<seangrove>
Bit nervous committing to lwt over Async having not built anything of size in async
<Drup>
if you are doing mirage things, I don't see any choice anyway.
<Drup>
(and js_of_ocaml is in a similar situation. Even if it may change soon-ish, you still have the core dependency, which makes js files enormous)
manizzle has joined #ocaml
<Drup>
He, I needed a quick benchmark for my printer. I created fibonacci divs !
pierpa has quit [Ping timeout: 268 seconds]
yunxing has quit [Remote host closed the connection]
Algebr has quit [Remote host closed the connection]
fluter has joined #ocaml
pyon has quit [Quit: ... the fear fades away.]
Algebr has joined #ocaml
pyon has joined #ocaml
jeffmo has quit [Quit: jeffmo]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
<seangrove>
Algebr: Up to meet and chat on Thursday?
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
seangrove has quit [Ping timeout: 268 seconds]
manizzle has quit [Ping timeout: 250 seconds]
tennix has quit [Ping timeout: 260 seconds]
phay_ has joined #ocaml
phay_ is now known as FredF
ygrek_ has quit [Ping timeout: 250 seconds]
Algebr` has joined #ocaml
yunxing has joined #ocaml
yunxing has quit [Remote host closed the connection]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
copy` has quit [Quit: Connection closed for inactivity]
tennix has joined #ocaml
wiredsister has joined #ocaml
kushal has quit [Quit: Leaving]
therac25 has quit [Quit: therac25]
kushal has joined #ocaml
johnelse has quit [Ping timeout: 250 seconds]
johnelse has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
wiredsister has quit [Ping timeout: 248 seconds]
ryuo has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
manizzle has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
iorivur has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
aantron has quit [Remote host closed the connection]
hydan has joined #ocaml
Algebr` has quit [Remote host closed the connection]
therac25 has joined #ocaml
noddy has quit [Ping timeout: 240 seconds]
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
therac25 has quit [Quit: therac25]
nicholasf has quit [Ping timeout: 244 seconds]
MercurialAlchemi has joined #ocaml
struk|desk|away is now known as struk|desk
larhat has quit [Quit: Leaving.]
seangrove has joined #ocaml
Mercuria1Alchemi has joined #ocaml
ygrek has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
<Leonidas>
Algebr: also, the dependency chain of Lwt is far smaller than Async
struk|desk is now known as struk|desk|away
therac25 has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
atbagautdinov has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
seangrove has quit [Ping timeout: 250 seconds]
Simn has joined #ocaml
toolslive has quit [Ping timeout: 246 seconds]
atbagautdinov has left #ocaml ["ERC (IRC client for Emacs 25.1.50.2)"]
teknozulu has quit [Ping timeout: 240 seconds]
struktured has joined #ocaml
toolslive has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
therac25 has quit [Quit: therac25]
ais523 has joined #ocaml
butts_butts has joined #ocaml
<ais523>
I'm trying to write some code in which I provide a polymorphic function f as an argument to a function g, and function g calls function f twice, with a different type each time
<ais523>
simply writing the function directly causes type inference failures; the type of f is inferred to something specific at one use site and then it won't let me call it with a different type at the other
<ais523>
what solutions are available to the issue? (worst case I can just write two copies of f, but that's fairly ridiculous…)
<adrien>
can you show the code?
<adrien>
the code you have so far*
seangrove has joined #ocaml
<ais523>
adrien: the actual code is too complicated to show easily and has a lot of irrelevant extra things involved, but here's a minimal example:
<ais523>
let g (f : 'a -> unit) = (f 1; f "a")
<adrien>
what about f? (or at the very least, its signature)
<ais523>
adrien: let f _ = () would work
<ais523>
it has type 'a -> unit in this example
<adrien>
but yours?
<ais523>
it's about three levels worth of nested variants and polymorphic variants with type parameters
<adrien>
if it's buried in code, you can trigger an error by using ": int"
<adrien>
like
<adrien>
let f _ : int = ()
<adrien>
well, almost, bad example
<ais523>
the problem is not with the type of f; but if I swap identifiers out, I get
<ais523>
(('a1, 'b) c, 'a1) d -> (('a2, 'b) c, 'a2) d
<ais523>
as the type of f
<def`>
ais523: second rank polymorphism can be introduced via records or objects
<ais523>
in this case. g uses the same values for 'a1 and 'a2 at every callsite, but different values for 'b
<ais523>
def`: ah good, this is the sort of answer I was hoping for
<ais523>
(I'd realised it was rank 2 polymorphism)
<ais523>
how do I do it with a record? just one field that has the desired polymorphic type, then access via the record type?
seangrove has quit [Ping timeout: 260 seconds]
<def`>
type t = {f : 'a. 'a -> int}
<ais523>
thanks
<ais523>
let's try this
<def`>
let g t = t.f 5, t.f ()
<def`>
;;
<def`>
g {f = ignore}
<ais523>
yep, that works
<ais523>
thanks
<def`>
np
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
mietek has quit [Ping timeout: 260 seconds]
butts_butts has quit [Ping timeout: 244 seconds]
mietek has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
struktured has quit [Ping timeout: 268 seconds]
sgnb has joined #ocaml
larhat has joined #ocaml
ais523 has left #ocaml ["<fungot> fizzie: it makes demons fly out of my window, washing the windows api"]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
djellemah has quit [Ping timeout: 248 seconds]
Sorella has quit [Quit: Connection closed for inactivity]
seangrove has joined #ocaml
seangrove has quit [Ping timeout: 252 seconds]
slicefd has joined #ocaml
seangrove has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
seangrove has quit [Ping timeout: 246 seconds]
Emmanuel`_ has quit [Client Quit]
Emmanuel`_ has joined #ocaml
freehck has joined #ocaml
ontologiae has joined #ocaml
orbifx has quit [Quit: AtomicIRC: The nuclear option.]
orbifx has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
sepp2k has joined #ocaml
Emmanuel`_ has joined #ocaml
nicholasf has joined #ocaml
Vintila has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
ygrek has quit [Ping timeout: 244 seconds]
jwatzman|work has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
seangrove has joined #ocaml
silver has joined #ocaml
malc_ has joined #ocaml
seangrove has quit [Ping timeout: 264 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
Kakadu has joined #ocaml
ibor has quit [Ping timeout: 248 seconds]
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
copy` has joined #ocaml
nicholasf has quit [Client Quit]
struktured has joined #ocaml
ibor has joined #ocaml
<orbifx>
Algebr: here?
<companion_cube>
o/
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
_andre has joined #ocaml
ggole has joined #ocaml
FredF has quit [Remote host closed the connection]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
seangrove has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
seangrove has quit [Ping timeout: 240 seconds]
<MasseR>
has someone been able to build ppx with 4.0.2 modular implicits branch?
<mrvn>
Kakadu: not required. but I think c++11 is.
darkf has quit [Quit: Leaving]
hannes has quit [Ping timeout: 260 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
hannes has joined #ocaml
<toolslive>
I have a question regarding opam's "depexts" when exactly is this executed ? (I need to have an OS library installed before the build of the opam package starts)
<mrvn>
Kakadu: any idea why the painter#fillRect segfaults?
<mrvn>
Kakadu: what does -Dprivate=public do?
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
rand__ has joined #ocaml
<Kakadu>
mrvn: Not studied crash yet, it doesn't compile
<mrvn>
Kakadu: Putting `pkg-config ...` in CCOpt executes that for every single file it compiles. isn't there a way to run that once only in oasis?
<Kakadu>
no idea?
<Kakadu>
no
<mrvn>
Kakadu: huh? because of tzhe qt5 path?
<Kakadu>
no idea
fraggle_ has quit [Read error: Connection reset by peer]
<Kakadu>
without question mark
<Kakadu>
anyway
<Kakadu>
I'm going to get rid of oasis in lablqt
<Kakadu>
i'm tired from this shit
Emmanuel`_ has quit [Quit: Konversation terminated!]
Vintila has quit [Ping timeout: 260 seconds]
Emmanuel`_ has joined #ocaml
<flux>
kakadu, btw, does lablqt provide access to qgraphicsscene?
fraggle_ has joined #ocaml
<flux>
I'm guetting a bit tired on lablgtk+cairo :/, it has some drawing issues when it gets cpu-bound
MercurialAlchemi has joined #ocaml
seangrove has joined #ocaml
<Kakadu>
flux: It doesn't because it is oriented on QtQuick
<Kakadu>
flux: but I probably can add some ad-hoc support but I'm not sure that it is right thing to do
<Kakadu>
You can proably do something like this in QtQuick
<Kakadu>
When I discussed QtQuick 2D software renderer the guys told me that the right approach is to rewrite everyting from QGraphsciScene to QtQuick
<Kakadu>
So, maybe it is right thing to do
<Kakadu>
Anyway, I beleive that code will be simpler
MercurialAlchemi has quit [Ping timeout: 244 seconds]
seangrove has quit [Ping timeout: 276 seconds]
Haudegen has quit [Ping timeout: 244 seconds]
seangrove has joined #ocaml
seangrove has quit [Ping timeout: 268 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
aantron has joined #ocaml
Emmanuel`_ has joined #ocaml
<Kakadu>
hmmm, GDB says that something os wrong on line 0xb76303a0 in QRasterPaintEngine::fillRect (this=0x825d8c0, r=..., color=...) at painting/qpaintengine_raster.cpp:1826
<Kakadu>
1826 sorted.reserve(pointCount);
<Kakadu>
mrvn: You can compile Qt with debug support
<Kakadu>
It will give more detailed backtrace
<mrvn>
but both the rect and the color seem fine.
<Kakadu>
Yeah, thay seems fine
<Kakadu>
where fine = printable
<mrvn>
My guess is that some memory gets reused and the finalisers overwrite some reallocated memory.
<mrvn>
Kakadu: printable and print the right values.
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
MercurialAlchemi has joined #ocaml
BitPuffin has joined #ocaml
Haudegen has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 276 seconds]
Kakadu has quit [Ping timeout: 250 seconds]
dwillems has joined #ocaml
<dwillems>
Hi everyone. Is it possible to define a list of module which have the same type ?
<mrvn>
yes
Kakadu has joined #ocaml
<dwillems>
define a "type t = (sig val a : string end) list" for example
mettekou has joined #ocaml
<mrvn>
# module type M = sig val a : string end type t = (module M) list;;
<mrvn>
module type M = sig val a : string end
<mrvn>
type t = (module M) list
<mrvn>
I don't think you can define the module type inline.
<dwillems>
Great ! Thanks.
<def`>
yep, only paths (with optional constraint list) are accepted in package type, no other module expression
doomy has joined #ocaml
<doomy>
hi
<lyxia>
doomy: hello
<Anarchos>
hi doomy
<Anarchos>
hi lyxia
seangrove has joined #ocaml
pierpa has joined #ocaml
<mrvn>
Kakadu: How do you get your lablqml to build without linking to qt? I get lots and lots of undefined references.
<mrvn>
(in my qt5)
ohama has quit [Ping timeout: 260 seconds]
aantron has quit [Quit: Leaving...]
<orbifx>
mrvn it does link to qt
<mrvn>
orbifx: it doesn't specify CCLib anywhere
ohama has joined #ocaml
<orbifx>
I think the final app has to do the linking
<orbifx>
this is one test app I'm working on just now
<Kakadu>
mrvn: There are linking problems which building an executable with oasis
<Kakadu>
building cmas is fine
<mrvn>
orbifx: The test1 test case should be linking to qt
<Kakadu>
not idea why yet
<mrvn>
Kakadu: You have to specify CCLib: -l...., but `pkg-config ...` doesn't work there.
<mrvn>
at least I can't get it to work
<mrvn>
CCLib: -lQt5Widgets -lQt5Gui -lQt5Core -lstdc++ works fine but not pkg-config
seangrove has quit [Ping timeout: 244 seconds]
Vintila has joined #ocaml
seangrove has joined #ocaml
vhf has left #ocaml ["WeeChat 0.4.2"]
mettekou has quit [Read error: Connection reset by peer]
malc_ has left #ocaml ["ERC (IRC client for Emacs 25.0.50.2)"]
silver has quit [Quit: rakede]
<orbifx>
mrvn: look at what pkg-ocnfig returns the way you call it
<orbifx>
it's a command
_2can has quit [Ping timeout: 264 seconds]
_2can has joined #ocaml
<mrvn>
orbifx: -lQt5Widgets -lQt5Gui -lQt5Core
<doomy>
I'm using opam (1.2.0), ocaml v4.02.3 and oasis (v0.4.5 , installed with opam), and I couldin't find a way to use/link with Big_int module. I have a link error "Reference to undefined global `Big_int'"
<mrvn>
orbifx: CCOpt evalutes `` but CCLib takes it verbatim and complains.
<doomy>
opam doesn't seem to have a big_int package
<doomy>
what am I missing ?
<orbifx>
doomy: BigNumbers?
<orbifx>
mrvn: hmm dunno about that
<orbifx>
doomy: actually didn't see your first message
<Kakadu>
Everybody should call me "Oh, Great Kakadu" :)
kushal has quit [Quit: Leaving]
<orbifx>
:P
<orbifx>
There is one more bug before that greatness
<orbifx>
but way to go on fixing that bug
<Anarchos>
Kakadu: if you use reinterpret_cast.... I can't stand black magic !
dwillems has quit [Ping timeout: 250 seconds]
<flux>
yeah, much nicer to use c-style casts, they don't -look- as dangerous ;)
<flux>
kakadu, well if that's the right thing to do then I certainly should consider that
<Kakadu>
Also, I heared that we should pass C++ pointer to ocaml with wrapping with Abstract_tag
<Kakadu>
Don't know exactly why it should be done
<Kakadu>
mrvn: It seems that you don't do this
<flux>
instead of passing them directly you mean?
<flux>
I have these ffmpeg bindings under construction and so far I've just passed the pointers as-is :)
<flux>
but I guess they need to be boxed to work nicely with gc..
tennix has joined #ocaml
<flux>
(now it's unsafe as the user needs to be able to dispose the objects manually so the pointers become invalid)
manizzle has quit [Remote host closed the connection]
manizzle has joined #ocaml
<ggole>
Warning 18: this ground coercion is not principal. Eh?
<ggole>
If I annotate the coerced variable with the same type that is inferred the warning goes away.
seangrove has joined #ocaml
kushal has joined #ocaml
<flux>
"When in doubt, Obj.magic." -Xavier Leroy
seangrove has quit [Ping timeout: 260 seconds]
seangrove has joined #ocaml
Mercuria1Alchemi has quit [Ping timeout: 252 seconds]
MercurialAlchemi has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
badon has quit [Disconnected by services]
badon_ has joined #ocaml
badon_ is now known as badon
djellemah has joined #ocaml
mettekou has joined #ocaml
regnat has quit [Quit: WeeChat 1.4]
regnat has joined #ocaml
rom1504_ is now known as rom1504
pyon has quit [Quit: ... the fear fades away.]
quicquid has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
sgeisenh has joined #ocaml
ibor has quit [Read error: Connection reset by peer]
slicefd has quit [Quit: WeeChat 1.4]
Emmanuel`_ has quit [Quit: Konversation terminated!]
ibor has joined #ocaml
Emmanuel`_ has joined #ocaml
sepp2k has quit [Quit: Leaving.]
<orbifx>
Anyone here proficient with C to OCaml callbacks?
aantron has joined #ocaml
<mrvn>
Kakadu: how does anything you did change anything? dynamic_cast checks the cast, you just assume the pointer is right. That's not always the case with multiple inheritance.
pyon has joined #ocaml
<mrvn>
orbifx: slightly
<mrvn>
Kakadu: The reason you should not pass C pointers to ocaml is that the pointer might get freed, then the ocaml heap grows and suddenly the pointer points inside the heap and the Gc crashes. My C++ objects only get freed when the ocaml object holding them dies or they invalidate the pointer. Should be save.
<orbifx>
mrvn: I've been trying to figure out of a crash that occurs in a code for about 2 days now
<mrvn>
There should be an equivalent for CAMLreturn* that doesn't return, one that can be used as ... { CAMLenter(); CAMLlocal1(val); ... CAMLleave(); } ...
<mrvn>
orbifx: not exactly. it tells the Gc that a value is stored there keeping things alive and when it moves something it needs to update that value.
<mrvn>
orbifx: which also means you must never access the value without holding the runtime lock
<orbifx>
thanks man this helps
<orbifx>
what's the best way to learn about the GC?
<orbifx>
(i'm writing the nested lambdas in teh meantime)
<mrvn>
I just read the chapter about interfacing with the Gc.
Emmanuel`_ has quit [Quit: Konversation terminated!]
<orbifx>
in manual?
<mrvn>
orbifx: youyep.
Emmanuel`_ has joined #ocaml
<orbifx>
ok
<mrvn>
did you look at my Signal class?
wiredsister has joined #ocaml
<orbifx>
briefly
<orbifx>
what am I looking for?
<orbifx>
I kept the tab to read it after fixing this issue
<mrvn>
orbifx: it currently leaks memory, the closurep is never freed.
<orbifx>
ok
<orbifx>
what's your plan? register it with the GC?
<mrvn>
orbifx: but it shows how to allocate space for the closure and register it with the Gc.
<mrvn>
it's registered. but it needs to be managed by the signal. Removed when the object dies or the connection is disconnected.
cdidd has quit [Ping timeout: 260 seconds]
<orbifx>
My eye caught something about registering finalisers
<orbifx>
can you not do that for when the object dies?
<mrvn>
The object being the QT object. QT calls the destructor. They are not managed by the Gc.
<mrvn>
E.g. when you connected to a window and the window closes then the connection needs to be broken.
<orbifx>
is that what you meant by nested lambdas?
<orbifx>
ooops
<pippijn>
who writes C++ in .c files?
<orbifx>
just noticed the return shouldn't be tehre
<mrvn>
I will probably stuff the closure into the Connection object returned by the connect(), add a hashtable of active connections, add a disconnect function to remove one and disconnect all in the destructor.
<mrvn>
pippijn: people working around myocamlbuild not knowing what c++ is.
<pippijn>
:\
<pippijn>
ok
<orbifx>
mrvn: Whilst I appreciate your work on wrapping Qt.. After having used it for a long while, I found it uber tedious.
<pippijn>
yeah, I remember that.. I wrote ocamlbuild rules for C++ instead
<mrvn>
orbifx: I think you need to add () after the inner lambda to invoke it.
pierpa has quit [Ping timeout: 252 seconds]
<orbifx>
mrvn: running now
<orbifx>
I will push for you to check too
<mrvn>
orbifx: you should have used a gist for it :)
<orbifx>
I will be making a pull request after it's fixed
<orbifx>
this is Kakadu's project
<orbifx>
so far so good.. it's running
<mrvn>
just remember to squash all the broken commits.
<mrvn>
It might be better to put propName and var into the [] instead.
<orbifx>
you reckon it doesn't optimise them?
<mrvn>
for the inner one. BInding them instead of passing them again as arguments.
<mrvn>
just style wise.
<orbifx>
fair enough will do
<orbifx>
21K counts so far and no crash
<orbifx>
man if that was it.. been in a crazy rush the past few days. I've been late for my project already and a spanner like that was last I needed.
<orbifx>
so let's recap so that I can learn out of this conundrum
<orbifx>
What were the problems here mrvn ?
<orbifx>
CAMLparamX and CAMLlocal need to be in then lock?
<orbifx>
always?
schive has joined #ocaml
<mrvn>
orbifx: you should have something like: class CamlRuntimeSystem { CamlRuntimeSystem(lambda_type lambda) { caml_acquire_runtime_system(); lambda(); } ~CamlRuntimeSystem() { caml_release_runtime_system(); }
<mrvn>
orbifx: yes, that's was my guess.
<mrvn>
orbifx: I think I will make C++ classes reimplementing CAMLparam/CAMLlocal in a RAII fashion.
<orbifx>
I'd like to have an extensive discussion at some point about ocaml, gui's and qt
<mrvn>
back in a while
<edwin>
companion_cube: got a bit more feedback on your new qcheck. would you like me to summarize here, or just write up some issues on github?
thomasga has quit [Quit: Leaving.]
<companion_cube>
maybe in pv, so as not to pollute the chan
<edwin>
sure
yunxing has joined #ocaml
thomasga has joined #ocaml
larhat has quit [Quit: Leaving.]
thomasga has quit [Client Quit]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
thomasga has joined #ocaml
thomasga has quit [Client Quit]
Guest87501 is now known as nore
mettekou has quit [Read error: Connection reset by peer]
thomasga has joined #ocaml
<mrvn>
re
<companion_cube>
.str
shinnya has joined #ocaml
<orbifx>
mrvn: thanks again btw, huge boost
slash^ has joined #ocaml
yunxing has quit [Remote host closed the connection]
<companion_cube>
orbifx: now you can write stuff on ctypes on ocaml.org! ;)
<orbifx>
huh?
yunxing has joined #ocaml
yunxing has quit [Remote host closed the connection]
<seangrove>
companion_cube: It also has a dependency on Netdate
<flux>
algebr, rename then better?-)
<Algebr>
heh
pierpa` has joined #ocaml
<seangrove>
I know I'm not yet qualified to speak to too much of Pervasives, but I already *really* wish there were uri and date types included in core OCaml
<Algebr>
sure you are!
<flux>
it would be nifty if instead of that it was possible to generate a named record with those fields
<Algebr>
I've used calendar
<flux>
but I guess some meta programming would be required for that
Druup has joined #ocaml
<Algebr>
TIL: values declared in modules in .ml are visisbile to everything else in the same .ml even if the .mli doesn't expose every value of a submodule in the mli
cschneid- has joined #ocaml
Drup has quit [Ping timeout: 240 seconds]
teiresias has quit [Ping timeout: 250 seconds]
l1x has quit [Ping timeout: 250 seconds]
NhanH has quit [Ping timeout: 250 seconds]
dch has quit [Ping timeout: 250 seconds]
oldmanistan_ has quit [Ping timeout: 250 seconds]
bitbckt has joined #ocaml
jmasseo_ has quit [Ping timeout: 250 seconds]
bitbckt has quit [Ping timeout: 250 seconds]
cschneid_ has quit [Ping timeout: 250 seconds]
l1x_ is now known as l1x
oldmanistan__ is now known as oldmanistan_
bitbckt is now known as Guest23093
wiredsis` has joined #ocaml
flx has joined #ocaml
wiredsister has quit [Remote host closed the connection]
pierpa` has quit [Read error: Connection reset by peer]
NhanH_ is now known as NhanH
Kakadu has joined #ocaml
<companion_cube>
seangrove: they should be in the stdlib, agreed, but not in Pervasives
dch_ is now known as dch
flux has quit [Ping timeout: 246 seconds]
pierpa` has joined #ocaml
flx is now known as flux
sgeisenh has joined #ocaml
orbifx has quit [Ping timeout: 252 seconds]
pierpa` has quit [Read error: Connection reset by peer]
<seangrove>
companion_cube: Heh, I don't even know the difference, apparently ;)
<seangrove>
But yes, stdlib
<companion_cube>
Pervasives is the module that is automatically "open"'d in every file
<seangrove>
A pretty crucial point for compatiblity across libs, and for making things more modular
<companion_cube>
the thing is, OCaml maintainers don't want new stuff to move into the stdlib, because 1/ they have to maintain it 2/ it becomes much harder to modify, release, etc. since it's tied to OCaml releases themselves
<companion_cube>
yeah, what I would like is shared type definitions
<seangrove>
Yeah, that may be enough
slash^ has quit [Read error: Connection reset by peer]
larhat has joined #ocaml
foocraft has joined #ocaml
<Algebr>
a record of just bools should work if I just do {true; true; true;}
thomasga has quit [Quit: Leaving.]
yan has joined #ocaml
<yan>
is anyone familiar with a way to use ocaml bindings to c++ to treat a graph of c++ objects as ADTs in ocaml? i.e. so i can define a visitor/traversal strategy in ocaml on a graph of c++ objects
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
<companion_cube>
not that I know of
<yan>
companion_cube: i'm currently thinking just creating an ipc mechanism where each node is serialized and ocaml side requests for children/neighbors
<companion_cube>
that's a possbility
<companion_cube>
with protobuf or the something similar?
<yan>
likely protobuf, yeah
<yan>
although ocaml protobuf support looks weak
<yan>
(background: i'm trying to model a set of ASTs and CFGs of programs in C++ and create analysis passes as ocaml visitors)
<Algebr>
protobuf has like 3 implements in ocaml
<Algebr>
plus a ppx deriving thing
nicholasf has joined #ocaml
superboum_ has joined #ocaml
nicholasf has quit [Remote host closed the connection]
nicholasf has joined #ocaml
nicholasf has quit [Remote host closed the connection]
octachron has joined #ocaml
nicholasf has joined #ocaml
cat5e has quit [Read error: Connection reset by peer]
Soni has joined #ocaml
Soni is now known as cat5e
butts_butts has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
TheLemonMan has joined #ocaml
Anarchos has joined #ocaml
darkf has joined #ocaml
theblatte has joined #ocaml
seangrove has quit [Ping timeout: 244 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
foocraft has quit [Ping timeout: 264 seconds]
foocraft has joined #ocaml
thomasga has joined #ocaml
malc_ has joined #ocaml
Guest23093 is now known as bitbckt
bitbckt has quit [Changing host]
bitbckt has joined #ocaml
malc_ has quit [Ping timeout: 248 seconds]
BitPuffin has quit [Ping timeout: 244 seconds]
malc_ has joined #ocaml
_andre has quit [Quit: leaving]
Haudegen has quit [Ping timeout: 246 seconds]
foocraft has quit [Ping timeout: 276 seconds]
octachron has quit [Ping timeout: 244 seconds]
th5 has quit [Quit: th5]
malc_ has quit [Quit: ERC (IRC client for Emacs 25.0.50.2)]
<lobo>
i'm trying to write a custom reporter for the logs library, but i'm unable to extract the text message from a log entry. maybe someone got some spare time to have a look at line 22 http://paste.headstrong.de/view/a9395b7f
<lobo>
i also don't unterstand, why calling msgf changes the return type of the reporter function
foocraft has joined #ocaml
<companion_cube>
there's a lot of "format" magic in there
<companion_cube>
I hope you use merlin
wolfcore has quit [Ping timeout: 244 seconds]
AlexRussia has joined #ocaml
<lobo>
companion_cube: yes i do. i spent some time reading the format documentation today, but i'm still not fully enlightened :D
<companion_cube>
maybe you can start with the defautl reporter of logs
<lobo>
companion_cube: thx. i've only read the format doc and the tutorial on the module so far
<companion_cube>
it's not easy :D
<lobo>
i've spent the last couple of hours reading the logs module. it has good documentation, but i still don't understand it entierly. but maybe understanding the format module first is the right way to go :D
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
octachron has joined #ocaml
wolfcore has joined #ocaml
schive has quit [Quit: Leaving]
nicholasf has quit [Remote host closed the connection]
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
<thomasga>
I think you want to use Format.std_formattter (insead of str)
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
nicholasf has quit [Ping timeout: 248 seconds]
foocraft has quit [Remote host closed the connection]
<lobo>
thomasga: actually i need the log message text as string/bytes to convert it into a syslog message. because i want to send it via udp to a remote host afterwards
orbifx has joined #ocaml
<thomasga>
ha, so you might need to flush the string formatter then
quicquid has left #ocaml [#ocaml]
<Algebr>
tried refactoring some of my lwt_logging code and now nothing is being printed to the syslog. Lwt log is so poorly documented/understood; dislike this magic
<Algebr>
okay WOW, you can't do Lwt_log.add_rule "*" more than once on different levels
MercurialAlchemi has quit [Ping timeout: 248 seconds]
<lobo>
thomasga: thx. i'll give it a try
mettekou has quit [Ping timeout: 244 seconds]
BitPuffin has joined #ocaml
silver_ has joined #ocaml
<orbifx>
thomasga: handy, didn't know about "%!"
silver has quit [Ping timeout: 252 seconds]
butts_butts has quit [Ping timeout: 240 seconds]
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
silver__ has joined #ocaml
silver_ has quit [Ping timeout: 240 seconds]
silver has joined #ocaml
Haudegen has joined #ocaml
silver__ has quit [Ping timeout: 248 seconds]
mettekou has joined #ocaml
tane has quit [Quit: Verlassend]
<Algebr>
record_backtrace stays true with a child, correct, say so record_backtrace and then a daemonization
nicholasf has joined #ocaml
mcc has joined #ocaml
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
thomasga has quit [Quit: Leaving.]
cschneid- has quit [Ping timeout: 240 seconds]
averell has quit [Ping timeout: 240 seconds]
BitPuffin|osx has joined #ocaml
oliveira has joined #ocaml
Simn has quit [Quit: Leaving]
BitPuffin|osx has quit [Remote host closed the connection]
BitPuffin|osx has joined #ocaml
BitPuffin has quit [Ping timeout: 268 seconds]
cschneid_ has joined #ocaml
<oliveira>
Hello everyone. I'm a beginner in OCaml and I need help understanding and using modules. I have downloaded an open source library all written in OCaml (libra.cs.uoregon.edu). The library uses oasis to manage the compilation process, and I can compile it fine. But I don't want to use the binaries of this library, I want to use some internal modules
<oliveira>
of it. In resume, I would like to go in a top-level and type in "open libra", just like I do with other modules like "graphics". Can someone give me some insights on this, please? Thank you in advance.
Vintila has joined #ocaml
<Algebr>
if you are using utop, then you can do this in utop: #require "the_library_name";;
<oliveira>
Thx, Algebr. I tried that on utop, but I get "No such package: libra".
<oliveira>
I think that I would need somehow to "install" the library...
<Algebr>
Okay, did you install the library?
<Algebr>
does it have an opam file?
<oliveira>
Yes, I can install the library using opam, just by doing "opam install libra-tk". But even after this I can't use it in utop.
thomasga has joined #ocaml
<Algebr>
okay, do: ocamlfind list | grep libra do you get any hits
<oliveira>
Nothing
Anarchos has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
<oliveira>
After installing the library by uOpam, I only get binaries available...
thomasga has quit [Client Quit]
<Algebr>
okay, looking at the _oasis file seems that the libs are called ext, data, circuit, mn, bn, spn, lbfgs, fminbr, pll, gibbsImpl
<Algebr>
so try one of those with #require instead
<oliveira>
Oh, that makes sense. I'll try now
<oliveira>
Trying "#require "bn";;" gives me "No such package: bn"
<orbifx>
mrvn: here?
<Algebr>
1. make you sure actually installed it 2. do opam switch and if it tells you to do an eval, do it, reopen utop and try again
<Algebr>
ah, bn isn't coming up because it has Install:false written
<Algebr>
oliveira: you should be looking and learning how to read the _oasis file as well
<oliveira>
I am working on that :) I'm following the Tutorials on the website
<Algebr>
actually all the libs in libra-tk have install:false so it seems they only wanted you to have exectuables from command line
<oliveira>
Oh, that's bad... :/ But I do have the source code. Do you think it is possible to make them usable as a modules?
mettekou has quit [Ping timeout: 250 seconds]
<Algebr>
change install:false to install:true for the libs you want, then in root of repo do opam pin add libra-tk . -y
<Algebr>
that might work
<oliveira>
Oh, nice! I'll check that right now. Thank you
<octachron>
oliveira, you might have to copy the opam file from the main opam repository
<oliveira>
Thx, octanchron. I actually can get the whole source code from their website (http://libra.cs.uoregon.edu/), which includes the opam file
<Algebr>
the opam file in the the repo, it was included in opam source libra-tk
<oliveira>
Sorry, I still couldn't make it work.
<oliveira>
After running that commend the installation process went fine, but I still can't "require" any library from utop
<octachron>
oliveira, try deleting the rule for the special install/uninstall scripts in the _oasis file
Reshi has joined #ocaml
<octachron>
i.e the lines starting with XCustomInstall, XCustomUninstall
<oliveira>
Then I just run again the same command? Or should I "uninstall" the libraru first?
<oliveira>
*library
<octachron>
you should probably uninstall first
<octachron>
since you are messing with the un/installation script for the library executables
Emmanuel`_ has quit [Quit: Konversation terminated!]
Emmanuel`_ has joined #ocaml
<oliveira>
Sure! I just run "opam uninstall libra-tk" and now I'm running the "opam pin add libra-tk . -y" again
<oliveira>
I am sorry, same issue :/ If I go at utop and "#require "bn";;" I still get "No such package: bn"
<Algebr>
what about doing `make install`
<oliveira>
But I run it with those "XCustomInstall/Uninstall" or not...?
<oliveira>
(Of course, I'll keep the "Install: true" )
<Algebr>
Druup: does simple using lwt.ppx turn on backtrace support?
<oliveira>
I tried to run "make install" and the installation was successful. Indeed, I can use the binaries, but the modules aren't still available in utop :/
<Algebr>
1. Create a new project and pull out the code you want 2. email maintainers and ask them to let you install libs
<octachron>
oliveira, try also remove the InstallStyle line in the oasis, the PostBuildCommand, do a make distclean and then opam reinstall?
yunxing has quit [Remote host closed the connection]
<oliveira>
Sure, I'll try that one, thx octachron. Also, thx, Algebr, I'll contact them :)
yunxing has joined #ocaml
<oliveira>
Unfortunately, it didn't work, octachron. But I'll contact the maintainers about this situation. Thank you all for the help.