cantstanya has quit [Remote host closed the connection]
qrvpzvb has quit [Ping timeout: 260 seconds]
cantstanya has joined #ocaml
browncodes has quit [Remote host closed the connection]
tennix has joined #ocaml
mrvn has quit [Ping timeout: 250 seconds]
rgrinberg1 has joined #ocaml
rgrinberg has quit [Ping timeout: 240 seconds]
Algebr has quit [Remote host closed the connection]
mrvn has joined #ocaml
nullcatxxx_ has joined #ocaml
raphaelss has quit [Ping timeout: 265 seconds]
browncodes has joined #ocaml
ontologiae has quit [Ping timeout: 256 seconds]
swgillespie has joined #ocaml
AltGr has joined #ocaml
palomer has quit [Quit: palomer]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
toomuchtvrotsurb has quit [Remote host closed the connection]
toomuchtvrotsurb has joined #ocaml
echo-area has quit [Remote host closed the connection]
empyrean has quit [Remote host closed the connection]
toomuchtvrotsurb has quit [Remote host closed the connection]
AltGr has left #ocaml [#ocaml]
dsheets has quit [Ping timeout: 246 seconds]
bernardo1pc is now known as bernardofpc
nullcatxxx_ has joined #ocaml
palomer has joined #ocaml
cdidd has quit [Ping timeout: 265 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
damason has quit [Ping timeout: 246 seconds]
damason has joined #ocaml
SomeDamnBody has joined #ocaml
<SomeDamnBody>
is there a way to use opam to view the documentation of a package?
<Drup>
not yet
<Drup>
until we have that, either 1) go to the package's website 2) find the .mli in " opam config var tyxml:lib" 3) find the .mli in the source
jeffmo has joined #ocaml
igoroliveira has quit [Quit: Connection closed for inactivity]
jeffmo has quit [Read error: Connection reset by peer]
jeffmo has joined #ocaml
lolisa has joined #ocaml
scriptdevil has quit [Ping timeout: 240 seconds]
echo-area has joined #ocaml
palomer has quit [Quit: palomer]
__uu__ has joined #ocaml
scriptdevil has joined #ocaml
__uu__ has quit []
__uu__ has joined #ocaml
palomer has joined #ocaml
tmtwd has joined #ocaml
raphaelss has joined #ocaml
darkf has joined #ocaml
palomer_ has joined #ocaml
palomer has quit [Ping timeout: 256 seconds]
palomer_ is now known as palomer
mac10688 has quit [Ping timeout: 252 seconds]
struk|desk has quit [Remote host closed the connection]
struk|desk has joined #ocaml
psy_ has quit [Ping timeout: 240 seconds]
scriptdevil has quit [Ping timeout: 250 seconds]
damason has quit [Ping timeout: 250 seconds]
damason has joined #ocaml
pyon has quit [Quit: Seasons will pass you byyy... I get uuup... I get dooown...]
mrhmouse has left #ocaml ["WeeChat 1.3"]
cdidd has joined #ocaml
pyon has joined #ocaml
kushal has joined #ocaml
luzie has quit [Quit: WeeChat 1.3-dev]
luzie has joined #ocaml
ob_ has joined #ocaml
luzie has quit [Remote host closed the connection]
MercurialAlchemi has joined #ocaml
luzie has joined #ocaml
rgrinberg1 has quit [Ping timeout: 240 seconds]
rgrinberg1 has joined #ocaml
TallerGhostWalt has quit [Ping timeout: 240 seconds]
TallerGhostWalt has joined #ocaml
ob_ has quit [Quit: Leaving]
damason has quit [Ping timeout: 246 seconds]
damason has joined #ocaml
psy_ has joined #ocaml
psy_ has quit [Max SendQ exceeded]
nullcatxxx_ has quit [Ping timeout: 240 seconds]
psy_ has joined #ocaml
toomuchtvrotsurb has joined #ocaml
swgillespie has joined #ocaml
MercurialAlchemi has quit [Ping timeout: 264 seconds]
tmtwd has quit [Ping timeout: 260 seconds]
govg has quit [Ping timeout: 256 seconds]
psy_ has quit [Ping timeout: 255 seconds]
SomeDamnBody has quit [Ping timeout: 246 seconds]
SomeDamnBody has joined #ocaml
palomer has quit [Quit: palomer]
palomer has joined #ocaml
Radvendii has quit [Ping timeout: 246 seconds]
Sorella has quit [Quit: Connection closed for inactivity]
shinnya has quit [Ping timeout: 244 seconds]
toomuchtvrotsurb has quit [Remote host closed the connection]
nullcatxxx_ has joined #ocaml
Haudegen has quit [Ping timeout: 244 seconds]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SomeDamnBody has quit [Ping timeout: 268 seconds]
Haudegen has joined #ocaml
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tmtwd has joined #ocaml
nullcatxxx_ has joined #ocaml
palomer has quit [Quit: palomer]
tmtwd has quit [Quit: Leaving]
palomer has joined #ocaml
seliopou_ has quit [Ping timeout: 240 seconds]
seliopou has joined #ocaml
ygrek has quit [Ping timeout: 246 seconds]
palomer has quit [Quit: palomer]
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ibor has quit [Quit: Leaving.]
BitPuffin|osx has quit [Ping timeout: 272 seconds]
psy_ has joined #ocaml
psy_ has quit [Max SendQ exceeded]
psy_ has joined #ocaml
lolisa has quit [Quit: meow]
<flux>
very nice, I hadn't even heard of http://assimp.sourceforge.net/ and now def` has written bindings for it, why don't you advertise it here.. :-) (assimp = "Open Source Asset Import Library", reads various 3d model formats)
<flux>
STEP support would be fun as well but perhaps too non-gamey for Assimp to support ;)
<ia0>
but then, how do I disambiguate the use of () from type unit from my new type?
scriptdevil has quit [Remote host closed the connection]
scriptdevil has joined #ocaml
<ia0>
also, is there a way to name the product elements of sum type?
<ia0>
like: type t = A of {a1:t1; a2:t2} | B of {b1:t3}
<boegel>
what's the best way to check whether a particular version of an OCaml package is available?
<sgnb>
ia0: not at the moment, but there will be soon
<ia0>
great
<boegel>
it seems like "opam list <name>.<version>" blatently ignores the version?
<boegel>
adrien: so, there's someone I should poke? who?
<sgnb>
ia0: about (), you won't be able to use type unit anymore if you bind it to another variant
<sgnb>
I mean, you won't be able to use () to denotate type unit... of course, you'll still be able to use e.g. the return value of ignore
<sgnb>
oh, Pervasives.(()) works
<sgnb>
of course it works, forget about that
<adrien>
boegel: errr, I actuallly meant "the former" ='(
<boegel>
adrien: ah, ok
<boegel>
hmm, wait, ignore my rant, the version is not ignored at all
qrvpzvb has joined #ocaml
<ia0>
sgnb: for me it doesn't work, when I write 'let x = Pervasives.(())' I get 'The constructor () expects 2 argument(s), but is applied here to 0 argument(s)'
<ia0>
I have to use 'let x : unit = Pervasives.(())'
<ia0>
which is actually the same as 'let x : unit = ()'
<ia0>
I use ocaml 4.02.1
octachron has joined #ocaml
jonludlam has joined #ocaml
<sgnb>
ia0: by "works", I mean "Pervasives.(())" is the same as "()" since Pervasives doesn't define it...
<sgnb>
so it won't get you unit if you redefined () to something else
<ia0>
ok thanks!
<ia0>
btw, does anyone see a use for redefining ()?
<ia0>
I don't understand why it is possible to do so
ely-se has quit [Quit: leaving]
dmbaturin has quit [Ping timeout: 260 seconds]
Kakadu has joined #ocaml
<flux>
well, maybe if you have some very magic EDSL where you want to have expressions that look like OCaml but aren't really
toolslive has joined #ocaml
<sgnb>
ia0: I think it is just a parsing trick for OCaml itself
<flux>
much like true and false are valid constructor names as well
<sgnb>
and land, lor and co can be infix operators
<ia0>
ok I see
qrvpzvb has quit [Ping timeout: 260 seconds]
<toolslive>
seen the /* xxxx */ trick to fake infix operators ?
<flux>
no, but I can imagine it.. has someone actually used it?-)
ob_ has joined #ocaml
<flux>
the precedency must be nice..
<flux>
and with flambda it might even be fast!
<flux>
matrix /* matrix_mul_matrix */ matrix
<octachron>
There is also confusing questions like: Which one amongst (), [], ::, true, false can be used as constructor in a type definition?
<toolslive>
I once discovered :: is not a real operator
<flux>
I wonder why not.
<flux>
actually scratch that
<flux>
I mean why isn't it a real constructor
<octachron>
it is a constructor "type t = ::" is "valid"
<flux>
hmm, I suppose because it starts with an operator character
<flux>
oh silly me, I tried with (::)
<toolslive>
well, that does not exist
<flux>
I thought that didn't use to work..
<flux>
but type a = :: of int * int let b = 4::2 works ok
madroach has quit [Ping timeout: 264 seconds]
ely-se has joined #ocaml
<flux>
so it seems only [] cannot be used a a constructor, probably because it's more complicated in the syntax
dmbaturin has joined #ocaml
rgrinberg1 has joined #ocaml
madroach has joined #ocaml
<flux>
if you define tyep a = :: of int * int list, you only get to make integer lists anymore :-), even with the ['f'] -syntax
<ely-se>
nice
<flux>
so I guess there's only one thing missing, the ability to define an empty list constructor
Ravana has joined #ocaml
<octachron>
flux: I am not sure why [] cannot be used as constructor, it might be to explicitely disallow the redefinition of the list type ( there is pull request for that on github)
rgrinberg1 has quit [Ping timeout: 268 seconds]
mort___ has quit [Quit: Leaving.]
ontologiae has joined #ocaml
<flux>
octachron, I think it's because [] is a special case of the syntax [1; 2; 3], so it doesn't 'naturally' expand to a plain [] constructor..
<boegel>
installed-version is empty, so none of these are actually installed, ok...
<boegel>
ah, I need to use opam list -i :)
octachron has quit [Quit: Leaving]
sbrouf has joined #ocaml
<toolslive>
hm, I'm getting EINVAL from Lwt's select engine.....
madroach has quit [Quit: leaving]
madroach has joined #ocaml
ely-se has quit [Quit: leaving]
AltGr has left #ocaml [#ocaml]
mort___ has joined #ocaml
dmbaturin has quit [Ping timeout: 250 seconds]
ely-se has joined #ocaml
psy_ has quit [Ping timeout: 264 seconds]
kushal has quit [Quit: Leaving]
ely-se has quit [Quit: leaving]
darkf_ is now known as darkf
frawgie__ has joined #ocaml
Haudegen has quit [Ping timeout: 260 seconds]
ontologiae has quit [Ping timeout: 264 seconds]
keen___________0 has quit [Read error: Connection reset by peer]
ontologiae has joined #ocaml
keen___________0 has joined #ocaml
dsheets has joined #ocaml
willy_ has joined #ocaml
wwilly has quit [Ping timeout: 255 seconds]
ely-se has joined #ocaml
damason has joined #ocaml
<boegel>
does anyone know what this means when trying to run "opam pin -yv add batteries 2.3.1": Invalid_argument("select not implemented")
dsheets has quit [Ping timeout: 244 seconds]
AltGr has joined #ocaml
Haudegen has joined #ocaml
echo-area has quit [Remote host closed the connection]
tennix has quit [Quit: WeeChat 1.3]
AltGr has left #ocaml [#ocaml]
mort___ has quit [Quit: Leaving.]
ely-se has quit [Quit: lunch]
jonludlam has quit [Ping timeout: 252 seconds]
ggole has joined #ocaml
<boegel>
does "opam pin add batteries 2.3.1" imply "opam install batteries.2.3.1" in case it's not installed yet?
sepp2k has joined #ocaml
octachron has joined #ocaml
ibor has joined #ocaml
<flux>
toolslive, are you closing fds with Unix.close?
<toolslive>
yes...
<boegel>
hmm, has anyone seen this after installing findlib: ocamlfind: cannot execute binary file
<boegel>
the file command says ocamlfind is 'data'
<flux>
toolslive, so probably if Lwt ends up doing 'select' on such an fd it would produce that error
psy_ has joined #ocaml
rgrinberg1 has joined #ocaml
_andre has joined #ocaml
rgrinberg1 has quit [Ping timeout: 264 seconds]
ibor has quit [Ping timeout: 256 seconds]
<boegel>
well, I should say ocamlfind, not findlib, but fine
ob_ has left #ocaml ["Leaving"]
ely-se has joined #ocaml
scriptdevil has quit [Ping timeout: 250 seconds]
jonludlam has joined #ocaml
LnL has quit [Ping timeout: 260 seconds]
__uu__ has quit []
scriptdevil has joined #ocaml
damason has quit [Quit: No Ping reply in 180 seconds.]
damason has joined #ocaml
__uu__ has joined #ocaml
ely-se has quit [Quit: leaving]
ely-se has joined #ocaml
sbrouf has quit [Ping timeout: 268 seconds]
scriptdevil has quit [Ping timeout: 240 seconds]
<sgnb>
boegel: how did you install ocamlfind?
<boegel>
sgnb: opam install ocamlfind.1.5.5
<boegel>
(and then "opam pin ocamlfind 1.5.5", but I don't think that matters)
<sgnb>
boegel: which OS?
<boegel>
sgnb: Scientific Linux 6 (so RHEL6, basically)
<sgnb>
boegel: did you try "ocamlrun ocamlfind"?
<boegel>
I didn't, but I can
<boegel>
sgnb: is that how ocamlfind is supposed to be run? (and if so, why isn't 'opam install' running it like that when trying to install 'batteries')?
mort___ has joined #ocaml
<sgnb>
boegel: no, it's not how it is supposed to be run but... does it work?
<boegel>
sgnb: Fatal error: the file '.../opam/system/bin/ocamlfind' is not a bytecode executable file
<flux>
boegel, I suppose you're not out of disk space? or I/O errors?
mort___ has quit [Quit: Leaving.]
mort___ has joined #ocaml
mort___ has quit [Ping timeout: 240 seconds]
echo-area has joined #ocaml
dsheets has joined #ocaml
<mrvn>
is your home mounted noexec?
<flux>
wouldn't it say permissions denied or some such
<mrvn>
no idea what ocamlfind makes out of the error to execute it
<mrvn>
and if it s native code and not bytecode then ocamlrun won't help
<boegel>
mrvn: I'm not installing in my home dir, and the dir I'm installing to is definitely *not* noexe (since I install all my software there)
<mrvn>
file .../opam/system/bin/ocamlfind
<boegel>
flux: no sign of I/O errors, plenty of disk space available (over 1TB)
<flux>
boegel, have you tried looking at the file?
<boegel>
the fact that the Linux 'file' command marks it as 'data' rather than 'binary executable' is fishy too
<boegel>
flux: binary gibberish :)
<flux>
objinfo?
<mrvn>
purge and reinstall
rgrinberg1 has joined #ocaml
<boegel>
mrvn: tried this multiple times already, I keep hitting the same issue
<flux>
actually never mind, I was thinking objdump and it doesn't work on executables anyway :)
<boegel>
flux: well, it's not an executable (file would tell me)
<flux>
boegel, does your ocaml compiler produce working executables?
ely-se has quit [Quit: leaving]
<boegel>
flux: I'll try a hello world OCaml, hold on
echo-area has quit [Remote host closed the connection]
<toolslive>
rhel6 ? people use that?
echo-area has joined #ocaml
<boegel>
flux: works fine:
<boegel>
bash-4.1$ ocamlc -o hello hello.ml
<boegel>
bash-4.1$ ./hello
<boegel>
Hello world!
<boegel>
toolslive: I'm trying to get OCaml to work on a HPC cluster (RHEL is quite common on supercomputers)
<flux>
boegel, ocamlopt
<boegel>
bash-4.1$ ocamlopt -o hello hello.ml
<boegel>
bash-4.1$ ./hello
<boegel>
Hello world!
<toolslive>
I just spent some time on centos7 and basically, redhat is a dying flavour.
<mrvn>
boegel: less and less common
<flux>
so I guess the question now is how is the ocamlfind binary produced
<toolslive>
it hurt like hell
<boegel>
mrvn: because of RHEL7? :P
<boegel>
flux: let me copy-paste the output of "opam install ocamlfind"
<mrvn>
boegel: because of Ubuntu/Debian
rgrinberg1 has quit [Ping timeout: 240 seconds]
<Drup>
boegel: add -v
<boegel>
(not here, in a pastebin or somesuch)
<boegel>
Drup: to what? ocamlopt?
<flux>
boegel, does it include the compilation commands?
<Drup>
to opam install
<flux>
boegel, also: which ocamlopt
ely-se has joined #ocaml
* boegel
adds -v to opam install
<flux>
boegel, ie. are you using the same ocaml compiler as opam
<boegel>
flux: pretty sure I am, there's none available elsewhere
<flux>
so which ocamlopt says.. ?
<boegel>
flux: ocamlopt -v just prints version info, doesn't print verbose info
<boegel>
waw, this is getting interesting, dafuq is going on :)
<boegel>
you can see where ocamlfind is being installed if you look for bin/ocamlfind
echo-area has quit [Remote host closed the connection]
ely-se has quit [Quit: leaving]
echo-area has joined #ocaml
<boegel>
it seems like it was copied from ocamlfind_opt, which was created with "ocamlopt -I +compiler-libs -o ocamlfind_opt findlib.cmxa unix.cmxa ocaml_args.cmx frontend.cmx"
<boegel>
anything fishy there?
<boegel>
is the -I supposed to consume a value (like with gcc, etc.)? if so, the "-I +compiler-libs" looks weird...
jonludlam has joined #ocaml
<sgnb>
"-I +compiler-libs" is normal
tennix has joined #ocaml
BitPuffin has joined #ocaml
BitPuffin has quit [Remote host closed the connection]
BitPuffin has joined #ocaml
ely-se has joined #ocaml
<toolslive>
@Boegel: if you're interested, I have a dockerfile that documents development setup for ocaml in a centos7
<sgnb>
still, I don't see what's wrong with what he did
<flux>
boegel, are the intermediate files still there? are you able to reproduce those steps manually and get a broken binary?-)
ely-se has quit [Quit: leaving]
damason has quit [Ping timeout: 255 seconds]
rgrinberg1 has joined #ocaml
<sgnb>
boegel: do you get anything useful by running "strings" on your ocamlfind file?
<sgnb>
boegel: or, can you put it online somewhere?
<boegel>
flux: I can make sure the intermediate files are there
<flux>
the file I'm getting is literally 1280592 binary zeroes :)
<boegel>
flux: well, that may explain it :P
<boegel>
flux: how did you check that?
<sgnb>
me too (only zeroes)
<flux>
ie. hd
<sgnb>
boegel: hexdump -C
<flux>
but not sure if RHEL has it
<flux>
it certainly has 'od'
<boegel>
hah, ok
<flux>
od -td1
pyon has quit [Quit: fix config]
<boegel>
ok, so now what? :P
<flux>
what filesystem are you suing?
<flux>
or using, maybe not suing yet
ely-se has joined #ocaml
<boegel>
I feel like I'm on to something very stupid, or very interesting
<flux>
or is there network involved..
<boegel>
flux: GPFS
<flux>
ok, so something untypical :)
<flux>
you should check if other files created by the installation process are also zeroes
<boegel>
flux: it is a networked filesystem, but it's working fine for the rest
pyon has joined #ocaml
<flux>
and if the intermediate files are zeroes
<boegel>
flux: let me try installing on a non-GPFS filesystem first :)
tennix has quit [Ping timeout: 240 seconds]
<flux>
if the intermediate files are not zeroes you should yes try that :)
<flux>
oh, your files were probably all on gpfs
<boegel>
flux: sure, yeah, but I can try using /tmp, which is local disk (ext4)
<boegel>
how sensitive is OCaml to the environment in which you're running?
<sgnb>
it is not supposed to be that sensitive
ely-se has quit [Client Quit]
ontologiae has quit [Read error: Connection reset by peer]
<sgnb>
boegel: did try your hello world example from above on the same FS?
ely-se has joined #ocaml
ontologiae has joined #ocaml
<boegel>
I'm not sure it's something in the environment
tennix has joined #ocaml
tennix has quit [Changing host]
tennix has joined #ocaml
<boegel>
sgnb: hmm, no, that was in a different filesystem (NFS mounted over GPFS)
<boegel>
sgnb: but I can try it, hold on
ely-se has quit [Client Quit]
rpg has joined #ocaml
ely-se has joined #ocaml
<boegel>
sgnb: hello world works just fine on the GPFS filesystem
tennix has quit [Ping timeout: 260 seconds]
<sgnb>
boegel: your GPFS is rooted at /user, right?
ontologiae has quit [Quit: WeeChat 1.0]
<sgnb>
boegel: what about findlib's other files? are they zeroes too?
<boegel>
sgnb: well, not really, some of /user is NFS mounted
<boegel>
sgnb: /user/scratch is all GPFS mounted
mort___ has joined #ocaml
<boegel>
installing in /tmp works fine, ocamlfind is a nice binary file then
<boegel>
dafuq :)
<sgnb>
is /user/scratchdelcatty GPFS too?
<boegel>
never seen this before, and I literally built close to 1000 different software projects in that directory
<boegel>
sgnb: yeah, that's GPFS
<sgnb>
and what's in .../software/OCaml/4.02.3-foss-2015b/opam/system/lib/findlib ?
<sgnb>
I mean, are the files there zeroes?
<boegel>
sgnb: only one is: findlib.cmxs
<sgnb>
hum... interesting...
<boegel>
the other are recognizable by 'file' as non-data stuff
<flux>
file should really have a magic detection for 'starts and ends with zeroes and there are zeroes in the middle, likeely all zeroes' :-)
<boegel>
flux: hehe
<sgnb>
so only ELF files get corrupted
yac has joined #ocaml
<boegel>
flux: it does say 'data', and all zeroes is one (very specfic) kind of data, I guess ;)
<yac>
What does the minor version mean? Is there a versioning / release engineering policy?
<Drup>
yac: in the compiler ? It's usually for bugfixes
<boegel>
sgnb: seems so, yeah, the other files there are ASCII, ar archive, or recognized as Objective Caml stuff
sh0t has quit [Ping timeout: 240 seconds]
<yac>
I am trying to figure out possible potentional breakage when upgrading
Sorella has joined #ocaml
<Drup>
yac: it's clearly marked in the changelog
<sgnb>
boegel: compile your hello program in /user/scratchdelcatty, then copy the binary to /user/scratch
<yac>
I just found it :)
<yac>
thanks
<sgnb>
(trying to reproduce what findlib is doing)
<boegel>
sgnb: well, /user/scratchdelcatty and /user/scratch are one and the same (/user/scratch is just a symlink)
<sgnb>
nonetheless
<boegel>
sgnb: works just fine after copying (I would be *very* surprised if it didn't)
<boegel>
sgnb: but, the corruption happens before the cp, no? i.e. when findlib.cmxs is generated?
<sgnb>
well, I am already *very* surprised of the whole situation
<boegel>
sgnb: which makes it interesting :)
sh0t has joined #ocaml
tennix has joined #ocaml
amirmc has joined #ocaml
<sgnb>
boegel: did you try installing findlib manually? (i.e. without opam)
<sgnb>
(try to be as similar as possible as the opam setup)
saml has quit [Read error: Connection reset by peer]
<sgnb>
boegel: or, run opam with option -b
<sgnb>
(opam install -b ocamlfind)
<boegel>
sgnb: have to run, will follow up on this later, thanks for your help so far!
empyrean has joined #ocaml
toomuchtvrotsurb has joined #ocaml
psy_ has quit [Ping timeout: 272 seconds]
ely-se has quit [Quit: leaving]
raphaelsss has joined #ocaml
raphaelss has quit [Ping timeout: 240 seconds]
nullcatxxx_ has joined #ocaml
ely-se has joined #ocaml
madroach has quit [Read error: Connection reset by peer]
madroach has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
MercurialAlchemi has joined #ocaml
mort___ has quit [Quit: Leaving.]
kushal has quit [Quit: Leaving]
slash^ has joined #ocaml
nullcatxxx_ has joined #ocaml
raphaelsss has quit [Ping timeout: 246 seconds]
ely-se has quit [Quit: leaving]
toomuchtvrotsurb has quit [Remote host closed the connection]
LnL has joined #ocaml
<boegel>
sgnb: I tried setting $OPAMKEEPBUILDDIR, but it seems like it chucked the build dir for ocamlfind anyway...
sh0t has quit [Ping timeout: 244 seconds]
AlexRussia has quit [Quit: WeeChat 1.4-dev]
empyrean has quit [Ping timeout: 272 seconds]
amirmc has quit [Quit: Leaving.]
AlexRussia has joined #ocaml
dario2 has joined #ocaml
psy_ has joined #ocaml
<icicled>
is there a way to bring up docs for a function in emacs?
psy_ has quit [Max SendQ exceeded]
<icicled>
or jump to a library's cmi at least
<dario2>
Hallo everyone! (Hopefully) quick question: when using ppx_deriving.show, how does one prevent the generated "show" function from line-breaking at 80 columns?
<icicled>
I've got tuareg & merlin setup fyi
<Drup>
dario2: Format.pp_set_margin
psy_ has joined #ocaml
<dario2>
Thanks Drup!
<dario2>
Major wishlist for RWO v2: add a chapter about the Format module.
<dario2>
All the documentation I've found seems to assume users are already familiar with the module!
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Drup>
that is .. a very common issue
<Drup>
Format is tricky to document, because you can use it at a lot of complexity level
<toolslive>
merlin still makes my emacs hang from time to time.
<dario2>
Incidentally, Drup, which formatter should I pass as the first argument of Format.pp_set_margin?
<Drup>
depends, where are you printing ?
<dario2>
stdout
<Drup>
if it's on stdout, then Format.std_formatter
<dario2>
To be more precise, I'm doing something like Printf.printf "here is %s\n" (M.show x)
rpg has quit [Ping timeout: 244 seconds]
<Drup>
You should not do that
nullcatxxx_ has joined #ocaml
<Drup>
Format.printf "Here is%a\n" M.show x
<Drup>
it's much better
Tekilla has joined #ocaml
<Drup>
M.pp
<Drup>
It will ensure proper indentation
<dario2>
See, this is why we need documentation on the Format module... :-)
<Drup>
There is documentation, what we lack is tutorial
<dario2>
Yes, I meant introductory documentation.
cdidd has quit [Remote host closed the connection]
<dario2>
APIDOC is useful if you already know the principles
cdidd has joined #ocaml
mort___ has joined #ocaml
darkf has quit [Quit: Leaving]
ygrek has joined #ocaml
orbifx has quit [Ping timeout: 256 seconds]
<qrvpzvb>
What is Tuareg?
dario2 has quit [Quit: Konversation terminated!]
dhil has joined #ocaml
<Drup>
qrvpzvb: the ocaml emacs mode
palomer has joined #ocaml
<boegel>
does anyone know of a way to make opam use a different build directory than <prefix_of_ocaml_instalation>opam/system/build? sgnb?
rgrinberg1 has quit [Ping timeout: 252 seconds]
orbifx has joined #ocaml
ygrek_ has joined #ocaml
tennix has quit [Ping timeout: 246 seconds]
<toolslive>
opam init --help
ely-se has joined #ocaml
ygrek has quit [Ping timeout: 256 seconds]
octachron has quit [Quit: Leaving]
icicled has left #ocaml ["Leaving"]
rgrinberg1 has joined #ocaml
jwatzman|work has joined #ocaml
<palomer>
hey guys
<palomer>
when I do @@deriving show to show values that contain strings with japanese characters, it mangles the japanese characters
<palomer>
stuff like \227\129\139\227\129\132\227\129\149\227\129\164
ely-se has quit [Quit: Leaving]
<flux>
you mean when you use toplevel?
<flux>
because it does quoting to all characters it doesn't think is ASCII
<flux>
simple example: "ä"
BitPuffin has left #ocaml ["Using Circe, the loveliest of all IRC clients"]
<palomer>
I’m not using toplevel
<flux>
well, 'show' probably tries to output in form that's compatible with toplevel
tennix has joined #ocaml
<flux>
in other words, it doesn't produce binary characters and it doesn't know about unicode
<smondet>
palomer: derving show makes strings that should be reparsable by ocamlc
<flux>
maybe there's a way to make it understand utf8
<palomer>
actually, I just figured it out, I have to use {…; answer:string [@printer fun fmt -> fprintf fmt “%s”]}
toomuchtvrotsurb has joined #ocaml
<smondet>
palomer: yes, it's just that the default is "%S" (capital S → quote strings)
<palomer>
even better! type p_string = string [@printer fun fmt -> fprintf fmt "%s"] [@@deriving show]
<palomer>
why would you want it to be repareable by ocaml?
<flux>
well, why not?
<flux>
wouldn't it be annoying to have a show for a binary blob and then get your terminal all crapped up?-)
<flux>
btw, you can probably just write: [@printer output_string]
<palomer>
ahh, good point
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<palomer>
rror: This expression has type Format.formatter
<palomer>
but an expression was expected of type out_channel.
<palomer>
if I try to use output_string
<flux>
ah, I didn't realize it was Format.fprintf instead of Printf.fprintf
<flux>
well, if there isn't a similar function available in Format, you can define it yourself..
<Drup>
pp_print_string
<flux>
pp_print_text seems suitable
tennix has quit [Ping timeout: 268 seconds]
<Drup>
pp_print_text is different, it allows to break line at spaces
jonludlam has quit [Ping timeout: 272 seconds]
psy_ has quit [Read error: Connection reset by peer]
<palomer>
man, wouldn’t it be cool if you could do something like [@@show] exp to convert exp to a string
<palomer>
right now I’m doing type foo = (* type of exp*) … show_foo exp
<flux>
install the implicit modules branch
<flux>
and witness the magic of 'show exp'
<flux>
..I don't recall how it handles records, though :)
psy has joined #ocaml
<flux>
.."modular implicits" that is
<palomer>
is it going to get merged into trunk?
<palomer>
(or is it HEAD now?)
<flux>
maybe, probably, not yet in HEAD
<palomer>
hey flux, I’ve known you for like 7 years now
<palomer>
and I still don’t know what you do
<flux>
I program computers!
nullcatxxx_ has joined #ocaml
<palomer>
so you’re a developer?
<flux>
yes
<palomer>
in ocaml?
<flux>
no
<flux>
used to do some ocaml as well, though, but that company folded since :)
<palomer>
so you code for a living then you code in ocaml as a hobby
<palomer>
?
<flux>
yes
<palomer>
are you in the bay area?
englishm has joined #ocaml
<flux>
no.. in fact, you may determine from my irc host that I'm in Finland :)
<flux>
oh, I don't have a hostname at the moment
<Drup>
(from the real name too, but I guess it's only obvious for europeans)
<flux>
reverses seem to be difficult in v6.. ;)
<palomer>
does it bother you to use another programming language in your normal job?
<flux>
no.. I use a language that's suitable for the task
<Drup>
(double k + ä is not such a common combination :p)
<flux>
though perhaps some tasks would be quite suitable for ocaml, but then become unsuitable due to others not knowing it
ely-se has joined #ocaml
<palomer>
from a technical perspective, what things are ocaml not suitable for?
<flux>
well, in particular projects that already have a large body of non-ocaml-code
<flux>
then projects that would target more exotic platforms
<flux>
then if you want to build a large web service using various other interfaces and do it fast, the ecosystem just isn't there
mariano_ has joined #ocaml
<flux>
on the other hand, ocaml is mostly suitable for any task, but it may take more time than other environments with much more existing modules
<englishm>
Hi. I'm trying to automate the setup of a development environment based on the installation instructions for Real World OCaml, but somehow I wound up without `corebuild` in my $PATH - where does that come from?
Kakadu has quit [Quit: Page closed]
<dmbaturin>
englishm: You've installed Core from opam?
<englishm>
dmbaturin: Yes.
<dmbaturin>
palomer: If you mean not suitable as in cannot handle the task even theoretically, bare metal/embedded and hard RT are are such tasks, because of mandatory garbage collection.
<englishm>
Oh, it's possible I don't have the right ocaml selected, I suppose.
<dmbaturin>
I wonder why it suggests to install ocaml from source rather than install opam from binaries and then do opam switch.
<Drup>
(19:02:06) flux: then if you want to build a large web service using various other interfaces and do it fast, the ecosystem just isn't there <- what's lacking ?
<palomer>
yeah, that’s a good question, what’s missing?
<flux>
drup, I don't know really, but it seems colleagues doing such things have a lot of stuff to build on ;)
<palomer>
you have colleagues working in ocaml?
raphaelss has joined #ocaml
<flux>
no.
<Drup>
I know there are lot's of things in java, but I'm wondering which one are really missing
<flux>
and in patricular if I were to choose to use eliom for an ocaml project.. I would feed quite dubious about the chance that I would get stuck and with no way forward
<flux>
which really sucks if there's a deadline.
<flux>
that's how Obj.magic gets into your code.. ;)
<Drup>
stuck against what ?
<flux>
say I end up in a type- or interface-relatede problem with Eliom, as I have while developing a web service
<Drup>
(we have our own escape hooks too :p)
<englishm>
Ah, I just had to `eval $(opam config env)`. Thanks for the prompt, dmbaturin.
Kakadu has joined #ocaml
<palomer>
I just redid the websocket part of my nodejs server. I didn’t want to use something heavy weight like eliom, so I built it on top of ocaml-websocket
<dmbaturin>
englishm: Yeah, I was just going to ask if you eval'd the env. :)
<flux>
if I just use 'raw html' I can always solve that kind of problem by looking how the HTML is specified and write that
<flux>
I probably have great many tools to check if my HTML is any good; some built into browsers
<flux>
it doesn't help that the type query functionality doesn't quite work with Eliom..
<Drup>
huum
<palomer>
yeah, I copy/paste html all the time like there’s no tomorrow
<Drup>
(I should release a special purpose version of ocp-browser which works nicely with eliom)
<palomer>
does eliom let me do that?
<flux>
in practice it would be hard for me to sell this to my colleagues if they can bump into problems I'm not able to solve with ease, given how much ocaml experience I have comparatively ;).
<Drup>
palomer: There is a syntax extension which let you write html but it's ... unsatisfying. I would need time to rewrite it
<Drup>
(and I don't have that time)
<dmbaturin>
I find the concept of typed HTML quite appealing, but I have similar concerns about lack of "escape hatch" if something doesn't fit into that model.
<Drup>
that concert is common and I'm always a bit confused about it
tennix has joined #ocaml
<Drup>
I mean, there is literally a function "Html5.M.Unsafe.coerce_elt "
<Drup>
concern*
<Drup>
This is a non-issue, you just pop the function to tell tyxml to shut up and go forward and it will work
<Drup>
(and you open a bug report :D)
<Drup>
A more important issue, I think, about tyxml is the error messages
<Drup>
they are .. slightly unfriendly
<dmbaturin>
Maybe I should try eliom for the web interface to that thing I'm working on.
<palomer>
how well does eliom work with websockets?
<dmbaturin>
I also need to find something that provides val coerce : 'a programmer -> ocaml programmer ;)
<Drup>
palomer: it doesn't use websockets and it says nothing about them :p
<palomer>
if it doesn’t use websockets, how are you supposed to implement something like a chat room?
<Drup>
The abstractions present in eliom use comets
<Drup>
(It might be hard to believe, but people were building chat rooms before websockets :D)
<palomer>
ah, through polling
<Drup>
arguably it should be rewritten with websockets ...
<Drup>
as I said, time.
jwatzman|work has quit [Quit: jwatzman|work]
<dmbaturin>
palomer: The alternative way to implement a chat room is the F5 button. ;)
toomuchtvrotsurb has quit [Ping timeout: 240 seconds]
palomer has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nullcatxxx_ has joined #ocaml
__uu___ has joined #ocaml
__uu__ has quit [Ping timeout: 240 seconds]
<palomer>
anyone here used ocaml-websocket?
<dmbaturin>
palomer: Not me, but I want to hear about your experience with it.
<palomer>
it’s really low level, which I like
<palomer>
but it doesn’t have a webserver, which I don’t like
<palomer>
so it’s not possible for me to get the session information
<palomer>
since I have to have a different webserver and websocket server
<palomer>
also, there doesn’t seem to be a way to find out if a user disconnected unexpedtly (control C)
<dmbaturin>
This doesn't sound fun.
<palomer>
I’m emailing the owner to see what he has to say
toomuchtvrotsurb has joined #ocaml
<Drup>
isn't that vbmithr ? ^
<palomer>
vbmithr: hey! are you here?
<palomer>
lol, I didn’t know he’s in the channel
tennix has joined #ocaml
<palomer>
that being said, ocaml-websocket is a gazillion times nicer to use than socket.io
<palomer>
for nodejs
Kakadu has quit [Quit: Page closed]
palomer_ has joined #ocaml
palomer has quit [Ping timeout: 265 seconds]
palomer_ is now known as palomer
rgrinberg1 has quit [Ping timeout: 252 seconds]
dhil has quit [Quit: Leaving]
JuggleTux has joined #ocaml
orbifx2 has joined #ocaml
nullcatxxx_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
psy has quit [Ping timeout: 264 seconds]
orbifx has quit [Ping timeout: 264 seconds]
rgrinberg1 has joined #ocaml
mort___ has joined #ocaml
englishm has quit []
lobo has joined #ocaml
palomer has quit [Quit: palomer]
psy has joined #ocaml
psy has quit [Max SendQ exceeded]
psy has joined #ocaml
palomer has joined #ocaml
psy has quit [Ping timeout: 246 seconds]
mort___ has left #ocaml [#ocaml]
dsheets has joined #ocaml
Kakadu has joined #ocaml
orbifx2 has quit [Ping timeout: 264 seconds]
psy has joined #ocaml
<qrvpzvb>
Not really OCaml specific, but in select(3), what are errorfds/exceptfds? The Linux manpage just says "are watched for exceptions".
<adrien>
qrvpzvb: when error conditions happen
<adrien>
for instance a socket was shut down by the other side
<adrien>
(note that close() from another thread of a file descriptor in use for a select() call is undefined [ and it leads to crappy results in practice ])
<adrien>
night
psy has quit [Ping timeout: 250 seconds]
<qrvpzvb>
adrien: No problem, I'm not using threads. Thanks!
tnguyen has quit [Read error: Connection reset by peer]
slash^ has quit [Read error: Connection reset by peer]
tnguyen has joined #ocaml
palomer has quit [Quit: palomer]
cross has quit [Quit: leaving]
cross has joined #ocaml
moei has quit [Quit: Leaving...]
mariano_ has quit [Remote host closed the connection]
sbrouf has quit [Ping timeout: 250 seconds]
ousado_ has joined #ocaml
ousado has quit [Ping timeout: 240 seconds]
Tekilla has quit [Quit: Quitte]
empyrean has joined #ocaml
empyrean has quit [Remote host closed the connection]
empyrean has joined #ocaml
joelr1 has joined #ocaml
<joelr1>
Moin! Any OMake specialists here?
ousado_ is now known as ousado
ousado has quit [Changing host]
ousado has joined #ocaml
ibor has joined #ocaml
JuggleTux has quit [Quit: leaving]
<smondet>
joelr1: I've done a bunch of omake hacks over the years, but as usual, just ask your question
<joelr1>
Well… I want to split the source code of a library over several subdirectories but I can’t figure out how to collect the value of a library from subdirs and propagate it up into the parent OMakefile
<joelr1>
smondet: ^
<joelr1>
Say, I have FILES[] += … in the OMakefile of each subdir. I want to the top-level FILES to have all the files from subdirs but that doesn’t happen
raphaelss has quit [Ping timeout: 260 seconds]
<joelr1>
smondet: It looks like omake expects me to build libraries in each subdir but I’m just using the subdirs to organize the source code.
<smondet>
joelr1: I think OMake is going “top-down” in the directory tree and you want it the other way around
<joelr1>
smondet: Well, is there a way for me to have my cake and eat it too?
<joelr1>
smondet: I really want to organize source files into diferent directories, without having to build libraries in each one
<smondet>
joelr1: I always use only one OMakeroot file and do ervrything inside there, so what I would do is have only `FILES [] = dir1/.. dir1/ ... dir2/... ` from the top-level
<joelr1>
smondet: I tried doing that but it told me it couldn’t find one file or another. Let me try that again...
<smondet>
if you are using the omake functions to build ocaml stuff like `OCamlLibrary` have the lib spread over different directory may break some assumptions there (which means that you're on your own to make stuff actually build)
<smondet>
s/have/having/
<joelr1>
smondet: Do not know how to build "src/ext/l1.o" required for ...
<joelr1>
I do have src/ext/l1.ml
<joelr1>
This is all in src/ and I do have FILES[] = ext/l1 ...
<joelr1>
smondet: This is the exact message: Do not know how to build "src/ext/l1.o" required for "src/xxx.cmxa"
<smondet>
joelr1: what I would try to do is use `vmount` to to put back all the $(FILES) in a same temp directoy (like _build/my-lib/) and then use `OCamlLibrary` inside there
<joelr1>
smondet: So you would use vmount to put src/ext in src?
palomer has joined #ocaml
<smondet>
joelr1: yes, but in a `_build/` directory to have it more “hygienic”
<joelr1>
smondet: I don’t think it’s the equality test since I can insert a println in there and it prints. It’s that vmount that’s not working for some reason
mac10688 has joined #ocaml
<Soni>
thanks
ibor has joined #ocaml
Kakadu has quit [Remote host closed the connection]
rpg_ has joined #ocaml
rpg_ has quit [Client Quit]
<Drup>
I'm trying to build something, I'm bumping into 1) the value restriction 2) the lack of HKT 3) the lack of module implicits
<dmbaturin>
Since it's the first time it's offered, no one can tell you if it's any good yet. ;)
<Drup>
Hum, it's more oriented towards beginners in programming.
BitPuffin|osx has joined #ocaml
rgrinberg1 has quit [Ping timeout: 260 seconds]
<smondet>
joelr1: (maybe) the `vmount` function creates an omake target that “builds” the _build directory, so being already there makes it not run again (?)
<dmbaturin>
Drup: If haskell seems appropriate for the task, why not use it? Using haskell does not necessarily make you a bad person.
<smondet>
Drup: look at Coq then :-p
damason has joined #ocaml
<Drup>
dmbaturin: because It's in the context of numerous other ocaml tools
<dmbaturin>
Ah, I see. For some reason I thought you are making something (relatively) from scratch.
shinnya has joined #ocaml
<Drup>
playing with tyxml + ocaml-d3
<Drup>
(good luck making tyxml in haskell, with no poly variant and no functor)
<Drup>
I discovered a new type error, wee !
jonludlam has quit [Ping timeout: 264 seconds]
<joelr1>
smondet: Thanks for your help!
joelr1 has quit [Quit: joelr1]
shinnya has quit [Ping timeout: 256 seconds]
_andre has quit [Quit: leaving]
<Drup>
dmbaturin: actually, what I really want is 1ML
Rebelion has joined #ocaml
ibor has quit [Read error: Connection reset by peer]
shinnya has joined #ocaml
destrius_ has quit [Remote host closed the connection]
orbifx has quit [Quit: WeeChat 1.3]
shinnya has quit [Ping timeout: 265 seconds]
Algebr has quit [Remote host closed the connection]