<eikke>
removing the function call overhead by copying the required Buffer functions in a module in the same file, then compiling with agressive inlining, helps +- 10% (asm shows all call's are gone)
ikaros has quit [Remote host closed the connection]
tautologico has quit [Quit: tautologico]
sgnb has quit [Read error: Connection reset by peer]
sgnb has joined #ocaml
sgnb has quit [Read error: Connection reset by peer]
wagle has quit [Remote host closed the connection]
sgnb has joined #ocaml
wagle has joined #ocaml
fraggle_ has joined #ocaml
sgnb has quit [Read error: Connection reset by peer]
sgnb has joined #ocaml
eikke has quit [Ping timeout: 248 seconds]
gnuvince has quit [Quit: C-x C-c]
sgnb has quit [Ping timeout: 246 seconds]
sgnb has joined #ocaml
sgnb has quit [Read error: Connection reset by peer]
sgnb has joined #ocaml
tertl3 has quit [Ping timeout: 252 seconds]
tertl3 has joined #ocaml
mfp has quit [Ping timeout: 245 seconds]
mfp has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]
tautologico has joined #ocaml
Tobu has joined #ocaml
smerz has quit [Remote host closed the connection]
tertl3 has quit [Ping timeout: 244 seconds]
cyphase has quit [Ping timeout: 276 seconds]
ssbr has joined #ocaml
<ssbr>
I figured out what I want! I definitely wish I could do "match x with ((Foo | Bar) (x, y, z)) -> ..."
<ssbr>
hm, but then I'd want a label for whatever Foo | Bar was so that I could return a new Foo/Bar as necessary...
<_habnabit>
match x with Foo (x, y, z) | Bar (x, y, z) -> x + y + z
<ssbr>
_habnabit: that is annoying. Also I'd forgotten my actual problem
<ssbr>
which is Foo (x,y,z) -> blah x y z | Bar (x,y,z) -> blah x y z
<_habnabit>
and why couldn't you write it the way I said?
<ssbr>
_habnabit: oh, because it's really annoying
<ssbr>
_habnabit: it ends up looking like this: match x with Foo (x, y, z) -> let renamed = (rename_params x z) in ((rename_values y renamed), renamed) | Bar (x, y, z) -> let renamed = (rename_params x z) in ((rename_values y renamed), renamed)
<_habnabit>
er, I don't think you read what I said
<ssbr>
I guess I should write that as a function? makes it spaghetti-like
<ssbr>
_habnabit: ehhhhhh! I forgot the last bit
<_habnabit>
note how mine only ahs one ->
<ssbr>
_habnabit: I think it was actually ((rename_values y renamed), Foo x y renamed) or something like thbat
<ssbr>
Foo (x,y,renamed)
<ssbr>
I really wish I had the code in front of me
<_habnabit>
oh, well
<ssbr>
... crap, I mistyped my "actual problem"
<_habnabit>
then I'd write a function, yeah
<ssbr>
_habnabit: sure, except... how?
<ssbr>
Either way I _need_ that (let renamed = ... in ...) bit to be copy-pasted
<_habnabit>
it is kind of a problem that you can't pass around a type constructor like a function
<_habnabit>
I'd like to see the actual code, though :p
<ssbr>
_habnabit: I'll show it to you tomorrow
<ssbr>
I might be misremembering _this_ particular annoying case, although there were others that were less horrible
tertl3 has joined #ocaml
cyphase has joined #ocaml
<ssbr>
anyway, um, yes, I communicated poorly. Hush, I just woke up. :<
tertl3 has quit [Client Quit]
emmanuelux has quit [Ping timeout: 264 seconds]
<wmeyer``>
:)
<wmeyer``>
ssbr: lucky, i am going to bed now
<ssbr>
wmeyer``: hardly lucky. I missed a whole day
<ssbr>
it is midnight here
<wmeyer``>
ssbr: that's exactly what I did yesterday
<wmeyer``>
ssbr: woke up at midnight and started hacking
<wmeyer``>
ssbr: so where are you at, if it's midnight I presume is some way half way to states from UK
<ssbr>
wmeyer``: Toronto!
<wmeyer``>
ssbr: that's pretty cool :)
<ssbr>
it's actually really hot
<ssbr>
and I don't have AC
<wmeyer``>
ssbr: me either - but here is not needed
<ssbr>
Lucky. :)
<wmeyer``>
ssbr: oh, I wish the weather was slighly better - but anyway most of the I spent in the bunker so I don't mind
<wmeyer``>
ssbr: but the beer festival has just started
<ssbr>
Oof. So you're missing that then?
<wmeyer``>
ssbr: today \o/ so I might come out to drink some pints
<wmeyer``>
sometimes I wish the weather was better yes, not that often, in fact i am mostly fine with wearing almost whole year a light jacket
<wmeyer``>
ssbr: Camlp4 let me down again :(
<ssbr>
hahaha
<ssbr>
camlp4 always lets me down :<
<ssbr>
I keep expecting it to be able to grok what it does not grok
<wmeyer``>
ssbr: true, true. :D
<wmeyer``>
but this time I had another weird problem
<wmeyer``>
on saturday night It was generating an additional leading bar in the generated polymorphic variant types
<wmeyer``>
which is strangely fine when you generate OCaml text file
<wmeyer``>
but is not when it performs direct marshaling to the compiler
<wmeyer``>
so it compiles fine - but when you use -pp it gives weir error message
<wmeyer``>
so I work arounded that by using custom ocamlbuild plugin
ztfw`` is now known as ztfw
<wmeyer``>
today there is some problem I've never had before
<wmeyer``>
it generates: let alu stream = fun _ -> raise (Match_failure ("ghost-location", 1, 0))
<wmeyer``>
<wmeyer``>
very helpful isn't it?
<ssbr>
mmm.
<wmeyer``>
I am sure however I handle all the cases
<wmeyer``>
it was working before the refactoring
<wmeyer``>
ups - maybe the list is empty!
<wmeyer``>
so it will generate and empty <:expr<>> or whatever
<wmeyer``>
and camlp4 goes mad
<wmeyer``>
anyway I pretty much done for today
<wmeyer``>
time to take a nap before i start doing C++ :/
lamawithonel has joined #ocaml
<ssbr>
Goodnight
<wmeyer``>
night!
tautologico has quit [Quit: tautologico]
Tobu has quit [Ping timeout: 248 seconds]
BiDOrD_ has joined #ocaml
andreypopp has joined #ocaml
BiDOrD has quit [Ping timeout: 244 seconds]
Tobu has joined #ocaml
lamawithonel has quit [Ping timeout: 246 seconds]
lamawithonel has joined #ocaml
kmicinski has joined #ocaml
jaxtr has quit [Ping timeout: 256 seconds]
jaxtr has joined #ocaml
ftrvxmtrx has joined #ocaml
mrvn_ has joined #ocaml
mrvn has quit [Read error: Operation timed out]
digcon9 has joined #ocaml
hto has quit [Quit: Lost terminal]
pango is now known as pangoafk
kmicinski has quit [Ping timeout: 256 seconds]
ulfdoz has joined #ocaml
andreypopp has quit [Quit: Quit]
ftrvxmtrx has quit [Quit: Leaving]
ulfdoz has quit [Ping timeout: 240 seconds]
untroubled has joined #ocaml
munga has joined #ocaml
sgnb has quit [Remote host closed the connection]
sgnb has joined #ocaml
eikke has joined #ocaml
djcoin has joined #ocaml
Snark has joined #ocaml
zuymanto has joined #ocaml
mika1 has joined #ocaml
cago has joined #ocaml
ftrvxmtrx has joined #ocaml
Tobu has quit [Ping timeout: 272 seconds]
thomasga has joined #ocaml
Tobu has joined #ocaml
Tobu has quit [Ping timeout: 248 seconds]
Tobu has joined #ocaml
tmaedaZ has quit [Ping timeout: 246 seconds]
tmaedaZ has joined #ocaml
zuymanto has quit [Quit: zuymanto]
GPHemsley has quit [Ping timeout: 252 seconds]
GPHemsley has joined #ocaml
GPHemsley has quit [Changing host]
GPHemsley has joined #ocaml
eikke has quit [Ping timeout: 240 seconds]
Hussaind has joined #ocaml
Hussaind has left #ocaml []
zuymanto has joined #ocaml
zuymanto has quit [Quit: zuymanto]
zuymanto has joined #ocaml
zuymanto has quit [Client Quit]
untroubled has quit [Quit: leaving]
eikke has joined #ocaml
munga has quit [Ping timeout: 244 seconds]
_andre has joined #ocaml
maufred has quit [Read error: Operation timed out]
maufred has joined #ocaml
noamsml is now known as noamsml[kersh]
Yoric has joined #ocaml
munga has joined #ocaml
snearch has joined #ocaml
munga has quit [Quit: Ex-Chat]
Sablier has joined #ocaml
thelema has quit [Read error: Operation timed out]
maufred has quit [Ping timeout: 244 seconds]
maufred has joined #ocaml
thelema has joined #ocaml
avsm has joined #ocaml
snearch has quit [Quit: Verlassend]
emmanuelux has joined #ocaml
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
digcon9 has quit [Quit: digcon9]
avsm has quit [Client Quit]
ski has joined #ocaml
avsm has joined #ocaml
leopard2 has joined #ocaml
<leopard2>
Hi anyone around?
<Drakken>
yep
<adrien>
sorry, /me is a square
<leopard2>
Error: Unbound value get_full_path
<adrien>
leopard2: you should pastebin the full code ;-)
<Drakken>
get_full_path isn't defined in that scope.
<leopard2>
Just running a test on Leopard prerr_endline ( get_full_path "/usr/lib/haxe/std/StdTypes.hx");;
<Drakken>
where is gfp defined?
<leopard2>
I was just running a test for Nicolas for haxe issue on leopard just going to try on lion. But newbie to ocaml.
<leopard2>
should the line be different?
<leopard2>
this is the compile line... ocamlopt -o test -cclib libs/extc/extc_stubs.o -cclib -lz libs/extc/extc.cmxa test.ml
<adrien>
get_full_path is probably from extc
Yoric has quit [Ping timeout: 245 seconds]
<adrien>
so, considering the name
<adrien>
try: "Extc.get_full_path"
emmanuelux has quit [Remote host closed the connection]
<f[x]>
live telepathy seance!
<leopard2>
Thanks adrien is the compile info correct for mac?
<leopard2>
its complaining about Unbound Module Extc
emmanuelux has joined #ocaml
<leopard2>
could it be that may ocaml is via mac ports and the poth to extc is wrong?
<leopard2>
path
<adrien>
could be; it's very hard to say since we have little infos
<adrien>
what have you installed? ocaml only? ocaml+haxe? something else?
<leopard2>
I have haxe installed but currently a broken haxe version on leopard only. I have tracked down the break to rev 4188 haxe. And I have ocaml 3.12.1
ski has quit [Ping timeout: 245 seconds]
<leopard2>
its line 1300 or there abouts of typeload.ml this line mfile = Common.get_full_path file; that breaks leopard.
<leopard2>
removing Common.get_full_path and it works fine. So just running a test Nicolas ask me to run. But it's not compiling on Lion on leopard.
<leopard2>
I presuem I should change the compile to make sure extc_stubs.o is found
<leopard2>
presume
ski has joined #ocaml
<leopard2>
I have changed the compile line to... ocamlopt -o test -cclib /usr/lib/ocaml/extc/extc_stubs.o -cclib -lz /usr/lib/ocaml/extc/extc.cmxa test.ml
struktured has quit [Ping timeout: 245 seconds]
<adrien>
and?
Yoric has joined #ocaml
<leopard2>
it is still unbound with or without Extc
<leopard2>
what is -cclib doing?
<adrien>
system linker arguments
<adrien>
tells it to use "-lz"
<leopard2>
Are there path differences between leopard and snowy in ocaml ?
<leopard2>
by the way is there a good book on ocaml, I can never find any at any book stores ( and tried London, Bath, Oxford ).
ski has quit [Ping timeout: 246 seconds]
<adrien>
there's the o'reilly book; now free of charge but not printed
<adrien>
and see ocaml-lang.org
<adrien>
as for your command, what's the error message for the last one?
<leopard2>
is the o'reilly book up to date?
ski has joined #ocaml
<leopard2>
ocamlopt -o test -cclib /usr/lib/ocaml/extc/extc_stubs.o -cclib -lz /usr/lib/ocaml/extc/extc.cmxa test.ml
<leopard2>
File "test.ml", line 1, characters 16-29:
<leopard2>
Error: Unbound value get_full_path
<leopard2>
when I exclude Extc
<leopard2>
and
<leopard2>
File "test.ml", line 1, characters 16-34:
<leopard2>
Error: Unbound module Extc
<adrien>
well, for get_full_path, ask Nicolas what should be the line; it's a library function but you're missing the full path probably
<adrien>
he should know it
<leopard2>
I tried cd /usr/lib/ocaml/extc/ and it takes me to the correct place
<leopard2>
I will have to push back on the email yes I just thought I should try IRC often a good way to get more insight into a language. Thanks for the help anyway.
ski has quit [Ping timeout: 245 seconds]
<adrien>
the issue is that it uses a library that most of us don't know about
<adrien>
("extc")
<leopard2>
how do I check where my Ocaml is running from?
<adrien>
ocamlc -where
<adrien>
it shows the standard library path
<adrien>
but you really should not have two installations of ocaml available at the same time
ski has joined #ocaml
<leopard2>
ocamlc -where
<leopard2>
/opt/local/lib/ocaml
<leopard2>
there is no extc folder in there though can I macport it
<adrien>
ls /usr/bin/*ocamlopt*
<leopard2>
well mine is in usr/lib/ocaml/ does that differ between leopard and snowy?
ski has quit [Ping timeout: 265 seconds]
ski has joined #ocaml
<adrien>
well, not really a matter of mac os x version, more of macports
<leopard2>
Older versions of haxe compiled fine so using macports ocaml should not be a problem or atleast haxe source should no mind
<leopard2>
not mind
Sanders_NL has joined #ocaml
zuymanto has joined #ocaml
cago has quit [Ping timeout: 252 seconds]
kmicinski has joined #ocaml
zuymanto has quit [Quit: zuymanto]
fpz has joined #ocaml
mika1 has quit [Quit: Leaving.]
smiler has left #ocaml []
kmicinski has quit [Ping timeout: 246 seconds]
Tobu has quit [Ping timeout: 272 seconds]
lopex has quit [Read error: Connection reset by peer]
bobry has quit [Read error: Connection reset by peer]
IbnFirnas has quit [Remote host closed the connection]
joewilliams has quit [Remote host closed the connection]
Tobu has joined #ocaml
hto has joined #ocaml
<fpz>
window balance
<orbitz>
hcarty: Hello!
joewilliams has joined #ocaml
Sanders_NL has quit [Remote host closed the connection]
gnuvince has joined #ocaml
Sablier has quit [Quit: Quitte]
kmicinski has joined #ocaml
bobry has joined #ocaml
lopex has joined #ocaml
IbnFirnas has joined #ocaml
ftrvxmtrx has quit [Quit: Leaving]
rwmjones is now known as rwmjones_afk
zuymanto has joined #ocaml
ocp has joined #ocaml
everyonemines has joined #ocaml
eikke has quit [Ping timeout: 252 seconds]
fraggle_ has quit [Read error: Connection reset by peer]
<tchell>
And it segfaults in a different place every time, as judged by printf debugging.
<tchell>
It opens and closes lots of filehandles, uses Pcre, reads a 22GB file line by line... I'm running out of ideas.
<mfp>
tchell: looks like a stack overflow
<tchell>
because of my mutually recursive functions?
<mfp>
next is not tail-recursive
<tchell>
I see.
<mfp>
you are calling read inside a try ... with Not_found -> ...
<tchell>
ok, I can fix that.
<mfp>
the typical idiom to handle that is let ms = try Some (Pcre.extract ...) with Not_found -> None in match ms with Some x -> ... | None -> ...
<mfp>
allowing you to call perform the recursive calls in tail position
<mfp>
-call
<tchell>
Ok.
<tchell>
Great! That seems to work! Thanks!
<mfp>
np
<wmeyer``>
thelema: are you there?
<wmeyer``>
thelema: I was thinking currently about parsing _oasis dependencies, I will push another fix for the oasis installation first. BTW: Shouldn't odb have interactive mode?
pangoafk is now known as pango
<wmeyer``>
thelema: Another idea -- why to clober user with the unneeded log -- spawn the build, check what was the status code, if it's not 0 then be suspicious and print the accumulated log. In general I would expect that odb would be more elegant in terms of the dialog with the user.
Yoric has quit [Ping timeout: 260 seconds]
hto has quit [Quit: Lost terminal]
eikke has joined #ocaml
fraggle_ has joined #ocaml
Anarchos has joined #ocaml
hto has joined #ocaml
<jaxtr>
ahh it's a wonderful day
<wmeyer``>
thelema: Just commited the final fix for getting oasis if it's needed
fraggle_laptop has joined #ocaml
edwin has joined #ocaml
edwin has left #ocaml []
kmicinski has quit [Ping timeout: 246 seconds]
kmicinski has joined #ocaml
Yoric has joined #ocaml
GPHemsley has left #ocaml []
<thelema>
wmeyer``: I'll take a look at it now, but I'm about to go, so unless it pulls cleanly, I don't think it'll get merged right now
<thelema>
I worry that an interactive interface for odb is... unnecessary. I think we can put a program with an interactive interface in the odb repo, but I want simple `curl odb.ml | ocaml` to work out of the box
<wmeyer``>
thelema: No worry it can wait, thanks.
<wmeyer``>
thelema: I think having some odb-simple or odb-interactive that will call odb.ml put *somewhere* (biggest chalenge) would be an interesting experiment - worth to try - if ocamlbrew supported that - this would be even better. I think we could then make odb.ml better at the same time - sort of separating dialog from the rest of code. So far I am happy on incremental improvements
eni has joined #ocaml
zuymanto has quit [Quit: zuymanto]
testcocoon has quit [Quit: Coyote finally caught me]
eikke has quit [Read error: Connection reset by peer]
testcocoon has joined #ocaml
Submarine has quit [Quit: Leaving]
itewsh has joined #ocaml
eikke has joined #ocaml
<ssbr_>
I never want to see a fold for the rest of my life
<ssbr_>
100% of the List.fold_lefts and List.fold_rights I've read, I've rewritten as List.map
<adrien>
# List.fold_left (+) 0 [ 1; 2; 3; 4 ];;
<adrien>
also, if you've rewritten a fold_left into something with map, you've lost tail-recursivity
<jonafan>
let List.map f xs = List.fold_right (fun x xs -> f x :: xs) xs []
<jonafan>
map and fold are for different things, and you probably should have used map in the first place
<adrien>
if you manager to make something using fold_left and a lower complexity than it'd take with map or rev_map, then definitely use fold_left
<ssbr_>
adrien: they're implementing map in terms of folds.
<ssbr_>
I just replaced something in exactly this form.
<jonafan>
well, at least you didn't use a list reference with List.iter
<ssbr_>
There's also the thing where I really don't like reading folds -- the associativity issues disturb me out of a relaxed reading :S
<_habnabit>
jonafan, fwiw it's legacy code not written by ssbr_
<jonafan>
ah
<ssbr_>
I'm not sure if I'll grow out of disliking folds. But in this case I think the folds are pretty objectively wrong.
<ssbr_>
maybe you can quibble about the fold_lefts that are equivalent to a reverse map?
<ssbr_>
I don't remember if there were any of those
<_habnabit>
ssbr_, what's the alternative to a fold, though? are you suggesting that map not be implemented in terms of a fold, or what
<ssbr_>
_habnabit: I
<ssbr_>
whoops
<ssbr_>
_habnabit: I don't really care how map is implemented. But I find recursion easier to read.
<ssbr_>
Apparently functional programmers hate recursion and love HOFs, but...
<ssbr_>
I dunno, fold isn't a HOF I like, anyway.
<ssbr_>
Maybe I'll grow out of it.
<_habnabit>
that's fine for the case of lists, maybe. but what about folding over a tree?
<_habnabit>
you don't necessarily want to expose the implementation
<ssbr_>
_habnabit: I've never folded over a tree.
<everyonemines>
fold doesn't parallelize, map does
<everyonemines>
(but in the case of ocaml map is implemented as a for loop)
<_habnabit>
(only if you're mapping a pure function)
<everyonemines>
(but you usually are)
<ssbr_>
I don't care about CPU usage or stack usage one bit with this code.
<ssbr_>
Everything being folded that I've replaced is really tiny.
<wmeyer``>
ssbr_: I use a lot of fold, I prefer combinators over explicit recursion
<ssbr_>
I dunno. I feel like I should.
<ssbr_>
I think after enough of it I will just pattern match the associativity instantly
<ssbr_>
as it is I have to think, "OK, fold_right replaces cons with f, and fold_left goes left to right"
<ssbr_>
and work it out. Annoying. :(
<ssbr_>
(fortunately for stuff like (+) and (*) it doesn't matter at all!)
<Ptival>
I just think of it as "ok, need to do something on that list, passing around that result being built..."
<ssbr_>
Ptival: you're thinking of constructing a fold though
<ssbr_>
I'm thinking of reading. :S
<ssbr_>
I guess it applies both ways
<Qrntz>
on a slightly related note, would it make more sense to use a string map instead of a (string, string) hash table if 1) I have a small dataset 2) the structure is often fold 3) the structure stays constant throughout the program run?
<Ptival>
why would you not use a map?
<Qrntz>
I am mostly concerned with performance
<Qrntz>
that's what I'm asking!
snearch has joined #ocaml
<Ptival>
unless you're doing HPC...
ezn-01 has joined #ocaml
snearch has quit [Client Quit]
avsm has joined #ocaml
<Ptival>
anyway, given your constraints, you can use both
_andre has quit [Quit: leaving]
<Ptival>
yes, you'll probably get better performance with hashtbl
<Ptival>
but unless you're querying that structure like crazy, I doubt you'll be seeing much difference
<Qrntz>
I fold it quite often
<Ptival>
fold should be the same
<Qrntz>
actually, I just discovered that I'm sorting the list I get by folding over that hash table in some places, so it would probably be better to use an ordered structure in the first place
eikke has quit [Ping timeout: 244 seconds]
ocp has quit [Ping timeout: 244 seconds]
<jonafan>
have you profiled this code and shown that it's too slow?
eikke has joined #ocaml
<Qrntz>
I profiled this code and the bottleneck isn't in this place
<Qrntz>
I'm just obsessed with making everything «idiomatic» without losing performance
<jonafan>
my preference is for persistant data structures like map
Yoric has quit [Remote host closed the connection]
ski has quit [Quit: bounce]
eikke has quit [Ping timeout: 250 seconds]
eikke has joined #ocaml
ski has joined #ocaml
<orbitz>
I want to have all of my library under a namespace of X, so a user can do X.Client or X.Server, for example. Is best way to do that to make an X module and do module Server = X_server?
<pippijn>
orbitz: you can make a pack
<orbitz>
a pack with the devil?
<pippijn>
ocamlc -pack or oasis Pack: true
<orbitz>
God building in Ocaml is such a terrible experience
kmicinski has quit [Ping timeout: 245 seconds]
<adrien>
? packing is fairly simple
Snark has quit [Quit: Quitte]
Anarchos has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
<orbitz>
Lots of simple things makes one complex thing
<adrien>
packing's main issue is that if you also access the functions from the same source repository as where you define them, it's possible that you access them without going through the pack
ski has quit [Quit: bounce !]
<pippijn>
adrien: yes.. but only if you do, and also, why is that bad?
<adrien>
it's not "bad", but it's doable while you might not want to do it
<pippijn>
right
<pippijn>
ok
<Qrntz>
is there any way to «open» a module namespace for a dynamically loaded file from within the code that loads it?
<adrien>
typically, you'd make a folder and pack everything in it with the idea that source files from outside that folder cannot skip the pack
<pippijn>
I'm almost convinced that packs are a good thing, but not entirely, yet
<mfp>
you probably need to add Ssl.load_verify_locations ssl_context path_to_ca_cert "" or such
<mfp>
and something like Ssl.set_verify ssl_context [Ssl.Verify_fail_if_no_peer_cert] None to make sure there's a client certificate
<pippijn>
mfp: I don't want that
<pippijn>
the client certificate is optional
<pippijn>
anyway, I tried the following things:
<mfp>
then Verify_peer IIRC
<pippijn>
hm, ok
thomasga has quit [Quit: Leaving.]
<pippijn>
ah
<pippijn>
mfp: it works
fraggle_laptop has quit [Remote host closed the connection]
<mfp>
Qrntz: you cannot access the values defined in the dynamically loaded file directly, but you can have it register them somehow
<mfp>
Qrntz: in particular, you can register a first-class module and then unpack it in the loader, giving you full access to whatever functionality you want to export in the loaded module :)
<pippijn>
why isn't that exception propagated out?
<mfp>
pippijn: you might want to add a call to Ssl.verify for good measure (it'll raise if the client cert is not OK), even though in theory the handshake should be terminated according to SSL_CTX_set_verify(3) (it's not how that would be reported in the Ssl bindings)
<mfp>
not *clear* how
lamawithonel has quit [Remote host closed the connection]
<pippijn>
set_verify does that, I think
<pippijn>
and it does
<pippijn>
in my code
<mfp>
but there's only one verify_callback, isn't there?
<pippijn>
a raised exception will wait at the infinite <&>
<mfp>
what's that operator? I assume it was the pastebin garbling >>
<mfp>
ah Lwt.join
<pippijn>
it's Lwt.join
sgnb has quit [Ping timeout: 246 seconds]
<mfp>
*assumed
<mfp>
argh can't type tonight
<pippijn>
I need to catch it, anyway, so I can close the socket
avsm has quit [Quit: Leaving.]
<Qrntz>
mfp, hmm, that would indeed make the module accessible to the loaded ones, but I want to explicitly «open» it, as in let the loaded modules access the elements of it without using the module name
<Qrntz>
(trying to mock up a plugin api)
<mfp>
you want to use values defined in the "loader" module from the load*ed* one?
<Qrntz>
well, yes, that would do it
<mfp>
you should be able to do that directly
<Qrntz>
(accessing without a qualified module name, though)
<Qrntz>
hm
<mfp>
just open Xxx then :)
<Qrntz>
that's the problem — I don't want to «open» a module explicitly from within the loaded ones, that is, I need to access something from another module (preferrably, one specially meant for dynlinked modules) as if it were defined in the loaded module itself
<Qrntz>
sort of like if it was defined in pervasives, I wouldn't go as far as augmenting pervasives though :-)
<mfp>
I don't know any way to have that "implicit open" at load time
ski has quit [Ping timeout: 240 seconds]
<mfp>
would it be acceptable to preprocess the sources to prepend open Mynewpervasives at compile-time?
<Qrntz>
that's what I just thought of, too
<Qrntz>
perhaps
<mfp>
(looks like a lot of work just to avoid open X, but...)
<Qrntz>
:-)
<mfp>
batteries used to do that with camlp4
<Qrntz>
maybe I'll think of something better, all I aim for is a plugin interface that's maximally transparent and «sandboxed» but is in ocaml
<Qrntz>
the sandboxing part is achieved fairly easily with Dynlink.allow_only, now I'm trying to do something with transparency
<Qrntz>
still, thanks for your help!
<mfp>
Qrntz: does allow_only work for native code?
<Qrntz>
good question
<Qrntz>
it doesn't say anything about its byte/native compatibility in reference manual
<mfp>
there's a note about allow_unsafe_modules being a NOP in native code, though
<mfp>
so maybe allow_only does work
<Qrntz>
hmm, yes, it seems to
<mfp>
would like to know if you figure it out, but zzz time for me now
<Sablier>
hi, does a lib like SDL-mixer who works for windows exist ?
* mfp
afk
cdidd has quit [Read error: Operation timed out]
<Qrntz>
mfp, on load it says «no implementation available» for the modules that were referenced but not allowed to be used, so yes, I presume it works
<pippijn>
is there something that can parse /C=US/ST=State Name/L=Locality/O=Organisation/...?
<Qrntz>
Sablier, ocamlsdl interfaces with sdl_mixer
<pippijn>
and gives me a list of data?
itewsh has quit [Quit: o/]
<Sablier>
yes of curse, but impossible to build ocaml-sdl :/
<Sablier>
same for sfml
<Sablier>
i try to solve that but i cant :s
eikke has quit [Ping timeout: 276 seconds]
<Sablier>
and i dont see any compiled tools for that :/
eikke has joined #ocaml
smondet has quit [Quit: bye]
<Qrntz>
Sablier, it is certainly possible since I've succeeded in building it myself
<Qrntz>
what exactly is your error
<Sablier>
when i try make ocamlsdl i have this error