<mrvn>
What file does #use "topfind" look for exactly? .cmo?
<dsheets>
looks for the file that i print the first line of
<dsheets>
only does this in a script not the interactive toplevel
<mrvn>
are you sure? starce it
<mrvn>
.oO(Why do you use opam as root?)
<dsheets>
mrvn, in a VM
<dsheets>
running system tests and need root
lordkryss_ has joined #ocaml
lordkryss has quit [Ping timeout: 240 seconds]
divyanshu has joined #ocaml
<dsheets>
mrvn, it looks like it checks a path relative to the compiler install
pngl has joined #ocaml
<dsheets>
still tracking down the bit of the toplevel source that makes the determination
<BitPuffin>
hm, | Sexp.List [Sexp.Atom name; query] ->... - I know that it's matching name and query, which both must be of type Sexp, but the Sexp.Atom part confuses me
<BitPuffin>
ah wait
<BitPuffin>
it's an algebraic type
<pngl>
Trying out the demo.ml file for ocamlgraph, I get "reference to undefined global `Graphics'. I compiled with ocamlfind ocamlc -o demo -package graphics,ocamlgraph demo.ml
<flux>
does local opening workin that context? | Sexp.(List [Atom name; query) -> ..
<BitPuffin>
does it mean that both name and query is an Atom?
<def`>
-linkpkg
<flux>
if it doesn't, it should :-)
<def`>
pngl: add -linkpkg flag
<flux>
(I think it may not, as it's not an expression..)
rgrinberg has quit [Quit: Leaving.]
<pngl>
def`: thanks!
<BitPuffin>
ah right, I think you anly have to specify it for one of the list elements or something
<BitPuffin>
then it can infer that the rest will be the same because lists are homogenous
<orbitz>
dsheets: It's a bit rainy in <my location>, but it's a holiday tomorrow hopefuly it will be nicer out then
<flux>
actually it may not be able to infer that
<flux>
but there have been some enhancements to it, so maybe it does nowadays.
<BitPuffin>
I remember reading something like that somewhere in real world ocaml
jbrown has quit [Remote host closed the connection]
pngl has quit [Quit: Page closed]
jbrown has joined #ocaml
<mrvn>
Given the type of one element it infers the type of the list. That then goes back fixing the type of all elements of the list.
claudiuc has quit [Remote host closed the connection]
<flux>
cool, just tried that it indeed does work in 4.01
<flux>
but | ModuleName.(pattern) doesn't work
<flux>
it would be nice if it worked as well.
<mrvn>
that seems like a bug
<mrvn>
Use ModuleName.(match ... )
eikke_ has joined #ocaml
pyon has quit [Remote host closed the connection]
penglingbo has quit [Ping timeout: 240 seconds]
pyon has joined #ocaml
<BitPuffin>
don't forget to report the bug if it isn't already reported
<dsheets>
mrvn, the ultimate problem was that .ocamlinit is not loaded for non-interactive interpretation. bug-worthy? sensical?
<mrvn>
if you want it then load it
<mrvn>
personally I never write ocaml scripts. I just compile the code.
<dsheets>
right, i'd like the same behavior as the user sees, though which would require 10+ lines at the top of scripts
<mrvn>
and when my .ocamlinit contains open Core then your code fails
<dsheets>
mrvn, true, i think something analogous to bashrc/bash_profile would be nice
<dsheets>
there are some environmental configs and some interactive use configs that are separate
rand000 has joined #ocaml
rand000 has quit [Read error: Connection reset by peer]
rand000 has joined #ocaml
termos has left #ocaml [#ocaml]
Nuki has joined #ocaml
sagotch has joined #ocaml
waern has quit [Ping timeout: 240 seconds]
maattdd has joined #ocaml
waern has joined #ocaml
thomasga has quit [Quit: Leaving.]
maattdd has quit [Ping timeout: 264 seconds]
<adrien>
that'd probably kill most "ocaml" scripts
<dsheets>
separating interactive and non-interactive configuration?
<adrien_oww>
having a configuration for non-interactive
<dsheets>
adrien_oww, why? it would do things like add search paths
<adrien_oww>
build scripts :)
<flux>
I suppose there could be another init file, but .ocamlinit is sucha good name :)
<dsheets>
yeah, if the user has a crazy config, i'd like my build script to automatically adapt
<adrien_oww>
yeah, crappy name :)
<adrien_oww>
#use "~/foo_config.ml" at the top of your scripts or add a couple lines of ocamlfind-related stuff
shinnya has joined #ocaml
<flux>
but such files cannot be compiled anymore.
<dsheets>
eh, don't care, already using #use "topfind" and #require "unix"
<flux>
(also does ~ expansion really work there?)
thomasga has joined #ocaml
<dsheets>
just needed topfind in the search path... requires Topdir.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH") but this is v opam specific
<dsheets>
in general, they'll have topfind in a sane place but this is still not great
<ousado>
is there some document about the ocaml calling conventions?
<adrien_oww>
flux: no, ~ doesn't work, but it could
MasseR has joined #ocaml
<dsheets>
i'd rather introduce a non-interactive config script than allow ~ and risk competing de facto configs with terrible names
NoNNaN has joined #ocaml
<adrien_oww>
I'd first stop reading it in $PWD
divyanshu has quit [Quit: Computer has gone to sleep.]
<dsheets>
.ocamlinit or #use "path"?
<dsheets>
.ocamlinit from $PWD seems a bit crazy
<flux>
it's very nice, I often have very different .ocamlinits for different projects
<dsheets>
flux, couldn't you simulate this behavior from a global .ocamlinit loader, though?
<flux>
maybe, although I'm not certain how. but probably with the help of the Toplevel module
<adrien>
chris2: look a bit deeper, you'll find what is calling it
<adrien>
if it's being called on int or some simple types, there's a way to make it quite a lot faster
<chris2>
i use maps on strings, ints and (int*int) as well as my own ADT
<chris2>
ok, just annotate the type there?
Nuki has quit [Ping timeout: 240 seconds]
<adrien_oww>
that's mostly the idea
tane has joined #ocaml
Nahra has joined #ocaml
sagotch has joined #ocaml
chris2_ has joined #ocaml
chris2 has quit [Ping timeout: 264 seconds]
shinnya has quit [Ping timeout: 255 seconds]
Nuki has joined #ocaml
ebzzry_ is now known as ebzzry
yomimono has joined #ocaml
maattdd has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
waern has quit [Ping timeout: 245 seconds]
mcclurmc has joined #ocaml
<chris2_>
just to get that right, if i write compare : adt -> adt -> int, ocaml will still use compare_val and not specialize a version for this kind of adt?
jludlam is now known as jonludlam
<whitequark>
you could check the disassembly
<chris2_>
asm doesnt change
chris2_ is now known as chris2
ygrek has joined #ocaml
mcclurmc has quit [Remote host closed the connection]
waern has joined #ocaml
mcclurmc has joined #ocaml
<adrien_oww>
chris2: if your "compare" is what is in scope, it will use it
<chris2>
compare is pervasives compare
<chris2>
but i guess if i write that out as ocaml code, it wont be faster
<chris2>
but the run time is ok now
mcclurmc has quit [Ping timeout: 264 seconds]
<adrien_oww>
on an adt it might not be faster
<adrien_oww>
on ints and the like, yeah
Nuki has quit [Ping timeout: 245 seconds]
Nuki has joined #ocaml
yomimono has quit [Ping timeout: 240 seconds]
troydm has quit [Quit: What is hope? That all of your wishes and all of your dreams come true? (C) Rau Le Creuset]
troydm has joined #ocaml
Nuki has quit [Remote host closed the connection]
divyanshu has quit [Ping timeout: 272 seconds]
divyanshu has joined #ocaml
tane has quit [Quit: Verlassend]
BitPuffin has quit [Ping timeout: 240 seconds]
philtor_ has joined #ocaml
cago has left #ocaml [#ocaml]
Nahra has quit [Ping timeout: 240 seconds]
ontologiae has joined #ocaml
sagotch has quit [Remote host closed the connection]
tlockney_away is now known as tlockney
glurky has joined #ocaml
Nuki has joined #ocaml
philtor_ has quit [Ping timeout: 272 seconds]
Nahra` has joined #ocaml
Nahra` has quit [Remote host closed the connection]
Nahra has joined #ocaml
manizzle has quit [Ping timeout: 244 seconds]
yomimono has joined #ocaml
<chris2>
adrien_oww: yeah, specializing int*int manually helped a bit
<whitequark>
chris2: out of curiosity, what is it you're making?
<chris2>
whitequark: a model checker
<whitequark>
OSS?
<chris2>
not yet
<chris2>
it's my master thesis
<chris2>
but once it's ready for publication, sure
Arsenik has joined #ocaml
ontologiae has quit [Ping timeout: 255 seconds]
eikke_ has quit [Ping timeout: 255 seconds]
<Drup>
whitequark: good :D
<whitequark>
almost finished in fact
<Drup>
including the option and optcomp and pa_lwt_log ?
<whitequark>
oh, not pa_lwt_log
<whitequark>
optcomp?
<Drup>
I think optcomp is used somwhere in lwt
<whitequark>
um, well, it is, but it's not user-exported
<whitequark>
I may in fact rewrite optcomp tomorrow
<whitequark>
it's pretty simple
<Drup>
I'm not sure we want that, retro compat issues :/
<whitequark>
oh?
<whitequark>
it could be done in a way compatible with 4.01
<Drup>
how ?
<whitequark>
if OPTCOMP.(...) instead of if%optcomp
<Drup>
but not with earlier than that
<whitequark>
yes
<Drup>
(and meh.)
<whitequark>
it's not my call to make
<Drup>
yeah
mcclurmc has joined #ocaml
<whitequark>
O_o
<whitequark>
wtf is with -dsource
Nuki has quit [Ping timeout: 240 seconds]
<whitequark>
&lwt let _ = raise Not_found
Hannibal_Smith has joined #ocaml
maattdd has quit [Read error: No route to host]
racycle has joined #ocaml
Nuki has joined #ocaml
<chris2>
ok, specializing List.assoc helped a lot
pminten has joined #ocaml
<companion_cube>
do you use big association lists?
yomimono has quit [Ping timeout: 272 seconds]
<chris2>
not very big, but many of them
<chris2>
i'd use maps, but i need multimaps for some step
<dsheets>
kmicinski, opam update and use a patched switch
<dsheets>
which switch are you on now?
<kmicinski>
so I opam update'd, what about a patched switch?
<kmicinski>
I was on 4.00.1, switching to 4.01.0
<dsheets>
cool, just do that and it should work
<kmicinski>
alright
<kmicinski>
if I can trouble you, when I opam switch, I see a list, system is 4.00.1, while switch is 4.01.0, can I make them equal?
<kmicinski>
(i.e., can I set system to be 4.01.0)
lostman has quit [Quit: Connection closed for inactivity]
<dsheets>
kmicinski, system just means whatever was previously installed. what effect are you after? having the same packages?
<dsheets>
you could upgrade your system compiler outside of opam in whatever way you originally got it but it would not have the clang patch automatically applied
<dsheets>
you could apply it yourself, also
<kmicinski>
ah, sorry, I answered my own question, opem switch reinstall system worked
<dsheets>
kmicinski, really? the error went away?
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
claudiuc_ has joined #ocaml
seanmcl has joined #ocaml
kmicinski has quit [Quit: Lost terminal]
claudiuc has quit [Ping timeout: 240 seconds]
WraithM has quit [Quit: Lost terminal]
WraithM has joined #ocaml
ontologiae has joined #ocaml
tobiasBora has quit [Ping timeout: 240 seconds]
mcclurmc has quit [Ping timeout: 240 seconds]
rand000 has quit [Ping timeout: 264 seconds]
seanmcl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tobiasBora has joined #ocaml
mcclurmc has joined #ocaml
Arsenik has quit [Remote host closed the connection]
tobiasBora has quit [Ping timeout: 272 seconds]
Thooms has quit [Ping timeout: 240 seconds]
* adrien
hits Damien Doligez with a stick
<adrien>
no deleting of my *~ files!
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
rgrinberg has joined #ocaml
rgrinberg has quit [Client Quit]
hhugo has quit [Quit: Leaving.]
olauzon has quit [Quit: olauzon]
axiles has quit [Remote host closed the connection]
divyanshu has quit [Quit: Computer has gone to sleep.]
rgrinberg has joined #ocaml
Kakadu has quit [Quit: Konversation terminated!]
ontologiae has quit [Ping timeout: 244 seconds]
eikke_ has quit [Ping timeout: 264 seconds]
aggelos_ has joined #ocaml
oriba has joined #ocaml
hhugo has joined #ocaml
eikke_ has joined #ocaml
Thooms has joined #ocaml
ggole has quit []
divyanshu has joined #ocaml
hhugo has quit [Quit: Leaving.]
yomimono has quit [Ping timeout: 264 seconds]
rand000 has joined #ocaml
avsm has joined #ocaml
Eyyub has quit [Ping timeout: 244 seconds]
dapz has joined #ocaml
ontologiae has joined #ocaml
slash^ has quit [Read error: Connection reset by peer]
ollehar has joined #ocaml
<jpdeplaix>
gasche: having a .merlin file for ocaml is quite easy, but merlin seems not to like the fact that the cmi format has changed so it's impossible to use :/
<whitequark>
there's updated merlin
<whitequark>
4.02 branch
Eyyub has joined #ocaml
hhugo has joined #ocaml
Simn has quit [Quit: Leaving]
<Drup>
waa, parsing/pprintast.ml is such a mess X_x
<Drup>
it's a huge maze of indirection, redefinition and "| _ -> assert false"
<Drup>
well, not that huge, 1300 line only.
Eyyub has quit [Ping timeout: 264 seconds]
divyanshu has quit [Quit: Computer has gone to sleep.]
philtor_ has joined #ocaml
BitPuffin has quit [Ping timeout: 255 seconds]
araujo has quit [Ping timeout: 240 seconds]
Eyyub has joined #ocaml
araujo has joined #ocaml
Thooms has quit [Quit: WeeChat 0.3.8]
Eyyub has quit [Ping timeout: 264 seconds]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shinnya has joined #ocaml
mcclurmc has quit [Ping timeout: 244 seconds]
mcclurmc has joined #ocaml
dapz has joined #ocaml
ollehar has quit [Ping timeout: 264 seconds]
Eyyub has joined #ocaml
<whitequark>
Drup: updated PR
<whitequark>
should be finished now.
<Drup>
nic
<Drup>
nice*
<whitequark>
there's switches too; -no-debug and -no-log
<Drup>
marvelous :3
<whitequark>
I made [%lwt e] equivalent to try_lwt e
<whitequark>
this takes care of [%lwt raise] as well
<Drup>
huum, ok
<whitequark>
also I'm thinking of bringing back >>, because, while it was equivalent to >>= fun _ -> in pa_lwt, it could be made to add backtrace info
<whitequark>
which would be great
<Drup>
isn't >>= already enough for backtrace info ?
<whitequark>
nope
<whitequark>
you need Lwt.backtrace_bind
<whitequark>
and a raise that is lexically right next to it
alpounet has quit [Remote host closed the connection]
alpounet has joined #ocaml
<Drup>
you could define >>= as backtrace_bind if no -no-debug
<whitequark>
writing >>= fun () -> is really damn annoying
<Drup>
sure, I was just arguing on the ">> could be convenient for backtraces"
<whitequark>
also, properly redefining >>= would require me to look at the environment
<whitequark>
I can imagine someone using another monad library inside e.g. a local open
<whitequark>
though it somewhat applies to >> too
<Drup>
oh sure, yes
<Drup>
pwah
<Drup>
forget about that
Nahra has quit [Remote host closed the connection]
<Drup>
(I'm looking for the piece of code doing the pretty printing in the REPL and can't find it >_<)
<whitequark>
in the REPL?
<Drup>
ocaml
alpounet has quit [Ping timeout: 240 seconds]
Nuki has quit [Ping timeout: 240 seconds]
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jao has joined #ocaml
jao has quit [Changing host]
jao has joined #ocaml
araujo has quit [Ping timeout: 255 seconds]
dapz has joined #ocaml
<whitequark>
Warning 8: this pattern-matching is not exhaustive.
<whitequark>
Here is an example of a value that is not matched:
<whitequark>
*extension*
<whitequark>
lol what ?
asmanur has quit [Remote host closed the connection]
<whitequark>
oh. open types
darkf has joined #ocaml
dsheets has quit [Ping timeout: 255 seconds]
madroach has quit [Ping timeout: 252 seconds]
madroach has joined #ocaml
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
NoNNaN has quit [Remote host closed the connection]
NoNNaN has joined #ocaml
avsm has quit [Quit: Leaving.]
philtor_ has quit [Ping timeout: 264 seconds]
jwatzman|work has quit [Quit: jwatzman|work]
rgrinberg has quit [Quit: Leaving.]
rgrinberg has joined #ocaml
<whitequark>
Drup: pls review
<Drup>
will do ;)
<whitequark>
does ocsigen-buildbot just react to a comment with "merge" in it?
jwatzman|work has joined #ocaml
jwatzman|work has quit [Changing host]
jwatzman|work has joined #ocaml
<Drup>
I'm surprised it's enabled on lwt
<Drup>
hnrgrgr ?
<whitequark>
what?
<whitequark>
oh, it's a nickname, not an odd interjection