gildor changed the topic of #ocaml to: Discussions about the OCaml programming language | http://caml.inria.fr/ | OCaml 3.12.0 http://bit.ly/aNZBUp
enthymeme has quit [Quit: rcirc on GNU Emacs 23.1.1]
philtor has joined #ocaml
lopex has quit []
avsm has quit [Quit: Leaving.]
smerz has quit [Remote host closed the connection]
thieusoai has quit [Remote host closed the connection]
Tianon has joined #ocaml
Tianon has quit [Changing host]
Tianon has joined #ocaml
boscop has quit [Ping timeout: 250 seconds]
boscop has joined #ocaml
joewilliams is now known as joewilliams_away
ymasory has quit [Quit: Leaving]
joewilliams_away is now known as joewilliams
hto has quit [Ping timeout: 250 seconds]
ymasory has joined #ocaml
dnolen has quit [Quit: dnolen]
alfa_y_omega has quit [Ping timeout: 276 seconds]
ymasory has quit [Quit: Leaving]
alfa_y_omega has joined #ocaml
lamawithonel_ has quit [Ping timeout: 246 seconds]
lamawithonel_ has joined #ocaml
vivanov has joined #ocaml
ulfdoz has joined #ocaml
alfa_y_omega has quit [Ping timeout: 246 seconds]
alfa_y_omega has joined #ocaml
boscop has quit [Ping timeout: 246 seconds]
lamawithonel_ has quit [Remote host closed the connection]
lamawithonel has joined #ocaml
lamawithonel has quit [Ping timeout: 246 seconds]
lamawithonel has joined #ocaml
hto has joined #ocaml
philtor has quit [Ping timeout: 276 seconds]
Snark has joined #ocaml
Yoric has joined #ocaml
avsm has joined #ocaml
jderque has joined #ocaml
ankit9|zzz has quit [Quit: Leaving]
ygrek has joined #ocaml
ikaros has joined #ocaml
Cyanure has joined #ocaml
edwin has joined #ocaml
ftrvxmtrx has quit [Quit: This computer has gone to sleep]
larhat has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
ygrek has quit [Ping timeout: 246 seconds]
Yoric has quit [Quit: Leaving.]
ftrvxmtrx has joined #ocaml
ikaros has joined #ocaml
jderque has quit [Quit: leaving]
<flux> hey, this is interesting: https://github.com/avsm/mpl
<flux> looks sort of like competition for bitstring
ikaros has quit [Quit: Ex-Chat]
<adrien> flux: oh, that's so nice of you to volunteer for an in-depth analysis and comparison of both :-)
<flux> gnh :)
<flux> too bad it doesn't come with the ssh or dns implementations it mentions in the white paper
<adrien> maybe it's only a git-push away
Yoric has joined #ocaml
rby has joined #ocaml
<flux> the other papers linked from openmirage.org seem pretty interesting as well: http://www.openmirage.org/wiki/papers
<rixed> too bad it does not use ASN.1 for message descriptions.
<flux> ah, the ssh server impl was from another whitepaper and the source is here: https://github.com/avsm/melange/tree/master/apps/sshd
<flux> and well is the deens in the same directory hierarchy
ankit9 has joined #ocaml
ikaros has joined #ocaml
hto has quit [Ping timeout: 250 seconds]
rby has quit [Quit: leaving]
rby has joined #ocaml
hto has joined #ocaml
hto has quit [Ping timeout: 260 seconds]
hto has joined #ocaml
ankit9 has quit [Quit: Leaving]
Yoric1 has joined #ocaml
Yoric has quit [Read error: Connection reset by peer]
ftrvxmtrx has quit [Quit: Leaving]
ankit9 has joined #ocaml
ikaros has quit [Quit: Ex-Chat]
Cyanure has quit [Read error: Connection reset by peer]
jderque has joined #ocaml
lopex has joined #ocaml
ygrek has joined #ocaml
sepp2k has joined #ocaml
chegibari has joined #ocaml
fraggle_ has quit [Read error: Connection reset by peer]
fraggle_ has joined #ocaml
chegibari has quit [Ping timeout: 276 seconds]
vivanov has quit [Ping timeout: 250 seconds]
chegibari has joined #ocaml
<gildor> hi all
<gildor> I have a typing problem
<gildor> I would like to express that I have a "double parametric type"
<gildor> e.g. type ('a, 'b) conditional
<gildor> and be able to set (string, 'b) conditional
<gildor> and conditional can be either Solved or Unsolved
<gildor> e.g. type 'a myval = (string, 'a) conditional
_andre has joined #ocaml
<gildor> and in one case match myval with | `Always nm -> | `Sometimes _ -> raise Not_sovled
<gildor> or have it unsolved and it should be a list of choices
<gildor> let myval = [EFlag "enable_foo", "foo"; EBool true, "nofoo"]
<gildor> i.e.
<gildor> let myval : (string, [`Solved]) conditional = `Always "foo"
<gildor> and let myval : (string, [`Unsolved]) conditional = [EFlag "enable_foo", "foo"; EBool true, "nofoo"]
<gildor> any ideas ?
<flux> hmm
<flux> so ('a, 'b) conditional might be a list, or a variant?
<gildor> yes
<gildor> maybe something like
<gildor> type 'a solved_choices = [`Always of 'a | `Sometimes of 'a unsolved_choices]
<gildor> type 'a unsolved_choices = (expr, 'a) list
<gildor> let myval : (string, string solved_choices) conditional = `Always "foo"
<gildor> and let myval : (string, string unsolved_choices) conditional = [EFlag "enable_foo", "foo"; EBool true, "nofoo"]
* gildor time for lunch, be back in 1hour, sorry for the bad timing of the question
<flux> I'm not sure if that is possible
<gildor> I don't see solutions either, that why I am asking ;-)
munga has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
avsm has quit [Ping timeout: 244 seconds]
<gildor> I am back
<gildor> flux: any ideas ?
<gildor> maybe, I can ask caml-list ?
<flux> gildor, I would suggest that. or give up :)
<gildor> never give up
<flux> maybe there's a neat way to encode if with functors of type constraints. or not-so-neat.
<gildor> I think the main problem is the fact that the value and the container are bound
<gildor> i.e. _string_ and _string_ solved_choices
<gildor> I think I can solve this, by using solved_choices = [`Always of int | `Sometimes ]
<gildor> and have int be the index of the choices
<gildor> in the list
<gildor> let myval : (string, unsolved_choices) conditional = (), [EFlag "enable_foo", "foo"; EBool true, "nofoo"]
<gildor> let myval : (string, [[`Always of int | `Sometimes ]) conditional = (`Always 0), [EFlag "enable_foo", "foo"; EBool true, "nofoo"]
vivanov has joined #ocaml
jderque has quit [Quit: leaving]
Rukowen_ has joined #ocaml
<Rukowen_> hi all
<Rukowen_> i'm using ocaml to write an lexical analyzer
<Rukowen_> could I ask a question here?
Yoric1 is now known as Yoric
<Yoric> Go ahead
sepp2k has quit [Ping timeout: 252 seconds]
Rukowen_ has left #ocaml []
sepp2k has joined #ocaml
dnolen has joined #ocaml
ymasory has joined #ocaml
tomprince has quit [Quit: WeeChat 0.3.4]
Yoric1 has joined #ocaml
Yoric has quit [Read error: Connection reset by peer]
philtor has joined #ocaml
Yoric1 is now known as Yoric
oriba has joined #ocaml
oriba has left #ocaml []
emmanuelux has joined #ocaml
emmanuelux has quit [Read error: Connection reset by peer]
emmanuelux has joined #ocaml
avsm has joined #ocaml
Tobu has quit [Ping timeout: 260 seconds]
hto has quit [Ping timeout: 246 seconds]
Snark has quit [Quit: Ex-Chat]
yezariaely has joined #ocaml
ymasory has quit [Ping timeout: 246 seconds]
philtor has quit [Ping timeout: 276 seconds]
yezariaely has left #ocaml []
dnolen has quit [Quit: dnolen]
lopex has quit []
hto has joined #ocaml
ankit9 has quit [Quit: Leaving]
ankit9 has joined #ocaml
joewilliams is now known as joewilliams_away
joewilliams_away is now known as joewilliams
leyyer_su has joined #ocaml
ymasory has joined #ocaml
jderque has joined #ocaml
ankit9 has quit [Quit: Leaving]
leyyer_su has quit [Remote host closed the connection]
leyyer_su has joined #ocaml
hto has quit [Ping timeout: 246 seconds]
tomprince has joined #ocaml
<tomprince> join #twisted
tomprince has quit [Client Quit]
ulfdoz has quit [Ping timeout: 276 seconds]
tomprince has joined #ocaml
ankit9 has joined #ocaml
Klystron has joined #ocaml
ymasory has quit [Quit: Leaving]
nantralien has joined #ocaml
<nantralien> I just built a simple GUI around the toplevel for Haiku-OS :)
<adrien> in ocaml? :p
leyyer_s` has joined #ocaml
<nantralien> adrien no in c++
<adrien> ='(
<nantralien> there is no multithreading ocaml so no way to build GUIS in Haiku
<adrien> yeah, I remember ;-)
<adrien> have you followed the recent events/announces on the caml-list?
<nantralien> adrien no
ulfdoz has joined #ocaml
<adrien> there's ongoing work for multithreading and it might lead to the changes you need
leyyer_su has quit [Ping timeout: 260 seconds]
<adrien> about haiku's GUI, do you know if programming with it looks like qt or gtk? is it using callbacks or something else?
<nantralien> adrien it is like the native api of BeOS so pretty much like Qt
<adrien> ok, thanks
nantralien has quit [Quit: going to my britton lessons]
<adrien> will read tha
avsm has quit [Quit: Leaving.]
avsm has joined #ocaml
avsm has quit [Client Quit]
Klystron has quit [Remote host closed the connection]
eye-scuzzy has joined #ocaml
<thelema> l
<adrien> m
alfa_y_omega has quit [Read error: Operation timed out]
alfa_y_omega has joined #ocaml
napping has joined #ocaml
Yoric has quit [Quit: Leaving.]
leyyer_s` has quit [Remote host closed the connection]
ygrek has joined #ocaml
snf has joined #ocaml
rby has quit [Quit: leaving]
ztfw has joined #ocaml
boscop has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
ygrek has joined #ocaml
hto has joined #ocaml
<napping> ocamlopt -g doesn't seem to add debugging information
<napping> well, there are camlMldebug_* symbols afterall, but ocamldebug refuses native executables, and gdb sees no useful symbols
<adrien> gdb, that's another story
<adrien> what do you want to see?
ygrek has quit [Ping timeout: 246 seconds]
<napping> I think I would like debugging information in native executables
<adrien> for which use case?
<napping> but actually, profiling information is probably enough
<adrien> you get backtraces if you set OCAMLRUNPARAM=b (the environment variable)
<thelema> napping: profiling is done by compiling with -p
<adrien> have to go
<thelema> -p Compile and link with profiling support for "gprof"
<napping> I was looking into debugging because something else was broken, but strace was enough to fix it
ymasory has joined #ocaml
<napping> I'm specifically trying to profile Coq, and more specifically some slow Ltac scripts
<napping> It's recompiling now with profiling on.
<thelema> ok
<napping> It's been a while since I've used gprof - do you know if it works gracefully if only part of a program is compiled with profiling?
<thelema> I believe so, but I'm not sure
<thelema> ... thinking about it, yes - it must, because I know my libraries weren't compiled for profiling.
olauzon has joined #ocaml
<thelema> and I can profile and get results for them
<thelema> without the details of their internals
<napping> I'd like a call graph just between points I mark myself
larhat has quit [Quit: Leaving.]
ygrek has joined #ocaml
<napping> oh, it looks like there's no overall call graph even if every function is compiled with profiling
<thelema> scroll down - the call graph profile follows the flat profile
<napping> Yeah, but it's callers and callees of each individual function
<thelema> what do you want that's not provided?
<napping> That looks nice. Is there any way to prevent inlining?
<napping> I was trying to check if a call graph can be reassembled if you can from a profiled module, into an unprofiled module, into another profiled module
<thelema> -inline 0
<napping> but ocamlopt seems to be too smart
<napping> yeah, that's what I thought too, but it didn't work
<napping> Bot.ml has functions like let f _ = print_string "f"; print_newline ()
<napping> Mid.ml functions like let d x = print_string "d(";f x ; g x;print_string ")";print_newline ()
<napping> and Top.ml is open Mid;; d (); e ()
<thelema> "Specifying -inline 0 prevents all functions from being inlined, except those whose body is smaller than the call site."
<napping> which shouldn't include any of those functions
ztfw has quit [Ping timeout: 250 seconds]
ymasory_ has joined #ocaml
ymasory has quit [Ping timeout: 248 seconds]
<hcarty> thelema: A Camomile-less Batteries would be wonderful in my opinion
<thelema> hcarty: Hopefully yoriyuki is amenable to having his ulib folded into batteries.
<hcarty> thelema: Primarily because it would (I think?) remove any dependencies on outside files
<thelema> yes, camomile is the only required library dependency of batteries.
<hcarty> That too, but I was thinking about all of the resource files Camomile needs at run time
<thelema> yes, I'll be happy to get rid of all that.
<napping> Well, those functions are there after all, but the call graph is a bit strange
<napping> I think some optimizations still occur inside modules
<thelema> ocaml does cross-module inlining if it's useful.
<napping> The first problem was that all the functions were buried in the profile because nothing took any time, and then I lost my functions next to all the runtime calls when I turned off filtering
<napping> so then I made the leaf functions call somthing with an expensive loop
<napping> but for some reason the time for that loop is attributed only to the mid-level functions, but doesn't appear within the leaf functions
<thelema> napping: odd - maybe the leaf functions are still small enough to be inlined?
<napping> let f _ = print_string "f"; print_newline (); delay ()
<napping> doesn't seem like it should be inlined at -inline 0
<thelema> you're probably right.
<thelema> grr, I want one Batteries module with two implementations, but I can't because the .cmi files differ, because one implementation sets up locks using BatRMutex
* thelema looks again at how Unix does it
Yoric has joined #ocaml
<thelema> hmm, I wonder if the systhreads implementation of Mutex works in bytecode... I guess I can find out...
<napping> objdump says Mid is just making simple calls to the functions in Bot
<napping> I guess it's the tailcalls
<napping> yeah, calBot__i_65 ends with a jmpq which the relocation info says goes to camlBot__delay_58
<napping> so that time will show up under the parent, but not the leaf
<thelema> TCO for the lose.
<ygrek> gprof profiling is dead-end anyway
<thelema> ygrek: why?
<ygrek> recompilation needed, disturbs too much, requires full program run
<napping> "Because there are already better replacements?", he asked, hopefully.
<napping> I'm just following the suggestions in the docs here
<napping> Hey, nice callgraph now, with print_newline() after the expensive thing
<ygrek> poormansprofiler ftw
<napping> hmm, looks pretty good
<thelema> ygrek: wow, that's ghetto
<napping> probably still won't handle tail calls very well
jld has quit [Ping timeout: 248 seconds]
<napping> If modules are compiled without profiling on, the callgraph definitely gets broken
<napping> _mcount just exracts the current function and it's caller by looking at the stack
ymasory_ is now known as ymasory
<napping> and if that parent is in an untraced module it loses the trail
ftrvxmtrx has joined #ocaml
Tianon has quit [Read error: Operation timed out]
munga has quit [Ping timeout: 260 seconds]
Tianon has joined #ocaml
Tianon has quit [Ping timeout: 264 seconds]
Tianon has joined #ocaml
vivanov has quit [Ping timeout: 246 seconds]
Tianon has quit [Changing host]
Tianon has joined #ocaml
zorun has quit [Ping timeout: 248 seconds]
zorun has joined #ocaml
jld has joined #ocaml
jld has quit [Client Quit]
jld has joined #ocaml
chegibari has quit [Read error: Connection reset by peer]
nantralien has joined #ocaml
ymasory has quit [Quit: Leaving]
joewilliams is now known as joewilliams_away
joewilliams_away is now known as joewilliams
emmanuelux has quit [Remote host closed the connection]
waern has quit [Ping timeout: 240 seconds]
<hcarty> thelema: What is the state of the v2 branch? Is it up to date with the development in master?
<thelema> hcarty: no, I guess I should do one more merge from master
_andre has quit [Quit: leaving]
<thelema> ok, now it's up to date with master
emmanuelux has joined #ocaml
Yoric has quit [Remote host closed the connection]
jderque has quit [Quit: leaving]
<nantralien> thelema what is the v2 branch ?
<nantralien> thelema ah, i don't know about batteries :)
<hcarty> nantralien: It's worth knowing about!
<thelema> description after directory listing
<hcarty> thelema: It's probably not a big deal yet, but Camomile can be removed from README's list of requirements
<thelema> yup.
<hcarty> And META
<nantralien> thelema i wonder why a standard set of libs is not in the stdlib of ocaml distib... :)
<hcarty> And _oasis
<hcarty> nantralien: The OCaml authors want to keep the bundled stdlib small to make it easier to maintain
<nantralien> hcarty i know but my opinion about small is 'not so small' !
avsm has joined #ocaml
ikaros has joined #ocaml
<hcarty> nantralien: That may be, but given how little full-time paid time OCaml gets, it's probably better that it stays small
<hcarty> A community bundle can address stdlib limitations
<thelema> hcarty: new v2 pushed
<nantralien> hcarty yes it's a pity that all the good things that universities create, they let other develop it and get the money....
<thelema> hmm, shouldn't have pushed...
<hcarty> nantralien: I'm not sure I follow - a community OCaml bundle would, presumably, be distributed without charge
<nantralien> hcarty i agree, i was speaking about general behaviour of universities
<hcarty> nantralien: In an ideal case, the university would be focused on research rather than bringing in money
<nantralien> hcarty i agree
<hcarty> nantralien: The OCaml team does provide means to provide financial support for OCaml's development
<nantralien> hcarty and i thank them for the wonderful compiler
<nantralien> hcarty the best tool to use to focus on programming, and get efficient binaries :)
<hcarty> It is quite a nice language and compiler
avsm has quit [Read error: Connection reset by peer]
avsm has joined #ocaml
alfa_y_omega has quit [Ping timeout: 276 seconds]
avsm1 has joined #ocaml
avsm has quit [Read error: Connection reset by peer]
alfa_y_omega has joined #ocaml
<thelema> hcarty: new v2 pushed for testing
<hcarty> thelema: Cool, I'll take a look. I'm sad to see that CamelCase won out :-)
<thelema> it is slightly more efficient to type...
<hcarty> But less efficient to read!
<thelema> you'd rather Bat_multi_p_map?
<hcarty> I'm not terribly concerned though... individual module names tend to be short
<hcarty> No, but I like Multi_map more than MultiMap
<hcarty> I wouldn't expect the Bat* modules to be used directly all that often, given that they are often incomplete
olauzon has quit [Quit: olauzon]
<thelema> well, the stdlib gives us "ArrayLabels"/"StringLabels" and "Nativeint"/"Printexc"/"Bigarray" as well as "Big_int"/"Arith_status"
<hcarty> Again, though - I'd argue that the *Labels modules are not going to be used directly all that often.
<hcarty> They would probably be used as aliased replacements for the matching unlabeled module
olauzon has joined #ocaml
<hcarty> Nativeint, Printexc, Bigarray are all unfortunately named, I agree :-)
<thelema> the other reason I went for CamelCase was it was a simpler change. I agree with your logic, but just don't want to change things now. Send a patch, and it'll be as you name things.
<hcarty> thelema: I understand - I'll either put a patch together soon or suck it up and deal with the consequences
<thelema> exactly.
avsm1 has quit [Quit: Leaving.]
<hcarty> preludeml has a short OCaml program which converts the prelude.ml source from CamelCase to underscore_separated. It may be usable with Batteries as well.
napping has quit [Quit: leaving]
edwin has quit [Remote host closed the connection]
munga has joined #ocaml
alfa_y_omega has quit [Ping timeout: 244 seconds]
alfa_y_omega has joined #ocaml
nantralien has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
olauzon has quit [Quit: olauzon]
oriba has joined #ocaml
oriba has left #ocaml []
ygrek has quit [Ping timeout: 246 seconds]
lopex has joined #ocaml
munga has quit [Read error: Operation timed out]
ikaros has quit [Quit: Ex-Chat]
pdhborges has joined #ocaml
Derander_ has joined #ocaml
dnolen has joined #ocaml
__mattam__ has joined #ocaml
Derander has quit [Ping timeout: 246 seconds]
mattam has quit [Ping timeout: 246 seconds]
Amorphous has quit [Ping timeout: 240 seconds]
ymasory has joined #ocaml
Amorphous has joined #ocaml
avsm has joined #ocaml
pdhborges is now known as gcjgirly
gcjgirly is now known as pdhborges