jimmyrcom_ has quit [Remote host closed the connection]
copy_ has quit [Quit: Connection closed for inactivity]
mbuf has joined #ocaml
lopex has quit [Quit: Connection closed for inactivity]
cbot has joined #ocaml
dreadedfrog has joined #ocaml
jimmyrcom_ has joined #ocaml
dreadedfrog has quit [Ping timeout: 240 seconds]
sh0t has quit [Remote host closed the connection]
alexelcu has quit [Remote host closed the connection]
alexelcu has joined #ocaml
jimmyrcom_ has quit [Ping timeout: 260 seconds]
FreeBirdLjj has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
FreeBirdLjj has joined #ocaml
jimmyrcom_ has joined #ocaml
govg has joined #ocaml
iZsh has quit [Ping timeout: 248 seconds]
iZsh has joined #ocaml
cbot has quit [Quit: Leaving]
malina has quit [Ping timeout: 260 seconds]
FreeBirdLjj has quit [Remote host closed the connection]
whoman has quit [Remote host closed the connection]
whoman has joined #ocaml
jbrown has quit [Ping timeout: 255 seconds]
FreeBirdLjj has joined #ocaml
jbrown has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 240 seconds]
MercurialAlchemi has joined #ocaml
FreeBirdLjj has joined #ocaml
dreadedfrog has joined #ocaml
dreadedfrog has quit [Ping timeout: 240 seconds]
_whitelogger has joined #ocaml
dreadedfrog has joined #ocaml
KeyJoo has joined #ocaml
mbuf has quit [Quit: Ex-Chat]
nullx002 has quit [Ping timeout: 240 seconds]
peterpp has joined #ocaml
nullx002 has joined #ocaml
kakadu has joined #ocaml
dreadedfrog has quit [Ping timeout: 240 seconds]
kakadu has quit [Ping timeout: 260 seconds]
kakadu_ has joined #ocaml
tane has joined #ocaml
mfp__ has joined #ocaml
dreadedfrog has joined #ocaml
dreadedfrog has quit [Ping timeout: 240 seconds]
jnavila has joined #ocaml
slash^ has joined #ocaml
dreadedfrog has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
<Drup>
orbifx[m]: number one rule about guessing where to optimize: it is not where you think.
whoman has quit [Quit: Leaving]
pacak has left #ocaml [#ocaml]
jnavila has quit [Remote host closed the connection]
dakk has joined #ocaml
mbuf has joined #ocaml
<dakk>
I'm trying to use two ppx processor on my jbuilder project; I wrote "(preprocess (pps (ppx_bitstring ppx_sexp_conv)))" in my jbuild script, but when I try to make I got "Error: Extension `bitstring' was not translated"
<orbifx[m]>
Drup, I make the mistake I think others make too when asking about this kind of thing: in reality I want to know how it works, might not even care to change it in the end
<Drup>
Between map and hashtbls ? It mostly come downs on functional or imperative styles, really
<Drup>
to*
<companion_cube>
hashtbls are a bit faster if used properly, but they are imperative
<Drup>
yeah, it depends how fast you can hash
<Drup>
(if you can even hash)
<companion_cube>
of course
<companion_cube>
it's rarely slower than comparing though, in my experience
<companion_cube>
hash + equal is even easier to write, in my experience, than a full comparison function
andreas_ has joined #ocaml
<orbifx[m]>
Well, my first question was if hand-written match statements on strings are checked in the order they are written, thus map being more efficient because I presume it can do a binary search?
<orbifx[m]>
dakk, not sure about your error, you might want to ask on the mailing list or forum
<dakk>
orbifx[m], ok I'll try there; just for clarify, the code compile well when I remove ppx_sexp_conv from preprocess
morfeen has joined #ocaml
<orbifx[m]>
dakk: only tried to get one ppx extension to work with jbuilder and I didn't get it to work :P. Never used sexp_conv.
<Drup>
orbifx[m]: match on string is optimized into a branching tree of tests on 8 bits words composing the strings
morfeen has quit [Remote host closed the connection]
<dakk>
orbifx[m], I think it's not a problem related with sexp_conv, the problem occurs every time I try to put 2 preprocessors; I'll make some other try then I'll submit an issue
<orbifx[m]>
Drup: oh cool, so nothing to worry about when using those
<Drup>
(You can actually see that concretely by writing a simple string match and compiling with ocamlopt -dclambda
<Drup>
(the code is ... kind of ridiculous)
<Drup>
(it's full of magic numbers)
<orbifx[m]>
what's -dclambda?
<Drup>
It outputs the intermediate representation called CLambda
<orbifx[m]>
ok cool
<orbifx[m]>
The next question was, if there is a better way to code that part of code I referenced, which is a combination or nested records, which need to mapped to strings
<Drup>
(as a general rule, code generated by pattern matching is the fastest possible)
<Drup>
(the compilation of pattern matching is rather amazing is a rather amazing thing)
<orbifx[m]>
I've started thinking that the way that is "contained" hurts composability and extensability.
<orbifx[m]>
extensibility
<Drup>
It's not pretty, but it's parsing code, so it's ok
<orbifx[m]>
I was thinking about putting all these to a Map (or something more appropriate), not to gain performance, but to generalise it and make it easier to work with. But I was wondering if that is appropriate.
<orbifx[m]>
In theory different fields are used by different modules. That's my latest appreciation.
FreeBirdLjj has joined #ocaml
morfeen has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
<orbifx[m]>
but I would not like to hurt the whole structure disproportionally, Drup
<orbifx[m]>
so any thoughts or advice would be appreciated
FreeBirdLjj has joined #ocaml
tane has quit [Quit: Leaving]
BitPuffin|osx has joined #ocaml
sam_ has joined #ocaml
dreadedfrog has quit [Ping timeout: 240 seconds]
sam_ has quit [Ping timeout: 260 seconds]
raphaelss has quit [Quit: leaving]
morfeen has quit [Remote host closed the connection]
sam_ has joined #ocaml
sam_ has quit [Ping timeout: 276 seconds]
copy_ has joined #ocaml
BitPuffin|osx has quit [Ping timeout: 276 seconds]
ShalokShalom has joined #ocaml
lopex has joined #ocaml
dakk has quit [Ping timeout: 255 seconds]
_whitelogger has joined #ocaml
morfeen has joined #ocaml
mbuf has quit [Quit: Ex-Chat]
<peterpp>
are there any particular techniques to resolve circular dependencies?
http_GK1wmSU has joined #ocaml
<orbifx[m]>
peterpp: not that I know of.
http_GK1wmSU has left #ocaml [#ocaml]
<octachron>
peterpp, it depends on the source of the circular dependencies; but some variations may be: use smaller modules to avoid circular dependencies in the first place, generalize away the dependencies, start with dummy mutable state and then fill in the details
<peterpp>
octachron, thanks for the suggestions!
sam_ has joined #ocaml
sam_ has quit [Ping timeout: 240 seconds]
morfeen has quit [Remote host closed the connection]
<peterpp>
octachron, I refactored to remove the circular dependency and a much cleaner design emerged
<peterpp>
I'm actually glad I got this error
<companion_cube>
:D
<companion_cube>
cleaner design!
MercurialAlchemi has quit [Ping timeout: 246 seconds]
<octachron>
peterpp, it is not always the case but this tends to happen quite often (i.e. it is nice to have beginings and endings nicely separated)
<companion_cube>
sometimes, though, I need to mutually define big blocks of variables :/
<companion_cube>
also there is still the ugly case of a type containing a set of itself
Algebr has joined #ocaml
sam_ has joined #ocaml
sam_ has quit [Ping timeout: 260 seconds]
peterpp has quit [Ping timeout: 260 seconds]
ShalokShalom has quit [Ping timeout: 260 seconds]
ShalokShalom_ has joined #ocaml
sam_ has joined #ocaml
morfeen has joined #ocaml
sh0t has joined #ocaml
ShalokShalom_ has quit [Ping timeout: 260 seconds]
morfeen has quit [Remote host closed the connection]
sam_ has quit [Ping timeout: 260 seconds]
argent_smith has joined #ocaml
http_GK1wmSU has joined #ocaml
http_GK1wmSU has quit [K-Lined]
peterpp has joined #ocaml
peterpp has quit [Read error: Connection reset by peer]
peterpp_ has joined #ocaml
tane has joined #ocaml
sh0t has quit [Remote host closed the connection]
morfeen has joined #ocaml
morfeen has quit [Remote host closed the connection]
Algebr has quit [Remote host closed the connection]
Simn has joined #ocaml
FreeBird_ has joined #ocaml
FreeBirdLjj has quit [Ping timeout: 260 seconds]
FreeBird_ has quit [Remote host closed the connection]
sh0t has joined #ocaml
Anarchos has joined #ocaml
morfeen has joined #ocaml
morfeen has quit [Remote host closed the connection]
sam_ has joined #ocaml
peterpp_ has quit [Quit: Ex-Chat]
peterpp_ has joined #ocaml
sam_ has quit [Ping timeout: 246 seconds]
cbot has joined #ocaml
groovy2shoes has quit [Ping timeout: 258 seconds]
mengu has joined #ocaml
fionnan_ is now known as fionnan
morfeen has joined #ocaml
groovy2shoes has joined #ocaml
MercurialAlchemi has joined #ocaml
morfeen has quit [Ping timeout: 255 seconds]
raphaelss has joined #ocaml
ziyourenxiang has quit [Ping timeout: 255 seconds]
dakk has joined #ocaml
<peterpp_>
I need to patch a library that I downloaded with opam, what's the most straightforward way to do so?
dreadedfrog has joined #ocaml
dreadedfrog has quit [Ping timeout: 246 seconds]
<hannes>
peterpp_: what do you mean? locally only? or do you intend to enhance the library and submit a patch upstream?
<peterpp_>
sorry... that was a weird question
<hannes>
peterpp_: in any case, opam source <library> will fetch the source, you can then modify it locally and use "opam pin add <library-name> <directory>" to convince opam to use your local one instead of the one provided by opam repository
<peterpp_>
hannes, I'm using a library x, and instead of using the version I downloaded with opam, I want to use the one I downloaded from the repo on github
<hannes>
peterpp_: if you don't have any local modifications, you can "opam pin add <library> --dev-repo")
<peterpp_>
amazing... I had no idea opam had a command for this
<hannes>
peterpp_: the above mentioned "opam pin add foo ." is slightly dangerous: it'll rsync your ".", and thus keep temporary build files across (better use pins to git repositories, where HEAD is used, and not some dirty local files)
<peterpp_>
I do have local modifications of the library in question
<hannes>
peterpp_: opam help pin is your friend :)
<peterpp_>
so I'll do it the way you suggested, with `opam source ..` and then pin
<hannes>
peterpp_: if you already have it locally and modifications, no need for opam source anymore :)
<peterpp_>
hannes, thanks, you were very helpful!
KeyJoo has quit [Quit: Good luck! Have a nice Day!]
morfeen has joined #ocaml
morfeen has quit [Remote host closed the connection]
kolko has joined #ocaml
sgnb has quit [Remote host closed the connection]
DrWhax has quit [Ping timeout: 258 seconds]
BitPuffin|osx has joined #ocaml
DrWhax has joined #ocaml
jimt_ has joined #ocaml
jimt has quit [Ping timeout: 240 seconds]
govg has quit [Ping timeout: 248 seconds]
sam_ has joined #ocaml
morfeen has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 268 seconds]
sgnb has joined #ocaml
sam_ has quit [Ping timeout: 260 seconds]
malina has joined #ocaml
morfeen has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
vbmithr_ has joined #ocaml
Murmus_ has joined #ocaml
k1000_ has joined #ocaml
tormen has joined #ocaml
hrk_ has joined #ocaml
peterpp_ has quit [Ping timeout: 240 seconds]
Druup has joined #ocaml
trevorriles_ has joined #ocaml
dakk has quit [Ping timeout: 255 seconds]
fantasticsid has joined #ocaml
seangrove has joined #ocaml
Anarchos has quit [*.net *.split]
tane has quit [*.net *.split]
andreas_ has quit [*.net *.split]
regnat[m] has quit [*.net *.split]
smondet[m] has quit [*.net *.split]
orbifx[m] has quit [*.net *.split]
Murmus has quit [*.net *.split]
vbmithr has quit [*.net *.split]
Armael has quit [*.net *.split]
Merv has quit [*.net *.split]
tormen_ has quit [*.net *.split]
srax has quit [*.net *.split]
hrk has quit [*.net *.split]
mbrock has quit [*.net *.split]
Drup has quit [*.net *.split]
k1000 has quit [*.net *.split]
adi_____ has quit [*.net *.split]
JSharp has quit [*.net *.split]
trevorriles has quit [*.net *.split]
rgrinberg has quit [*.net *.split]
cbarrett has quit [*.net *.split]
metadave has quit [*.net *.split]
jimmyrcom_ has quit [Remote host closed the connection]
<seangrove>
Hey all, I'm having a tough time generating a .mli file from a .ml file - All the modules seem to be unbound. Is there a way to take a working "compile-this-to-native" command and turn it into "print the inferred interface"?
tane has joined #ocaml
<kakadu_>
YOu can try to find that makes .cmo from .ml and replace -c by -i
<kakadu_>
find a copmmand*
M-martinklepsch has quit [Ping timeout: 255 seconds]
<malina>
nothing like a good copper
aspiwack[m] has quit [Ping timeout: 240 seconds]
hdurer[m] has quit [Ping timeout: 240 seconds]
<malina>
and the Dutch certainly would adopt it it to copmand
timclassic has quit [Ping timeout: 258 seconds]
yetanotherion[m] has quit [Ping timeout: 264 seconds]
<malina>
if they could
<malina>
,)
Bluddy[m] has quit [Ping timeout: 240 seconds]
M-ErkkiSeppl has quit [Ping timeout: 246 seconds]
copy[m] has quit [Ping timeout: 246 seconds]
samrat[m] has quit [Ping timeout: 246 seconds]
srenatus[m] has quit [Ping timeout: 246 seconds]
M-jimt has quit [Ping timeout: 258 seconds]
MercurialAlchemi has quit [Ping timeout: 260 seconds]
isaachodes[m] has quit [Ping timeout: 255 seconds]
andreas_ has joined #ocaml
Armael has joined #ocaml
Merv has joined #ocaml
srax has joined #ocaml
mbrock has joined #ocaml
adi_____ has joined #ocaml
rgrinberg has joined #ocaml
JSharp has joined #ocaml
metadave has joined #ocaml
cbarrett has joined #ocaml
FreeBirdLjj has joined #ocaml
dhil has quit [Quit: Quit]
tokomak has joined #ocaml
<octachron>
seangrove, ocamlbuild has a path_to_file.inferred.mli target, otherwise you should build your target, locate your build directory and use ocamlfind ocamlc -package ocamlfind_package_list -I-I build_dirs -i impl.ml
dhil has joined #ocaml
FreeBirdLjj has quit [Remote host closed the connection]
slash^ has quit [Read error: Connection reset by peer]
peterpp_ has joined #ocaml
dmbaturin has quit [Ping timeout: 268 seconds]
gasche has left #ocaml ["ERC (IRC client for Emacs 24.5.1)"]
dmbaturin has joined #ocaml
MercurialAlchemi has joined #ocaml
Sim_n has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 240 seconds]
Simn has quit [Ping timeout: 255 seconds]
morfeen has joined #ocaml
tane has quit [Quit: Leaving]
morfeen has quit [Ping timeout: 240 seconds]
fantasticsid has quit [Ping timeout: 240 seconds]
argent_smith has quit [Quit: Leaving.]
seangrove has quit [Ping timeout: 260 seconds]
average is now known as depressedaverage
Sim_n has quit [Quit: Leaving]
Bluddy[m] has joined #ocaml
srenatus[m] has joined #ocaml
M-jimt has joined #ocaml
sam_ has joined #ocaml
sam_ has quit [Ping timeout: 240 seconds]
dreadedfrog has joined #ocaml
samrat[m] has joined #ocaml
regnat[m] has joined #ocaml
M-martinklepsch has joined #ocaml
M-ErkkiSeppl has joined #ocaml
orbifx[m] has joined #ocaml
hdurer[m] has joined #ocaml
timclassic has joined #ocaml
smondet[m] has joined #ocaml
aspiwack[m] has joined #ocaml
yetanotherion[m] has joined #ocaml
copy[m] has joined #ocaml
isaachodes[m] has joined #ocaml
mengu has quit [Remote host closed the connection]
ousado has quit [Remote host closed the connection]
cbot has quit [Ping timeout: 240 seconds]
<peterpp_>
I'm working on a project with lwt and have begun using a programming style in which I often pass mutable state to multiple simultaneous lwt threads
sam_ has joined #ocaml
seangrove has joined #ocaml
<peterpp_>
I'm trying to figure out if this is a bad idea
<peterpp_>
it seems to be completely at odds with the functional paradigm
fantasticsid has joined #ocaml
andreas_ has quit [Quit: Connection closed for inactivity]
<hannes>
peterpp_: lwt also provides you with other means of sharing data -- such as lwt_mvar (which are actor-style mailboxes)... there's no real need for using mutable state :)
<peterpp_>
hannes, thanks... I'll look into those
cbot_ has quit [Ping timeout: 240 seconds]
pierpa has joined #ocaml
<hannes>
peterpp_: but I also sometimes end up with some mutable state which I share between lwt tasks (e.g. a list of all connected clients, each contained in their own lwt task, but the list is a globally mutable reference)
<peterpp_>
hannes, do you happen to have something on github that I could look at?
<orbifx[m]>
ShalokShalom_: the qt part is a bit outdated
<orbifx[m]>
peterpp_: you can also use streams to distributed values around
<peterpp_>
hannes, I was looking for some lwt code to learn from but didn't come up with much
<peterpp_>
orbitz, ah thanks for making me aware of that
<sam_>
still struggling to figure out how to debug why my qcheck test never finishes...
<sam_>
it seems like ounit2 is supposed to have some kinda logging facilities, and i assume that anything printed to stdout while running a test gets captured. but when I use QCheck.Test.make I don't get access to the test_ctxt in my ('a -> bool) function so I can't figure out how to even attempt to log anything.
pierpa has quit [*.net *.split]
<peterpp_>
ls
<orbifx[m]>
sam_, you need to get someone who has used these tools. You might get further asking on the list or forus
<orbifx[m]>
forum*
tokomak has quit [Remote host closed the connection]